openddl-parser: latest greatest.
Signed-off-by: Kim Kulling <kim.kulling@googlemail.com>pull/502/head
parent
0e579bfb06
commit
e9dcad4181
|
@ -116,14 +116,6 @@ const std::string &DDLNode::getName() const {
|
|||
return m_name;
|
||||
}
|
||||
|
||||
void DDLNode::setProperties( Property *first ) {
|
||||
m_properties = first;
|
||||
}
|
||||
|
||||
Property *DDLNode::getProperties() const {
|
||||
return m_properties;
|
||||
}
|
||||
|
||||
void DDLNode::setValue( Value *val ) {
|
||||
m_value = val;
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ static bool isIntegerType( Value::ValueType integerType ) {
|
|||
return true;
|
||||
}
|
||||
|
||||
static DDLNode *createDDLNode( Identifier *id, Property *first, OpenDDLParser *parser ) {
|
||||
static DDLNode *createDDLNode( Identifier *id, OpenDDLParser *parser ) {
|
||||
if( nullptr == id || ddl_nullptr == parser ) {
|
||||
return ddl_nullptr;
|
||||
}
|
||||
|
@ -80,9 +80,6 @@ static DDLNode *createDDLNode( Identifier *id, Property *first, OpenDDLParser *p
|
|||
const std::string type( id->m_buffer );
|
||||
DDLNode *parent( parser->top() );
|
||||
DDLNode *node = DDLNode::create( type, "", parent );
|
||||
if( ddl_nullptr != first ) {
|
||||
node->setProperties( first );
|
||||
}
|
||||
|
||||
return node;
|
||||
}
|
||||
|
@ -254,8 +251,13 @@ char *OpenDDLParser::parseHeader( char *in, char *end ) {
|
|||
in++;
|
||||
}
|
||||
|
||||
// set the properties
|
||||
if( ddl_nullptr != first ) {
|
||||
m_context->setProperties( first );
|
||||
}
|
||||
|
||||
// store the node
|
||||
DDLNode *node( createDDLNode( id, first, this ) );
|
||||
DDLNode *node( createDDLNode( id, this ) );
|
||||
if( nullptr != node ) {
|
||||
pushNode( node );
|
||||
} else {
|
||||
|
|
|
@ -55,8 +55,6 @@ public:
|
|||
const std::string &getType() const;
|
||||
void setName( const std::string &name );
|
||||
const std::string &getName() const;
|
||||
void setProperties( Property *first );
|
||||
Property *getProperties() const;
|
||||
void setValue( Value *val );
|
||||
Value *getValue() const;
|
||||
void setDataArrayList( DataArrayList *dtArrayList );
|
||||
|
|
|
@ -141,8 +141,22 @@ struct Context {
|
|||
, m_root( ddl_nullptr ) {
|
||||
// empty
|
||||
}
|
||||
|
||||
void setProperties( Property *first );
|
||||
Property *getProperties() const;
|
||||
};
|
||||
|
||||
|
||||
inline
|
||||
void Context::setProperties( Property *first ) {
|
||||
m_properties = first;
|
||||
}
|
||||
|
||||
inline
|
||||
Property *Context::getProperties() const {
|
||||
return m_properties;
|
||||
}
|
||||
|
||||
END_ODDLPARSER_NS
|
||||
|
||||
#define ODDL_NO_COPYING( classname ) \
|
||||
|
|
Loading…
Reference in New Issue