|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biomage.tools.generate_cpp.CreateCPPFile
public class CreateCPPFile
Nested Class Summary | |
---|---|
class |
CreateCPPFile.AssignmentWriter
Description: Writes the Assignment operator to the CPP file. |
class |
CreateCPPFile.ClassDeclWriter
Description: Writes the class declaration out to the file. |
class |
CreateCPPFile.ConstructorBodyWriter
Description: Writes the copy constructor body needed into the CPP file. |
class |
CreateCPPFile.ConstructorWriter
Description: Writes the copy constructor header needed into the CPP file. |
class |
CreateCPPFile.DataMemberWriter
Description: Writes out the data members of the Class in the Header File. |
class |
CreateCPPFile.EquivalenceWriter
Description: Writes the =='s operator to the CPP file. |
class |
CreateCPPFile.GetAndSetWriter
Description: Writes the attribute set and get methods to the C++ header file. |
class |
CreateCPPFile.ImportWriter
Description: Writes the correct includes needed in the header files. |
class |
CreateCPPFile.IncludeWriter
Description: Writes the includes that we need into the CPP file. |
class |
CreateCPPFile.RemoveFromWriter
Description: Writes the RemoveFrom function to the CPP file. |
class |
CreateCPPFile.specificWriter
Description: An abstract class used to in conjuction with the LoopNames function that reads through all the attributes and assocations. |
class |
CreateCPPFile.TemplateWriter
Description: Writes the correct template needed in the header files. |
Field Summary | |
---|---|
protected static java.lang.String |
bodyIndent
|
protected static java.lang.String |
NEWLINE
Description: The environment specific new line. |
protected static java.lang.String |
oneIndent
Description: Size of indentation. |
Constructor Summary | |
---|---|
CreateCPPFile()
|
Method Summary | |
---|---|
java.lang.String |
conref(java.lang.String arg)
|
java.lang.String |
conrefVectorize(java.lang.String arg,
boolean packscope)
|
java.lang.String |
context()
|
java.lang.String |
dAgg(CreateFile.AssociationAttrInformation attr)
|
java.lang.String |
fixDataType(CreateFile.AttrInformation attr)
|
java.lang.String |
GetMeth(java.lang.String arg)
|
java.lang.String |
indent(int num)
|
java.lang.String |
initialCap(java.lang.String string)
|
void |
LoopNames(CreateFile creator,
CreateCPPFile.specificWriter swriter)
Description: Loops through the Attributes and Associations so that we can write based on context. |
java.lang.String |
packageName()
|
java.lang.String |
param(java.lang.String arg)
|
void |
printCPPClassFile(CreateFile creator,
java.lang.String fullOutputDir,
java.lang.String packagePath,
java.io.File header,
java.lang.String mainHeadersName,
java.lang.String guardName)
Description: From the parsed information creates the file itself. |
void |
printCPPClassImpl(CreateFile creator,
java.lang.String fullOutputDir,
java.lang.String packagePath,
java.io.File header,
java.lang.String mainHeadersName)
Description: This Method creates the CPP implementation file. |
java.lang.String |
quote(java.lang.String arg)
|
java.lang.String |
ref(java.lang.String arg)
|
java.lang.String |
Scope(java.lang.String arg)
|
java.lang.String |
SetMeth(java.lang.String arg)
|
java.lang.String |
smartPointer(CreateFile.AssociationAttrInformation attr,
boolean packagescope)
|
java.lang.String |
varit(java.lang.String arg)
|
java.lang.String |
vectorize(java.lang.String arg,
boolean packagescope)
|
protected static java.util.Vector |
wrapString(java.lang.String string,
int lineLength,
int firstLineOffset)
Description: Takes the input string and breaks it into appropriate sized pieces. |
void |
writeBigHeaders(java.lang.String fullOutputDir,
java.lang.String packageName,
java.io.File header,
java.util.Vector classes,
java.lang.String headerName,
java.lang.String guardName)
Description: Writes all the header files into a standard include so that we can access them in mass. |
protected void |
writeCPPClassDecl(CreateFile creator,
java.io.FileWriter writer)
Description: Writes the CPP class declaration out to the Header file. |
void |
writeCPPComment(CreateFile creator,
java.io.FileWriter writer,
java.lang.String comment,
int indentLevel,
java.lang.String keyWord,
boolean startComment,
boolean endComment)
Description: Takes the comment, formats it for C++ and outputs it. |
void |
writeCPPCommon(CreateFile creator,
java.io.FileWriter writer)
Description: Writes the common methods, common to all the CPP class Header files. |
void |
writeExceptionClass(java.lang.String fullOutputDir,
java.lang.String packageName,
java.io.File header,
java.io.File mageException,
java.lang.String guardName)
Description: Writes the exception class template out to a file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String NEWLINE
protected static java.lang.String oneIndent
protected static java.lang.String bodyIndent
Constructor Detail |
---|
public CreateCPPFile()
Method Detail |
---|
public void LoopNames(CreateFile creator, CreateCPPFile.specificWriter swriter) throws java.lang.Exception
creator:
- The CreateFile object returned from the list.swriter:
- The specific context to do the write.
java.lang.Exception
public void writeBigHeaders(java.lang.String fullOutputDir, java.lang.String packageName, java.io.File header, java.util.Vector classes, java.lang.String headerName, java.lang.String guardName) throws java.lang.Exception
fullOutputDir:
- the full path for the project.packageName:
- the name of the package specified from callerheader:
- The template file of header that begins every fileclasses:
- The list of all the classesheaderName:
- The name of the file to write.guardName:
- The name of the Guard string that appears at the
top of the all the header files.
java.lang.Exception
public void writeExceptionClass(java.lang.String fullOutputDir, java.lang.String packageName, java.io.File header, java.io.File mageException, java.lang.String guardName) throws java.lang.Exception
fullOutputDir:
- the full path for the project.packageName:
- the name of the package specified from callerheader:
- The template file of header that begins every filemageException:
- File for the MAGEException class.gaurdName:
- The name of the Guard string that appears at the
top of the all the header files.
java.lang.Exception
public void writeCPPComment(CreateFile creator, java.io.FileWriter writer, java.lang.String comment, int indentLevel, java.lang.String keyWord, boolean startComment, boolean endComment) throws java.lang.Exception
creator:
- The classFile usedwriter:
- used to write the comment to the file.comment:
- main string to write to the document.indentLevel:
- how far to indent.keyWord:
- JavaDoc keyword to prepend to the first line.startComment:
- Add lines to begin the comment.endComment:
- end the commetn.
java.lang.Exception
protected void writeCPPClassDecl(CreateFile creator, java.io.FileWriter writer) throws java.lang.Exception
creator:
- The CreateFile class used to extract what to writewriter:
- The file to write to.
java.lang.Exception
public void writeCPPCommon(CreateFile creator, java.io.FileWriter writer) throws java.lang.Exception
creator:
- The CreateFile class used to extract what to writewriter:
- The file to write to.
java.lang.Exception
public void printCPPClassFile(CreateFile creator, java.lang.String fullOutputDir, java.lang.String packagePath, java.io.File header, java.lang.String mainHeadersName, java.lang.String guardName) throws java.lang.Exception
fullOutputDir:
- the full path for the project.packagePath:
- the directory from which to start from.header:
- the preamble copyright and creation information.mainHeadersName:
- the name of header file that includes all
MAGE headers.guardName:
- The name of the Guard string that appears at the
top of the all the header files.
java.lang.Exception
public void printCPPClassImpl(CreateFile creator, java.lang.String fullOutputDir, java.lang.String packagePath, java.io.File header, java.lang.String mainHeadersName) throws java.lang.Exception
creator:
- The object the we are writing CPP for.fullOutputDir:
- the full path for the project.packagePath:
- the directory from which to start from.header:
- the preamble copyright and creation information.mainHeadersName:
- the name of the file containing a list of
all the MAGE headers ( luckily we don't
have to use it).
java.lang.Exception
public java.lang.String indent(int num) throws java.lang.Exception
java.lang.Exception
public java.lang.String initialCap(java.lang.String string) throws java.lang.Exception
java.lang.Exception
public java.lang.String GetMeth(java.lang.String arg) throws java.lang.Exception
java.lang.Exception
public java.lang.String SetMeth(java.lang.String arg) throws java.lang.Exception
java.lang.Exception
public java.lang.String Scope(java.lang.String arg)
public java.lang.String ref(java.lang.String arg)
public java.lang.String varit(java.lang.String arg) throws java.lang.Exception
java.lang.Exception
public java.lang.String conref(java.lang.String arg) throws java.lang.Exception
java.lang.Exception
public java.lang.String dAgg(CreateFile.AssociationAttrInformation attr) throws java.lang.Exception
java.lang.Exception
public java.lang.String vectorize(java.lang.String arg, boolean packagescope) throws java.lang.Exception
java.lang.Exception
public java.lang.String smartPointer(CreateFile.AssociationAttrInformation attr, boolean packagescope) throws java.lang.Exception
java.lang.Exception
public java.lang.String conrefVectorize(java.lang.String arg, boolean packscope) throws java.lang.Exception
java.lang.Exception
public java.lang.String fixDataType(CreateFile.AttrInformation attr) throws java.lang.Exception
java.lang.Exception
public java.lang.String param(java.lang.String arg)
public java.lang.String quote(java.lang.String arg)
public java.lang.String context()
public java.lang.String packageName()
protected static java.util.Vector wrapString(java.lang.String string, int lineLength, int firstLineOffset) throws java.lang.Exception
string:
- the string to wrap.lineLength:
- length to use as basis of wrapping.firstLineOffset:
- how much less room for the first line.
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |