Game Develop C++ Platform: XmlMacros.h Source File

| Game Develop C++ Platform Platform for developing native games based on OpenGL and SFML with Game Develop

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Groups Pages
XmlMacros.h
Go to the documentation of this file.
1
10 #ifndef XMLMACROS_H_INCLUDED
11 #define XMLMACROS_H_INCLUDED
12
13 #define GD_CURRENT_ELEMENT_SAVE_ATTRIBUTE(name_, value_) elem->SetAttribute( name_, value_ );
14 #define GD_CURRENT_ELEMENT_SAVE_ATTRIBUTE_FLOAT(name_, value_) elem->SetDoubleAttribute( name_, value_ );
15 #define GD_CURRENT_ELEMENT_SAVE_ATTRIBUTE_DOUBLE(name_, value_) elem->SetDoubleAttribute( name_, value_ );
16 #define GD_CURRENT_ELEMENT_SAVE_ATTRIBUTE_STRING(name_, value_) elem->SetAttribute( name_, value_.c_str() );
17 #define GD_CURRENT_ELEMENT_SAVE_ATTRIBUTE_BOOL(name_, value_) if ( value_ ) elem->SetAttribute( name_, "true" ); else elem->SetAttribute( name_, "false" )
18
19 #define GD_CURRENT_ELEMENT_LOAD_ATTRIBUTE_INT(name_, variable_) if ( elem->Attribute( name_ ) != NULL ) elem->QueryIntAttribute( name_, &variable_ );
20 #define GD_CURRENT_ELEMENT_LOAD_ATTRIBUTE_FLOAT(name_, variable_) if ( elem->Attribute( name_ ) != NULL ) elem->QueryFloatAttribute( name_, &variable_ );
21 #define GD_CURRENT_ELEMENT_LOAD_ATTRIBUTE_DOUBLE(name_, variable_) if ( elem->Attribute( name_ ) != NULL ) elem->QueryDoubleAttribute( name_, &variable_ );
22 #define GD_CURRENT_ELEMENT_LOAD_ATTRIBUTE_STRING(name_, variable_) if ( elem->Attribute( name_ ) != NULL ) variable_ = elem->Attribute( name_ );
23 #define GD_CURRENT_ELEMENT_LOAD_ATTRIBUTE_BOOL(name_, variable_) if ( elem->Attribute( name_ ) != NULL && strcmp( elem->Attribute( name_ ), "false" ) == 0 ) variable_ = false; else variable_ = true;
24
25 #define GD_CURRENT_ELEMENT_GET_ATTRIBUTE_INT(name_, variable_) if ( elem->Attribute( name_ ) != NULL ) elem->QueryIntAttribute( name_, &variable_ );
26 #define GD_CURRENT_ELEMENT_GET_ATTRIBUTE_FLOAT(name_, variable_) if ( elem->Attribute( name_ ) != NULL ) elem->QueryFloatAttribute( name_, &variable_ );
27 #define GD_CURRENT_ELEMENT_GET_ATTRIBUTE_DOUBLE(name_, variable_) if ( elem->Attribute( name_ ) != NULL ) elem->QueryDoubleAttribute( name_, &variable_ );
28 #define GD_CURRENT_ELEMENT_GET_ATTRIBUTE_STRING(name_, variable_) if ( elem->Attribute( name_ ) != NULL ) variable_ = elem->Attribute( name_ );
29 #define GD_CURRENT_ELEMENT_GET_ATTRIBUTE_BOOL(name_, variable_) if ( elem->Attribute( name_ ) != NULL && strcmp( elem->Attribute( name_ ), "false" ) == 0 ) variable_ = false; else variable_ = true;
30
31 #endif // XMLMACROS_H_INCLUDED
32