Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

generateFactory.cpp File Reference

Implements a program which generates the vuUtilityFactory class implementation for the GUI Tool. More...

#include <fstream.h>
#include <iostream.h>
#include <string.h>
#include "vuString.h"
#include "vuDVector.h"

Include dependency graph for generateFactory.cpp:

Include dependency graph

Go to the source code of this file.

Typedefs

typedef vuDVector< vuStringStringList

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[])


Detailed Description

Implements a program which generates the vuUtilityFactory class implementation for the GUI Tool.

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.


Typedef Documentation

typedef vuDVector<vuString> StringList
 

Definition at line 29 of file generateFactory.cpp.


Function Documentation

int main int  argc,
char *  argv[]
 

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:

vuString stripExt const char *  name  ) 
 

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:

const char * stripPath const char *  name  ) 
 

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().

void writeComment ofstream &  fout,
const StringList list
 

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:

void writeCreate ofstream &  fout,
const StringList list
 

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:

void writeIncludes ofstream &  fout,
const StringList list
 

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:

void writeIsAvailable ofstream &  fout,
const StringList list
 

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:

void writeListAvailable ofstream &  fout,
const StringList list
 

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:


Generated on Wed Dec 15 21:20:41 2004 for vuVolume by  doxygen 1.3.9.1