#include <fstream.h>
#include <iostream.h>
#include <string.h>
#include "vuString.h"
#include "vuDVector.h"
Include dependency graph for generateFactory.cpp:
Go to the source code of this file.
Typedefs | |
typedef vuDVector< vuString > | StringList |
Functions | |
void | writeComment (ofstream &fout, const StringList &list) |
Write a comment for the vuUtilityFactory implementation. | |
void | writeIncludes (ofstream &fout, const StringList &list) |
Writes the include statements for the factory. | |
void | writeCreate (ofstream &fout, const StringList &list) |
Implements the create() method of the vuUtilityFactory. | |
void | writeIsAvailable (ofstream &fout, const StringList &list) |
Implements the isAvailable() method of the vuUtiltyFactory. | |
void | writeListAvailable (ofstream &fout, const StringList &list) |
Implements the listAvailable() method of the vuUTiltiyFactory. | |
vuString | stripExt (const char *name) |
Strips any ".o" extensions from the name and returns the string. | |
const char * | stripPath (const char *name) |
Strips any directory paths from the name and returns the pointer. | |
int | main (int argc, char *argv[]) |
It gets passed the Utility names for the specific vuUtilityFactory implementation and makes a class that can create these utilities. Specifically, it makes the .cpp file that implements the vuUtilityFactory class interface. The names of the utilities are passed by the command line.
Syntax:
generateFactory Utility1 Utility2 ...
where "Utility#" is both the name of the Utility's header file, and of the class itself. The program will generate code to #include the header and to instantiate the class. This will be saved as vuUtilityFactory.cpp which then can be compiled with the GUI Tool program.
This program is meant to be run by the GUI Tool's makefile.
Definition in file generateFactory.cpp.
|
Definition at line 29 of file generateFactory.cpp. |
|
Definition at line 52 of file generateFactory.cpp. References vuDVector< T >::add(), StringList, stripExt(), writeComment(), writeCreate(), writeIncludes(), writeIsAvailable(), and writeListAvailable(). |
Here is the call graph for this function:
|
Strips any ".o" extensions from the name and returns the string.
Definition at line 187 of file generateFactory.cpp. References dword, vuString::getLength(), and vuString::substr(). Referenced by main(). |
Here is the call graph for this function:
|
Strips any directory paths from the name and returns the pointer.
Definition at line 202 of file generateFactory.cpp. Referenced by writeCreate(), writeIsAvailable(), and writeListAvailable(). |
|
Write a comment for the vuUtilityFactory implementation.
Definition at line 91 of file generateFactory.cpp. References dword, and vuDVector< T >::getLength(). Referenced by main(). |
Here is the call graph for this function:
|
Implements the create() method of the vuUtilityFactory.
Definition at line 120 of file generateFactory.cpp. References dword, vuDVector< T >::getLength(), and stripPath(). Referenced by main(). |
Here is the call graph for this function:
|
Writes the include statements for the factory.
Definition at line 105 of file generateFactory.cpp. References dword, and vuDVector< T >::getLength(). Referenced by main(). |
Here is the call graph for this function:
|
Implements the isAvailable() method of the vuUtiltyFactory.
Definition at line 145 of file generateFactory.cpp. References dword, vuDVector< T >::getLength(), and stripPath(). Referenced by main(). |
Here is the call graph for this function:
|
Implements the listAvailable() method of the vuUTiltiyFactory.
Definition at line 169 of file generateFactory.cpp. References dword, vuDVector< T >::getLength(), and stripPath(). Referenced by main(). |
Here is the call graph for this function: