mummy  1.0.3
Namespaces | Functions
MummyUtilities.h File Reference
#include "cableContext.h"
#include "cxxFundamentalType.h"
#include "gxsys/ios/iosfwd"
#include "gxsys/stl/string"
Include dependency graph for MummyUtilities.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  cable

Functions

void Trace (const char *s)
void Emit (gxsys_ios::ostream &os, const char *s)
void EmitInt (gxsys_ios::ostream &os, const int i)
void EmitUint (gxsys_ios::ostream &os, const unsigned int i)
void EmitIndent (gxsys_ios::ostream &os, const unsigned int n=1)
void EmitFile (gxsys_ios::ostream &os, const char *filename)
void WriteToFile (const char *filename, const char *s)
bool IsChar (const cable::Type *t)
bool IsFundamental (const cable::Type *t, cxx::FundamentalType::Id tid)
bool IsObject (const cable::Type *t)
bool IsVoid (const cable::Type *t)
bool HasMapToType (const cable::Type *t)
gxsys_stl::string GetMapToType (const cable::Type *t)
gxsys_stl::string GetStringMethod (const cable::Type *t)
bool IsCharPointer (const cable::Type *t)
bool IsCharPointerPointer (const cable::Type *t)
bool IsFundamentalPointer (const cable::Type *t, cxx::FundamentalType::Id tid)
bool IsFundamentalPointerPointer (const cable::Type *t, cxx::FundamentalType::Id tid)
bool IsObjectPointer (const cable::Type *t)
bool IsObjectPointerReference (const cable::Type *t)
bool IsVoidPointer (const cable::Type *t)
const char * GetAccessString (cable::Context::Access access)
const cable::Class * GetParentClass (const cable::Class *c)
bool ClassIsA (const cable::Class *c, const gxsys_stl::string &parent)
bool ValidateBaseClasses (const cable::Class *c)
gxsys_stl::string GetSimpleName (const cable::Named *n)
gxsys_stl::string GetFullyQualifiedName (const cable::Named *n, const char *sep)
gxsys_stl::string GetFullyQualifiedNameForCPlusPlus (const cable::Named *n)
gxsys_stl::string GetFullyQualifiedNameForCSharp (const cable::Named *n)
gxsys_stl::string GetFullyQualifiedCPlusPlusTypeIdName (const cable::Named *n)
bool EquivalentTypedefNameExists (const cable::Class *c, const cable::FunctionType *target, gxsys_stl::string &s)
bool HasAttribute (const cable::SourceObject *o, const char *attr)
bool IsUtilityClass (const cable::Class *c)
gxsys_stl::string ExtractAttribute (const gxsys_stl::string &atts, const gxsys_stl::string &attBase)
gxsys_stl::string ExtractAttribute (const cable::SourceObject *o, const gxsys_stl::string &attBase)
gxsys_stl::string ExtractArraySize (const gxsys_stl::string &atts)
gxsys_stl::string ExtractImplementsInterface (const gxsys_stl::string &atts)
gxsys_stl::string ExtractMapToType (const cable::SourceObject *o)
gxsys_stl::string ExtractStringMethod (const cable::SourceObject *o)
gxsys_stl::string GetMappedTypeName (const cable::Class *c, bool fullyQualified)
gxsys_stl::string GetWrappedClassName (const cable::Class *c)
gxsys_stl::string GetWrappedClassNameFullyQualified (const cable::Class *c)
void SuppressMsg (const int n)
bool ShouldLogMsg (const int n)
void LogMsg (const gxsys_stl::string &file, const unsigned long line, const gxsys_stl::string &label, const int n)
int GetErrorCount ()
int GetFirstErrorValue ()
int GetNthErrorValue (int n)
int GetMostRecentErrorValue ()
const cable::Constructor * FindNonAbstractPublicDefaultConstructor (const cable::Class *c)
gxsys_stl::string GetCPlusPlusZeroInitializerExpression (const cable::Type *t)
gxsys_stl::string GetCsharpZeroInitializerExpression (const cable::Type *t)
bool BlockContains (const gxsys_stl::vector< gxsys_stl::string > &block, const char *value)
bool ShouldEmitComment (const char *comment)
gxsys_stl::string EncodeStringForXml (const char *s)
void EmitDocumentationBlock (gxsys_ios::ostream &os, const gxsys_stl::vector< gxsys_stl::string > &block, const unsigned int indent, bool isClassDoc=false)
gxsys_stl::string ExtractDerivedName (const char *s, const cable::Named *n, bool verbose)

