C# Class FlatRedBall.Glue.Parsing.CodeWriter

Show file Open project: vchelaru/FlatRedBall

Public Methods

Method Description
CreateAndAddGeneratedFile ( IElement saveObject ) : void
CreateClass ( ClassProperties classProperties ) : ICodeBlock
CreateClass ( string namespaceName, string className, List members ) : ICodeBlock
CreateClass ( string namespaceName, string className, bool isPartial, List members, bool isStatic, List usingStatements, string>.Dictionary untypedMembers, ICodeBlock methodContent ) : ICodeBlock
CreateGeneratedFileIfNecessary ( IElement saveObject ) : void
EliminateCall ( string call, string &contents ) : void
GenerateAfterActivity ( ICodeBlock codeBlock, IElement saveObject ) : ICodeBlock
GenerateCode ( IElement element ) : void
GenerateLoadStaticContent ( ICodeBlock codeBlock, IElement saveObject ) : void
GeneratePostInitialize ( ICodeBlock codeBlock, IElement saveObject ) : void
InitializeStaticData ( string gameFileName, bool whetherToCall ) : void
IsOnOwnLayer ( IElement element ) : bool
MakeLocalizedIfNecessary ( NamedObjectSave namedObject, string variableName, object valueAsObject, string valueAsString, CustomVariable customVariable ) : string
SaveFileContents ( string fileContents, string fileName, bool tryAgain ) : bool
SetBaseClass ( string fileName, string baseClass ) : void
SetBaseClass ( string &fileContents, string baseClass, bool overwrite ) : void
SetBaseClass ( string fileName, string baseClass, bool overwrite, string &fileContents ) : void
SetBaseClass ( string fileName, string baseClass, string &fileContents ) : void
SetClassNameAndNamespace ( string projectNamespace, string elementName, StringBuilder templateCode ) : void
SetClassNameAndNamespace ( string classNamespace, string elementName, StringBuilder templateCode, bool useGlobalContent, string replacementContentManagerName, string inheritance ) : void

Private Methods

Method Description
AddEventCustomCodeFileForElement ( IElement element ) : void
AddEventGeneratedCodeFileForElement ( IElement element ) : void
CodeWriter ( ) : System
GenerateActivity ( ICodeBlock codeBlock, IElement saveObject ) : ICodeBlock
GenerateAddThisEntityToManagers ( IElement saveObject, ICodeBlock currentBlock ) : void
GenerateAddToManagers ( IElement saveObject ) : ICodeBlock
GenerateAddToManagersBottomUp ( ICodeBlock codeBlock, IElement element, List reusableEntireFileRfses ) : void
GenerateAndAddElementCustomCode ( IElement element ) : void
GenerateAssignCustomVariables ( ICodeBlock codeBlock, IElement element ) : void
GenerateAssignmentForListOfObjects ( ICodeBlock codeBlock, IElement element, ICodeBlock ifCallOnContainedElements, List listOfItems ) : void
GenerateConvertToManuallyUpdated ( ICodeBlock codeBlock, IElement saveObject, List reusableEntireFileRfses ) : void
GenerateDestroy ( IElement saveObject ) : ICodeBlock
GenerateFields ( IElement saveObject ) : ICodeBlock
GenerateGeneralActivity ( ICodeBlock codeBlock, IElement saveObject ) : ICodeBlock
GenerateInitialize ( IElement saveObject ) : ICodeBlock
GenerateMethods ( ICodeBlock codeBlock, IElement saveObject ) : void
GeneratePauseIgnoringActivity ( ICodeBlock codeBlock, IElement saveObject ) : void
GenerateReAddToManagers ( IElement saveObject, ICodeBlock currentBlock ) : void
GenerateRemoveFromManagers ( ICodeBlock currentBlock, IElement saveObject ) : void
GenerateUnloadStaticContent ( ICodeBlock codeBlock, IElement saveObject ) : ICodeBlock
GenerateUsings ( StringBuilder stringBuilder, IElement saveObject ) : void
GetAllCodeFilesFor ( IElement element ) : List
GetIndexAfter ( string stringToSearchFor, StringBuilder entireStringToSearchIn ) : int
GetIndexAfter ( string stringToSearchFor, string entireStringToSearchIn ) : int
GetInheritance ( IElement element ) : string
IsAnyNamedObjectAttachedToCamera ( List namedObjectList ) : bool
IsCustomVariableAssignedInAddToManagers ( CustomVariable customVariable, IElement saveObject ) : bool
IsVariableHandledByCustomCodeGenerator ( CustomVariable customVariable, IElement element ) : bool
PrepareTypeToBeWritten ( TypedMemberBase member, string memberType ) : string
RefreshReusableEntireFileRfses ( IElement element ) : void
RefreshStartupScreenCode ( ) : void
ReplaceNamespace ( string fileContents, string newNamespace ) : string
ReplaceNamespace ( string fileContents, string newNamespace, string &oldNamespace ) : string
SetStartUpScreen ( string gameFileName, string startUpScreen ) : void

