ConsoleDoc
by Emanuel Zephir · 01/29/2002 (9:52 am) · 11 comments
Download Code File
This is a modification of ConsoleDoc which corrects a few bugs that would cause it to crash when running it on a fairly new source tree.
As in nohbdy's original release, the source with the fixes is included.
I hope this helps someone.
This is a modification of ConsoleDoc which corrects a few bugs that would cause it to crash when running it on a fairly new source tree.
As in nohbdy's original release, the source with the fixes is included.
I hope this helps someone.
#3
05/06/2002 (8:15 pm)
Thanks! This is really going to help me!
#4
05/27/2002 (10:28 pm)
Excellent! Exactly what i needed!
#5
05/29/2002 (9:13 pm)
I havent had the opportunity to play with ConsoleDoc for a while, but I will attempt to take care of the empty line issue and re upload the files with a new version number after I get some more feedback.
#6
Thanks!
Owen
06/01/2002 (4:35 am)
An excellant tool, helped answer some questions immediately after its use.Thanks!
Owen
#7
When I investigated the problem, the program crashed when it tried to actually scan the defintions of the addField method.
After a brief look through of the file, I found nothing that would add to the console documentation. So I added a little patch job.
Here's the code I changed:
In ScanDocs.cpp under the definition of ScanDir I changed this :
to this:
Hopefully someone else will find this helpful.
- Eric
02/18/2005 (11:38 am)
When I tried to use this program on the latest release of the engine the program crashed when it started to scan consoleObject.cc.When I investigated the problem, the program crashed when it tried to actually scan the defintions of the addField method.
After a brief look through of the file, I found nothing that would add to the console documentation. So I added a little patch job.
Here's the code I changed:
In ScanDocs.cpp under the definition of ScanDir I changed this :
while(FindNextFile(hFind,&FindFileData))
if (FindFileData.cFileName[0] != '.')
if (FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
ScanDir(newPath,FindFileData.cFileName);
SetCurrentDirectory(newPath);
}
else
ScanFile(FindFileData.cFileName);to this:
while(FindNextFile(hFind,&FindFileData))
if (FindFileData.cFileName[0] != '.')
if (FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
ScanDir(newPath,FindFileData.cFileName);
SetCurrentDirectory(newPath);
}
else
{
//ScanLine inside ScanFile will crash when it "scans" the actual definitions of the function addField, etc.
//No worries though, there isn't any thing console related possible to add to the documentation :)
if(strcmp(FindFileData.cFileName, "consoleObject.cc") != 0 && strcmp(FindFileData.cFileName, "consoleObject.h") != 0)
ScanFile(FindFileData.cFileName);
}Hopefully someone else will find this helpful.
- Eric
#9
It would say:
(I've add 'using namespace std;' to the main.h) to avoid tons of errors.
Any ideas?
09/23/2005 (11:14 pm)
Not able to complie under VC++ 2003.It would say:
....\main.cpp(51) : error C2039: 'nocreate' : is not a member of 'std::basic_ios<_Elem,_Traits>'
(I've add 'using namespace std;' to the main.h) to avoid tons of errors.
Any ideas?
#10
#include
//#include deprecated
#include
//#include deprecated
#include
#include
#include
#include
#include
using namespace std;
--------etc
After doing that, I receive 10 errors tha looked like this:
ConDB.cpp(60): error C2664: 'ConDB::writeTXT' : cannot convert parameter 1 from 'std::ofstream' to 'std::ofstream'
Basically, what's happening here is that the output stream is NOT being passed by reference in the old code and the Microsoft compiler in VS/VC++ prior to 2003 just didn't care. Now in VC++ .NET 2003, it won't let you do that.
What worked for me was passing the output stream by reference...
In your header files, change this:
bool writeTXT(ofstream outFile);
to this:
bool writeTXT(ofstream& outFile);
In your CPP files, change this:
::writeTXT(ofstream outFile)
to this:
::writeTXT(ofstream& outFile)
So, for example, in ConEvent.cpp, my writeTXT function looks like this:
bool ConEvent::writeTXT(ofstream& outFile)
This compiled for me, and I'm testing it now...
01/26/2006 (8:16 pm)
Here's my main.cpp after "doing the right thing" and standardizing the includes:#include
//#include
#include
//#include
#include
#include
#include
#include
#include
using namespace std;
--------etc
After doing that, I receive 10 errors tha looked like this:
ConDB.cpp(60): error C2664: 'ConDB::writeTXT' : cannot convert parameter 1 from 'std::ofstream' to 'std::ofstream'
Basically, what's happening here is that the output stream is NOT being passed by reference in the old code and the Microsoft compiler in VS/VC++ prior to 2003 just didn't care. Now in VC++ .NET 2003, it won't let you do that.
What worked for me was passing the output stream by reference...
In your header files, change this:
bool writeTXT(ofstream outFile);
to this:
bool writeTXT(ofstream& outFile);
In your CPP files, change this:
::writeTXT(ofstream outFile)
to this:
::writeTXT(ofstream& outFile)
So, for example, in ConEvent.cpp, my writeTXT function looks like this:
bool ConEvent::writeTXT(ofstream& outFile)
This compiled for me, and I'm testing it now...
#11
12/31/2007 (6:24 pm)
does not work 
Torque Owner Jere Sanisalo