Function Documentation

bool BlockContains ( const gxsys_stl::vector< gxsys_stl::string > &  block,
const char *  value 
)

Definition at line 837 of file MummyUtilities.cxx.

Referenced by EmitDocumentationBlock().

bool ClassIsA ( const cable::Class *  c,
const gxsys_stl::string &  parent 
)

Definition at line 341 of file MummyUtilities.cxx.

References GetFullyQualifiedNameForCPlusPlus(), and GetParentClass().

Referenced by MummyCsharpShadowLayerGenerator::EmitClassDeclarationForShadowLayer(), and MummyCsharpShadowLayerGenerator::EmitClassImplementationForShadowLayer().

Here is the call graph for this function:

void Emit ( gxsys_ios::ostream &  os,
const char *  s 
)

Definition at line 53 of file MummyUtilities.cxx.

Referenced by MummyCsharpUnitTestGenerator::EmitClass(), MummyCsharpShadowLayerGenerator::EmitClassDeclarationForShadowLayer(), MummyCsharpExportLayerGenerator::EmitClassForExportLayer(), MummyCsharpShadowLayerGenerator::EmitClassImplementationForShadowLayer(), MummyCsharpExportLayerGenerator::EmitClassMethodDeclarationForExportLayer(), MummyCsharpShadowLayerGenerator::EmitClassMethodDeclarationForShadowLayer(), MummyCsharpExportLayerGenerator::EmitClassMethodForExportLayer(), MummyCsharpGenerator::EmitCSharpConstructor(), MummyCsharpGenerator::EmitCSharpDispose(), MummyCsharpGenerator::EmitCSharpDllImportDeclaration(), MummyCsharpGenerator::EmitCSharpEnums(), MummyCsharpGenerator::EmitCSharpEvent(), MummyCsharpUnitTestGenerator::EmitCSharpFactoryMethodUnitTest(), MummyCsharpGenerator::EmitCSharpMethod(), MummyCsharpGenerator::EmitCSharpMethodBody(), MummyCsharpGenerator::EmitCSharpMethodDeclaration(), MummyCsharpUnitTestGenerator::EmitCSharpMethodUnitTest(), MummyCsharpGenerator::EmitCSharpProperty(), MummyCsharpUnitTestGenerator::EmitCSharpPropertyUnitTest(), MummyCsharpUnitTestGenerator::EmitCSharpStructMemberAccessUnitTest(), MummyCsharpGenerator::EmitCSharpWrapperClass(), MummyCsharpGenerator::EmitCSharpWrapperClassAsStruct(), EmitDocumentationBlock(), EmitIndent(), MummyGenerator::EmitMummyVersionComments(), MummyCsharpExportLayerGenerator::EmitSpecialHandlingForObjectPointerReturns(), EmitThrowClonedException(), and MummyCsharpGenerator::GetMethodSignature().

void EmitDocumentationBlock ( gxsys_ios::ostream &  os,
const gxsys_stl::vector< gxsys_stl::string > &  block,
const unsigned int  indent,
bool  isClassDoc = false 
)
void EmitFile ( gxsys_ios::ostream &  os,
const char *  filename 
)
void EmitIndent ( gxsys_ios::ostream &  os,
const unsigned int  n = 1 
)
void EmitInt ( gxsys_ios::ostream &  os,
const int  i 
)

Definition at line 61 of file MummyUtilities.cxx.

Referenced by MummyCsharpGenerator::EmitCSharpEnums().

