Classes | |
class | OBT_Exception |
class | AbstractAttribute |
class | AbstractConfigurationFileParser |
class | ConfigurationItem |
class | ConfigurationTree |
class | Event |
class | EventSource |
class | IService |
class | Plugin |
class | PluginInformation |
class | PrimitiveAttribute |
class | BoolAttribute |
class | ShortAttribute |
class | UnsignedShortAttribute |
class | IntAttribute |
class | UnsignedIntAttribute |
class | LongAttribute |
class | UnsignedLongAttribute |
class | FloatAttribute |
class | DoubleAttribute |
class | StringAttribute |
class | PrototypeFactory |
class | RTTI |
class | ServiceManager |
Plugins can add services to the ServiceManager, these services can later be used without knowing their implementation. More... | |
class | Singleton |
struct | TiXmlCursor |
class | TiXmlVisitor |
If you call the Accept() method, it requires being passed a TiXmlVisitor class to handle callbacks. More... | |
class | TiXmlBase |
TiXmlBase is a base class for every class in TinyXml. More... | |
class | TiXmlNode |
The parent class for everything in the Document Object Model. More... | |
class | TiXmlAttribute |
An attribute is a name-value pair. More... | |
class | TiXmlAttributeSet |
class | TiXmlElement |
The element is a container class. More... | |
class | TiXmlComment |
An XML comment. More... | |
class | TiXmlText |
XML text. More... | |
class | TiXmlDeclaration |
In correct XML the declaration is the first entry in the file. More... | |
class | TiXmlUnknown |
Any tag that tinyXml doesn't recognize is saved as an unknown. More... | |
class | TiXmlDocument |
Always the top level node. More... | |
class | TiXmlHandle |
A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly useful thing. More... | |
class | TiXmlPrinter |
Print to memory functionality. More... | |
class | TiXmlParsingData |
class | TracerOutput |
Interface to output messages in a console. More... | |
class | Tracer |
Tracer used to output messages. More... | |
class | TypedAttribute |
class | XMLConfigurationFileParser |
class | TiXmlString |
class | TiXmlOutStream |
Typedefs | |
typedef unsigned long | TypeID |
Enumerations | |
enum | { TIXML_SUCCESS, TIXML_SUCCESS, TIXML_NO_ATTRIBUTE, TIXML_NO_ATTRIBUTE, TIXML_WRONG_TYPE, TIXML_WRONG_TYPE } |
enum | TiXmlEncoding { TIXML_ENCODING_UNKNOWN, TIXML_ENCODING_UNKNOWN, TIXML_ENCODING_UTF8, TIXML_ENCODING_UTF8, TIXML_ENCODING_LEGACY, TIXML_ENCODING_LEGACY, TIXML_ENCODING_UNKNOWN, TIXML_ENCODING_UNKNOWN, TIXML_ENCODING_UTF8, TIXML_ENCODING_UTF8, TIXML_ENCODING_LEGACY, TIXML_ENCODING_LEGACY } |
enum | { TIXML_SUCCESS, TIXML_SUCCESS, TIXML_NO_ATTRIBUTE, TIXML_NO_ATTRIBUTE, TIXML_WRONG_TYPE, TIXML_WRONG_TYPE } |
enum | TiXmlEncoding { TIXML_ENCODING_UNKNOWN, TIXML_ENCODING_UNKNOWN, TIXML_ENCODING_UTF8, TIXML_ENCODING_UTF8, TIXML_ENCODING_LEGACY, TIXML_ENCODING_LEGACY, TIXML_ENCODING_UNKNOWN, TIXML_ENCODING_UNKNOWN, TIXML_ENCODING_UTF8, TIXML_ENCODING_UTF8, TIXML_ENCODING_LEGACY, TIXML_ENCODING_LEGACY } |
Functions | |
template<class TAttribute> | |
TAttribute::value_type | getAttributeValue (const typename TAttribute::owner_type &owner, unsigned int attributeNumber) |
template<class TAttribute> | |
TAttribute::value_type | getAttributeValue (const typename TAttribute::owner_type &owner, const char *name) |
template<class TAttribute> | |
void | setAttributeValue (typename TAttribute::owner_type &owner, unsigned int attributeNumber, typename TAttribute::value_type value) |
template<class TAttribute> | |
void | setAttributeValue (typename TAttribute::owner_type &owner, const char *name, typename TAttribute::value_type value) |
template<class TService> | |
TService * | getService (unsigned int ID) |
template<class TService> | |
const std::map < unsigned int, IService * > * | getServices () |
template<class TService> | |
void | addService (TService *service, unsigned int ID) |
template<class TService> | |
void | removeService (unsigned int ID) |
FILE * | TiXmlFOpen (const char *filename, const char *mode) |
std::istream & | operator>> (std::istream &in, TiXmlNode &base) |
std::ostream & | operator<< (std::ostream &out, const TiXmlNode &base) |
std::string & | operator<< (std::string &out, const TiXmlNode &base) |
TiXmlString | operator+ (const TiXmlString &a, const TiXmlString &b) |
TiXmlString | operator+ (const TiXmlString &a, const char *b) |
TiXmlString | operator+ (const char *a, const TiXmlString &b) |
bool | operator== (const TiXmlString &a, const TiXmlString &b) |
bool | operator< (const TiXmlString &a, const TiXmlString &b) |
bool | operator!= (const TiXmlString &a, const TiXmlString &b) |
bool | operator> (const TiXmlString &a, const TiXmlString &b) |
bool | operator<= (const TiXmlString &a, const TiXmlString &b) |
bool | operator>= (const TiXmlString &a, const TiXmlString &b) |
bool | operator== (const TiXmlString &a, const char *b) |
bool | operator== (const char *a, const TiXmlString &b) |
bool | operator!= (const TiXmlString &a, const char *b) |
bool | operator!= (const char *a, const TiXmlString &b) |
Variables | |
template class OBT_API | Singleton< ConfigurationTree > |
template class OBT_API | Singleton< ServiceManager > |
const int | TIXML_MAJOR_VERSION = 2 |
const int | TIXML_MINOR_VERSION = 5 |
const int | TIXML_PATCH_VERSION = 3 |
const TiXmlEncoding | TIXML_DEFAULT_ENCODING = TIXML_ENCODING_UNKNOWN |
const unsigned char | TIXML_UTF_LEAD_0 = 0xefU |
const unsigned char | TIXML_UTF_LEAD_1 = 0xbbU |
const unsigned char | TIXML_UTF_LEAD_2 = 0xbfU |
template class OBT_API | Singleton< Tracer > |
The Tracer singleton. | |
const int | TIXML_MAJOR_VERSION = 2 |
const int | TIXML_MINOR_VERSION = 5 |
const int | TIXML_PATCH_VERSION = 3 |
const TiXmlEncoding | TIXML_DEFAULT_ENCODING = TIXML_ENCODING_UNKNOWN |
const unsigned char | TIXML_UTF_LEAD_0 = 0xefU |
const unsigned char | TIXML_UTF_LEAD_1 = 0xbbU |
const unsigned char | TIXML_UTF_LEAD_2 = 0xbfU |
typedef unsigned long OBT::TypeID |
anonymous enum |
TIXML_SUCCESS | |
TIXML_SUCCESS | |
TIXML_NO_ATTRIBUTE | |
TIXML_NO_ATTRIBUTE | |
TIXML_WRONG_TYPE | |
TIXML_WRONG_TYPE |
Definition at line 163 of file OBTtinyxml.h.
00164 { 00165 TIXML_SUCCESS, 00166 TIXML_NO_ATTRIBUTE, 00167 TIXML_WRONG_TYPE 00168 };
anonymous enum |
TIXML_SUCCESS | |
TIXML_SUCCESS | |
TIXML_NO_ATTRIBUTE | |
TIXML_NO_ATTRIBUTE | |
TIXML_WRONG_TYPE | |
TIXML_WRONG_TYPE |
Definition at line 162 of file tiny/OBTtinyxml.h.
00163 { 00164 TIXML_SUCCESS, 00165 TIXML_NO_ATTRIBUTE, 00166 TIXML_WRONG_TYPE 00167 };
enum OBT::TiXmlEncoding |
Definition at line 171 of file tiny/OBTtinyxml.h.
00172 { 00173 TIXML_ENCODING_UNKNOWN, 00174 TIXML_ENCODING_UTF8, 00175 TIXML_ENCODING_LEGACY 00176 };
enum OBT::TiXmlEncoding |
Definition at line 172 of file OBTtinyxml.h.
00173 { 00174 TIXML_ENCODING_UNKNOWN, 00175 TIXML_ENCODING_UTF8, 00176 TIXML_ENCODING_LEGACY 00177 };
void OBT::addService | ( | TService * | service, | |
unsigned int | ID = 0 | |||
) | [inline] |
Add a service
service | to add. |
[DEBUG | ONLY] if service is null |
Definition at line 125 of file OBTServiceManager.h.
References OBT_DBG_ASSERT.
00126 { 00127 OBT_DBG_ASSERT( service != NULL ) ; 00128 ServiceManager::ServicesMap::mapped_type& serviceMap 00129 ( Singleton< ServiceManager >::getInstance()._services[ typeid( TService ).name() ] ) ; 00130 serviceMap[ ID ] = service ; 00131 }
TAttribute::value_type OBT::getAttributeValue | ( | const typename TAttribute::owner_type & | owner, | |
const char * | name | |||
) | [inline] |
Definition at line 113 of file OBTAbstractAttribute.h.
00114 { 00115 return ( owner.getRTTI().template getAttribute< TAttribute >( name )->getValue( owner ) ) ; 00116 }
TAttribute::value_type OBT::getAttributeValue | ( | const typename TAttribute::owner_type & | owner, | |
unsigned int | attributeNumber | |||
) | [inline] |
Definition at line 103 of file OBTAbstractAttribute.h.
00104 { 00105 return ( owner.getRTTI().template getAttribute< TAttribute >( attributeNumber )->getValue( owner ) ) ; 00106 }
TService* OBT::getService | ( | unsigned int | ID = 0 |
) | [inline] |
TService | type of the service to get. | |
ID | id of the service to get. |
Definition at line 85 of file OBTServiceManager.h.
References TRACE_WARNING.
00086 { 00087 ServiceManager::ServicesMap& services( Singleton< ServiceManager >::getInstance()._services ) ; 00088 ServiceManager::ServicesMap::iterator servicesIte( services.find( typeid( TService ).name() ) ) ; 00089 if ( servicesIte != services.end() ) 00090 { 00091 std::map< unsigned int, IService* >::iterator ite( servicesIte->second.find( ID ) ) ; 00092 if ( ite != servicesIte->second.end() ) 00093 { 00094 return static_cast<TService*>( ite->second ) ; 00095 } 00096 } 00097 TRACE_WARNING( "The following service was not found : " << typeid( TService ).name() << " with id " << ID ) ; 00098 return NULL ; 00099 }
const std::map< unsigned int, IService* >* OBT::getServices | ( | ) | [inline] |
Get all the services of the given type.
TService | type of the services to get. |
Definition at line 105 of file OBTServiceManager.h.
References TRACE_WARNING.
00106 { 00107 const std::map< unsigned int, IService* >* servicesFound = 0 ; 00108 ServiceManager::ServicesMap& services( Singleton< ServiceManager >::getInstance()._services ) ; 00109 ServiceManager::ServicesMap::const_iterator servicesIte( services.find( typeid( TService ).name() ) ) ; 00110 if ( servicesIte != services.end() ) 00111 { 00112 servicesFound = &servicesIte->second ; 00113 } 00114 else 00115 { 00116 TRACE_WARNING( "The following services was not found : " << typeid( TService ).name() ) ; 00117 } 00118 return servicesFound ; 00119 }
bool OBT::operator!= | ( | const char * | a, | |
const TiXmlString & | b | |||
) | [inline] |
bool OBT::operator!= | ( | const TiXmlString & | a, | |
const char * | b | |||
) | [inline] |
bool OBT::operator!= | ( | const TiXmlString & | a, | |
const TiXmlString & | b | |||
) | [inline] |
TiXmlString OBT::operator+ | ( | const char * | a, | |
const TiXmlString & | b | |||
) |
Definition at line 107 of file OBTtinystr.cpp.
References OBT::TiXmlString::append(), OBT::TiXmlString::length(), and OBT::TiXmlString::reserve().
00108 { 00109 TiXmlString tmp; 00110 TiXmlString::size_type a_len = static_cast<TiXmlString::size_type>( strlen(a) ); 00111 tmp.reserve(a_len + b.length()); 00112 tmp.append(a, a_len); 00113 tmp += b; 00114 return tmp; 00115 }
TiXmlString OBT::operator+ | ( | const TiXmlString & | a, | |
const char * | b | |||
) |
Definition at line 97 of file OBTtinystr.cpp.
References OBT::TiXmlString::append(), OBT::TiXmlString::length(), and OBT::TiXmlString::reserve().
00098 { 00099 TiXmlString tmp; 00100 TiXmlString::size_type b_len = static_cast<TiXmlString::size_type>( strlen(b) ); 00101 tmp.reserve(a.length() + b_len); 00102 tmp += a; 00103 tmp.append(b, b_len); 00104 return tmp; 00105 }
TiXmlString OBT::operator+ | ( | const TiXmlString & | a, | |
const TiXmlString & | b | |||
) |
Definition at line 88 of file OBTtinystr.cpp.
References OBT::TiXmlString::length(), and OBT::TiXmlString::reserve().
00089 { 00090 TiXmlString tmp; 00091 tmp.reserve(a.length() + b.length()); 00092 tmp += a; 00093 tmp += b; 00094 return tmp; 00095 }
bool OBT::operator< | ( | const TiXmlString & | a, | |
const TiXmlString & | b | |||
) | [inline] |
std::string & OBT::operator<< | ( | std::string & | out, | |
const TiXmlNode & | base | |||
) |
Definition at line 1624 of file OBTtinyxml.cpp.
References OBT::TiXmlNode::Accept(), OBT::TiXmlPrinter::SetStreamPrinting(), and OBT::TiXmlPrinter::Str().
01625 { 01626 TiXmlPrinter printer; 01627 printer.SetStreamPrinting(); 01628 base.Accept( &printer ); 01629 out.append( printer.Str() ); 01630 01631 return out; 01632 }
std::ostream & OBT::operator<< | ( | std::ostream & | out, | |
const TiXmlNode & | base | |||
) |
Note that this outputs without any newlines or formatting, as opposed to Print(), which includes tabs and new lines.
The operator<< and operator>> are not completely symmetric. Writing a node to a stream is very well defined. You'll get a nice stream of output, without any extra whitespace or newlines.
But reading is not as well defined. (As it always is.) If you create a TiXmlElement (for example) and read that from an input stream, the text needs to define an element or junk will result. This is true of all input streams, but it's worth keeping in mind.
A TiXmlDocument will read nodes until it reads a root element, and all the children of that root element.
Definition at line 1613 of file OBTtinyxml.cpp.
References OBT::TiXmlNode::Accept(), OBT::TiXmlPrinter::SetStreamPrinting(), and OBT::TiXmlPrinter::Str().
01614 { 01615 TiXmlPrinter printer; 01616 printer.SetStreamPrinting(); 01617 base.Accept( &printer ); 01618 out << printer.Str(); 01619 01620 return out; 01621 }
bool OBT::operator<= | ( | const TiXmlString & | a, | |
const TiXmlString & | b | |||
) | [inline] |
bool OBT::operator== | ( | const char * | a, | |
const TiXmlString & | b | |||
) | [inline] |
bool OBT::operator== | ( | const TiXmlString & | a, | |
const char * | b | |||
) | [inline] |
bool OBT::operator== | ( | const TiXmlString & | a, | |
const TiXmlString & | b | |||
) | [inline] |
Definition at line 270 of file OBTtinystr.h.
References OBT::TiXmlString::c_str(), and OBT::TiXmlString::length().
00271 { 00272 return ( a.length() == b.length() ) // optimization on some platforms 00273 && ( strcmp(a.c_str(), b.c_str()) == 0 ); // actual compare 00274 }
bool OBT::operator> | ( | const TiXmlString & | a, | |
const TiXmlString & | b | |||
) | [inline] |
bool OBT::operator>= | ( | const TiXmlString & | a, | |
const TiXmlString & | b | |||
) | [inline] |
std::istream & OBT::operator>> | ( | std::istream & | in, | |
TiXmlNode & | base | |||
) |
Tolerant of newlines and formatting, but doesn't expect them.
Definition at line 1600 of file OBTtinyxml.cpp.
References OBT::TiXmlBase::Parse(), OBT::TiXmlNode::StreamIn(), TIXML_DEFAULT_ENCODING, and TIXML_STRING.
01601 { 01602 TIXML_STRING tag; 01603 tag.reserve( 8 * 1000 ); 01604 base.StreamIn( &in, &tag ); 01605 01606 base.Parse( tag.c_str(), 0, TIXML_DEFAULT_ENCODING ); 01607 return in; 01608 }
void OBT::removeService | ( | unsigned int | ID = 0 |
) | [inline] |
Remove a service
[DEBUG | ONLY] if service is null |
Definition at line 137 of file OBTServiceManager.h.
00138 { 00139 ServiceManager::ServicesMap::iterator servicesIte 00140 ( Singleton< ServiceManager >::getInstance()._services.find( typeid( TService ).name() ) ) ; 00141 if ( servicesIte != Singleton< ServiceManager >::getInstance()._services.end() ) 00142 { 00143 std::map< unsigned int, IService* >::iterator ite( servicesIte->second.find( ID ) ) ; 00144 if ( ite != servicesIte->second.end() ) 00145 { 00146 servicesIte->second.erase( ite ) ; 00147 if ( servicesIte->second.empty() ) 00148 { 00149 Singleton< ServiceManager >::getInstance()._services.erase( servicesIte ) ; 00150 } 00151 } 00152 } 00153 }
void OBT::setAttributeValue | ( | typename TAttribute::owner_type & | owner, | |
const char * | name, | |||
typename TAttribute::value_type | value | |||
) | [inline] |
Definition at line 133 of file OBTAbstractAttribute.h.
00134 { 00135 owner.getRTTI().template getAttribute< TAttribute >( name )->setValue( owner, value ) ; 00136 }
void OBT::setAttributeValue | ( | typename TAttribute::owner_type & | owner, | |
unsigned int | attributeNumber, | |||
typename TAttribute::value_type | value | |||
) | [inline] |
Definition at line 123 of file OBTAbstractAttribute.h.
00124 { 00125 owner.getRTTI().template getAttribute< TAttribute >( attributeNumber )->setValue( owner, value ) ; 00126 }
FILE * OBT::TiXmlFOpen | ( | const char * | filename, | |
const char * | mode | |||
) |
Definition at line 40 of file OBTtinyxml.cpp.
Referenced by OBT::TiXmlDocument::LoadFile(), and OBT::TiXmlDocument::SaveFile().
00041 { 00042 #if defined(_MSC_VER) && (_MSC_VER >= 1400 ) 00043 FILE* fp = 0; 00044 errno_t err = fopen_s( &fp, filename, mode ); 00045 if ( !err && fp ) 00046 return fp; 00047 return 0; 00048 #else 00049 return fopen( filename, mode ); 00050 #endif 00051 }
template class OBT_API OBT::Singleton< ConfigurationTree > |
Definition at line 69 of file OBTConfigurationTree.h.
template class OBT_API OBT::Singleton< ServiceManager > |
Definition at line 79 of file OBTServiceManager.h.
template class OBT_API OBT::Singleton< Tracer > |
const TiXmlEncoding OBT::TIXML_DEFAULT_ENCODING = TIXML_ENCODING_UNKNOWN |
Definition at line 178 of file tiny/OBTtinyxml.h.
const TiXmlEncoding OBT::TIXML_DEFAULT_ENCODING = TIXML_ENCODING_UNKNOWN |
Definition at line 179 of file OBTtinyxml.h.
Referenced by operator>>(), OBT::TiXmlElement::StreamIn(), and OBT::TiXmlDocument::StreamIn().
const int OBT::TIXML_MAJOR_VERSION = 2 |
Definition at line 101 of file tiny/OBTtinyxml.h.
const int OBT::TIXML_MAJOR_VERSION = 2 |
Definition at line 102 of file OBTtinyxml.h.
const int OBT::TIXML_MINOR_VERSION = 5 |
Definition at line 102 of file tiny/OBTtinyxml.h.
const int OBT::TIXML_MINOR_VERSION = 5 |
Definition at line 103 of file OBTtinyxml.h.
const int OBT::TIXML_PATCH_VERSION = 3 |
Definition at line 103 of file tiny/OBTtinyxml.h.
const int OBT::TIXML_PATCH_VERSION = 3 |
Definition at line 104 of file OBTtinyxml.h.
const unsigned char OBT::TIXML_UTF_LEAD_0 = 0xefU |
Definition at line 64 of file tiny/OBTtinyxmlparser.cpp.
const unsigned char OBT::TIXML_UTF_LEAD_0 = 0xefU |
Definition at line 64 of file OBTtinyxmlparser.cpp.
Referenced by OBT::TiXmlDocument::Parse(), OBT::TiXmlDocument::SaveFile(), OBT::TiXmlBase::SkipWhiteSpace(), and OBT::TiXmlParsingData::Stamp().
const unsigned char OBT::TIXML_UTF_LEAD_1 = 0xbbU |
Definition at line 65 of file tiny/OBTtinyxmlparser.cpp.
const unsigned char OBT::TIXML_UTF_LEAD_1 = 0xbbU |
Definition at line 65 of file OBTtinyxmlparser.cpp.
Referenced by OBT::TiXmlDocument::Parse(), OBT::TiXmlDocument::SaveFile(), OBT::TiXmlBase::SkipWhiteSpace(), and OBT::TiXmlParsingData::Stamp().
const unsigned char OBT::TIXML_UTF_LEAD_2 = 0xbfU |
Definition at line 66 of file tiny/OBTtinyxmlparser.cpp.
const unsigned char OBT::TIXML_UTF_LEAD_2 = 0xbfU |
Definition at line 66 of file OBTtinyxmlparser.cpp.
Referenced by OBT::TiXmlDocument::Parse(), OBT::TiXmlDocument::SaveFile(), OBT::TiXmlBase::SkipWhiteSpace(), and OBT::TiXmlParsingData::Stamp().