NCBI C++ ToolKit
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
CClassCode Class Reference

Search Toolkit Book for CClassCode

#include "code.hpp"
(Private to src/serial/datatool.)

+ Inheritance diagram for CClassCode:
+ Collaboration diagram for CClassCode:

Public Member Functions

 CClassCode (CClassContext &ownerClass, const string &className)
 
virtual ~CClassCode (void)
 
virtual const CNamespaceGetNamespace (void) const override
 
const stringGetClassNameDT (void) const
 
const stringGetParentClassName (void) const
 
const CNamespaceGetParentClassNamespace (void) const
 
void SetParentClass (const string &className, const CNamespace &ns)
 
bool HaveVirtualDestructor (void) const
 
void SetVirtualDestructor (bool v=true)
 
virtual string GetMethodPrefix (void) const override
 
bool InternalClass (void) const
 
virtual TIncludesHPPIncludes (void) override
 
virtual TIncludesCPPIncludes (void) override
 
virtual void AddForwardDeclaration (const string &s, const CNamespace &ns) override
 
void AddInitializer (const string &member, const string &init)
 
void AddConstructionCode (const string &code)
 
void AddDestructionCode (const string &code)
 
bool HaveInitializers (void) const
 
CNcbiOstreamWriteInitializers (CNcbiOstream &out) const
 
CNcbiOstreamWriteConstructionCode (CNcbiOstream &out) const
 
CNcbiOstreamWriteDestructionCode (CNcbiOstream &out) const
 
CNcbiOstreamClassPublic (void)
 
CNcbiOstreamClassProtected (void)
 
CNcbiOstreamClassPrivate (void)
 
CNcbiOstreamInlineMethods (void)
 
CNcbiOstreamMethods (bool inl=false)
 
CNcbiOstreamMethodStart (bool inl=false)
 
CNcbiOstreamGenerateEmpty (CNcbiOstream &header) const
 
CNcbiOstreamGenerateHPP (CNcbiOstream &header) const
 
CNcbiOstreamGenerateINL (CNcbiOstream &code) const
 
CNcbiOstreamGenerateCPP (CNcbiOstream &code) const
 
CNcbiOstreamGenerateUserHPP (CNcbiOstream &header) const
 
CNcbiOstreamGenerateUserCPP (CNcbiOstream &code) const
 
virtual void AddHPPCode (const CNcbiOstrstream &code) override
 
virtual void AddINLCode (const CNcbiOstrstream &code) override
 
virtual void AddCPPCode (const CNcbiOstrstream &code) override
 
void SetEmptyClassCode (void)
 
- Public Member Functions inherited from CClassContext
virtual ~CClassContext (void)
 

Static Public Member Functions

static void SetExportSpecifier (const string &str)
 
static const stringGetExportSpecifier (void)
 
static void SetDoxygenComments (bool set)
 
static bool GetDoxygenComments (void)
 
static void SetDoxygenGroup (const string &str)
 
static const stringGetDoxygenGroup (void)
 
static void SetDocRootURL (const string &str)
 
static const stringGetDocRootURL (void)
 

Private Member Functions

 CClassCode (const CClassCode &)
 
CClassCodeoperator= (const CClassCode &)
 

Private Attributes

CClassContextm_Code
 
string m_ClassName
 
string m_ParentClassName
 
CNamespace m_ParentClassNamespace
 
bool m_VirtualDestructor
 
bool m_EmptyClassCode
 
CNcbiOstrstream m_ClassPublic
 
CNcbiOstrstream m_ClassProtected
 
CNcbiOstrstream m_ClassPrivate
 
CNcbiOstrstream m_Initializers
 
list< stringm_ConstructionCode
 
list< stringm_DestructionCode
 
CNcbiOstrstream m_InlineMethods
 
CNcbiOstrstream m_Methods
 

Static Private Attributes

static string sm_ExportSpecifier
 
static bool sm_DoxygenComments =false
 
static string sm_DoxygenGroup
 
static string sm_DocRootURL
 

Additional Inherited Members

- Public Types inherited from CClassContext
typedef set< stringTIncludes
 

Detailed Description

Definition at line 46 of file code.hpp.

Constructor & Destructor Documentation

◆ CClassCode() [1/2]

CClassCode::CClassCode ( CClassContext ownerClass,
const string className 
)

Definition at line 50 of file code.cpp.

