tPathToExecutable Class Reference

Class holding our best guess of the path to the binary executable. More...

Collaboration diagram for tPathToExecutable:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void Set (char const *defaultPath)
 sets a default path, for when we have no better idea
char const * Get () const

Private Attributes

tString path_


Detailed Description

Class holding our best guess of the path to the binary executable.

Definition at line 1368 of file tDirectories.cpp.


Member Function Documentation

void tPathToExecutable::Set ( char const *  defaultPath  )  [inline]

sets a default path, for when we have no better idea

Definition at line 1372 of file tDirectories.cpp.

References BINDIR, con, and PROGNAME.

Referenced by tDirectoriesCommandLineAnalyzer::DoInitialize().

01373     {
01374 #ifndef WIN32
01375 #ifdef ENABLE_BINRELOC
01376         // get path of executable
01377         char const * bestGuess = SELFPATH;
01378 #else // binreloc
01379         char const * bestGuess = BINDIR "/" PROGNAME;
01380 #endif// binreloc
01381 #else // win32
01382         char const * bestGuess = "./" PROGNAME;
01383 #endif// win32
01384 
01385 #ifndef ENABLE_BINRELOC
01386         // if the passed default path is a real path, let it override the best guess
01387         if ( strstr( defaultPath, "/" ) || strstr( defaultPath, "\\" ) )
01388             bestGuess = defaultPath;
01389         //            bestGuess = "./armagetronad-dedicated";
01390 #endif
01391 
01392         path_ = bestGuess;
01393 
01394 #ifdef DEBUG_PATH
01395         con << "path to executable: " << path_ << "\n";
01396 #endif
01397     }

Here is the caller graph for this function:

char const* tPathToExecutable::Get (  )  const [inline]

Definition at line 1400 of file tDirectories.cpp.

References tASSERT.

Referenced by FindDataPath(), and GenerateParentOfExecutable().

01401     {
01402         tASSERT( path_.Len() > 2 );
01403         return path_;
01404     }

Here is the caller graph for this function:


Member Data Documentation

tString tPathToExecutable::path_ [private]

Definition at line 1406 of file tDirectories.cpp.


The documentation for this class was generated from the following file:
Generated on Sat Mar 15 23:58:05 2008 for Armagetron Advanced by  doxygen 1.5.4