void EmitUint ( gxsys_ios::ostream &  os,
const unsigned int  i 
)
gxsys_stl::string EncodeStringForXml ( const char *  s)

Definition at line 868 of file MummyUtilities.cxx.

Referenced by EmitDocumentationBlock(), and IncreaseCoverage().

bool EquivalentTypedefNameExists ( const cable::Class *  c,
const cable::FunctionType *  target,
gxsys_stl::string &  s 
)
gxsys_stl::string ExtractArraySize ( const gxsys_stl::string &  atts)

Definition at line 611 of file MummyUtilities.cxx.

References ExtractAttribute().

Referenced by MummyCsharpGenerator::EmitCSharpWrapperClass(), and MummyCsharpGenerator::GetMethodArgumentArraySize().

Here is the call graph for this function:

gxsys_stl::string ExtractAttribute ( const gxsys_stl::string &  atts,
const gxsys_stl::string &  attBase 
)
gxsys_stl::string ExtractAttribute ( const cable::SourceObject *  o,
const gxsys_stl::string &  attBase 
)

Definition at line 603 of file MummyUtilities.cxx.

References ExtractAttribute().

Here is the call graph for this function:

gxsys_stl::string ExtractDerivedName ( const char *  s,
const cable::Named *  n,
bool  verbose 
)
gxsys_stl::string ExtractImplementsInterface ( const gxsys_stl::string &  atts)

Definition at line 618 of file MummyUtilities.cxx.

References ExtractAttribute().

Referenced by MummyCsharpGenerator::EmitCSharpWrapperClass().

Here is the call graph for this function:

gxsys_stl::string ExtractMapToType ( const cable::SourceObject *  o)

Definition at line 625 of file MummyUtilities.cxx.

References ExtractAttribute().

Referenced by MummyCsharpUnitTestGenerator::EmitClass(), MummyCsharpExportLayerGenerator::EmitClassForExportLayer(), MummyCsharpGenerator::EmitCSharpWrapperClass(), GetExportLayerMappedType(), GetMappedTypeName(), and GetMapToType().

Here is the call graph for this function:

gxsys_stl::string ExtractStringMethod ( const cable::SourceObject *  o)

Definition at line 632 of file MummyUtilities.cxx.

References ExtractAttribute().

Referenced by GetStringMethod().

Here is the call graph for this function:

const cable::Constructor* FindNonAbstractPublicDefaultConstructor ( const cable::Class *  c)
const char* GetAccessString ( cable::Context::Access  access)

Definition at line 289 of file MummyUtilities.cxx.

References LogError, and me_InvalidArg.

Referenced by MummyCsharpGenerator::GatherWrappedMethods().

gxsys_stl::string GetCPlusPlusZeroInitializerExpression ( const cable::Type *  t)
gxsys_stl::string GetCsharpZeroInitializerExpression ( const cable::Type *  t)

Definition at line 807 of file MummyUtilities.cxx.

References LogError, and me_InternalError.

int GetErrorCount ( )

Definition at line 719 of file MummyUtilities.cxx.

References error_values.

Referenced by GetMostRecentErrorValue(), GetNthErrorValue(), and IncreaseCoverage().

int GetFirstErrorValue ( )

Definition at line 738 of file MummyUtilities.cxx.

References GetNthErrorValue().

Referenced by MummyApplication::Main().

Here is the call graph for this function:

gxsys_stl::string GetFullyQualifiedCPlusPlusTypeIdName ( const cable::Named *  n)

Definition at line 505 of file MummyUtilities.cxx.

References GetFullyQualifiedLengthPrefixedName(), and GetFullyQualifiedNameForCPlusPlus().

Referenced by MummyCsharpGenerator::EmitCSharpWrapperClass().

Here is the call graph for this function:

gxsys_stl::string GetFullyQualifiedName ( const cable::Named *  n,
const char *  sep 
)

Definition at line 415 of file MummyUtilities.cxx.

References GetFullyQualifiedName(), LogError, and me_InvalidArg.