Method Details

CreateAndAddGeneratedFile() public static method

public static CreateAndAddGeneratedFile ( IElement saveObject ) : void
saveObject IElement
return void

CreateClass() public static method

public static CreateClass ( ClassProperties classProperties ) : ICodeBlock
classProperties ClassProperties
return ICodeBlock

CreateClass() public static method

public static CreateClass ( string namespaceName, string className, List members ) : ICodeBlock
namespaceName string
className string
members List
return ICodeBlock

CreateClass() public static method

public static CreateClass ( string namespaceName, string className, bool isPartial, List members, bool isStatic, List usingStatements, string>.Dictionary untypedMembers, ICodeBlock methodContent ) : ICodeBlock
namespaceName string
className string
isPartial bool
members List
isStatic bool
usingStatements List
untypedMembers string>.Dictionary
methodContent ICodeBlock
return ICodeBlock

CreateGeneratedFileIfNecessary() public static method

public static CreateGeneratedFileIfNecessary ( IElement saveObject ) : void
saveObject IElement
return void

EliminateCall() public static method

public static EliminateCall ( string call, string &contents ) : void
call string
contents string
return void

GenerateAfterActivity() public static method

public static GenerateAfterActivity ( ICodeBlock codeBlock, IElement saveObject ) : ICodeBlock
codeBlock ICodeBlock
saveObject IElement
return ICodeBlock

GenerateCode() public static method

public static GenerateCode ( IElement element ) : void
element IElement
return void

GenerateLoadStaticContent() public static method

public static GenerateLoadStaticContent ( ICodeBlock codeBlock, IElement saveObject ) : void
codeBlock ICodeBlock
saveObject IElement
return void

GeneratePostInitialize() public static method

public static GeneratePostInitialize ( ICodeBlock codeBlock, IElement saveObject ) : void
codeBlock ICodeBlock
saveObject IElement
return void

InitializeStaticData() public static method

public static InitializeStaticData ( string gameFileName, bool whetherToCall ) : void
gameFileName string
whetherToCall bool
return void

IsOnOwnLayer() public static method

public static IsOnOwnLayer ( IElement element ) : bool
element IElement
return bool

MakeLocalizedIfNecessary() public static method

public static MakeLocalizedIfNecessary ( NamedObjectSave namedObject, string variableName, object valueAsObject, string valueAsString, CustomVariable customVariable ) : string
namedObject FlatRedBall.Glue.SaveClasses.NamedObjectSave
variableName string
valueAsObject object
valueAsString string
customVariable FlatRedBall.Glue.SaveClasses.CustomVariable
return string

SaveFileContents() public static method

public static SaveFileContents ( string fileContents, string fileName, bool tryAgain ) : bool
fileContents string
fileName string
tryAgain bool
return bool

SetBaseClass() public static method

public static SetBaseClass ( string fileName, string baseClass ) : void
fileName string
baseClass string
return void

SetBaseClass() public static method

public static SetBaseClass ( string &fileContents, string baseClass, bool overwrite ) : void
fileContents string
baseClass string
overwrite bool
return void

SetBaseClass() public static method

public static SetBaseClass ( string fileName, string baseClass, bool overwrite, string &fileContents ) : void
fileName string
baseClass string
overwrite bool
fileContents string
return void

SetBaseClass() public static method

public static SetBaseClass ( string fileName, string baseClass, string &fileContents ) : void
fileName string
baseClass string
fileContents string
return void

SetClassNameAndNamespace() public static method

public static SetClassNameAndNamespace ( string projectNamespace, string elementName, StringBuilder templateCode ) : void
projectNamespace string
elementName string
templateCode StringBuilder
return void

SetClassNameAndNamespace() public static method

public static SetClassNameAndNamespace ( string classNamespace, string elementName, StringBuilder templateCode, bool useGlobalContent, string replacementContentManagerName, string inheritance ) : void
classNamespace string
elementName string
templateCode StringBuilder
useGlobalContent bool
replacementContentManagerName string
inheritance string
return void