#include <dds_generator.h>
Public Member Functions | |
ScopedNamespaceGuard (UTL_ScopedName *name, std::ostream &os, const char *keyword="namespace") | |
~ScopedNamespaceGuard () | |
Public Attributes | |
std::ostream & | os_ |
std::string | semi_ |
int | n_ |
Definition at line 153 of file dds_generator.h.
ScopedNamespaceGuard::ScopedNamespaceGuard | ( | UTL_ScopedName * | name, | |
std::ostream & | os, | |||
const char * | keyword = "namespace" | |||
) | [inline] |
Definition at line 154 of file dds_generator.h.
References n_, semi_, and str.
00156 : os_(os) 00157 { 00158 for (n_ = 0; name->tail(); 00159 name = static_cast<UTL_ScopedName*>(name->tail())) { 00160 const char* str = name->head()->get_string(); 00161 if (str && str[0]) { 00162 ++n_; 00163 os << keyword << (name->head()->escaped() ? " _" : " ") 00164 << str << " {\n"; 00165 } 00166 } 00167 if (std::strcmp(keyword, "module") == 0) semi_ = ";"; 00168 }
ScopedNamespaceGuard::~ScopedNamespaceGuard | ( | ) | [inline] |
Definition at line 177 of file dds_generator.h.
Referenced by ScopedNamespaceGuard(), and ~ScopedNamespaceGuard().
std::ostream& ScopedNamespaceGuard::os_ |
Definition at line 175 of file dds_generator.h.
Referenced by ~ScopedNamespaceGuard().
std::string ScopedNamespaceGuard::semi_ |
Definition at line 176 of file dds_generator.h.
Referenced by ScopedNamespaceGuard(), and ~ScopedNamespaceGuard().