Referenced by MummyCsharpGenerator::GetExportLayerFunctionName(), GetFullyQualifiedName(), GetFullyQualifiedNameForCPlusPlus(), and GetFullyQualifiedNameForCSharp().

Here is the call graph for this function:

gxsys_stl::string GetFullyQualifiedNameForCPlusPlus ( const cable::Named *  n)
gxsys_stl::string GetFullyQualifiedNameForCSharp ( const cable::Named *  n)

Definition at line 498 of file MummyUtilities.cxx.

References GetFullyQualifiedName().

Referenced by MummyCsharpUnitTestGenerator::EmitClass(), MummyCsharpGenerator::EmitCSharpWrapperClass(), GetEnumerationTypeString(), and GetMappedTypeName().

Here is the call graph for this function:

gxsys_stl::string GetMappedTypeName ( const cable::Class *  c,
bool  fullyQualified 
)

Definition at line 639 of file MummyUtilities.cxx.

References ExtractMapToType(), GetFullyQualifiedNameForCSharp(), and GetSimpleName().

Referenced by GetWrappedClassName(), and GetWrappedClassNameFullyQualified().

Here is the call graph for this function:

gxsys_stl::string GetMapToType ( const cable::Type *  t)

Definition at line 180 of file MummyUtilities.cxx.

References ExtractMapToType(), and IsObject().

Referenced by MummyCsharpExportLayerGenerator::EmitClassMethodForExportLayer().

Here is the call graph for this function:

int GetMostRecentErrorValue ( )

Definition at line 745 of file MummyUtilities.cxx.

References GetErrorCount(), and GetNthErrorValue().

Referenced by IncreaseCoverage().

Here is the call graph for this function:

int GetNthErrorValue ( int  n)

Definition at line 726 of file MummyUtilities.cxx.

References error_values, and GetErrorCount().

Referenced by GetFirstErrorValue(), GetMostRecentErrorValue(), and IncreaseCoverage().

Here is the call graph for this function:

const cable::Class* GetParentClass ( const cable::Class *  c)
gxsys_stl::string GetSimpleName ( const cable::Named *  n)

Definition at line 396 of file MummyUtilities.cxx.

References LogError, and me_InvalidArg.

Referenced by GetMappedTypeName().

gxsys_stl::string GetStringMethod ( const cable::Type *  t)

Definition at line 200 of file MummyUtilities.cxx.

References ExtractStringMethod(), and IsObject().

Referenced by MummyCsharpExportLayerGenerator::EmitClassMethodForExportLayer().

Here is the call graph for this function:

gxsys_stl::string GetWrappedClassName ( const cable::Class *  c)

Definition at line 664 of file MummyUtilities.cxx.

References GetMappedTypeName().

Referenced by MummyCsharpUnitTestGenerator::EmitClass(), MummyCsharpGenerator::EmitCSharpWrapperClass(), MummyCsharpGenerator::EmitCSharpWrapperClassAsStruct(), GetEventName(), and GetQualifiedEventName().

Here is the call graph for this function:

gxsys_stl::string GetWrappedClassNameFullyQualified ( const cable::Class *  c)

Definition at line 671 of file MummyUtilities.cxx.

References GetMappedTypeName().

Referenced by MummyCsharpGenerator::EmitCSharpEvent(), MummyCsharpGenerator::EmitCSharpWrapperClass(), MummyCsharpGenerator::GetCSharpTypeString(), and MummyCsharpGenerator::GetPInvokeTypeString().

Here is the call graph for this function:

bool HasAttribute ( const cable::SourceObject *  o,
const char *  attr 
)
bool HasMapToType ( const cable::Type *  t)

Definition at line 159 of file MummyUtilities.cxx.

References HasAttribute(), and IsObject().

Referenced by MummyCsharpExportLayerGenerator::EmitClassForExportLayer(), MummyCsharpExportLayerGenerator::EmitClassMethodDeclarationForExportLayer(), MummyCsharpExportLayerGenerator::EmitClassMethodForExportLayer(), MummyCsharpGenerator::EmitCSharpDllImportDeclaration(), and GetExportLayerMappedType().