◆ ~CClassCode()

CClassCode::~CClassCode ( void  )
virtual

◆ CClassCode() [2/2]

CClassCode::CClassCode ( const CClassCode )
private

Member Function Documentation

◆ AddConstructionCode()

void CClassCode::AddConstructionCode ( const string code)

Definition at line 188 of file code.cpp.

References m_ConstructionCode.

◆ AddCPPCode()

void CClassCode::AddCPPCode ( const CNcbiOstrstream code)
overridevirtual

Implements CClassContext.

Definition at line 137 of file code.cpp.

References m_Methods, and Write().

◆ AddDestructionCode()

void CClassCode::AddDestructionCode ( const string code)

Definition at line 195 of file code.cpp.

References m_DestructionCode.

◆ AddForwardDeclaration()

void CClassCode::AddForwardDeclaration ( const string s,
const CNamespace ns 
)
overridevirtual

Implements CClassContext.

Definition at line 169 of file code.cpp.

References CClassContext::AddForwardDeclaration(), and m_Code.

◆ AddHPPCode()

void CClassCode::AddHPPCode ( const CNcbiOstrstream code)
overridevirtual

Implements CClassContext.

Definition at line 127 of file code.cpp.

References m_ClassPublic, and WriteTabbed().

◆ AddInitializer()

void CClassCode::AddInitializer ( const string member,
const string init 
)

Definition at line 179 of file code.cpp.

References HaveInitializers(), init(), and m_Initializers.

◆ AddINLCode()

void CClassCode::AddINLCode ( const CNcbiOstrstream code)
overridevirtual

Implements CClassContext.

Definition at line 132 of file code.cpp.

References m_InlineMethods, and Write().

◆ ClassPrivate()

CNcbiOstream& CClassCode::ClassPrivate ( void  )
inline

Definition at line 100 of file code.hpp.

References m_ClassPrivate.

◆ ClassProtected()

CNcbiOstream& CClassCode::ClassProtected ( void  )
inline

Definition at line 96 of file code.hpp.

References m_ClassProtected.

◆ ClassPublic()

CNcbiOstream& CClassCode::ClassPublic ( void  )
inline

Definition at line 92 of file code.hpp.

References m_ClassPublic.

◆ CPPIncludes()

CClassCode::TIncludes & CClassCode::CPPIncludes ( void  )
overridevirtual

Implements CClassContext.

Definition at line 157 of file code.cpp.

References CClassContext::CPPIncludes(), and m_Code.

◆ GenerateCPP()

CNcbiOstream & CClassCode::GenerateCPP ( CNcbiOstream code) const

Definition at line 285 of file code.cpp.

References m_Methods, and Write().

Referenced by ~CClassCode().

◆ GenerateEmpty()

CNcbiOstream & CClassCode::GenerateEmpty ( CNcbiOstream header) const

◆ GenerateHPP()

CNcbiOstream & CClassCode::GenerateHPP ( CNcbiOstream header) const

◆ GenerateINL()

CNcbiOstream & CClassCode::GenerateINL ( CNcbiOstream code) const

Definition at line 279 of file code.cpp.

References m_InlineMethods, and Write().

Referenced by ~CClassCode().

◆ GenerateUserCPP()

CNcbiOstream & CClassCode::GenerateUserCPP ( CNcbiOstream code) const

Definition at line 310 of file code.cpp.

References GetClassNameDT(), and InternalClass().

◆ GenerateUserHPP()

CNcbiOstream & CClassCode::GenerateUserHPP ( CNcbiOstream header) const

Definition at line 292 of file code.cpp.

References ctll::empty(), GetClassNameDT(), GetExportSpecifier(), and InternalClass().

◆ GetClassNameDT()

const string& CClassCode::GetClassNameDT ( void  ) const
inline

Definition at line 55 of file code.hpp.

References m_ClassName.

Referenced by GenerateEmpty(), GenerateHPP(), GenerateUserCPP(), GenerateUserHPP(), and GetMethodPrefix().

◆ GetDocRootURL()

const string & CClassCode::GetDocRootURL ( void  )
static

Definition at line 117 of file code.cpp.

References sm_DocRootURL.

Referenced by CFileCode::WriteSpecRefs(), and CFileCode::WriteUserCopyright().

◆ GetDoxygenComments()

bool CClassCode::GetDoxygenComments ( void  )
static

