本文整理汇总了C++中xsd::cxx::xml::dom::parser类的典型用法代码示例。如果您正苦于以下问题:C++ parser类的具体用法?C++ parser怎么用?C++ parser使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了parser类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: parse
void Event_selection::
parse (::xsd::cxx::xml::dom::parser< char >& p,
::xml_schema::Flags f)
{
this->::aosl::Event::parse (p, f);
p.reset_attributes ();
while (p.more_attributes ())
{
const ::xercesc::DOMAttr& i (p.next_attribute ());
const ::xsd::cxx::xml::qualified_name< char > n (
::xsd::cxx::xml::dom::name< char > (i));
if (n.name () == "object" && n.namespace_ ().empty ())
{
::std::auto_ptr< ObjectType > r (
ObjectTraits::create (i, f, this));
this->object_.set (r);
continue;
}
}
if (!object_.present ())
{
throw ::xsd::cxx::tree::expected_attribute< char > (
"object",
"");
}
}
示例2: parse
void Object_ref_element::
parse (::xsd::cxx::xml::dom::parser< char >& p,
::xml_schema::Flags f)
{
while (p.more_attributes ())
{
const ::xercesc::DOMAttr& i (p.next_attribute ());
const ::xsd::cxx::xml::qualified_name< char > n (
::xsd::cxx::xml::dom::name< char > (i));
if (n.name () == "id" && n.namespace_ ().empty ())
{
::std::auto_ptr< IdType > r (
IdTraits::create (i, f, this));
this->id_.set (r);
continue;
}
}
if (!id_.present ())
{
throw ::xsd::cxx::tree::expected_attribute< char > (
"id",
"");
}
}
示例3: parse
void Object_sprite::
parse (::xsd::cxx::xml::dom::parser< char >& p,
::xml_schema::Flags f)
{
this->::aosl::Object::parse (p, f);
for (; p.more_elements (); p.next_element ())
{
const ::xercesc::DOMElement& i (p.cur_element ());
const ::xsd::cxx::xml::qualified_name< char > n (
::xsd::cxx::xml::dom::name< char > (i));
// graphic
//
if (n.name () == "graphic" && n.namespace_ () == "artofsequence.org/aosl/1.0")
{
::std::auto_ptr< GraphicType > r (
GraphicTraits::create (i, f, this));
if (!this->graphic_)
{
this->graphic_.set (r);
continue;
}
}
break;
}
}
示例4: parse
void Properties_graphic_object::
parse (::xsd::cxx::xml::dom::parser< char >& p,
::xml_schema::Flags f)
{
for (; p.more_elements (); p.next_element ())
{
const ::xercesc::DOMElement& i (p.cur_element ());
const ::xsd::cxx::xml::qualified_name< char > n (
::xsd::cxx::xml::dom::name< char > (i));
// output
//
if (n.name () == "output" && n.namespace_ () == "artofsequence.org/aosl/1.0")
{
::std::auto_ptr< OutputType > r (
OutputTraits::create (i, f, this));
if (!this->output_)
{
this->output_.set (r);
continue;
}
}
// input
//
if (n.name () == "input" && n.namespace_ () == "artofsequence.org/aosl/1.0")
{
::std::auto_ptr< InputType > r (
InputTraits::create (i, f, this));
if (!this->input_)
{
this->input_.set (r);
continue;
}
}
break;
}
}
示例5: parse
void Navigation::
parse (::xsd::cxx::xml::dom::parser< char >& p,
::xml_schema::Flags f)
{
for (; p.more_elements (); p.next_element ())
{
const ::xercesc::DOMElement& i (p.cur_element ());
const ::xsd::cxx::xml::qualified_name< char > n (
::xsd::cxx::xml::dom::name< char > (i));
// event
//
{
::xsd::cxx::tree::type_factory_map< char >& tfm (
::xsd::cxx::tree::type_factory_map_instance< 0, char > ());
::std::auto_ptr< ::xsd::cxx::tree::type > tmp (
tfm.create (
"event",
"artofsequence.org/aosl/1.0",
&::xsd::cxx::tree::factory_impl< EventType >,
true, true, i, n, f, this));
if (tmp.get () != 0)
{
::std::auto_ptr< EventType > r (
dynamic_cast< EventType* > (tmp.get ()));
if (r.get ())
tmp.release ();
else
throw ::xsd::cxx::tree::not_derived< char > ();
this->event_.push_back (r);
continue;
}
}
break;
}
}
示例6: parse
void Event::
parse (::xsd::cxx::xml::dom::parser< char >& p,
::xml_schema::Flags f)
{
while (p.more_attributes ())
{
const ::xercesc::DOMAttr& i (p.next_attribute ());
const ::xsd::cxx::xml::qualified_name< char > n (
::xsd::cxx::xml::dom::name< char > (i));
if (n.name () == "move" && n.namespace_ ().empty ())
{
::std::auto_ptr< MoveType > r (
MoveTraits::create (i, f, this));
this->move_.set (r);
continue;
}
if (n.name () == "type" && n.namespace_ ().empty ())
{
::std::auto_ptr< TypeType > r (
TypeTraits::create (i, f, this));
this->type_.set (r);
continue;
}
}
if (!move_.present ())
{
throw ::xsd::cxx::tree::expected_attribute< char > (
"move",
"");
}
if (!type_.present ())
{
this->type_.set (type_default_value ());
}
}
示例7: parse
void Axis_x::
parse (::xsd::cxx::xml::dom::parser< char >& p,
::xml_schema::Flags f)
{
while (p.more_attributes ())
{
const ::xercesc::DOMAttr& i (p.next_attribute ());
const ::xsd::cxx::xml::qualified_name< char > n (
::xsd::cxx::xml::dom::name< char > (i));
if (n.name () == "origin" && n.namespace_ ().empty ())
{
::std::auto_ptr< OriginType > r (
OriginTraits::create (i, f, this));
this->origin_.set (r);
continue;
}
if (n.name () == "positive" && n.namespace_ ().empty ())
{
::std::auto_ptr< PositiveType > r (
PositiveTraits::create (i, f, this));
this->positive_.set (r);
continue;
}
}
if (!origin_.present ())
{
this->origin_.set (origin_default_value ());
}
if (!positive_.present ())
{
this->positive_.set (positive_default_value ());
}
}
示例8: parse
void Change_transform::
parse (::xsd::cxx::xml::dom::parser< char >& p,
::xml_schema::Flags f)
{
this->::aosl::Change::parse (p, f);
for (; p.more_elements (); p.next_element ())
{
const ::xercesc::DOMElement& i (p.cur_element ());
const ::xsd::cxx::xml::qualified_name< char > n (
::xsd::cxx::xml::dom::name< char > (i));
// relative
//
if (n.name () == "relative" && n.namespace_ () == "artofsequence.org/aosl/1.0")
{
::std::auto_ptr< RelativeType > r (
RelativeTraits::create (i, f, this));
this->relative_.push_back (r);
continue;
}
// absolute
//
if (n.name () == "absolute" && n.namespace_ () == "artofsequence.org/aosl/1.0")
{
::std::auto_ptr< AbsoluteType > r (
AbsoluteTraits::create (i, f, this));
this->absolute_.push_back (r);
continue;
}
break;
}
}
示例9: parse
void cuboids_t::
parse (::xsd::cxx::xml::dom::parser< char >& p,
::xml_schema::flags f)
{
for (; p.more_elements (); p.next_element ())
{
const ::xercesc::DOMElement& i (p.cur_element ());
const ::xsd::cxx::xml::qualified_name< char > n (
::xsd::cxx::xml::dom::name< char > (i));
// cuboid
//
if (n.name () == "cuboid" && n.namespace_ ().empty ())
{
::std::auto_ptr< cuboid_type > r (
cuboid_traits::create (i, f, this));
this->cuboid_.push_back (r);
continue;
}
break;
}
}
示例10: parse
void List_resource::
parse (::xsd::cxx::xml::dom::parser< char >& p,
::xml_schema::Flags f)
{
for (; p.more_elements (); p.next_element ())
{
const ::xercesc::DOMElement& i (p.cur_element ());
const ::xsd::cxx::xml::qualified_name< char > n (
::xsd::cxx::xml::dom::name< char > (i));
// resource
//
if (n.name () == "resource" && n.namespace_ () == "artofsequence.org/aosl/1.0")
{
::std::auto_ptr< ResourceType > r (
ResourceTraits::create (i, f, this));
this->resource_.push_back (r);
continue;
}
break;
}
}
示例11: parse
void Properties_stream_object::
parse (::xsd::cxx::xml::dom::parser< char >& p,
::xml_schema::Flags f)
{
while (p.more_attributes ())
{
const ::xercesc::DOMAttr& i (p.next_attribute ());
const ::xsd::cxx::xml::qualified_name< char > n (
::xsd::cxx::xml::dom::name< char > (i));
if (n.name () == "begin" && n.namespace_ ().empty ())
{
::std::auto_ptr< BeginType > r (
BeginTraits::create (i, f, this));
this->begin_.set (r);
continue;
}
if (n.name () == "end" && n.namespace_ ().empty ())
{
::std::auto_ptr< EndType > r (
EndTraits::create (i, f, this));
this->end_.set (r);
continue;
}
if (n.name () == "loop" && n.namespace_ ().empty ())
{
this->loop_.set (LoopTraits::create (i, f, this));
continue;
}
if (n.name () == "interval" && n.namespace_ ().empty ())
{
::std::auto_ptr< IntervalType > r (
IntervalTraits::create (i, f, this));
this->interval_.set (r);
continue;
}
if (n.name () == "controller" && n.namespace_ ().empty ())
{
::std::auto_ptr< ControllerType > r (
ControllerTraits::create (i, f, this));
this->controller_.set (r);
continue;
}
if (n.name () == "activation" && n.namespace_ ().empty ())
{
::std::auto_ptr< ActivationType > r (
ActivationTraits::create (i, f, this));
this->activation_.set (r);
continue;
}
}
if (!begin_.present ())
{
this->begin_.set (begin_default_value ());
}
if (!end_.present ())
{
this->end_.set (end_default_value ());
}
if (!loop_.present ())
{
this->loop_.set (loop_default_value ());
}
if (!interval_.present ())
{
this->interval_.set (interval_default_value ());
}
if (!controller_.present ())
{
this->controller_.set (controller_default_value ());
}
if (!activation_.present ())
{
this->activation_.set (activation_default_value ());
}
}
示例12: parse
void Layer::
parse (::xsd::cxx::xml::dom::parser< char >& p,
::xml_schema::Flags f)
{
for (; p.more_elements (); p.next_element ())
{
const ::xercesc::DOMElement& i (p.cur_element ());
const ::xsd::cxx::xml::qualified_name< char > n (
::xsd::cxx::xml::dom::name< char > (i));
// extension
//
if (n.name () == "extension" && n.namespace_ () == "artofsequence.org/aosl/1.0")
{
::std::auto_ptr< ExtensionType > r (
ExtensionTraits::create (i, f, this));
if (!this->extension_)
{
this->extension_.set (r);
continue;
}
}
// object
//
if (n.name () == "object" && n.namespace_ () == "artofsequence.org/aosl/1.0")
{
::std::auto_ptr< ObjectType > r (
ObjectTraits::create (i, f, this));
this->object_.push_back (r);
continue;
}
break;
}
while (p.more_attributes ())
{
const ::xercesc::DOMAttr& i (p.next_attribute ());
const ::xsd::cxx::xml::qualified_name< char > n (
::xsd::cxx::xml::dom::name< char > (i));
if (n.name () == "id" && n.namespace_ ().empty ())
{
::std::auto_ptr< IdType > r (
IdTraits::create (i, f, this));
this->id_.set (r);
continue;
}
if (n.name () == "active" && n.namespace_ ().empty ())
{
this->active_.set (ActiveTraits::create (i, f, this));
continue;
}
}
if (!id_.present ())
{
throw ::xsd::cxx::tree::expected_attribute< char > (
"id",
"");
}
if (!active_.present ())
{
this->active_.set (active_default_value ());
}
}
示例13: parse
void Change::
parse (::xsd::cxx::xml::dom::parser< char >& p,
::xml_schema::Flags f)
{
for (; p.more_elements (); p.next_element ())
{
const ::xercesc::DOMElement& i (p.cur_element ());
const ::xsd::cxx::xml::qualified_name< char > n (
::xsd::cxx::xml::dom::name< char > (i));
// effects
//
if (n.name () == "effects" && n.namespace_ () == "artofsequence.org/aosl/1.0")
{
::std::auto_ptr< EffectsType > r (
EffectsTraits::create (i, f, this));
if (!this->effects_)
{
this->effects_.set (r);
continue;
}
}
// script
//
if (n.name () == "script" && n.namespace_ () == "artofsequence.org/aosl/1.0")
{
::std::auto_ptr< ScriptType > r (
ScriptTraits::create (i, f, this));
if (!this->script_)
{
this->script_.set (r);
continue;
}
}
// extension
//
if (n.name () == "extension" && n.namespace_ () == "artofsequence.org/aosl/1.0")
{
::std::auto_ptr< ExtensionType > r (
ExtensionTraits::create (i, f, this));
if (!this->extension_)
{
this->extension_.set (r);
continue;
}
}
break;
}
while (p.more_attributes ())
{
const ::xercesc::DOMAttr& i (p.next_attribute ());
const ::xsd::cxx::xml::qualified_name< char > n (
::xsd::cxx::xml::dom::name< char > (i));
if (n.name () == "type" && n.namespace_ ().empty ())
{
::std::auto_ptr< TypeType > r (
TypeTraits::create (i, f, this));
this->type_.set (r);
continue;
}
if (n.name () == "object" && n.namespace_ ().empty ())
{
::std::auto_ptr< ObjectType > r (
ObjectTraits::create (i, f, this));
this->object_.set (r);
continue;
}
}
if (!type_.present ())
{
this->type_.set (type_default_value ());
}
if (!object_.present ())
{
throw ::xsd::cxx::tree::expected_attribute< char > (
"object",
"");
}
}
示例14: parse
void Stage::
parse (::xsd::cxx::xml::dom::parser< char >& p,
::xml_schema::Flags f)
{
for (; p.more_elements (); p.next_element ())
{
const ::xercesc::DOMElement& i (p.cur_element ());
const ::xsd::cxx::xml::qualified_name< char > n (
::xsd::cxx::xml::dom::name< char > (i));
// navigation
//
if (n.name () == "navigation" && n.namespace_ () == "artofsequence.org/aosl/1.0")
{
::std::auto_ptr< NavigationType > r (
NavigationTraits::create (i, f, this));
if (!this->navigation_)
{
this->navigation_.set (r);
continue;
}
}
// script
//
if (n.name () == "script" && n.namespace_ () == "artofsequence.org/aosl/1.0")
{
::std::auto_ptr< ScriptType > r (
ScriptTraits::create (i, f, this));
if (!this->script_)
{
this->script_.set (r);
continue;
}
}
// extension
//
if (n.name () == "extension" && n.namespace_ () == "artofsequence.org/aosl/1.0")
{
::std::auto_ptr< ExtensionType > r (
ExtensionTraits::create (i, f, this));
if (!this->extension_)
{
this->extension_.set (r);
continue;
}
}
break;
}
while (p.more_attributes ())
{
const ::xercesc::DOMAttr& i (p.next_attribute ());
const ::xsd::cxx::xml::qualified_name< char > n (
::xsd::cxx::xml::dom::name< char > (i));
if (n.name () == "id" && n.namespace_ ().empty ())
{
::std::auto_ptr< IdType > r (
IdTraits::create (i, f, this));
this->id_.set (r);
continue;
}
}
if (!id_.present ())
{
throw ::xsd::cxx::tree::expected_attribute< char > (
"id",
"");
}
}
示例15: parse
void Story::
parse (::xsd::cxx::xml::dom::parser< char >& p,
::xml_schema::Flags f)
{
for (; p.more_elements (); p.next_element ())
{
const ::xercesc::DOMElement& i (p.cur_element ());
const ::xsd::cxx::xml::qualified_name< char > n (
::xsd::cxx::xml::dom::name< char > (i));
// properties
//
if (n.name () == "properties" && n.namespace_ () == "artofsequence.org/aosl/1.0")
{
::std::auto_ptr< PropertiesType > r (
PropertiesTraits::create (i, f, this));
if (!this->properties_)
{
this->properties_.set (r);
continue;
}
}
// navigation
//
if (n.name () == "navigation" && n.namespace_ () == "artofsequence.org/aosl/1.0")
{
::std::auto_ptr< NavigationType > r (
NavigationTraits::create (i, f, this));
if (!this->navigation_)
{
this->navigation_.set (r);
continue;
}
}
// stages
//
if (n.name () == "stages" && n.namespace_ () == "artofsequence.org/aosl/1.0")
{
::std::auto_ptr< StagesType > r (
StagesTraits::create (i, f, this));
if (!stages_.present ())
{
this->stages_.set (r);
continue;
}
}
// moves
//
if (n.name () == "moves" && n.namespace_ () == "artofsequence.org/aosl/1.0")
{
::std::auto_ptr< MovesType > r (
MovesTraits::create (i, f, this));
if (!moves_.present ())
{
this->moves_.set (r);
continue;
}
}
break;
}
if (!stages_.present ())
{
throw ::xsd::cxx::tree::expected_element< char > (
"stages",
"artofsequence.org/aosl/1.0");
}
if (!moves_.present ())
{
throw ::xsd::cxx::tree::expected_element< char > (
"moves",
"artofsequence.org/aosl/1.0");
}
while (p.more_attributes ())
{
const ::xercesc::DOMAttr& i (p.next_attribute ());
const ::xsd::cxx::xml::qualified_name< char > n (
::xsd::cxx::xml::dom::name< char > (i));
if (n.name () == "begin" && n.namespace_ ().empty ())
{
::std::auto_ptr< BeginType > r (
BeginTraits::create (i, f, this));
this->begin_.set (r);
continue;
}
}
if (!begin_.present ())
//.........这里部分代码省略.........