Here is the call graph for this function:

bool IsChar ( const cable::Type *  t)

Definition at line 120 of file MummyUtilities.cxx.

References IsFundamental().

Referenced by MummyCsharpGenerator::GetCSharpTypeString(), MummyCsharpGenerator::GetPInvokeTypeString(), GetVariantTypeCastingString(), and GetVariantTypeString().

Here is the call graph for this function:

bool IsCharPointer ( const cable::Type *  t)

Definition at line 220 of file MummyUtilities.cxx.

References IsFundamentalPointer().

Referenced by MummyCsharpGenerator::EmitCSharpMethodBody(), MummyCsharpGenerator::GetCSharpTypeString(), and MummyCsharpGenerator::GetPInvokeTypeString().

Here is the call graph for this function:

bool IsCharPointerPointer ( const cable::Type *  t)

Definition at line 227 of file MummyUtilities.cxx.

References IsFundamentalPointerPointer().

Referenced by IsCxxMainStyleParamPair().

Here is the call graph for this function:

bool IsFundamental ( const cable::Type *  t,
cxx::FundamentalType::Id  tid 
)

Definition at line 127 of file MummyUtilities.cxx.

Referenced by IsChar(), IsFundamentalPointer(), and IsVoid().

bool IsFundamentalPointer ( const cable::Type *  t,
cxx::FundamentalType::Id  tid 
)

Definition at line 234 of file MummyUtilities.cxx.

References IsFundamental().

Referenced by IsCharPointer(), IsFundamentalPointerPointer(), IsVoidPointer(), and ReturnTypeMatchesHintType().

Here is the call graph for this function:

bool IsFundamentalPointerPointer ( const cable::Type *  t,
cxx::FundamentalType::Id  tid 
)

Definition at line 246 of file MummyUtilities.cxx.

References IsFundamentalPointer().

Referenced by IsCharPointerPointer().

Here is the call graph for this function:

bool IsObject ( const cable::Type *  t)
bool IsObjectPointer ( const cable::Type *  t)
bool IsObjectPointerReference ( const cable::Type *  t)

Definition at line 270 of file MummyUtilities.cxx.

References IsObjectPointer().

Referenced by MummyCsharpGenerator::EmitCSharpMethodBody().

Here is the call graph for this function:

bool IsUtilityClass ( const cable::Class *  c)
bool IsVoid ( const cable::Type *  t)
bool IsVoidPointer ( const cable::Type *  t)

Definition at line 282 of file MummyUtilities.cxx.

References IsFundamentalPointer().

Referenced by MummyCsharpGenerator::EmitCSharpDispose().

Here is the call graph for this function:

void LogMsg ( const gxsys_stl::string &  file,
const unsigned long  line,
const gxsys_stl::string &  label,
const int  n 
)

Definition at line 701 of file MummyUtilities.cxx.

References error_values, and me_InternalError.

bool ShouldEmitComment ( const char *  comment)

Definition at line 854 of file MummyUtilities.cxx.

Referenced by EmitDocumentationBlock().

bool ShouldLogMsg ( const int  n)

Definition at line 689 of file MummyUtilities.cxx.

References suppressed_msg_values.

void SuppressMsg ( const int  n)

Definition at line 682 of file MummyUtilities.cxx.

References suppressed_msg_values.

Referenced by MummySettings::Initialize().

void Trace ( const char *  s)

Definition at line 42 of file MummyUtilities.cxx.

Referenced by IncreaseCoverage(), and MummyLineOrientedTextFileReader::Update().

bool ValidateBaseClasses ( const cable::Class *  c)

Definition at line 363 of file MummyUtilities.cxx.

References LogError, me_MoreThanOneBaseClass, and ValidateBaseClasses().

Referenced by MummyApplication::ProcessClass(), and ValidateBaseClasses().

Here is the call graph for this function:

void WriteToFile ( const char *  filename,
const char *  s 
)

Definition at line 106 of file MummyUtilities.cxx.

Referenced by MummyApplication::ProcessClass().