◆ GetDoxygenGroup()

const string & CClassCode::GetDoxygenGroup ( void  )
static

◆ GetExportSpecifier()

const string & CClassCode::GetExportSpecifier ( void  )
static

◆ GetMethodPrefix()

string CClassCode::GetMethodPrefix ( void  ) const
overridevirtual

Implements CClassContext.

Definition at line 142 of file code.cpp.

References GetClassNameDT(), CClassContext::GetMethodPrefix(), and m_Code.

◆ GetNamespace()

const CNamespace & CClassCode::GetNamespace ( void  ) const
overridevirtual

Implements CClassContext.

Definition at line 122 of file code.cpp.

References CClassContext::GetNamespace(), and m_Code.

Referenced by GenerateEmpty(), and GenerateHPP().

◆ GetParentClassName()

const string& CClassCode::GetParentClassName ( void  ) const
inline

Definition at line 59 of file code.hpp.

References m_ParentClassName.

Referenced by GenerateEmpty(), and GenerateHPP().

◆ GetParentClassNamespace()

const CNamespace& CClassCode::GetParentClassNamespace ( void  ) const
inline

Definition at line 63 of file code.hpp.

References m_ParentClassNamespace.

Referenced by GenerateEmpty(), and GenerateHPP().

◆ HaveInitializers()

bool CClassCode::HaveInitializers ( void  ) const

Definition at line 174 of file code.cpp.

References Empty(), and m_Initializers.

Referenced by AddInitializer().

◆ HaveVirtualDestructor()

bool CClassCode::HaveVirtualDestructor ( void  ) const
inline

Definition at line 69 of file code.hpp.

References m_VirtualDestructor.

◆ HPPIncludes()

CClassCode::TIncludes & CClassCode::HPPIncludes ( void  )
overridevirtual

Implements CClassContext.

Definition at line 152 of file code.cpp.

References CClassContext::HPPIncludes(), and m_Code.

◆ InlineMethods()

CNcbiOstream& CClassCode::InlineMethods ( void  )
inline

Definition at line 104 of file code.hpp.

References m_InlineMethods.

◆ InternalClass()

bool CClassCode::InternalClass ( void  ) const

Definition at line 147 of file code.cpp.

References CClassContext::GetMethodPrefix(), and m_Code.

Referenced by GenerateUserCPP(), and GenerateUserHPP().

◆ Methods()

CNcbiOstream& CClassCode::Methods ( bool  inl = false)
inline

Definition at line 108 of file code.hpp.

References m_InlineMethods, and m_Methods.

◆ MethodStart()

CNcbiOstream& CClassCode::MethodStart ( bool  inl = false)
inline

Definition at line 112 of file code.hpp.

References m_InlineMethods, and m_Methods.

◆ operator=()

CClassCode& CClassCode::operator= ( const CClassCode )
private

◆ SetDocRootURL()

void CClassCode::SetDocRootURL ( const string str)
static

Definition at line 112 of file code.cpp.

References sm_DocRootURL, and str().

Referenced by CDataTool::GenerateCode().

◆ SetDoxygenComments()

void CClassCode::SetDoxygenComments ( bool  set)
static

Definition at line 93 of file code.cpp.

References sm_DoxygenComments.

Referenced by CDataTool::GenerateCode().

◆ SetDoxygenGroup()

void CClassCode::SetDoxygenGroup ( const string str)
static

Definition at line 102 of file code.cpp.

References sm_DoxygenGroup, and str().

Referenced by CDataTool::GenerateCode().

◆ SetEmptyClassCode()

void CClassCode::SetEmptyClassCode ( void  )
inline

Definition at line 133 of file code.hpp.

References m_EmptyClassCode.

◆ SetExportSpecifier()

void CClassCode::SetExportSpecifier ( const string str)
static

Definition at line 83 of file code.cpp.

References sm_ExportSpecifier, and str().

Referenced by CDataTool::GenerateCode().

◆ SetParentClass()

void CClassCode::SetParentClass ( const string className,
const CNamespace ns 
)

Definition at line 162 of file code.cpp.

References m_ParentClassName, and m_ParentClassNamespace.

◆ SetVirtualDestructor()

void CClassCode::SetVirtualDestructor ( bool  v = true)
inline

Definition at line 73 of file code.hpp.

References m_VirtualDestructor.

◆ WriteConstructionCode()

