コード例 #1
0
ファイル: object_sprite.cpp プロジェクト: joonhwan/aosl-cpp
  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;
    }
  }
コード例 #2
0
  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;
    }
  }
コード例 #3
0
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;
    }
}
コード例 #4
0
  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;
    }
  }
コード例 #5
0
  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;
    }
  }
コード例 #6
0
ファイル: InputCuboids.cpp プロジェクト: AndSt/MolSim
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;
  }
}
コード例 #7
0
ファイル: layer.cpp プロジェクト: invy/mjklaim-freewindows
  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 ());
    }
  }
コード例 #8
0
ファイル: InputCuboids.cpp プロジェクト: AndSt/MolSim
void cuboid_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));

    // meshWidth
    //
    if (n.name () == "meshWidth" && n.namespace_ ().empty ())
    {
      if (!meshWidth_.present ())
      {
        this->meshWidth_.set (meshWidth_traits::create (i, f, this));
        continue;
      }
    }

    // mass
    //
    if (n.name () == "mass" && n.namespace_ ().empty ())
    {
      if (!mass_.present ())
      {
        this->mass_.set (mass_traits::create (i, f, this));
        continue;
      }
    }

    // meanV
    //
    if (n.name () == "meanV" && n.namespace_ ().empty ())
    {
      if (!meanV_.present ())
      {
        this->meanV_.set (meanV_traits::create (i, f, this));
        continue;
      }
    }

    // parTypeC
    //
    if (n.name () == "parTypeC" && n.namespace_ ().empty ())
    {
      if (!parTypeC_.present ())
      {
        this->parTypeC_.set (parTypeC_traits::create (i, f, this));
        continue;
      }
    }

    // epsilon
    //
    if (n.name () == "epsilon" && n.namespace_ ().empty ())
    {
      if (!epsilon_.present ())
      {
        this->epsilon_.set (epsilon_traits::create (i, f, this));
        continue;
      }
    }

    // sigma
    //
    if (n.name () == "sigma" && n.namespace_ ().empty ())
    {
      if (!sigma_.present ())
      {
        this->sigma_.set (sigma_traits::create (i, f, this));
        continue;
      }
    }

    // originVector
    //
    if (n.name () == "originVector" && n.namespace_ ().empty ())
    {
      ::std::auto_ptr< originVector_type > r (
        originVector_traits::create (i, f, this));

      if (!originVector_.present ())
      {
        this->originVector_.set (r);
        continue;
      }
    }

    // startVelocity
    //
    if (n.name () == "startVelocity" && n.namespace_ ().empty ())
    {
      ::std::auto_ptr< startVelocity_type > r (
        startVelocity_traits::create (i, f, this));

      if (!startVelocity_.present ())
      {
        this->startVelocity_.set (r);
        continue;
      }
    }

    // size3D
    //
    if (n.name () == "size3D" && n.namespace_ ().empty ())
    {
      ::std::auto_ptr< size3D_type > r (
        size3D_traits::create (i, f, this));

      if (!size3D_.present ())
      {
        this->size3D_.set (r);
        continue;
      }
    }

    break;
  }

  if (!meshWidth_.present ())
  {
    throw ::xsd::cxx::tree::expected_element< char > (
      "meshWidth",
      "");
  }

  if (!mass_.present ())
  {
    throw ::xsd::cxx::tree::expected_element< char > (
      "mass",
      "");
  }

  if (!meanV_.present ())
  {
    throw ::xsd::cxx::tree::expected_element< char > (
      "meanV",
      "");
  }

  if (!parTypeC_.present ())
  {
    throw ::xsd::cxx::tree::expected_element< char > (
      "parTypeC",
      "");
  }

  if (!epsilon_.present ())
  {
    throw ::xsd::cxx::tree::expected_element< char > (
      "epsilon",
      "");
  }

  if (!sigma_.present ())
  {
    throw ::xsd::cxx::tree::expected_element< char > (
      "sigma",
      "");
  }

  if (!originVector_.present ())
  {
    throw ::xsd::cxx::tree::expected_element< char > (
      "originVector",
      "");
  }

  if (!startVelocity_.present ())
  {
    throw ::xsd::cxx::tree::expected_element< char > (
      "startVelocity",
      "");
  }

  if (!size3D_.present ())
  {
    throw ::xsd::cxx::tree::expected_element< char > (
      "size3D",
      "");
  }
}
コード例 #9
0
ファイル: InputCuboids.cpp プロジェクト: AndSt/MolSim
void size3D_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));

    // width
    //
    if (n.name () == "width" && n.namespace_ ().empty ())
    {
      if (!width_.present ())
      {
        this->width_.set (width_traits::create (i, f, this));
        continue;
      }
    }

    // height
    //
    if (n.name () == "height" && n.namespace_ ().empty ())
    {
      if (!height_.present ())
      {
        this->height_.set (height_traits::create (i, f, this));
        continue;
      }
    }

    // depth
    //
    if (n.name () == "depth" && n.namespace_ ().empty ())
    {
      if (!depth_.present ())
      {
        this->depth_.set (depth_traits::create (i, f, this));
        continue;
      }
    }

    break;
  }

  if (!width_.present ())
  {
    throw ::xsd::cxx::tree::expected_element< char > (
      "width",
      "");
  }

  if (!height_.present ())
  {
    throw ::xsd::cxx::tree::expected_element< char > (
      "height",
      "");
  }

  if (!depth_.present ())
  {
    throw ::xsd::cxx::tree::expected_element< char > (
      "depth",
      "");
  }
}
コード例 #10
0
ファイル: InputCuboids.cpp プロジェクト: AndSt/MolSim
void startV_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));

    // velX
    //
    if (n.name () == "velX" && n.namespace_ ().empty ())
    {
      if (!velX_.present ())
      {
        this->velX_.set (velX_traits::create (i, f, this));
        continue;
      }
    }

    // velY
    //
    if (n.name () == "velY" && n.namespace_ ().empty ())
    {
      if (!velY_.present ())
      {
        this->velY_.set (velY_traits::create (i, f, this));
        continue;
      }
    }

    // velZ
    //
    if (n.name () == "velZ" && n.namespace_ ().empty ())
    {
      if (!velZ_.present ())
      {
        this->velZ_.set (velZ_traits::create (i, f, this));
        continue;
      }
    }

    break;
  }

  if (!velX_.present ())
  {
    throw ::xsd::cxx::tree::expected_element< char > (
      "velX",
      "");
  }

  if (!velY_.present ())
  {
    throw ::xsd::cxx::tree::expected_element< char > (
      "velY",
      "");
  }

  if (!velZ_.present ())
  {
    throw ::xsd::cxx::tree::expected_element< char > (
      "velZ",
      "");
  }
}
コード例 #11
0
ファイル: change.cpp プロジェクト: invy/mjklaim-freewindows
  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",
        "");
    }
  }
コード例 #12
0
ファイル: stage.cpp プロジェクト: invy/mjklaim-freewindows
  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",
        "");
    }
  }
コード例 #13
0
ファイル: story.cpp プロジェクト: invy/mjklaim-freewindows
  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 ())
    {
      throw ::xsd::cxx::tree::expected_attribute< char > (
        "begin",
        "");
    }
  }