NCBI C++ ToolKit
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
CNamespace Class Reference

Search Toolkit Book for CNamespace

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

+ Collaboration diagram for CNamespace:

Public Types

typedef vector< stringTNamespaces
 

Public Member Functions

 CNamespace (void)
 
 CNamespace (const string &s)
 
void Set (const CNamespace &ns, CNcbiOstream &out, bool mainHeader=true)
 
string GetNamespaceRef (const CNamespace &ns) const
 
void UseFullname (bool full)
 
bool UseFullname (void) const
 
void Reset (void)
 
void Reset (CNcbiOstream &out)
 
CNcbiOstreamPrintFullName (CNcbiOstream &out) const
 
 operator string (void) const
 
string ToString (void) const
 
bool IsEmpty (void) const
 
 DECLARE_OPERATOR_BOOL (!IsEmpty())
 
bool operator== (const CNamespace &ns) const
 
bool operator!= (const CNamespace &ns) const
 
bool InNCBI (void) const
 
bool InSTD (void) const
 
bool IsNCBI (void) const
 
bool IsSTD (void) const
 

Static Public Attributes

static const CNamespace KEmptyNamespace
 
static const CNamespace KNCBINamespace
 
static const CNamespace KSTDNamespace
 
static const string KNCBINamespaceName
 
static const string KSTDNamespaceName
 
static const string KNCBINamespaceDefine
 
static const string KSTDNamespaceDefine
 

Protected Member Functions

const TNamespacesGetNamespaces (void) const
 
size_t GetNamespaceLevel (void) const
 
void Open (const string &s, CNcbiOstream &out, bool mainHeader=true)
 
void Close (CNcbiOstream &out)
 
void CloseAllAbove (size_t level, CNcbiOstream &out)
 
size_t EqualLevels (const CNamespace &ns) const
 
void ToStringTo (string &s) const
 

Protected Attributes

TNamespaces m_Namespaces
 
bool m_UseFullname
 

Detailed Description

Definition at line 41 of file namespace.hpp.

Member Typedef Documentation

Definition at line 44 of file namespace.hpp.

Constructor & Destructor Documentation

CNamespace::CNamespace ( void  )

Definition at line 49 of file namespace.cpp.

CNamespace::CNamespace ( const string s)

Member Function Documentation

void CNamespace::Close ( CNcbiOstream out)
protected

Definition at line 161 of file namespace.cpp.

References _ASSERT, IsNCBI(), and m_Namespaces.

Referenced by CloseAllAbove().

void CNamespace::CloseAllAbove ( size_t  level,
CNcbiOstream out 
)
protected

Definition at line 177 of file namespace.cpp.

References Close(), GetNamespaceLevel(), and size.

Referenced by Reset(), and Set().

CNamespace::DECLARE_OPERATOR_BOOL ( IsEmpty())
size_t CNamespace::EqualLevels ( const CNamespace ns) const
protected

Definition at line 79 of file namespace.cpp.

References GetNamespaceLevel(), GetNamespaces(), i, and min().

Referenced by GetNamespaceRef(), operator==(), and Set().

size_t CNamespace::GetNamespaceLevel ( void  ) const
inlineprotected

Definition at line 138 of file namespace.hpp.

References m_Namespaces.

Referenced by CloseAllAbove(), EqualLevels(), GetNamespaceRef(), operator==(), and Set().

string CNamespace::GetNamespaceRef ( const CNamespace ns) const
const TNamespaces& CNamespace::GetNamespaces ( void  ) const
inlineprotected

Definition at line 134 of file namespace.hpp.

References m_Namespaces.

Referenced by EqualLevels(), GetNamespaceRef(), PrintFullName(), Set(), and ToStringTo().

bool CNamespace::InNCBI ( void  ) const
inline

Definition at line 112 of file namespace.hpp.

References KNCBINamespaceName, and m_Namespaces.

Referenced by CFileCode::GetDefineBase(), and GetNamespaceRef().

bool CNamespace::InSTD ( void  ) const
inline

Definition at line 117 of file namespace.hpp.

References KSTDNamespaceName, and m_Namespaces.

Referenced by GetNamespaceRef().

bool CNamespace::IsEmpty ( void  ) const
inline

Definition at line 87 of file namespace.hpp.

References m_Namespaces.

Referenced by CEnumRefTypeStrings::GetRef().

bool CNamespace::IsNCBI ( void  ) const
inline

Definition at line 122 of file namespace.hpp.

References KNCBINamespaceName, and m_Namespaces.

Referenced by Close(), and Open().

bool CNamespace::IsSTD ( void  ) const
inline

Definition at line 127 of file namespace.hpp.

References KSTDNamespaceName, and m_Namespaces.

void CNamespace::Open ( const string s,
CNcbiOstream out,
bool  mainHeader = true 
)
protected

Definition at line 139 of file namespace.cpp.

References IsNCBI(), and m_Namespaces.

Referenced by Set().

CNamespace::operator string ( void  ) const
inline

Definition at line 73 of file namespace.hpp.

References ToStringTo().

bool CNamespace::operator!= ( const CNamespace ns) const
inline

Definition at line 99 of file namespace.hpp.

bool CNamespace::operator== ( const CNamespace ns) const
inline

Definition at line 93 of file namespace.hpp.

References EqualLevels(), and GetNamespaceLevel().

CNcbiOstream & CNamespace::PrintFullName ( CNcbiOstream out) const

Definition at line 183 of file namespace.cpp.

References GetNamespaces(), i, ITERATE, and out().

Referenced by operator<<().

void CNamespace::Reset ( void  )
inline
void CNamespace::Reset ( CNcbiOstream out)
inline

Definition at line 66 of file namespace.hpp.

References CloseAllAbove().

void CNamespace::Set ( const CNamespace ns,
CNcbiOstream out,
bool  mainHeader = true 
)
string CNamespace::ToString ( void  ) const
inline
void CNamespace::ToStringTo ( string s) const
protected

Definition at line 190 of file namespace.cpp.

References GetNamespaces(), i, and ITERATE.

Referenced by operator string(), and ToString().

void CNamespace::UseFullname ( bool  full)
inline

Definition at line 52 of file namespace.hpp.

References m_UseFullname.

Referenced by CStdTypeStrings::CStdTypeStrings(), and GetNamespaceRef().

bool CNamespace::UseFullname ( void  ) const
inline

Definition at line 56 of file namespace.hpp.

References m_UseFullname.

Member Data Documentation

const CNamespace CNamespace::KEmptyNamespace
static
const CNamespace CNamespace::KNCBINamespace
static
const string CNamespace::KNCBINamespaceDefine
static

Definition at line 109 of file namespace.hpp.

Referenced by CNamespace(), and GetNamespaceRef().

const string CNamespace::KNCBINamespaceName
static

Definition at line 107 of file namespace.hpp.

Referenced by CNamespace(), InNCBI(), and IsNCBI().

const CNamespace CNamespace::KSTDNamespace
static
const string CNamespace::KSTDNamespaceDefine
static

Definition at line 110 of file namespace.hpp.

Referenced by CNamespace(), and GetNamespaceRef().

const string CNamespace::KSTDNamespaceName
static

Definition at line 108 of file namespace.hpp.

Referenced by CNamespace(), InSTD(), and IsSTD().

TNamespaces CNamespace::m_Namespaces
protected
bool CNamespace::m_UseFullname
protected

Definition at line 152 of file namespace.hpp.

Referenced by Reset(), and UseFullname().


The documentation for this class was generated from the following files:
Modified on Mon Jun 29 13:31:14 2015 by modify_doxy.py rev. 426318