CNcbiOstream & CClassCode::WriteConstructionCode ( CNcbiOstream out) const

Definition at line 207 of file code.cpp.

References i, ITERATE, m_ConstructionCode, out(), and WriteTabbed().

◆ WriteDestructionCode()

CNcbiOstream & CClassCode::WriteDestructionCode ( CNcbiOstream out) const

Definition at line 215 of file code.cpp.

References i, ITERATE, m_DestructionCode, out(), and WriteTabbed().

◆ WriteInitializers()

CNcbiOstream & CClassCode::WriteInitializers ( CNcbiOstream out) const

Definition at line 202 of file code.cpp.

References m_Initializers, out(), and Write().

Member Data Documentation

◆ m_ClassName

string CClassCode::m_ClassName
private

Definition at line 151 of file code.hpp.

Referenced by GetClassNameDT().

◆ m_ClassPrivate

CNcbiOstrstream CClassCode::m_ClassPrivate
private

Definition at line 163 of file code.hpp.

Referenced by ClassPrivate(), and GenerateHPP().

◆ m_ClassProtected

CNcbiOstrstream CClassCode::m_ClassProtected
private

Definition at line 162 of file code.hpp.

Referenced by ClassProtected(), and GenerateHPP().

◆ m_ClassPublic

CNcbiOstrstream CClassCode::m_ClassPublic
private

Definition at line 161 of file code.hpp.

Referenced by AddHPPCode(), ClassPublic(), and GenerateHPP().

◆ m_Code

CClassContext& CClassCode::m_Code
private

◆ m_ConstructionCode

list<string> CClassCode::m_ConstructionCode
private

Definition at line 165 of file code.hpp.

Referenced by AddConstructionCode(), and WriteConstructionCode().

◆ m_DestructionCode

list<string> CClassCode::m_DestructionCode
private

Definition at line 166 of file code.hpp.

Referenced by AddDestructionCode(), and WriteDestructionCode().

◆ m_EmptyClassCode

bool CClassCode::m_EmptyClassCode
private

Definition at line 160 of file code.hpp.

Referenced by SetEmptyClassCode(), and ~CClassCode().

◆ m_Initializers

CNcbiOstrstream CClassCode::m_Initializers
private

Definition at line 164 of file code.hpp.

Referenced by AddInitializer(), HaveInitializers(), and WriteInitializers().

◆ m_InlineMethods

CNcbiOstrstream CClassCode::m_InlineMethods
private

Definition at line 167 of file code.hpp.

Referenced by AddINLCode(), GenerateINL(), InlineMethods(), Methods(), and MethodStart().

◆ m_Methods

CNcbiOstrstream CClassCode::m_Methods
private

Definition at line 168 of file code.hpp.

Referenced by AddCPPCode(), GenerateCPP(), Methods(), and MethodStart().

◆ m_ParentClassName

string CClassCode::m_ParentClassName
private

Definition at line 152 of file code.hpp.

Referenced by GetParentClassName(), and SetParentClass().

◆ m_ParentClassNamespace

CNamespace CClassCode::m_ParentClassNamespace
private

Definition at line 153 of file code.hpp.

Referenced by GetParentClassNamespace(), and SetParentClass().

◆ m_VirtualDestructor

bool CClassCode::m_VirtualDestructor
private

Definition at line 159 of file code.hpp.

Referenced by HaveVirtualDestructor(), and SetVirtualDestructor().

◆ sm_DocRootURL

string CClassCode::sm_DocRootURL
staticprivate

Definition at line 157 of file code.hpp.

Referenced by GetDocRootURL(), and SetDocRootURL().

◆ sm_DoxygenComments

bool CClassCode::sm_DoxygenComments =false
staticprivate

Definition at line 155 of file code.hpp.

Referenced by GetDoxygenComments(), and SetDoxygenComments().

◆ sm_DoxygenGroup

string CClassCode::sm_DoxygenGroup
staticprivate

Definition at line 156 of file code.hpp.

Referenced by GetDoxygenGroup(), and SetDoxygenGroup().

◆ sm_ExportSpecifier

string CClassCode::sm_ExportSpecifier
staticprivate

Definition at line 154 of file code.hpp.

Referenced by GetExportSpecifier(), and SetExportSpecifier().


The documentation for this class was generated from the following files:
Modified on Thu Jun 13 17:25:20 2024 by modify_doxy.py rev. 669887