From cbf21587150381fc9a6f8d845c14346ad4b1fa2a Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Fri, 5 Mar 2021 14:52:29 +0000 Subject: [PATCH 01/17] enh: regenerate for NeuroML 2.1 --- CMakeLists.txt | 8 +- cmake/modules/FindXSD.cmake | 2 +- .../{NeuroML_v2beta4.cxx => NeuroML_v2.1.cxx} | 5396 +++++++++++--- .../{NeuroML_v2beta4.hxx => NeuroML_v2.1.hxx} | 6445 +++++++++++++---- .../{NeuroML_v2beta4.xsd => NeuroML_v2.1.xsd} | 353 +- 5 files changed, 9508 insertions(+), 2696 deletions(-) rename src/schema/{NeuroML_v2beta4.cxx => NeuroML_v2.1.cxx} (93%) rename src/schema/{NeuroML_v2beta4.hxx => NeuroML_v2.1.hxx} (93%) rename src/schema/{NeuroML_v2beta4.xsd => NeuroML_v2.1.xsd} (91%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 73a91ad..0488f74 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,19 +10,19 @@ cmake_policy(SET CMP0042 NEW) # Mac OS @rpath cmake_policy(SET CMP0048 NEW) # VERSION option to project() # Note: the version number uses Semantic Versioning http://semver.org/ -project(NeuroML_API VERSION 0.1.0) +project(NeuroML_API VERSION 2.1.0) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake/modules) # Developer settable options ############################ # Which schema to provide the API for -set(NeuroML_SCHEMA_PATH "${PROJECT_SOURCE_DIR}/src/schema/NeuroML_v2beta4.xsd" +set(NeuroML_SCHEMA_PATH "${PROJECT_SOURCE_DIR}/src/schema/NeuroML_v2.1.xsd" CACHE PATH "Path to the schema file to base the API on.") get_filename_component(NeuroML_SCHEMA_ABSPATH "${NeuroML_SCHEMA_PATH}" REALPATH) -get_filename_component(NeuroML_SCHEMA_NAME "${NeuroML_SCHEMA_PATH}" NAME_WE) +get_filename_component(NeuroML_SCHEMA_NAME "${NeuroML_SCHEMA_ABSPATH}" NAME_WLE) # Default to shared libs option(BUILD_SHARED_LIBS "Build NeuroML API as a shared library" ON) @@ -62,7 +62,7 @@ find_package(XercesC REQUIRED) list(APPEND NeuroML_INCLUDES "${XercesC_INCLUDE_DIRS}") # Can we regenerate the schema wrapper? -find_package(XSD QUIET) +find_package(XSD) if (XSD_FOUND) list(APPEND NeuroML_INCLUDES "${XSD_INCLUDE_DIRS}") file(GLOB _XSD_DEPS "src/schema/*.txt") diff --git a/cmake/modules/FindXSD.cmake b/cmake/modules/FindXSD.cmake index d16330a..76223b5 100644 --- a/cmake/modules/FindXSD.cmake +++ b/cmake/modules/FindXSD.cmake @@ -79,7 +79,7 @@ MACRO( XSD_SCHEMA NAME FILE EXTRA_DEPS) # destination file path sans any extension and then build paths to the # generated files. # - GET_FILENAME_COMPONENT( xs_FILE "${FILE}" NAME_WE ) + GET_FILENAME_COMPONENT( xs_FILE "${FILE}" NAME_WLE ) GET_FILENAME_COMPONENT( xs_FILE_DIR "${FILE}" DIRECTORY ) file(RELATIVE_PATH xs_FILE_REL "${CMAKE_SOURCE_DIR}" "${FILE}" ) # set(xs_OUT_TMP "${CMAKE_BINARY_DIR}/${xs_FILE_REL}") diff --git a/src/schema/NeuroML_v2beta4.cxx b/src/schema/NeuroML_v2.1.cxx similarity index 93% rename from src/schema/NeuroML_v2beta4.cxx rename to src/schema/NeuroML_v2.1.cxx index aeb4d64..d956c91 100644 --- a/src/schema/NeuroML_v2beta4.cxx +++ b/src/schema/NeuroML_v2.1.cxx @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2014 Code Synthesis Tools CC +// Copyright (c) 2005-2017 Code Synthesis Tools CC // // This program was generated by CodeSynthesis XSD, an XML Schema to // C++ data binding compiler. @@ -39,7 +39,7 @@ #include -#include "NeuroML_v2beta4.hxx" +#include "NeuroML_v2.1.hxx" namespace neuroml2 { @@ -139,6 +139,23 @@ namespace neuroml2 // + // ZeroOrOne + // + + ZeroOrOne:: + ZeroOrOne (::xml_schema::double_ v): ::xsd::cxx::tree::fundamental_base< ::xml_schema::double_, char, ::xml_schema::simple_type, ::xsd::cxx::tree::schema_type::double_ > (v) + { + } + + ZeroOrOne:: + ZeroOrOne (const ZeroOrOne& v, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::xsd::cxx::tree::fundamental_base< ::xml_schema::double_, char, ::xml_schema::simple_type, ::xsd::cxx::tree::schema_type::double_ > (v, f, c) + { + } + + // Notes // @@ -202,6 +219,24 @@ namespace neuroml2 // ComponentType // + const ComponentType::Property_sequence& ComponentType:: + Property () const + { + return this->Property_; + } + + ComponentType::Property_sequence& ComponentType:: + Property () + { + return this->Property_; + } + + void ComponentType:: + Property (const Property_sequence& s) + { + this->Property_ = s; + } + const ComponentType::Parameter_sequence& ComponentType:: Parameter () const { @@ -238,6 +273,24 @@ namespace neuroml2 this->Constant_ = s; } + const ComponentType::Exposure_sequence& ComponentType:: + Exposure () const + { + return this->Exposure_; + } + + ComponentType::Exposure_sequence& ComponentType:: + Exposure () + { + return this->Exposure_; + } + + void ComponentType:: + Exposure (const Exposure_sequence& s) + { + this->Exposure_ = s; + } + const ComponentType::Requirement_sequence& ComponentType:: Requirement () const { @@ -256,6 +309,24 @@ namespace neuroml2 this->Requirement_ = s; } + const ComponentType::InstanceRequirement_sequence& ComponentType:: + InstanceRequirement () const + { + return this->InstanceRequirement_; + } + + ComponentType::InstanceRequirement_sequence& ComponentType:: + InstanceRequirement () + { + return this->InstanceRequirement_; + } + + void ComponentType:: + InstanceRequirement (const InstanceRequirement_sequence& s) + { + this->InstanceRequirement_ = s; + } + const ComponentType::Dynamics_sequence& ComponentType:: Dynamics () const { @@ -465,345 +536,533 @@ namespace neuroml2 } - // NamedDimensionalType + // Exposure // - const NamedDimensionalType::name_type& NamedDimensionalType:: + const Exposure::name_type& Exposure:: name () const { return this->name_.get (); } - NamedDimensionalType::name_type& NamedDimensionalType:: + Exposure::name_type& Exposure:: name () { return this->name_.get (); } - void NamedDimensionalType:: + void Exposure:: name (const name_type& x) { this->name_.set (x); } - void NamedDimensionalType:: + void Exposure:: name (::std::unique_ptr< name_type > x) { this->name_.set (std::move (x)); } - const NamedDimensionalType::dimension_type& NamedDimensionalType:: + const Exposure::dimension_type& Exposure:: dimension () const { return this->dimension_.get (); } - NamedDimensionalType::dimension_type& NamedDimensionalType:: + Exposure::dimension_type& Exposure:: dimension () { return this->dimension_.get (); } - void NamedDimensionalType:: + void Exposure:: dimension (const dimension_type& x) { this->dimension_.set (x); } - void NamedDimensionalType:: + void Exposure:: dimension (::std::unique_ptr< dimension_type > x) { this->dimension_.set (std::move (x)); } - const NamedDimensionalType::dimension_type& NamedDimensionalType:: - dimension_default_value () - { - return dimension_default_value_; - } - - const NamedDimensionalType::description_optional& NamedDimensionalType:: + const Exposure::description_optional& Exposure:: description () const { return this->description_; } - NamedDimensionalType::description_optional& NamedDimensionalType:: + Exposure::description_optional& Exposure:: description () { return this->description_; } - void NamedDimensionalType:: + void Exposure:: description (const description_type& x) { this->description_.set (x); } - void NamedDimensionalType:: + void Exposure:: description (const description_optional& x) { this->description_ = x; } - void NamedDimensionalType:: + void Exposure:: description (::std::unique_ptr< description_type > x) { this->description_.set (std::move (x)); } - // Parameter + // NamedDimensionalType // + const NamedDimensionalType::name_type& NamedDimensionalType:: + name () const + { + return this->name_.get (); + } - // Requirement - // + NamedDimensionalType::name_type& NamedDimensionalType:: + name () + { + return this->name_.get (); + } + void NamedDimensionalType:: + name (const name_type& x) + { + this->name_.set (x); + } - // Dynamics - // + void NamedDimensionalType:: + name (::std::unique_ptr< name_type > x) + { + this->name_.set (std::move (x)); + } - const Dynamics::DerivedVariable_sequence& Dynamics:: - DerivedVariable () const + const NamedDimensionalType::dimension_type& NamedDimensionalType:: + dimension () const { - return this->DerivedVariable_; + return this->dimension_.get (); } - Dynamics::DerivedVariable_sequence& Dynamics:: - DerivedVariable () + NamedDimensionalType::dimension_type& NamedDimensionalType:: + dimension () { - return this->DerivedVariable_; + return this->dimension_.get (); } - void Dynamics:: - DerivedVariable (const DerivedVariable_sequence& s) + void NamedDimensionalType:: + dimension (const dimension_type& x) { - this->DerivedVariable_ = s; + this->dimension_.set (x); } - const Dynamics::ConditionalDerivedVariable_sequence& Dynamics:: - ConditionalDerivedVariable () const + void NamedDimensionalType:: + dimension (::std::unique_ptr< dimension_type > x) { - return this->ConditionalDerivedVariable_; + this->dimension_.set (std::move (x)); } - Dynamics::ConditionalDerivedVariable_sequence& Dynamics:: - ConditionalDerivedVariable () + const NamedDimensionalType::description_optional& NamedDimensionalType:: + description () const { - return this->ConditionalDerivedVariable_; + return this->description_; } - void Dynamics:: - ConditionalDerivedVariable (const ConditionalDerivedVariable_sequence& s) + NamedDimensionalType::description_optional& NamedDimensionalType:: + description () { - this->ConditionalDerivedVariable_ = s; + return this->description_; } + void NamedDimensionalType:: + description (const description_type& x) + { + this->description_.set (x); + } - // DerivedVariable + void NamedDimensionalType:: + description (const description_optional& x) + { + this->description_ = x; + } + + void NamedDimensionalType:: + description (::std::unique_ptr< description_type > x) + { + this->description_.set (std::move (x)); + } + + + // NamedDimensionalVariable // - const DerivedVariable::name_type& DerivedVariable:: + const NamedDimensionalVariable::name_type& NamedDimensionalVariable:: name () const { return this->name_.get (); } - DerivedVariable::name_type& DerivedVariable:: + NamedDimensionalVariable::name_type& NamedDimensionalVariable:: name () { return this->name_.get (); } - void DerivedVariable:: + void NamedDimensionalVariable:: name (const name_type& x) { this->name_.set (x); } - void DerivedVariable:: + void NamedDimensionalVariable:: name (::std::unique_ptr< name_type > x) { this->name_.set (std::move (x)); } - const DerivedVariable::dimension_type& DerivedVariable:: + const NamedDimensionalVariable::dimension_type& NamedDimensionalVariable:: dimension () const { return this->dimension_.get (); } - DerivedVariable::dimension_type& DerivedVariable:: + NamedDimensionalVariable::dimension_type& NamedDimensionalVariable:: dimension () { return this->dimension_.get (); } - void DerivedVariable:: + void NamedDimensionalVariable:: dimension (const dimension_type& x) { this->dimension_.set (x); } - void DerivedVariable:: + void NamedDimensionalVariable:: dimension (::std::unique_ptr< dimension_type > x) { this->dimension_.set (std::move (x)); } - const DerivedVariable::value_type& DerivedVariable:: - value () const + const NamedDimensionalVariable::description_optional& NamedDimensionalVariable:: + description () const { - return this->value_.get (); + return this->description_; } - DerivedVariable::value_type& DerivedVariable:: - value () + NamedDimensionalVariable::description_optional& NamedDimensionalVariable:: + description () { - return this->value_.get (); + return this->description_; } - void DerivedVariable:: - value (const value_type& x) + void NamedDimensionalVariable:: + description (const description_type& x) { - this->value_.set (x); + this->description_.set (x); } - void DerivedVariable:: - value (::std::unique_ptr< value_type > x) + void NamedDimensionalVariable:: + description (const description_optional& x) { - this->value_.set (std::move (x)); + this->description_ = x; + } + + void NamedDimensionalVariable:: + description (::std::unique_ptr< description_type > x) + { + this->description_.set (std::move (x)); } - const DerivedVariable::exposure_optional& DerivedVariable:: + const NamedDimensionalVariable::exposure_optional& NamedDimensionalVariable:: exposure () const { return this->exposure_; } - DerivedVariable::exposure_optional& DerivedVariable:: + NamedDimensionalVariable::exposure_optional& NamedDimensionalVariable:: exposure () { return this->exposure_; } - void DerivedVariable:: + void NamedDimensionalVariable:: exposure (const exposure_type& x) { this->exposure_.set (x); } - void DerivedVariable:: + void NamedDimensionalVariable:: exposure (const exposure_optional& x) { this->exposure_ = x; } - void DerivedVariable:: + void NamedDimensionalVariable:: exposure (::std::unique_ptr< exposure_type > x) { this->exposure_.set (std::move (x)); } - // ConditionalDerivedVariable + // Parameter // - const ConditionalDerivedVariable::Case_sequence& ConditionalDerivedVariable:: - Case () const + + // LEMS_Property + // + + const LEMS_Property::defaultValue_optional& LEMS_Property:: + defaultValue () const { - return this->Case_; + return this->defaultValue_; } - ConditionalDerivedVariable::Case_sequence& ConditionalDerivedVariable:: - Case () + LEMS_Property::defaultValue_optional& LEMS_Property:: + defaultValue () { - return this->Case_; + return this->defaultValue_; } - void ConditionalDerivedVariable:: - Case (const Case_sequence& s) + void LEMS_Property:: + defaultValue (const defaultValue_type& x) { - this->Case_ = s; + this->defaultValue_.set (x); + } + + void LEMS_Property:: + defaultValue (const defaultValue_optional& x) + { + this->defaultValue_ = x; } - const ConditionalDerivedVariable::name_type& ConditionalDerivedVariable:: + + // Requirement + // + + + // InstanceRequirement + // + + const InstanceRequirement::name_type& InstanceRequirement:: name () const { return this->name_.get (); } - ConditionalDerivedVariable::name_type& ConditionalDerivedVariable:: + InstanceRequirement::name_type& InstanceRequirement:: name () { return this->name_.get (); } - void ConditionalDerivedVariable:: + void InstanceRequirement:: name (const name_type& x) { this->name_.set (x); } - void ConditionalDerivedVariable:: + void InstanceRequirement:: name (::std::unique_ptr< name_type > x) { this->name_.set (std::move (x)); } - const ConditionalDerivedVariable::dimension_type& ConditionalDerivedVariable:: - dimension () const + const InstanceRequirement::type_type& InstanceRequirement:: + type () const { - return this->dimension_.get (); + return this->type_.get (); } - ConditionalDerivedVariable::dimension_type& ConditionalDerivedVariable:: - dimension () + InstanceRequirement::type_type& InstanceRequirement:: + type () { - return this->dimension_.get (); + return this->type_.get (); } - void ConditionalDerivedVariable:: - dimension (const dimension_type& x) + void InstanceRequirement:: + type (const type_type& x) { - this->dimension_.set (x); + this->type_.set (x); } - void ConditionalDerivedVariable:: - dimension (::std::unique_ptr< dimension_type > x) + void InstanceRequirement:: + type (::std::unique_ptr< type_type > x) { - this->dimension_.set (std::move (x)); + this->type_.set (std::move (x)); } - const ConditionalDerivedVariable::exposure_optional& ConditionalDerivedVariable:: - exposure () const + + // Dynamics + // + + const Dynamics::StateVariable_sequence& Dynamics:: + StateVariable () const { - return this->exposure_; + return this->StateVariable_; } - ConditionalDerivedVariable::exposure_optional& ConditionalDerivedVariable:: - exposure () + Dynamics::StateVariable_sequence& Dynamics:: + StateVariable () { - return this->exposure_; + return this->StateVariable_; } - void ConditionalDerivedVariable:: - exposure (const exposure_type& x) + void Dynamics:: + StateVariable (const StateVariable_sequence& s) { - this->exposure_.set (x); + this->StateVariable_ = s; } - void ConditionalDerivedVariable:: - exposure (const exposure_optional& x) + const Dynamics::DerivedVariable_sequence& Dynamics:: + DerivedVariable () const { - this->exposure_ = x; + return this->DerivedVariable_; + } + + Dynamics::DerivedVariable_sequence& Dynamics:: + DerivedVariable () + { + return this->DerivedVariable_; + } + + void Dynamics:: + DerivedVariable (const DerivedVariable_sequence& s) + { + this->DerivedVariable_ = s; + } + + const Dynamics::ConditionalDerivedVariable_sequence& Dynamics:: + ConditionalDerivedVariable () const + { + return this->ConditionalDerivedVariable_; + } + + Dynamics::ConditionalDerivedVariable_sequence& Dynamics:: + ConditionalDerivedVariable () + { + return this->ConditionalDerivedVariable_; + } + + void Dynamics:: + ConditionalDerivedVariable (const ConditionalDerivedVariable_sequence& s) + { + this->ConditionalDerivedVariable_ = s; + } + + const Dynamics::TimeDerivative_sequence& Dynamics:: + TimeDerivative () const + { + return this->TimeDerivative_; + } + + Dynamics::TimeDerivative_sequence& Dynamics:: + TimeDerivative () + { + return this->TimeDerivative_; + } + + void Dynamics:: + TimeDerivative (const TimeDerivative_sequence& s) + { + this->TimeDerivative_ = s; + } + + + // DerivedVariable + // + + const DerivedVariable::value_optional& DerivedVariable:: + value () const + { + return this->value_; + } + + DerivedVariable::value_optional& DerivedVariable:: + value () + { + return this->value_; + } + + void DerivedVariable:: + value (const value_type& x) + { + this->value_.set (x); + } + + void DerivedVariable:: + value (const value_optional& x) + { + this->value_ = x; + } + + void DerivedVariable:: + value (::std::unique_ptr< value_type > x) + { + this->value_.set (std::move (x)); + } + + const DerivedVariable::select_optional& DerivedVariable:: + select () const + { + return this->select_; + } + + DerivedVariable::select_optional& DerivedVariable:: + select () + { + return this->select_; + } + + void DerivedVariable:: + select (const select_type& x) + { + this->select_.set (x); + } + + void DerivedVariable:: + select (const select_optional& x) + { + this->select_ = x; + } + + void DerivedVariable:: + select (::std::unique_ptr< select_type > x) + { + this->select_.set (std::move (x)); + } + + + // StateVariable + // + + + // ConditionalDerivedVariable + // + + const ConditionalDerivedVariable::Case_sequence& ConditionalDerivedVariable:: + Case () const + { + return this->Case_; + } + + ConditionalDerivedVariable::Case_sequence& ConditionalDerivedVariable:: + Case () + { + return this->Case_; } void ConditionalDerivedVariable:: - exposure (::std::unique_ptr< exposure_type > x) + Case (const Case_sequence& s) { - this->exposure_.set (std::move (x)); + this->Case_ = s; } @@ -865,6 +1124,58 @@ namespace neuroml2 } + // TimeDerivative + // + + const TimeDerivative::variable_type& TimeDerivative:: + variable () const + { + return this->variable_.get (); + } + + TimeDerivative::variable_type& TimeDerivative:: + variable () + { + return this->variable_.get (); + } + + void TimeDerivative:: + variable (const variable_type& x) + { + this->variable_.set (x); + } + + void TimeDerivative:: + variable (::std::unique_ptr< variable_type > x) + { + this->variable_.set (std::move (x)); + } + + const TimeDerivative::value_type& TimeDerivative:: + value () const + { + return this->value_.get (); + } + + TimeDerivative::value_type& TimeDerivative:: + value () + { + return this->value_.get (); + } + + void TimeDerivative:: + value (const value_type& x) + { + this->value_.set (x); + } + + void TimeDerivative:: + value (::std::unique_ptr< value_type > x) + { + this->value_.set (std::move (x)); + } + + // ZeroToOne // @@ -1154,6 +1465,24 @@ namespace neuroml2 this->ionChannelHH_ = s; } + const NeuroMLDocument_base::ionChannelVShift_sequence& NeuroMLDocument_base:: + ionChannelVShift () const + { + return this->ionChannelVShift_; + } + + NeuroMLDocument_base::ionChannelVShift_sequence& NeuroMLDocument_base:: + ionChannelVShift () + { + return this->ionChannelVShift_; + } + + void NeuroMLDocument_base:: + ionChannelVShift (const ionChannelVShift_sequence& s) + { + this->ionChannelVShift_ = s; + } + const NeuroMLDocument_base::ionChannelKS_sequence& NeuroMLDocument_base:: ionChannelKS () const { @@ -1316,6 +1645,24 @@ namespace neuroml2 this->blockingPlasticSynapse_ = s; } + const NeuroMLDocument_base::doubleSynapse_sequence& NeuroMLDocument_base:: + doubleSynapse () const + { + return this->doubleSynapse_; + } + + NeuroMLDocument_base::doubleSynapse_sequence& NeuroMLDocument_base:: + doubleSynapse () + { + return this->doubleSynapse_; + } + + void NeuroMLDocument_base:: + doubleSynapse (const doubleSynapse_sequence& s) + { + this->doubleSynapse_ = s; + } + const NeuroMLDocument_base::gapJunction_sequence& NeuroMLDocument_base:: gapJunction () const { @@ -1802,6 +2149,24 @@ namespace neuroml2 this->voltageClamp_ = s; } + const NeuroMLDocument_base::voltageClampTriple_sequence& NeuroMLDocument_base:: + voltageClampTriple () const + { + return this->voltageClampTriple_; + } + + NeuroMLDocument_base::voltageClampTriple_sequence& NeuroMLDocument_base:: + voltageClampTriple () + { + return this->voltageClampTriple_; + } + + void NeuroMLDocument_base:: + voltageClampTriple (const voltageClampTriple_sequence& s) + { + this->voltageClampTriple_ = s; + } + const NeuroMLDocument_base::spikeArray_sequence& NeuroMLDocument_base:: spikeArray () const { @@ -1892,6 +2257,24 @@ namespace neuroml2 this->spikeGeneratorPoisson_ = s; } + const NeuroMLDocument_base::spikeGeneratorRefPoisson_sequence& NeuroMLDocument_base:: + spikeGeneratorRefPoisson () const + { + return this->spikeGeneratorRefPoisson_; + } + + NeuroMLDocument_base::spikeGeneratorRefPoisson_sequence& NeuroMLDocument_base:: + spikeGeneratorRefPoisson () + { + return this->spikeGeneratorRefPoisson_; + } + + void NeuroMLDocument_base:: + spikeGeneratorRefPoisson (const spikeGeneratorRefPoisson_sequence& s) + { + this->spikeGeneratorRefPoisson_ = s; + } + const NeuroMLDocument_base::poissonFiringSynapse_sequence& NeuroMLDocument_base:: poissonFiringSynapse () const { @@ -2184,16 +2567,16 @@ namespace neuroml2 // IncludeType // - const IncludeType::href_optional& IncludeType:: + const IncludeType::href_type& IncludeType:: href () const { - return this->href_; + return this->href_.get (); } - IncludeType::href_optional& IncludeType:: + IncludeType::href_type& IncludeType:: href () { - return this->href_; + return this->href_.get (); } void IncludeType:: @@ -2202,12 +2585,6 @@ namespace neuroml2 this->href_.set (x); } - void IncludeType:: - href (const href_optional& x) - { - this->href_ = x; - } - void IncludeType:: href (::std::unique_ptr< href_type > x) { @@ -2561,6 +2938,34 @@ namespace neuroml2 // + // IonChannelVShift + // + + const IonChannelVShift::vShift_type& IonChannelVShift:: + vShift () const + { + return this->vShift_.get (); + } + + IonChannelVShift::vShift_type& IonChannelVShift:: + vShift () + { + return this->vShift_.get (); + } + + void IonChannelVShift:: + vShift (const vShift_type& x) + { + this->vShift_.set (x); + } + + void IonChannelVShift:: + vShift (::std::unique_ptr< vShift_type > x) + { + this->vShift_.set (std::move (x)); + } + + // channelTypes // @@ -5699,6 +6104,106 @@ namespace neuroml2 } + // DoubleSynapse + // + + const DoubleSynapse::synapse1_type& DoubleSynapse:: + synapse1 () const + { + return this->synapse1_.get (); + } + + DoubleSynapse::synapse1_type& DoubleSynapse:: + synapse1 () + { + return this->synapse1_.get (); + } + + void DoubleSynapse:: + synapse1 (const synapse1_type& x) + { + this->synapse1_.set (x); + } + + void DoubleSynapse:: + synapse1 (::std::unique_ptr< synapse1_type > x) + { + this->synapse1_.set (std::move (x)); + } + + const DoubleSynapse::synapse2_type& DoubleSynapse:: + synapse2 () const + { + return this->synapse2_.get (); + } + + DoubleSynapse::synapse2_type& DoubleSynapse:: + synapse2 () + { + return this->synapse2_.get (); + } + + void DoubleSynapse:: + synapse2 (const synapse2_type& x) + { + this->synapse2_.set (x); + } + + void DoubleSynapse:: + synapse2 (::std::unique_ptr< synapse2_type > x) + { + this->synapse2_.set (std::move (x)); + } + + const DoubleSynapse::synapse1Path_type& DoubleSynapse:: + synapse1Path () const + { + return this->synapse1Path_.get (); + } + + DoubleSynapse::synapse1Path_type& DoubleSynapse:: + synapse1Path () + { + return this->synapse1Path_.get (); + } + + void DoubleSynapse:: + synapse1Path (const synapse1Path_type& x) + { + this->synapse1Path_.set (x); + } + + void DoubleSynapse:: + synapse1Path (::std::unique_ptr< synapse1Path_type > x) + { + this->synapse1Path_.set (std::move (x)); + } + + const DoubleSynapse::synapse2Path_type& DoubleSynapse:: + synapse2Path () const + { + return this->synapse2Path_.get (); + } + + DoubleSynapse::synapse2Path_type& DoubleSynapse:: + synapse2Path () + { + return this->synapse2Path_.get (); + } + + void DoubleSynapse:: + synapse2Path (const synapse2Path_type& x) + { + this->synapse2Path_.set (x); + } + + void DoubleSynapse:: + synapse2Path (::std::unique_ptr< synapse2Path_type > x) + { + this->synapse2Path_.set (std::move (x)); + } + + // BlockingPlasticSynapse // @@ -8089,7 +8594,7 @@ namespace neuroml2 SegmentParent::fractionAlong_type SegmentParent:: fractionAlong_default_value () { - return fractionAlong_type (1.0); + return fractionAlong_type (1.0F); } @@ -8975,6 +9480,24 @@ namespace neuroml2 this->channelDensity_ = s; } + const MembraneProperties::channelDensityVShift_sequence& MembraneProperties:: + channelDensityVShift () const + { + return this->channelDensityVShift_; + } + + MembraneProperties::channelDensityVShift_sequence& MembraneProperties:: + channelDensityVShift () + { + return this->channelDensityVShift_; + } + + void MembraneProperties:: + channelDensityVShift (const channelDensityVShift_sequence& s) + { + this->channelDensityVShift_ = s; + } + const MembraneProperties::channelDensityNernst_sequence& MembraneProperties:: channelDensityNernst () const { @@ -9866,6 +10389,34 @@ namespace neuroml2 } + // ChannelDensityVShift + // + + const ChannelDensityVShift::vShift_type& ChannelDensityVShift:: + vShift () const + { + return this->vShift_.get (); + } + + ChannelDensityVShift::vShift_type& ChannelDensityVShift:: + vShift () + { + return this->vShift_.get (); + } + + void ChannelDensityVShift:: + vShift (const vShift_type& x) + { + this->vShift_.set (x); + } + + void ChannelDensityVShift:: + vShift (::std::unique_ptr< vShift_type > x) + { + this->vShift_.set (std::move (x)); + } + + // ChannelDensityNernst // @@ -11592,6 +12143,178 @@ namespace neuroml2 } + // VoltageClampTriple + // + + const VoltageClampTriple::active_type& VoltageClampTriple:: + active () const + { + return this->active_.get (); + } + + VoltageClampTriple::active_type& VoltageClampTriple:: + active () + { + return this->active_.get (); + } + + void VoltageClampTriple:: + active (const active_type& x) + { + this->active_.set (x); + } + + void VoltageClampTriple:: + active (::std::unique_ptr< active_type > x) + { + this->active_.set (std::move (x)); + } + + const VoltageClampTriple::delay_type& VoltageClampTriple:: + delay () const + { + return this->delay_.get (); + } + + VoltageClampTriple::delay_type& VoltageClampTriple:: + delay () + { + return this->delay_.get (); + } + + void VoltageClampTriple:: + delay (const delay_type& x) + { + this->delay_.set (x); + } + + void VoltageClampTriple:: + delay (::std::unique_ptr< delay_type > x) + { + this->delay_.set (std::move (x)); + } + + const VoltageClampTriple::duration_type& VoltageClampTriple:: + duration () const + { + return this->duration_.get (); + } + + VoltageClampTriple::duration_type& VoltageClampTriple:: + duration () + { + return this->duration_.get (); + } + + void VoltageClampTriple:: + duration (const duration_type& x) + { + this->duration_.set (x); + } + + void VoltageClampTriple:: + duration (::std::unique_ptr< duration_type > x) + { + this->duration_.set (std::move (x)); + } + + const VoltageClampTriple::conditioningVoltage_type& VoltageClampTriple:: + conditioningVoltage () const + { + return this->conditioningVoltage_.get (); + } + + VoltageClampTriple::conditioningVoltage_type& VoltageClampTriple:: + conditioningVoltage () + { + return this->conditioningVoltage_.get (); + } + + void VoltageClampTriple:: + conditioningVoltage (const conditioningVoltage_type& x) + { + this->conditioningVoltage_.set (x); + } + + void VoltageClampTriple:: + conditioningVoltage (::std::unique_ptr< conditioningVoltage_type > x) + { + this->conditioningVoltage_.set (std::move (x)); + } + + const VoltageClampTriple::testingVoltage_type& VoltageClampTriple:: + testingVoltage () const + { + return this->testingVoltage_.get (); + } + + VoltageClampTriple::testingVoltage_type& VoltageClampTriple:: + testingVoltage () + { + return this->testingVoltage_.get (); + } + + void VoltageClampTriple:: + testingVoltage (const testingVoltage_type& x) + { + this->testingVoltage_.set (x); + } + + void VoltageClampTriple:: + testingVoltage (::std::unique_ptr< testingVoltage_type > x) + { + this->testingVoltage_.set (std::move (x)); + } + + const VoltageClampTriple::returnVoltage_type& VoltageClampTriple:: + returnVoltage () const + { + return this->returnVoltage_.get (); + } + + VoltageClampTriple::returnVoltage_type& VoltageClampTriple:: + returnVoltage () + { + return this->returnVoltage_.get (); + } + + void VoltageClampTriple:: + returnVoltage (const returnVoltage_type& x) + { + this->returnVoltage_.set (x); + } + + void VoltageClampTriple:: + returnVoltage (::std::unique_ptr< returnVoltage_type > x) + { + this->returnVoltage_.set (std::move (x)); + } + + const VoltageClampTriple::simpleSeriesResistance_type& VoltageClampTriple:: + simpleSeriesResistance () const + { + return this->simpleSeriesResistance_.get (); + } + + VoltageClampTriple::simpleSeriesResistance_type& VoltageClampTriple:: + simpleSeriesResistance () + { + return this->simpleSeriesResistance_.get (); + } + + void VoltageClampTriple:: + simpleSeriesResistance (const simpleSeriesResistance_type& x) + { + this->simpleSeriesResistance_.set (x); + } + + void VoltageClampTriple:: + simpleSeriesResistance (::std::unique_ptr< simpleSeriesResistance_type > x) + { + this->simpleSeriesResistance_.set (std::move (x)); + } + + // Spike // @@ -11820,6 +12543,34 @@ namespace neuroml2 } + // SpikeGeneratorRefPoisson + // + + const SpikeGeneratorRefPoisson::minimumISI_type& SpikeGeneratorRefPoisson:: + minimumISI () const + { + return this->minimumISI_.get (); + } + + SpikeGeneratorRefPoisson::minimumISI_type& SpikeGeneratorRefPoisson:: + minimumISI () + { + return this->minimumISI_.get (); + } + + void SpikeGeneratorRefPoisson:: + minimumISI (const minimumISI_type& x) + { + this->minimumISI_.set (x); + } + + void SpikeGeneratorRefPoisson:: + minimumISI (::std::unique_ptr< minimumISI_type > x) + { + this->minimumISI_.set (std::move (x)); + } + + // PoissonFiringSynapse // @@ -13431,91 +14182,95 @@ namespace neuroml2 } - // Projection + // BaseProjection // - const Projection::connection_sequence& Projection:: - connection () const + const BaseProjection::presynapticPopulation_type& BaseProjection:: + presynapticPopulation () const { - return this->connection_; + return this->presynapticPopulation_.get (); } - Projection::connection_sequence& Projection:: - connection () + BaseProjection::presynapticPopulation_type& BaseProjection:: + presynapticPopulation () { - return this->connection_; + return this->presynapticPopulation_.get (); } - void Projection:: - connection (const connection_sequence& s) + void BaseProjection:: + presynapticPopulation (const presynapticPopulation_type& x) { - this->connection_ = s; + this->presynapticPopulation_.set (x); } - const Projection::connectionWD_sequence& Projection:: - connectionWD () const + void BaseProjection:: + presynapticPopulation (::std::unique_ptr< presynapticPopulation_type > x) { - return this->connectionWD_; + this->presynapticPopulation_.set (std::move (x)); } - Projection::connectionWD_sequence& Projection:: - connectionWD () + const BaseProjection::postsynapticPopulation_type& BaseProjection:: + postsynapticPopulation () const { - return this->connectionWD_; + return this->postsynapticPopulation_.get (); } - void Projection:: - connectionWD (const connectionWD_sequence& s) + BaseProjection::postsynapticPopulation_type& BaseProjection:: + postsynapticPopulation () { - this->connectionWD_ = s; + return this->postsynapticPopulation_.get (); } - const Projection::presynapticPopulation_type& Projection:: - presynapticPopulation () const + void BaseProjection:: + postsynapticPopulation (const postsynapticPopulation_type& x) { - return this->presynapticPopulation_.get (); + this->postsynapticPopulation_.set (x); } - Projection::presynapticPopulation_type& Projection:: - presynapticPopulation () + void BaseProjection:: + postsynapticPopulation (::std::unique_ptr< postsynapticPopulation_type > x) { - return this->presynapticPopulation_.get (); + this->postsynapticPopulation_.set (std::move (x)); } - void Projection:: - presynapticPopulation (const presynapticPopulation_type& x) + + // Projection + // + + const Projection::connection_sequence& Projection:: + connection () const { - this->presynapticPopulation_.set (x); + return this->connection_; } - void Projection:: - presynapticPopulation (::std::unique_ptr< presynapticPopulation_type > x) + Projection::connection_sequence& Projection:: + connection () { - this->presynapticPopulation_.set (std::move (x)); + return this->connection_; } - const Projection::postsynapticPopulation_type& Projection:: - postsynapticPopulation () const + void Projection:: + connection (const connection_sequence& s) { - return this->postsynapticPopulation_.get (); + this->connection_ = s; } - Projection::postsynapticPopulation_type& Projection:: - postsynapticPopulation () + const Projection::connectionWD_sequence& Projection:: + connectionWD () const { - return this->postsynapticPopulation_.get (); + return this->connectionWD_; } - void Projection:: - postsynapticPopulation (const postsynapticPopulation_type& x) + Projection::connectionWD_sequence& Projection:: + connectionWD () { - this->postsynapticPopulation_.set (x); + return this->connectionWD_; } void Projection:: - postsynapticPopulation (::std::unique_ptr< postsynapticPopulation_type > x) + connectionWD (const connectionWD_sequence& s) { - this->postsynapticPopulation_.set (std::move (x)); + this->connectionWD_ = s; } const Projection::synapse_type& Projection:: @@ -13631,7 +14386,7 @@ namespace neuroml2 BaseConnectionOldFormat::preFractionAlong_type BaseConnectionOldFormat:: preFractionAlong_default_value () { - return preFractionAlong_type (.5); + return preFractionAlong_type (.5F); } const BaseConnectionOldFormat::postCellId_type& BaseConnectionOldFormat:: @@ -13715,7 +14470,7 @@ namespace neuroml2 BaseConnectionOldFormat::postFractionAlong_type BaseConnectionOldFormat:: postFractionAlong_default_value () { - return postFractionAlong_type (.5); + return postFractionAlong_type (.5F); } @@ -13803,7 +14558,7 @@ namespace neuroml2 BaseConnectionNewFormat::preFractionAlong_type BaseConnectionNewFormat:: preFractionAlong_default_value () { - return preFractionAlong_type (.5); + return preFractionAlong_type (.5F); } const BaseConnectionNewFormat::postCell_type& BaseConnectionNewFormat:: @@ -13887,7 +14642,7 @@ namespace neuroml2 BaseConnectionNewFormat::postFractionAlong_type BaseConnectionNewFormat:: postFractionAlong_default_value () { - return postFractionAlong_type (.5); + return postFractionAlong_type (.5F); } @@ -13980,52 +14735,22 @@ namespace neuroml2 this->electricalConnectionInstance_ = s; } - const ElectricalProjection::presynapticPopulation_type& ElectricalProjection:: - presynapticPopulation () const - { - return this->presynapticPopulation_.get (); - } - - ElectricalProjection::presynapticPopulation_type& ElectricalProjection:: - presynapticPopulation () - { - return this->presynapticPopulation_.get (); - } - - void ElectricalProjection:: - presynapticPopulation (const presynapticPopulation_type& x) - { - this->presynapticPopulation_.set (x); - } - - void ElectricalProjection:: - presynapticPopulation (::std::unique_ptr< presynapticPopulation_type > x) - { - this->presynapticPopulation_.set (std::move (x)); - } - - const ElectricalProjection::postsynapticPopulation_type& ElectricalProjection:: - postsynapticPopulation () const + const ElectricalProjection::electricalConnectionInstanceW_sequence& ElectricalProjection:: + electricalConnectionInstanceW () const { - return this->postsynapticPopulation_.get (); + return this->electricalConnectionInstanceW_; } - ElectricalProjection::postsynapticPopulation_type& ElectricalProjection:: - postsynapticPopulation () + ElectricalProjection::electricalConnectionInstanceW_sequence& ElectricalProjection:: + electricalConnectionInstanceW () { - return this->postsynapticPopulation_.get (); + return this->electricalConnectionInstanceW_; } void ElectricalProjection:: - postsynapticPopulation (const postsynapticPopulation_type& x) + electricalConnectionInstanceW (const electricalConnectionInstanceW_sequence& s) { - this->postsynapticPopulation_.set (x); - } - - void ElectricalProjection:: - postsynapticPopulation (::std::unique_ptr< postsynapticPopulation_type > x) - { - this->postsynapticPopulation_.set (std::move (x)); + this->electricalConnectionInstanceW_ = s; } @@ -14061,6 +14786,28 @@ namespace neuroml2 // + // ElectricalConnectionInstanceW + // + + const ElectricalConnectionInstanceW::weight_type& ElectricalConnectionInstanceW:: + weight () const + { + return this->weight_.get (); + } + + ElectricalConnectionInstanceW::weight_type& ElectricalConnectionInstanceW:: + weight () + { + return this->weight_.get (); + } + + void ElectricalConnectionInstanceW:: + weight (const weight_type& x) + { + this->weight_.set (x); + } + + // ContinuousProjection // @@ -14100,52 +14847,22 @@ namespace neuroml2 this->continuousConnectionInstance_ = s; } - const ContinuousProjection::presynapticPopulation_type& ContinuousProjection:: - presynapticPopulation () const + const ContinuousProjection::continuousConnectionInstanceW_sequence& ContinuousProjection:: + continuousConnectionInstanceW () const { - return this->presynapticPopulation_.get (); + return this->continuousConnectionInstanceW_; } - ContinuousProjection::presynapticPopulation_type& ContinuousProjection:: - presynapticPopulation () + ContinuousProjection::continuousConnectionInstanceW_sequence& ContinuousProjection:: + continuousConnectionInstanceW () { - return this->presynapticPopulation_.get (); + return this->continuousConnectionInstanceW_; } void ContinuousProjection:: - presynapticPopulation (const presynapticPopulation_type& x) + continuousConnectionInstanceW (const continuousConnectionInstanceW_sequence& s) { - this->presynapticPopulation_.set (x); - } - - void ContinuousProjection:: - presynapticPopulation (::std::unique_ptr< presynapticPopulation_type > x) - { - this->presynapticPopulation_.set (std::move (x)); - } - - const ContinuousProjection::postsynapticPopulation_type& ContinuousProjection:: - postsynapticPopulation () const - { - return this->postsynapticPopulation_.get (); - } - - ContinuousProjection::postsynapticPopulation_type& ContinuousProjection:: - postsynapticPopulation () - { - return this->postsynapticPopulation_.get (); - } - - void ContinuousProjection:: - postsynapticPopulation (const postsynapticPopulation_type& x) - { - this->postsynapticPopulation_.set (x); - } - - void ContinuousProjection:: - postsynapticPopulation (::std::unique_ptr< postsynapticPopulation_type > x) - { - this->postsynapticPopulation_.set (std::move (x)); + this->continuousConnectionInstanceW_ = s; } @@ -14205,6 +14922,28 @@ namespace neuroml2 // + // ContinuousConnectionInstanceW + // + + const ContinuousConnectionInstanceW::weight_type& ContinuousConnectionInstanceW:: + weight () const + { + return this->weight_.get (); + } + + ContinuousConnectionInstanceW::weight_type& ContinuousConnectionInstanceW:: + weight () + { + return this->weight_.get (); + } + + void ContinuousConnectionInstanceW:: + weight (const weight_type& x) + { + this->weight_.set (x); + } + + // ExplicitInput // @@ -14308,6 +15047,24 @@ namespace neuroml2 this->input_ = s; } + const InputList::inputW_sequence& InputList:: + inputW () const + { + return this->inputW_; + } + + InputList::inputW_sequence& InputList:: + inputW () + { + return this->inputW_; + } + + void InputList:: + inputW (const inputW_sequence& s) + { + this->inputW_ = s; + } + const InputList::population_type& InputList:: population () const { @@ -14493,6 +15250,28 @@ namespace neuroml2 } + // InputW + // + + const InputW::weight_type& InputW:: + weight () const + { + return this->weight_.get (); + } + + InputW::weight_type& InputW:: + weight () + { + return this->weight_.get (); + } + + void InputW:: + weight (const weight_type& x) + { + this->weight_.set (x); + } + + // basePyNNCell // @@ -14834,96 +15613,6 @@ namespace neuroml2 // EIF_cond_alpha_isfa_ista // - const EIF_cond_alpha_isfa_ista::a_type& EIF_cond_alpha_isfa_ista:: - a () const - { - return this->a_.get (); - } - - EIF_cond_alpha_isfa_ista::a_type& EIF_cond_alpha_isfa_ista:: - a () - { - return this->a_.get (); - } - - void EIF_cond_alpha_isfa_ista:: - a (const a_type& x) - { - this->a_.set (x); - } - - const EIF_cond_alpha_isfa_ista::b_type& EIF_cond_alpha_isfa_ista:: - b () const - { - return this->b_.get (); - } - - EIF_cond_alpha_isfa_ista::b_type& EIF_cond_alpha_isfa_ista:: - b () - { - return this->b_.get (); - } - - void EIF_cond_alpha_isfa_ista:: - b (const b_type& x) - { - this->b_.set (x); - } - - const EIF_cond_alpha_isfa_ista::delta_T_type& EIF_cond_alpha_isfa_ista:: - delta_T () const - { - return this->delta_T_.get (); - } - - EIF_cond_alpha_isfa_ista::delta_T_type& EIF_cond_alpha_isfa_ista:: - delta_T () - { - return this->delta_T_.get (); - } - - void EIF_cond_alpha_isfa_ista:: - delta_T (const delta_T_type& x) - { - this->delta_T_.set (x); - } - - const EIF_cond_alpha_isfa_ista::tau_w_type& EIF_cond_alpha_isfa_ista:: - tau_w () const - { - return this->tau_w_.get (); - } - - EIF_cond_alpha_isfa_ista::tau_w_type& EIF_cond_alpha_isfa_ista:: - tau_w () - { - return this->tau_w_.get (); - } - - void EIF_cond_alpha_isfa_ista:: - tau_w (const tau_w_type& x) - { - this->tau_w_.set (x); - } - - const EIF_cond_alpha_isfa_ista::v_spike_type& EIF_cond_alpha_isfa_ista:: - v_spike () const - { - return this->v_spike_.get (); - } - - EIF_cond_alpha_isfa_ista::v_spike_type& EIF_cond_alpha_isfa_ista:: - v_spike () - { - return this->v_spike_.get (); - } - - void EIF_cond_alpha_isfa_ista:: - v_spike (const v_spike_type& x) - { - this->v_spike_.set (x); - } - // HH_cond_exp // @@ -16919,6 +17608,41 @@ namespace neuroml2 { } + // ZeroOrOne + // + + ZeroOrOne:: + ZeroOrOne (const ::xercesc::DOMElement& e, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::xsd::cxx::tree::fundamental_base< ::xml_schema::double_, char, ::xml_schema::simple_type, ::xsd::cxx::tree::schema_type::double_ > (e, f, c) + { + } + + ZeroOrOne:: + ZeroOrOne (const ::xercesc::DOMAttr& a, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::xsd::cxx::tree::fundamental_base< ::xml_schema::double_, char, ::xml_schema::simple_type, ::xsd::cxx::tree::schema_type::double_ > (a, f, c) + { + } + + ZeroOrOne:: + ZeroOrOne (const ::std::string& s, + const ::xercesc::DOMElement* e, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::xsd::cxx::tree::fundamental_base< ::xml_schema::double_, char, ::xml_schema::simple_type, ::xsd::cxx::tree::schema_type::double_ > (s, e, f, c) + { + } + + ZeroOrOne* ZeroOrOne:: + _clone (::xml_schema::flags f, + ::xml_schema::container* c) const + { + return new class ZeroOrOne (*this, f, c); + } + // Notes // @@ -17183,9 +17907,12 @@ namespace neuroml2 ComponentType:: ComponentType (const name_type& name) : ::xml_schema::type (), + Property_ (this), Parameter_ (this), Constant_ (this), + Exposure_ (this), Requirement_ (this), + InstanceRequirement_ (this), Dynamics_ (this), name_ (name, this), extends_ (this), @@ -17198,9 +17925,12 @@ namespace neuroml2 ::xml_schema::flags f, ::xml_schema::container* c) : ::xml_schema::type (x, f, c), + Property_ (x.Property_, f, this), Parameter_ (x.Parameter_, f, this), Constant_ (x.Constant_, f, this), + Exposure_ (x.Exposure_, f, this), Requirement_ (x.Requirement_, f, this), + InstanceRequirement_ (x.InstanceRequirement_, f, this), Dynamics_ (x.Dynamics_, f, this), name_ (x.name_, f, this), extends_ (x.extends_, f, this), @@ -17213,9 +17943,12 @@ namespace neuroml2 ::xml_schema::flags f, ::xml_schema::container* c) : ::xml_schema::type (e, f | ::xml_schema::flags::base, c), + Property_ (this), Parameter_ (this), Constant_ (this), + Exposure_ (this), Requirement_ (this), + InstanceRequirement_ (this), Dynamics_ (this), name_ (this), extends_ (this), @@ -17238,6 +17971,17 @@ namespace neuroml2 const ::xsd::cxx::xml::qualified_name< char > n ( ::xsd::cxx::xml::dom::name< char > (i)); + // Property + // + if (n.name () == "Property" && n.namespace_ () == "http://www.neuroml.org/schema/neuroml2") + { + ::std::unique_ptr< Property_type > r ( + Property_traits::create (i, f, this)); + + this->Property_.push_back (::std::move (r)); + continue; + } + // Parameter // if (n.name () == "Parameter" && n.namespace_ () == "http://www.neuroml.org/schema/neuroml2") @@ -17260,6 +18004,17 @@ namespace neuroml2 continue; } + // Exposure + // + if (n.name () == "Exposure" && n.namespace_ () == "http://www.neuroml.org/schema/neuroml2") + { + ::std::unique_ptr< Exposure_type > r ( + Exposure_traits::create (i, f, this)); + + this->Exposure_.push_back (::std::move (r)); + continue; + } + // Requirement // if (n.name () == "Requirement" && n.namespace_ () == "http://www.neuroml.org/schema/neuroml2") @@ -17271,6 +18026,17 @@ namespace neuroml2 continue; } + // InstanceRequirement + // + if (n.name () == "InstanceRequirement" && n.namespace_ () == "http://www.neuroml.org/schema/neuroml2") + { + ::std::unique_ptr< InstanceRequirement_type > r ( + InstanceRequirement_traits::create (i, f, this)); + + this->InstanceRequirement_.push_back (::std::move (r)); + continue; + } + // Dynamics // if (n.name () == "Dynamics" && n.namespace_ () == "http://www.neuroml.org/schema/neuroml2") @@ -17331,9 +18097,12 @@ namespace neuroml2 if (this != &x) { static_cast< ::xml_schema::type& > (*this) = x; + this->Property_ = x.Property_; this->Parameter_ = x.Parameter_; this->Constant_ = x.Constant_; + this->Exposure_ = x.Exposure_; this->Requirement_ = x.Requirement_; + this->InstanceRequirement_ = x.InstanceRequirement_; this->Dynamics_ = x.Dynamics_; this->name_ = x.name_; this->extends_ = x.extends_; @@ -17351,15 +18120,24 @@ namespace neuroml2 bool operator== (const ComponentType& x, const ComponentType& y) { + if (!(x.Property () == y.Property ())) + return false; + if (!(x.Parameter () == y.Parameter ())) return false; if (!(x.Constant () == y.Constant ())) return false; + if (!(x.Exposure () == y.Exposure ())) + return false; + if (!(x.Requirement () == y.Requirement ())) return false; + if (!(x.InstanceRequirement () == y.InstanceRequirement ())) + return false; + if (!(x.Dynamics () == y.Dynamics ())) return false; @@ -17533,25 +18311,23 @@ namespace neuroml2 return !(x == y); } - // NamedDimensionalType + // Exposure // - const NamedDimensionalType::dimension_type NamedDimensionalType::dimension_default_value_ ( - "none"); - - NamedDimensionalType:: - NamedDimensionalType (const name_type& name) + Exposure:: + Exposure (const name_type& name, + const dimension_type& dimension) : ::xml_schema::type (), name_ (name, this), - dimension_ (dimension_default_value (), this), + dimension_ (dimension, this), description_ (this) { } - NamedDimensionalType:: - NamedDimensionalType (const NamedDimensionalType& x, - ::xml_schema::flags f, - ::xml_schema::container* c) + Exposure:: + Exposure (const Exposure& x, + ::xml_schema::flags f, + ::xml_schema::container* c) : ::xml_schema::type (x, f, c), name_ (x.name_, f, this), dimension_ (x.dimension_, f, this), @@ -17559,10 +18335,10 @@ namespace neuroml2 { } - NamedDimensionalType:: - NamedDimensionalType (const ::xercesc::DOMElement& e, - ::xml_schema::flags f, - ::xml_schema::container* c) + Exposure:: + Exposure (const ::xercesc::DOMElement& e, + ::xml_schema::flags f, + ::xml_schema::container* c) : ::xml_schema::type (e, f | ::xml_schema::flags::base, c), name_ (this), dimension_ (this), @@ -17575,7 +18351,7 @@ namespace neuroml2 } } - void NamedDimensionalType:: + void Exposure:: parse (::xsd::cxx::xml::dom::parser< char >& p, ::xml_schema::flags f) { @@ -17613,19 +18389,21 @@ namespace neuroml2 if (!dimension_.present ()) { - this->dimension_.set (dimension_default_value ()); + throw ::xsd::cxx::tree::expected_attribute< char > ( + "dimension", + ""); } } - NamedDimensionalType* NamedDimensionalType:: + Exposure* Exposure:: _clone (::xml_schema::flags f, ::xml_schema::container* c) const { - return new class NamedDimensionalType (*this, f, c); + return new class Exposure (*this, f, c); } - NamedDimensionalType& NamedDimensionalType:: - operator= (const NamedDimensionalType& x) + Exposure& Exposure:: + operator= (const Exposure& x) { if (this != &x) { @@ -17638,13 +18416,13 @@ namespace neuroml2 return *this; } - NamedDimensionalType:: - ~NamedDimensionalType () + Exposure:: + ~Exposure () { } bool - operator== (const NamedDimensionalType& x, const NamedDimensionalType& y) + operator== (const Exposure& x, const Exposure& y) { if (!(x.name () == y.name ())) return false; @@ -17659,235 +18437,176 @@ namespace neuroml2 } bool - operator!= (const NamedDimensionalType& x, const NamedDimensionalType& y) + operator!= (const Exposure& x, const Exposure& y) { return !(x == y); } - // Parameter - // - - Parameter:: - Parameter (const name_type& name) - : ::neuroml2::NamedDimensionalType (name) - { - } - - Parameter:: - Parameter (const Parameter& x, - ::xml_schema::flags f, - ::xml_schema::container* c) - : ::neuroml2::NamedDimensionalType (x, f, c) - { - } - - Parameter:: - Parameter (const ::xercesc::DOMElement& e, - ::xml_schema::flags f, - ::xml_schema::container* c) - : ::neuroml2::NamedDimensionalType (e, f, c) - { - } - - Parameter* Parameter:: - _clone (::xml_schema::flags f, - ::xml_schema::container* c) const - { - return new class Parameter (*this, f, c); - } - - Parameter:: - ~Parameter () - { - } - - // Requirement - // - - Requirement:: - Requirement (const name_type& name) - : ::neuroml2::NamedDimensionalType (name) - { - } - - Requirement:: - Requirement (const Requirement& x, - ::xml_schema::flags f, - ::xml_schema::container* c) - : ::neuroml2::NamedDimensionalType (x, f, c) - { - } - - Requirement:: - Requirement (const ::xercesc::DOMElement& e, - ::xml_schema::flags f, - ::xml_schema::container* c) - : ::neuroml2::NamedDimensionalType (e, f, c) - { - } - - Requirement* Requirement:: - _clone (::xml_schema::flags f, - ::xml_schema::container* c) const - { - return new class Requirement (*this, f, c); - } - - Requirement:: - ~Requirement () - { - } - - // Dynamics + // NamedDimensionalType // - Dynamics:: - Dynamics () + NamedDimensionalType:: + NamedDimensionalType (const name_type& name, + const dimension_type& dimension) : ::xml_schema::type (), - DerivedVariable_ (this), - ConditionalDerivedVariable_ (this) + name_ (name, this), + dimension_ (dimension, this), + description_ (this) { } - Dynamics:: - Dynamics (const Dynamics& x, - ::xml_schema::flags f, - ::xml_schema::container* c) + NamedDimensionalType:: + NamedDimensionalType (const NamedDimensionalType& x, + ::xml_schema::flags f, + ::xml_schema::container* c) : ::xml_schema::type (x, f, c), - DerivedVariable_ (x.DerivedVariable_, f, this), - ConditionalDerivedVariable_ (x.ConditionalDerivedVariable_, f, this) + name_ (x.name_, f, this), + dimension_ (x.dimension_, f, this), + description_ (x.description_, f, this) { } - Dynamics:: - Dynamics (const ::xercesc::DOMElement& e, - ::xml_schema::flags f, - ::xml_schema::container* c) + NamedDimensionalType:: + NamedDimensionalType (const ::xercesc::DOMElement& e, + ::xml_schema::flags f, + ::xml_schema::container* c) : ::xml_schema::type (e, f | ::xml_schema::flags::base, c), - DerivedVariable_ (this), - ConditionalDerivedVariable_ (this) + name_ (this), + dimension_ (this), + description_ (this) { if ((f & ::xml_schema::flags::base) == 0) { - ::xsd::cxx::xml::dom::parser< char > p (e, true, false, false); + ::xsd::cxx::xml::dom::parser< char > p (e, false, false, true); this->parse (p, f); } } - void Dynamics:: + void NamedDimensionalType:: parse (::xsd::cxx::xml::dom::parser< char >& p, ::xml_schema::flags f) { - for (; p.more_content (); p.next_content (false)) + while (p.more_attributes ()) { - const ::xercesc::DOMElement& i (p.cur_element ()); + const ::xercesc::DOMAttr& i (p.next_attribute ()); const ::xsd::cxx::xml::qualified_name< char > n ( ::xsd::cxx::xml::dom::name< char > (i)); - // DerivedVariable - // - if (n.name () == "DerivedVariable" && n.namespace_ () == "http://www.neuroml.org/schema/neuroml2") + if (n.name () == "name" && n.namespace_ ().empty ()) { - ::std::unique_ptr< DerivedVariable_type > r ( - DerivedVariable_traits::create (i, f, this)); - - this->DerivedVariable_.push_back (::std::move (r)); + this->name_.set (name_traits::create (i, f, this)); continue; } - // ConditionalDerivedVariable - // - if (n.name () == "ConditionalDerivedVariable" && n.namespace_ () == "http://www.neuroml.org/schema/neuroml2") + if (n.name () == "dimension" && n.namespace_ ().empty ()) { - ::std::unique_ptr< ConditionalDerivedVariable_type > r ( - ConditionalDerivedVariable_traits::create (i, f, this)); + this->dimension_.set (dimension_traits::create (i, f, this)); + continue; + } - this->ConditionalDerivedVariable_.push_back (::std::move (r)); + if (n.name () == "description" && n.namespace_ ().empty ()) + { + this->description_.set (description_traits::create (i, f, this)); continue; } + } - break; + if (!name_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "name", + ""); + } + + if (!dimension_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "dimension", + ""); } } - Dynamics* Dynamics:: + NamedDimensionalType* NamedDimensionalType:: _clone (::xml_schema::flags f, ::xml_schema::container* c) const { - return new class Dynamics (*this, f, c); + return new class NamedDimensionalType (*this, f, c); } - Dynamics& Dynamics:: - operator= (const Dynamics& x) + NamedDimensionalType& NamedDimensionalType:: + operator= (const NamedDimensionalType& x) { if (this != &x) { static_cast< ::xml_schema::type& > (*this) = x; - this->DerivedVariable_ = x.DerivedVariable_; - this->ConditionalDerivedVariable_ = x.ConditionalDerivedVariable_; + this->name_ = x.name_; + this->dimension_ = x.dimension_; + this->description_ = x.description_; } return *this; } - Dynamics:: - ~Dynamics () + NamedDimensionalType:: + ~NamedDimensionalType () { } bool - operator== (const Dynamics& x, const Dynamics& y) + operator== (const NamedDimensionalType& x, const NamedDimensionalType& y) { - if (!(x.DerivedVariable () == y.DerivedVariable ())) + if (!(x.name () == y.name ())) return false; - if (!(x.ConditionalDerivedVariable () == y.ConditionalDerivedVariable ())) + if (!(x.dimension () == y.dimension ())) + return false; + + if (!(x.description () == y.description ())) return false; return true; } bool - operator!= (const Dynamics& x, const Dynamics& y) + operator!= (const NamedDimensionalType& x, const NamedDimensionalType& y) { return !(x == y); } - // DerivedVariable + // NamedDimensionalVariable // - DerivedVariable:: - DerivedVariable (const name_type& name, - const dimension_type& dimension, - const value_type& value) + NamedDimensionalVariable:: + NamedDimensionalVariable (const name_type& name, + const dimension_type& dimension) : ::xml_schema::type (), name_ (name, this), dimension_ (dimension, this), - value_ (value, this), + description_ (this), exposure_ (this) { } - DerivedVariable:: - DerivedVariable (const DerivedVariable& x, - ::xml_schema::flags f, - ::xml_schema::container* c) + NamedDimensionalVariable:: + NamedDimensionalVariable (const NamedDimensionalVariable& x, + ::xml_schema::flags f, + ::xml_schema::container* c) : ::xml_schema::type (x, f, c), name_ (x.name_, f, this), dimension_ (x.dimension_, f, this), - value_ (x.value_, f, this), + description_ (x.description_, f, this), exposure_ (x.exposure_, f, this) { } - DerivedVariable:: - DerivedVariable (const ::xercesc::DOMElement& e, - ::xml_schema::flags f, - ::xml_schema::container* c) + NamedDimensionalVariable:: + NamedDimensionalVariable (const ::xercesc::DOMElement& e, + ::xml_schema::flags f, + ::xml_schema::container* c) : ::xml_schema::type (e, f | ::xml_schema::flags::base, c), name_ (this), dimension_ (this), - value_ (this), + description_ (this), exposure_ (this) { if ((f & ::xml_schema::flags::base) == 0) @@ -17897,7 +18616,7 @@ namespace neuroml2 } } - void DerivedVariable:: + void NamedDimensionalVariable:: parse (::xsd::cxx::xml::dom::parser< char >& p, ::xml_schema::flags f) { @@ -17919,9 +18638,9 @@ namespace neuroml2 continue; } - if (n.name () == "value" && n.namespace_ ().empty ()) + if (n.name () == "description" && n.namespace_ ().empty ()) { - this->value_.set (value_traits::create (i, f, this)); + this->description_.set (description_traits::create (i, f, this)); continue; } @@ -17945,44 +18664,37 @@ namespace neuroml2 "dimension", ""); } - - if (!value_.present ()) - { - throw ::xsd::cxx::tree::expected_attribute< char > ( - "value", - ""); - } } - DerivedVariable* DerivedVariable:: + NamedDimensionalVariable* NamedDimensionalVariable:: _clone (::xml_schema::flags f, ::xml_schema::container* c) const { - return new class DerivedVariable (*this, f, c); + return new class NamedDimensionalVariable (*this, f, c); } - DerivedVariable& DerivedVariable:: - operator= (const DerivedVariable& x) + NamedDimensionalVariable& NamedDimensionalVariable:: + operator= (const NamedDimensionalVariable& x) { if (this != &x) { static_cast< ::xml_schema::type& > (*this) = x; this->name_ = x.name_; this->dimension_ = x.dimension_; - this->value_ = x.value_; + this->description_ = x.description_; this->exposure_ = x.exposure_; } return *this; } - DerivedVariable:: - ~DerivedVariable () + NamedDimensionalVariable:: + ~NamedDimensionalVariable () { } bool - operator== (const DerivedVariable& x, const DerivedVariable& y) + operator== (const NamedDimensionalVariable& x, const NamedDimensionalVariable& y) { if (!(x.name () == y.name ())) return false; @@ -17990,7 +18702,7 @@ namespace neuroml2 if (!(x.dimension () == y.dimension ())) return false; - if (!(x.value () == y.value ())) + if (!(x.description () == y.description ())) return false; if (!(x.exposure () == y.exposure ())) @@ -18000,55 +18712,350 @@ namespace neuroml2 } bool - operator!= (const DerivedVariable& x, const DerivedVariable& y) + operator!= (const NamedDimensionalVariable& x, const NamedDimensionalVariable& y) { return !(x == y); } - // ConditionalDerivedVariable + // Parameter // - ConditionalDerivedVariable:: - ConditionalDerivedVariable (const name_type& name, - const dimension_type& dimension) + Parameter:: + Parameter (const name_type& name, + const dimension_type& dimension) + : ::neuroml2::NamedDimensionalType (name, + dimension) + { + } + + Parameter:: + Parameter (const Parameter& x, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::NamedDimensionalType (x, f, c) + { + } + + Parameter:: + Parameter (const ::xercesc::DOMElement& e, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::NamedDimensionalType (e, f, c) + { + } + + Parameter* Parameter:: + _clone (::xml_schema::flags f, + ::xml_schema::container* c) const + { + return new class Parameter (*this, f, c); + } + + Parameter:: + ~Parameter () + { + } + + // LEMS_Property + // + + LEMS_Property:: + LEMS_Property (const name_type& name, + const dimension_type& dimension) + : ::neuroml2::NamedDimensionalType (name, + dimension), + defaultValue_ (this) + { + } + + LEMS_Property:: + LEMS_Property (const LEMS_Property& x, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::NamedDimensionalType (x, f, c), + defaultValue_ (x.defaultValue_, f, this) + { + } + + LEMS_Property:: + LEMS_Property (const ::xercesc::DOMElement& e, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::NamedDimensionalType (e, f | ::xml_schema::flags::base, c), + defaultValue_ (this) + { + if ((f & ::xml_schema::flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, false, false, true); + this->parse (p, f); + } + } + + void LEMS_Property:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::flags f) + { + this->::neuroml2::NamedDimensionalType::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 () == "defaultValue" && n.namespace_ ().empty ()) + { + this->defaultValue_.set (defaultValue_traits::create (i, f, this)); + continue; + } + } + } + + LEMS_Property* LEMS_Property:: + _clone (::xml_schema::flags f, + ::xml_schema::container* c) const + { + return new class LEMS_Property (*this, f, c); + } + + LEMS_Property& LEMS_Property:: + operator= (const LEMS_Property& x) + { + if (this != &x) + { + static_cast< ::neuroml2::NamedDimensionalType& > (*this) = x; + this->defaultValue_ = x.defaultValue_; + } + + return *this; + } + + LEMS_Property:: + ~LEMS_Property () + { + } + + bool + operator== (const LEMS_Property& x, const LEMS_Property& y) + { + if (!(static_cast< const ::neuroml2::NamedDimensionalType& > (x) == + static_cast< const ::neuroml2::NamedDimensionalType& > (y))) + return false; + + if (!(x.defaultValue () == y.defaultValue ())) + return false; + + return true; + } + + bool + operator!= (const LEMS_Property& x, const LEMS_Property& y) + { + return !(x == y); + } + + // Requirement + // + + Requirement:: + Requirement (const name_type& name, + const dimension_type& dimension) + : ::neuroml2::NamedDimensionalType (name, + dimension) + { + } + + Requirement:: + Requirement (const Requirement& x, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::NamedDimensionalType (x, f, c) + { + } + + Requirement:: + Requirement (const ::xercesc::DOMElement& e, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::NamedDimensionalType (e, f, c) + { + } + + Requirement* Requirement:: + _clone (::xml_schema::flags f, + ::xml_schema::container* c) const + { + return new class Requirement (*this, f, c); + } + + Requirement:: + ~Requirement () + { + } + + // InstanceRequirement + // + + InstanceRequirement:: + InstanceRequirement (const name_type& name, + const type_type& type) : ::xml_schema::type (), - Case_ (this), name_ (name, this), - dimension_ (dimension, this), - exposure_ (this) + type_ (type, this) { } - ConditionalDerivedVariable:: - ConditionalDerivedVariable (const ConditionalDerivedVariable& x, - ::xml_schema::flags f, - ::xml_schema::container* c) + InstanceRequirement:: + InstanceRequirement (const InstanceRequirement& x, + ::xml_schema::flags f, + ::xml_schema::container* c) : ::xml_schema::type (x, f, c), - Case_ (x.Case_, f, this), name_ (x.name_, f, this), - dimension_ (x.dimension_, f, this), - exposure_ (x.exposure_, f, this) + type_ (x.type_, f, this) { } - ConditionalDerivedVariable:: - ConditionalDerivedVariable (const ::xercesc::DOMElement& e, - ::xml_schema::flags f, - ::xml_schema::container* c) + InstanceRequirement:: + InstanceRequirement (const ::xercesc::DOMElement& e, + ::xml_schema::flags f, + ::xml_schema::container* c) : ::xml_schema::type (e, f | ::xml_schema::flags::base, c), - Case_ (this), name_ (this), - dimension_ (this), - exposure_ (this) + type_ (this) { if ((f & ::xml_schema::flags::base) == 0) { - ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); + ::xsd::cxx::xml::dom::parser< char > p (e, false, false, true); this->parse (p, f); } } - void ConditionalDerivedVariable:: + void InstanceRequirement:: + 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 () == "name" && n.namespace_ ().empty ()) + { + this->name_.set (name_traits::create (i, f, this)); + continue; + } + + if (n.name () == "type" && n.namespace_ ().empty ()) + { + this->type_.set (type_traits::create (i, f, this)); + continue; + } + } + + if (!name_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "name", + ""); + } + + if (!type_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "type", + ""); + } + } + + InstanceRequirement* InstanceRequirement:: + _clone (::xml_schema::flags f, + ::xml_schema::container* c) const + { + return new class InstanceRequirement (*this, f, c); + } + + InstanceRequirement& InstanceRequirement:: + operator= (const InstanceRequirement& x) + { + if (this != &x) + { + static_cast< ::xml_schema::type& > (*this) = x; + this->name_ = x.name_; + this->type_ = x.type_; + } + + return *this; + } + + InstanceRequirement:: + ~InstanceRequirement () + { + } + + bool + operator== (const InstanceRequirement& x, const InstanceRequirement& y) + { + if (!(x.name () == y.name ())) + return false; + + if (!(x.type () == y.type ())) + return false; + + return true; + } + + bool + operator!= (const InstanceRequirement& x, const InstanceRequirement& y) + { + return !(x == y); + } + + // Dynamics + // + + Dynamics:: + Dynamics () + : ::xml_schema::type (), + StateVariable_ (this), + DerivedVariable_ (this), + ConditionalDerivedVariable_ (this), + TimeDerivative_ (this) + { + } + + Dynamics:: + Dynamics (const Dynamics& x, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::xml_schema::type (x, f, c), + StateVariable_ (x.StateVariable_, f, this), + DerivedVariable_ (x.DerivedVariable_, f, this), + ConditionalDerivedVariable_ (x.ConditionalDerivedVariable_, f, this), + TimeDerivative_ (x.TimeDerivative_, f, this) + { + } + + Dynamics:: + Dynamics (const ::xercesc::DOMElement& e, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::xml_schema::type (e, f | ::xml_schema::flags::base, c), + StateVariable_ (this), + DerivedVariable_ (this), + ConditionalDerivedVariable_ (this), + TimeDerivative_ (this) + { + if ((f & ::xml_schema::flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, true, false, false); + this->parse (p, f); + } + } + + void Dynamics:: parse (::xsd::cxx::xml::dom::parser< char >& p, ::xml_schema::flags f) { @@ -18058,19 +19065,150 @@ namespace neuroml2 const ::xsd::cxx::xml::qualified_name< char > n ( ::xsd::cxx::xml::dom::name< char > (i)); - // Case + // StateVariable // - if (n.name () == "Case" && n.namespace_ () == "http://www.neuroml.org/schema/neuroml2") + if (n.name () == "StateVariable" && n.namespace_ () == "http://www.neuroml.org/schema/neuroml2") { - ::std::unique_ptr< Case_type > r ( - Case_traits::create (i, f, this)); + ::std::unique_ptr< StateVariable_type > r ( + StateVariable_traits::create (i, f, this)); - this->Case_.push_back (::std::move (r)); + this->StateVariable_.push_back (::std::move (r)); + continue; + } + + // DerivedVariable + // + if (n.name () == "DerivedVariable" && n.namespace_ () == "http://www.neuroml.org/schema/neuroml2") + { + ::std::unique_ptr< DerivedVariable_type > r ( + DerivedVariable_traits::create (i, f, this)); + + this->DerivedVariable_.push_back (::std::move (r)); + continue; + } + + // ConditionalDerivedVariable + // + if (n.name () == "ConditionalDerivedVariable" && n.namespace_ () == "http://www.neuroml.org/schema/neuroml2") + { + ::std::unique_ptr< ConditionalDerivedVariable_type > r ( + ConditionalDerivedVariable_traits::create (i, f, this)); + + this->ConditionalDerivedVariable_.push_back (::std::move (r)); + continue; + } + + // TimeDerivative + // + if (n.name () == "TimeDerivative" && n.namespace_ () == "http://www.neuroml.org/schema/neuroml2") + { + ::std::unique_ptr< TimeDerivative_type > r ( + TimeDerivative_traits::create (i, f, this)); + + this->TimeDerivative_.push_back (::std::move (r)); continue; } break; } + } + + Dynamics* Dynamics:: + _clone (::xml_schema::flags f, + ::xml_schema::container* c) const + { + return new class Dynamics (*this, f, c); + } + + Dynamics& Dynamics:: + operator= (const Dynamics& x) + { + if (this != &x) + { + static_cast< ::xml_schema::type& > (*this) = x; + this->StateVariable_ = x.StateVariable_; + this->DerivedVariable_ = x.DerivedVariable_; + this->ConditionalDerivedVariable_ = x.ConditionalDerivedVariable_; + this->TimeDerivative_ = x.TimeDerivative_; + } + + return *this; + } + + Dynamics:: + ~Dynamics () + { + } + + bool + operator== (const Dynamics& x, const Dynamics& y) + { + if (!(x.StateVariable () == y.StateVariable ())) + return false; + + if (!(x.DerivedVariable () == y.DerivedVariable ())) + return false; + + if (!(x.ConditionalDerivedVariable () == y.ConditionalDerivedVariable ())) + return false; + + if (!(x.TimeDerivative () == y.TimeDerivative ())) + return false; + + return true; + } + + bool + operator!= (const Dynamics& x, const Dynamics& y) + { + return !(x == y); + } + + // DerivedVariable + // + + DerivedVariable:: + DerivedVariable (const name_type& name, + const dimension_type& dimension) + : ::neuroml2::NamedDimensionalVariable (name, + dimension), + value_ (this), + select_ (this) + { + } + + DerivedVariable:: + DerivedVariable (const DerivedVariable& x, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::NamedDimensionalVariable (x, f, c), + value_ (x.value_, f, this), + select_ (x.select_, f, this) + { + } + + DerivedVariable:: + DerivedVariable (const ::xercesc::DOMElement& e, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::NamedDimensionalVariable (e, f | ::xml_schema::flags::base, c), + value_ (this), + select_ (this) + { + if ((f & ::xml_schema::flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, false, false, true); + this->parse (p, f); + } + } + + void DerivedVariable:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::flags f) + { + this->::neuroml2::NamedDimensionalVariable::parse (p, f); + + p.reset_attributes (); while (p.more_attributes ()) { @@ -18078,37 +19216,165 @@ namespace neuroml2 const ::xsd::cxx::xml::qualified_name< char > n ( ::xsd::cxx::xml::dom::name< char > (i)); - if (n.name () == "name" && n.namespace_ ().empty ()) + if (n.name () == "value" && n.namespace_ ().empty ()) { - this->name_.set (name_traits::create (i, f, this)); + this->value_.set (value_traits::create (i, f, this)); continue; } - if (n.name () == "dimension" && n.namespace_ ().empty ()) + if (n.name () == "select" && n.namespace_ ().empty ()) { - this->dimension_.set (dimension_traits::create (i, f, this)); + this->select_.set (select_traits::create (i, f, this)); continue; } + } + } - if (n.name () == "exposure" && n.namespace_ ().empty ()) - { - this->exposure_.set (exposure_traits::create (i, f, this)); - continue; - } + DerivedVariable* DerivedVariable:: + _clone (::xml_schema::flags f, + ::xml_schema::container* c) const + { + return new class DerivedVariable (*this, f, c); + } + + DerivedVariable& DerivedVariable:: + operator= (const DerivedVariable& x) + { + if (this != &x) + { + static_cast< ::neuroml2::NamedDimensionalVariable& > (*this) = x; + this->value_ = x.value_; + this->select_ = x.select_; } - if (!name_.present ()) + return *this; + } + + DerivedVariable:: + ~DerivedVariable () + { + } + + bool + operator== (const DerivedVariable& x, const DerivedVariable& y) + { + if (!(static_cast< const ::neuroml2::NamedDimensionalVariable& > (x) == + static_cast< const ::neuroml2::NamedDimensionalVariable& > (y))) + return false; + + if (!(x.value () == y.value ())) + return false; + + if (!(x.select () == y.select ())) + return false; + + return true; + } + + bool + operator!= (const DerivedVariable& x, const DerivedVariable& y) + { + return !(x == y); + } + + // StateVariable + // + + StateVariable:: + StateVariable (const name_type& name, + const dimension_type& dimension) + : ::neuroml2::NamedDimensionalVariable (name, + dimension) + { + } + + StateVariable:: + StateVariable (const StateVariable& x, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::NamedDimensionalVariable (x, f, c) + { + } + + StateVariable:: + StateVariable (const ::xercesc::DOMElement& e, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::NamedDimensionalVariable (e, f, c) + { + } + + StateVariable* StateVariable:: + _clone (::xml_schema::flags f, + ::xml_schema::container* c) const + { + return new class StateVariable (*this, f, c); + } + + StateVariable:: + ~StateVariable () + { + } + + // ConditionalDerivedVariable + // + + ConditionalDerivedVariable:: + ConditionalDerivedVariable (const name_type& name, + const dimension_type& dimension) + : ::neuroml2::NamedDimensionalVariable (name, + dimension), + Case_ (this) + { + } + + ConditionalDerivedVariable:: + ConditionalDerivedVariable (const ConditionalDerivedVariable& x, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::NamedDimensionalVariable (x, f, c), + Case_ (x.Case_, f, this) + { + } + + ConditionalDerivedVariable:: + ConditionalDerivedVariable (const ::xercesc::DOMElement& e, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::NamedDimensionalVariable (e, f | ::xml_schema::flags::base, c), + Case_ (this) + { + if ((f & ::xml_schema::flags::base) == 0) { - throw ::xsd::cxx::tree::expected_attribute< char > ( - "name", - ""); + ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); + this->parse (p, f); } + } - if (!dimension_.present ()) + void ConditionalDerivedVariable:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::flags f) + { + this->::neuroml2::NamedDimensionalVariable::parse (p, f); + + for (; p.more_content (); p.next_content (false)) { - throw ::xsd::cxx::tree::expected_attribute< char > ( - "dimension", - ""); + const ::xercesc::DOMElement& i (p.cur_element ()); + const ::xsd::cxx::xml::qualified_name< char > n ( + ::xsd::cxx::xml::dom::name< char > (i)); + + // Case + // + if (n.name () == "Case" && n.namespace_ () == "http://www.neuroml.org/schema/neuroml2") + { + ::std::unique_ptr< Case_type > r ( + Case_traits::create (i, f, this)); + + this->Case_.push_back (::std::move (r)); + continue; + } + + break; } } @@ -18124,11 +19390,8 @@ namespace neuroml2 { if (this != &x) { - static_cast< ::xml_schema::type& > (*this) = x; + static_cast< ::neuroml2::NamedDimensionalVariable& > (*this) = x; this->Case_ = x.Case_; - this->name_ = x.name_; - this->dimension_ = x.dimension_; - this->exposure_ = x.exposure_; } return *this; @@ -18142,16 +19405,11 @@ namespace neuroml2 bool operator== (const ConditionalDerivedVariable& x, const ConditionalDerivedVariable& y) { - if (!(x.Case () == y.Case ())) - return false; - - if (!(x.name () == y.name ())) + if (!(static_cast< const ::neuroml2::NamedDimensionalVariable& > (x) == + static_cast< const ::neuroml2::NamedDimensionalVariable& > (y))) return false; - if (!(x.dimension () == y.dimension ())) - return false; - - if (!(x.exposure () == y.exposure ())) + if (!(x.Case () == y.Case ())) return false; return true; @@ -18273,12 +19531,130 @@ namespace neuroml2 return !(x == y); } + // TimeDerivative + // + + TimeDerivative:: + TimeDerivative (const variable_type& variable, + const value_type& value) + : ::xml_schema::type (), + variable_ (variable, this), + value_ (value, this) + { + } + + TimeDerivative:: + TimeDerivative (const TimeDerivative& x, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::xml_schema::type (x, f, c), + variable_ (x.variable_, f, this), + value_ (x.value_, f, this) + { + } + + TimeDerivative:: + TimeDerivative (const ::xercesc::DOMElement& e, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::xml_schema::type (e, f | ::xml_schema::flags::base, c), + variable_ (this), + value_ (this) + { + if ((f & ::xml_schema::flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, false, false, true); + this->parse (p, f); + } + } + + void TimeDerivative:: + 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 () == "variable" && n.namespace_ ().empty ()) + { + this->variable_.set (variable_traits::create (i, f, this)); + continue; + } + + if (n.name () == "value" && n.namespace_ ().empty ()) + { + this->value_.set (value_traits::create (i, f, this)); + continue; + } + } + + if (!variable_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "variable", + ""); + } + + if (!value_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "value", + ""); + } + } + + TimeDerivative* TimeDerivative:: + _clone (::xml_schema::flags f, + ::xml_schema::container* c) const + { + return new class TimeDerivative (*this, f, c); + } + + TimeDerivative& TimeDerivative:: + operator= (const TimeDerivative& x) + { + if (this != &x) + { + static_cast< ::xml_schema::type& > (*this) = x; + this->variable_ = x.variable_; + this->value_ = x.value_; + } + + return *this; + } + + TimeDerivative:: + ~TimeDerivative () + { + } + + bool + operator== (const TimeDerivative& x, const TimeDerivative& y) + { + if (!(x.variable () == y.variable ())) + return false; + + if (!(x.value () == y.value ())) + return false; + + return true; + } + + bool + operator!= (const TimeDerivative& x, const TimeDerivative& y) + { + return !(x == y); + } + // ZeroToOne // ZeroToOne:: - ZeroToOne (const ::xml_schema::double_& _xsd_double__base) - : ::xsd::cxx::tree::fundamental_base< ::xml_schema::double_, char, ::xml_schema::simple_type, ::xsd::cxx::tree::schema_type::double_ > (_xsd_double__base) + ZeroToOne (const ::xml_schema::float_& _xsd_float__base) + : ::xsd::cxx::tree::fundamental_base< ::xml_schema::float_, char, ::xml_schema::simple_type > (_xsd_float__base) { } @@ -18286,7 +19662,7 @@ namespace neuroml2 ZeroToOne (const ZeroToOne& x, ::xml_schema::flags f, ::xml_schema::container* c) - : ::xsd::cxx::tree::fundamental_base< ::xml_schema::double_, char, ::xml_schema::simple_type, ::xsd::cxx::tree::schema_type::double_ > (x, f, c) + : ::xsd::cxx::tree::fundamental_base< ::xml_schema::float_, char, ::xml_schema::simple_type > (x, f, c) { } @@ -18294,7 +19670,7 @@ namespace neuroml2 ZeroToOne (const ::xercesc::DOMElement& e, ::xml_schema::flags f, ::xml_schema::container* c) - : ::xsd::cxx::tree::fundamental_base< ::xml_schema::double_, char, ::xml_schema::simple_type, ::xsd::cxx::tree::schema_type::double_ > (e, f, c) + : ::xsd::cxx::tree::fundamental_base< ::xml_schema::float_, char, ::xml_schema::simple_type > (e, f, c) { } @@ -18302,7 +19678,7 @@ namespace neuroml2 ZeroToOne (const ::xercesc::DOMAttr& a, ::xml_schema::flags f, ::xml_schema::container* c) - : ::xsd::cxx::tree::fundamental_base< ::xml_schema::double_, char, ::xml_schema::simple_type, ::xsd::cxx::tree::schema_type::double_ > (a, f, c) + : ::xsd::cxx::tree::fundamental_base< ::xml_schema::float_, char, ::xml_schema::simple_type > (a, f, c) { } @@ -18311,7 +19687,7 @@ namespace neuroml2 const ::xercesc::DOMElement* e, ::xml_schema::flags f, ::xml_schema::container* c) - : ::xsd::cxx::tree::fundamental_base< ::xml_schema::double_, char, ::xml_schema::simple_type, ::xsd::cxx::tree::schema_type::double_ > (s, e, f, c) + : ::xsd::cxx::tree::fundamental_base< ::xml_schema::float_, char, ::xml_schema::simple_type > (s, e, f, c) { } @@ -18701,6 +20077,7 @@ namespace neuroml2 morphology_ (this), ionChannel_ (this), ionChannelHH_ (this), + ionChannelVShift_ (this), ionChannelKS_ (this), decayingPoolConcentrationModel_ (this), fixedFactorConcentrationModel_ (this), @@ -18710,6 +20087,7 @@ namespace neuroml2 expTwoSynapse_ (this), expThreeSynapse_ (this), blockingPlasticSynapse_ (this), + doubleSynapse_ (this), gapJunction_ (this), silentSynapse_ (this), linearGradedSynapse_ (this), @@ -18737,11 +20115,13 @@ namespace neuroml2 compoundInput_ (this), compoundInputDL_ (this), voltageClamp_ (this), + voltageClampTriple_ (this), spikeArray_ (this), timedSynapticInput_ (this), spikeGenerator_ (this), spikeGeneratorRandom_ (this), spikeGeneratorPoisson_ (this), + spikeGeneratorRefPoisson_ (this), poissonFiringSynapse_ (this), transientPoissonFiringSynapse_ (this), IF_curr_alpha_ (this), @@ -18772,6 +20152,7 @@ namespace neuroml2 morphology_ (x.morphology_, f, this), ionChannel_ (x.ionChannel_, f, this), ionChannelHH_ (x.ionChannelHH_, f, this), + ionChannelVShift_ (x.ionChannelVShift_, f, this), ionChannelKS_ (x.ionChannelKS_, f, this), decayingPoolConcentrationModel_ (x.decayingPoolConcentrationModel_, f, this), fixedFactorConcentrationModel_ (x.fixedFactorConcentrationModel_, f, this), @@ -18781,6 +20162,7 @@ namespace neuroml2 expTwoSynapse_ (x.expTwoSynapse_, f, this), expThreeSynapse_ (x.expThreeSynapse_, f, this), blockingPlasticSynapse_ (x.blockingPlasticSynapse_, f, this), + doubleSynapse_ (x.doubleSynapse_, f, this), gapJunction_ (x.gapJunction_, f, this), silentSynapse_ (x.silentSynapse_, f, this), linearGradedSynapse_ (x.linearGradedSynapse_, f, this), @@ -18808,11 +20190,13 @@ namespace neuroml2 compoundInput_ (x.compoundInput_, f, this), compoundInputDL_ (x.compoundInputDL_, f, this), voltageClamp_ (x.voltageClamp_, f, this), + voltageClampTriple_ (x.voltageClampTriple_, f, this), spikeArray_ (x.spikeArray_, f, this), timedSynapticInput_ (x.timedSynapticInput_, f, this), spikeGenerator_ (x.spikeGenerator_, f, this), spikeGeneratorRandom_ (x.spikeGeneratorRandom_, f, this), spikeGeneratorPoisson_ (x.spikeGeneratorPoisson_, f, this), + spikeGeneratorRefPoisson_ (x.spikeGeneratorRefPoisson_, f, this), poissonFiringSynapse_ (x.poissonFiringSynapse_, f, this), transientPoissonFiringSynapse_ (x.transientPoissonFiringSynapse_, f, this), IF_curr_alpha_ (x.IF_curr_alpha_, f, this), @@ -18843,6 +20227,7 @@ namespace neuroml2 morphology_ (this), ionChannel_ (this), ionChannelHH_ (this), + ionChannelVShift_ (this), ionChannelKS_ (this), decayingPoolConcentrationModel_ (this), fixedFactorConcentrationModel_ (this), @@ -18852,6 +20237,7 @@ namespace neuroml2 expTwoSynapse_ (this), expThreeSynapse_ (this), blockingPlasticSynapse_ (this), + doubleSynapse_ (this), gapJunction_ (this), silentSynapse_ (this), linearGradedSynapse_ (this), @@ -18879,11 +20265,13 @@ namespace neuroml2 compoundInput_ (this), compoundInputDL_ (this), voltageClamp_ (this), + voltageClampTriple_ (this), spikeArray_ (this), timedSynapticInput_ (this), spikeGenerator_ (this), spikeGeneratorRandom_ (this), spikeGeneratorPoisson_ (this), + spikeGeneratorRefPoisson_ (this), poissonFiringSynapse_ (this), transientPoissonFiringSynapse_ (this), IF_curr_alpha_ (this), @@ -18986,6 +20374,17 @@ namespace neuroml2 continue; } + // ionChannelVShift + // + if (n.name () == "ionChannelVShift" && n.namespace_ () == "http://www.neuroml.org/schema/neuroml2") + { + ::std::unique_ptr< ionChannelVShift_type > r ( + ionChannelVShift_traits::create (i, f, this)); + + this->ionChannelVShift_.push_back (::std::move (r)); + continue; + } + // ionChannelKS // if (n.name () == "ionChannelKS" && n.namespace_ () == "http://www.neuroml.org/schema/neuroml2") @@ -19085,6 +20484,17 @@ namespace neuroml2 continue; } + // doubleSynapse + // + if (n.name () == "doubleSynapse" && n.namespace_ () == "http://www.neuroml.org/schema/neuroml2") + { + ::std::unique_ptr< doubleSynapse_type > r ( + doubleSynapse_traits::create (i, f, this)); + + this->doubleSynapse_.push_back (::std::move (r)); + continue; + } + // gapJunction // if (n.name () == "gapJunction" && n.namespace_ () == "http://www.neuroml.org/schema/neuroml2") @@ -19382,6 +20792,17 @@ namespace neuroml2 continue; } + // voltageClampTriple + // + if (n.name () == "voltageClampTriple" && n.namespace_ () == "http://www.neuroml.org/schema/neuroml2") + { + ::std::unique_ptr< voltageClampTriple_type > r ( + voltageClampTriple_traits::create (i, f, this)); + + this->voltageClampTriple_.push_back (::std::move (r)); + continue; + } + // spikeArray // if (n.name () == "spikeArray" && n.namespace_ () == "http://www.neuroml.org/schema/neuroml2") @@ -19437,6 +20858,17 @@ namespace neuroml2 continue; } + // spikeGeneratorRefPoisson + // + if (n.name () == "spikeGeneratorRefPoisson" && n.namespace_ () == "http://www.neuroml.org/schema/neuroml2") + { + ::std::unique_ptr< spikeGeneratorRefPoisson_type > r ( + spikeGeneratorRefPoisson_traits::create (i, f, this)); + + this->spikeGeneratorRefPoisson_.push_back (::std::move (r)); + continue; + } + // poissonFiringSynapse // if (n.name () == "poissonFiringSynapse" && n.namespace_ () == "http://www.neuroml.org/schema/neuroml2") @@ -19636,6 +21068,7 @@ namespace neuroml2 this->morphology_ = x.morphology_; this->ionChannel_ = x.ionChannel_; this->ionChannelHH_ = x.ionChannelHH_; + this->ionChannelVShift_ = x.ionChannelVShift_; this->ionChannelKS_ = x.ionChannelKS_; this->decayingPoolConcentrationModel_ = x.decayingPoolConcentrationModel_; this->fixedFactorConcentrationModel_ = x.fixedFactorConcentrationModel_; @@ -19645,6 +21078,7 @@ namespace neuroml2 this->expTwoSynapse_ = x.expTwoSynapse_; this->expThreeSynapse_ = x.expThreeSynapse_; this->blockingPlasticSynapse_ = x.blockingPlasticSynapse_; + this->doubleSynapse_ = x.doubleSynapse_; this->gapJunction_ = x.gapJunction_; this->silentSynapse_ = x.silentSynapse_; this->linearGradedSynapse_ = x.linearGradedSynapse_; @@ -19672,11 +21106,13 @@ namespace neuroml2 this->compoundInput_ = x.compoundInput_; this->compoundInputDL_ = x.compoundInputDL_; this->voltageClamp_ = x.voltageClamp_; + this->voltageClampTriple_ = x.voltageClampTriple_; this->spikeArray_ = x.spikeArray_; this->timedSynapticInput_ = x.timedSynapticInput_; this->spikeGenerator_ = x.spikeGenerator_; this->spikeGeneratorRandom_ = x.spikeGeneratorRandom_; this->spikeGeneratorPoisson_ = x.spikeGeneratorPoisson_; + this->spikeGeneratorRefPoisson_ = x.spikeGeneratorRefPoisson_; this->poissonFiringSynapse_ = x.poissonFiringSynapse_; this->transientPoissonFiringSynapse_ = x.transientPoissonFiringSynapse_; this->IF_curr_alpha_ = x.IF_curr_alpha_; @@ -19728,6 +21164,9 @@ namespace neuroml2 if (!(x.ionChannelHH () == y.ionChannelHH ())) return false; + if (!(x.ionChannelVShift () == y.ionChannelVShift ())) + return false; + if (!(x.ionChannelKS () == y.ionChannelKS ())) return false; @@ -19755,6 +21194,9 @@ namespace neuroml2 if (!(x.blockingPlasticSynapse () == y.blockingPlasticSynapse ())) return false; + if (!(x.doubleSynapse () == y.doubleSynapse ())) + return false; + if (!(x.gapJunction () == y.gapJunction ())) return false; @@ -19836,6 +21278,9 @@ namespace neuroml2 if (!(x.voltageClamp () == y.voltageClamp ())) return false; + if (!(x.voltageClampTriple () == y.voltageClampTriple ())) + return false; + if (!(x.spikeArray () == y.spikeArray ())) return false; @@ -19851,6 +21296,9 @@ namespace neuroml2 if (!(x.spikeGeneratorPoisson () == y.spikeGeneratorPoisson ())) return false; + if (!(x.spikeGeneratorRefPoisson () == y.spikeGeneratorRefPoisson ())) + return false; + if (!(x.poissonFiringSynapse () == y.poissonFiringSynapse ())) return false; @@ -19912,9 +21360,9 @@ namespace neuroml2 // IncludeType:: - IncludeType () + IncludeType (const href_type& href) : ::xml_schema::type (), - href_ (this) + href_ (href, this) { } @@ -19957,6 +21405,13 @@ namespace neuroml2 continue; } } + + if (!href_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "href", + ""); + } } IncludeType* IncludeType:: @@ -20553,6 +22008,112 @@ namespace neuroml2 { } + // IonChannelVShift + // + + IonChannelVShift:: + IonChannelVShift (const id_type& id, + const vShift_type& vShift) + : ::neuroml2::IonChannel (id), + vShift_ (vShift, this) + { + } + + IonChannelVShift:: + IonChannelVShift (const IonChannelVShift& x, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::IonChannel (x, f, c), + vShift_ (x.vShift_, f, this) + { + } + + IonChannelVShift:: + IonChannelVShift (const ::xercesc::DOMElement& e, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::IonChannel (e, f | ::xml_schema::flags::base, c), + vShift_ (this) + { + if ((f & ::xml_schema::flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); + this->parse (p, f); + } + } + + void IonChannelVShift:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::flags f) + { + this->::neuroml2::IonChannel::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 () == "vShift" && n.namespace_ ().empty ()) + { + this->vShift_.set (vShift_traits::create (i, f, this)); + continue; + } + } + + if (!vShift_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "vShift", + ""); + } + } + + IonChannelVShift* IonChannelVShift:: + _clone (::xml_schema::flags f, + ::xml_schema::container* c) const + { + return new class IonChannelVShift (*this, f, c); + } + + IonChannelVShift& IonChannelVShift:: + operator= (const IonChannelVShift& x) + { + if (this != &x) + { + static_cast< ::neuroml2::IonChannel& > (*this) = x; + this->vShift_ = x.vShift_; + } + + return *this; + } + + IonChannelVShift:: + ~IonChannelVShift () + { + } + + bool + operator== (const IonChannelVShift& x, const IonChannelVShift& y) + { + if (!(static_cast< const ::neuroml2::IonChannel& > (x) == + static_cast< const ::neuroml2::IonChannel& > (y))) + return false; + + if (!(x.vShift () == y.vShift ())) + return false; + + return true; + } + + bool + operator!= (const IonChannelVShift& x, const IonChannelVShift& y) + { + return !(x == y); + } + // channelTypes // @@ -26105,6 +27666,175 @@ namespace neuroml2 return !(x == y); } + // DoubleSynapse + // + + DoubleSynapse:: + DoubleSynapse (const id_type& id, + const synapse1_type& synapse1, + const synapse2_type& synapse2, + const synapse1Path_type& synapse1Path, + const synapse2Path_type& synapse2Path) + : ::neuroml2::BaseVoltageDepSynapse (id), + synapse1_ (synapse1, this), + synapse2_ (synapse2, this), + synapse1Path_ (synapse1Path, this), + synapse2Path_ (synapse2Path, this) + { + } + + DoubleSynapse:: + DoubleSynapse (const DoubleSynapse& x, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::BaseVoltageDepSynapse (x, f, c), + synapse1_ (x.synapse1_, f, this), + synapse2_ (x.synapse2_, f, this), + synapse1Path_ (x.synapse1Path_, f, this), + synapse2Path_ (x.synapse2Path_, f, this) + { + } + + DoubleSynapse:: + DoubleSynapse (const ::xercesc::DOMElement& e, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::BaseVoltageDepSynapse (e, f | ::xml_schema::flags::base, c), + synapse1_ (this), + synapse2_ (this), + synapse1Path_ (this), + synapse2Path_ (this) + { + if ((f & ::xml_schema::flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); + this->parse (p, f); + } + } + + void DoubleSynapse:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::flags f) + { + this->::neuroml2::BaseVoltageDepSynapse::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 () == "synapse1" && n.namespace_ ().empty ()) + { + this->synapse1_.set (synapse1_traits::create (i, f, this)); + continue; + } + + if (n.name () == "synapse2" && n.namespace_ ().empty ()) + { + this->synapse2_.set (synapse2_traits::create (i, f, this)); + continue; + } + + if (n.name () == "synapse1Path" && n.namespace_ ().empty ()) + { + this->synapse1Path_.set (synapse1Path_traits::create (i, f, this)); + continue; + } + + if (n.name () == "synapse2Path" && n.namespace_ ().empty ()) + { + this->synapse2Path_.set (synapse2Path_traits::create (i, f, this)); + continue; + } + } + + if (!synapse1_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "synapse1", + ""); + } + + if (!synapse2_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "synapse2", + ""); + } + + if (!synapse1Path_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "synapse1Path", + ""); + } + + if (!synapse2Path_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "synapse2Path", + ""); + } + } + + DoubleSynapse* DoubleSynapse:: + _clone (::xml_schema::flags f, + ::xml_schema::container* c) const + { + return new class DoubleSynapse (*this, f, c); + } + + DoubleSynapse& DoubleSynapse:: + operator= (const DoubleSynapse& x) + { + if (this != &x) + { + static_cast< ::neuroml2::BaseVoltageDepSynapse& > (*this) = x; + this->synapse1_ = x.synapse1_; + this->synapse2_ = x.synapse2_; + this->synapse1Path_ = x.synapse1Path_; + this->synapse2Path_ = x.synapse2Path_; + } + + return *this; + } + + DoubleSynapse:: + ~DoubleSynapse () + { + } + + bool + operator== (const DoubleSynapse& x, const DoubleSynapse& y) + { + if (!(static_cast< const ::neuroml2::BaseVoltageDepSynapse& > (x) == + static_cast< const ::neuroml2::BaseVoltageDepSynapse& > (y))) + return false; + + if (!(x.synapse1 () == y.synapse1 ())) + return false; + + if (!(x.synapse2 () == y.synapse2 ())) + return false; + + if (!(x.synapse1Path () == y.synapse1Path ())) + return false; + + if (!(x.synapse2Path () == y.synapse2Path ())) + return false; + + return true; + } + + bool + operator!= (const DoubleSynapse& x, const DoubleSynapse& y) + { + return !(x == y); + } + // BlockingPlasticSynapse // @@ -31576,6 +33306,7 @@ namespace neuroml2 : ::xml_schema::type (), channelPopulation_ (this), channelDensity_ (this), + channelDensityVShift_ (this), channelDensityNernst_ (this), channelDensityGHK_ (this), channelDensityGHK2_ (this), @@ -31595,6 +33326,7 @@ namespace neuroml2 : ::xml_schema::type (x, f, c), channelPopulation_ (x.channelPopulation_, f, this), channelDensity_ (x.channelDensity_, f, this), + channelDensityVShift_ (x.channelDensityVShift_, f, this), channelDensityNernst_ (x.channelDensityNernst_, f, this), channelDensityGHK_ (x.channelDensityGHK_, f, this), channelDensityGHK2_ (x.channelDensityGHK2_, f, this), @@ -31614,6 +33346,7 @@ namespace neuroml2 : ::xml_schema::type (e, f | ::xml_schema::flags::base, c), channelPopulation_ (this), channelDensity_ (this), + channelDensityVShift_ (this), channelDensityNernst_ (this), channelDensityGHK_ (this), channelDensityGHK2_ (this), @@ -31663,6 +33396,17 @@ namespace neuroml2 continue; } + // channelDensityVShift + // + if (n.name () == "channelDensityVShift" && n.namespace_ () == "http://www.neuroml.org/schema/neuroml2") + { + ::std::unique_ptr< channelDensityVShift_type > r ( + channelDensityVShift_traits::create (i, f, this)); + + this->channelDensityVShift_.push_back (::std::move (r)); + continue; + } + // channelDensityNernst // if (n.name () == "channelDensityNernst" && n.namespace_ () == "http://www.neuroml.org/schema/neuroml2") @@ -31781,6 +33525,7 @@ namespace neuroml2 static_cast< ::xml_schema::type& > (*this) = x; this->channelPopulation_ = x.channelPopulation_; this->channelDensity_ = x.channelDensity_; + this->channelDensityVShift_ = x.channelDensityVShift_; this->channelDensityNernst_ = x.channelDensityNernst_; this->channelDensityGHK_ = x.channelDensityGHK_; this->channelDensityGHK2_ = x.channelDensityGHK2_; @@ -31809,6 +33554,9 @@ namespace neuroml2 if (!(x.channelDensity () == y.channelDensity ())) return false; + if (!(x.channelDensityVShift () == y.channelDensityVShift ())) + return false; + if (!(x.channelDensityNernst () == y.channelDensityNernst ())) return false; @@ -33155,6 +34903,118 @@ namespace neuroml2 return !(x == y); } + // ChannelDensityVShift + // + + ChannelDensityVShift:: + ChannelDensityVShift (const id_type& id, + const ionChannel_type& ionChannel, + const erev_type& erev, + const ion_type& ion, + const vShift_type& vShift) + : ::neuroml2::ChannelDensity (id, + ionChannel, + erev, + ion), + vShift_ (vShift, this) + { + } + + ChannelDensityVShift:: + ChannelDensityVShift (const ChannelDensityVShift& x, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::ChannelDensity (x, f, c), + vShift_ (x.vShift_, f, this) + { + } + + ChannelDensityVShift:: + ChannelDensityVShift (const ::xercesc::DOMElement& e, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::ChannelDensity (e, f | ::xml_schema::flags::base, c), + vShift_ (this) + { + if ((f & ::xml_schema::flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); + this->parse (p, f); + } + } + + void ChannelDensityVShift:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::flags f) + { + this->::neuroml2::ChannelDensity::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 () == "vShift" && n.namespace_ ().empty ()) + { + this->vShift_.set (vShift_traits::create (i, f, this)); + continue; + } + } + + if (!vShift_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "vShift", + ""); + } + } + + ChannelDensityVShift* ChannelDensityVShift:: + _clone (::xml_schema::flags f, + ::xml_schema::container* c) const + { + return new class ChannelDensityVShift (*this, f, c); + } + + ChannelDensityVShift& ChannelDensityVShift:: + operator= (const ChannelDensityVShift& x) + { + if (this != &x) + { + static_cast< ::neuroml2::ChannelDensity& > (*this) = x; + this->vShift_ = x.vShift_; + } + + return *this; + } + + ChannelDensityVShift:: + ~ChannelDensityVShift () + { + } + + bool + operator== (const ChannelDensityVShift& x, const ChannelDensityVShift& y) + { + if (!(static_cast< const ::neuroml2::ChannelDensity& > (x) == + static_cast< const ::neuroml2::ChannelDensity& > (y))) + return false; + + if (!(x.vShift () == y.vShift ())) + return false; + + return true; + } + + bool + operator!= (const ChannelDensityVShift& x, const ChannelDensityVShift& y) + { + return !(x == y); + } + // ChannelDensityNernst // @@ -34204,7 +36064,7 @@ namespace neuroml2 // const ConcentrationModel_D::type_type ConcentrationModel_D::type_default_value_ ( - "decayingPoolConcentrationModel"); + ::xml_schema::simple_type ("decayingPoolConcentrationModel")); ConcentrationModel_D:: ConcentrationModel_D (const id_type& id, @@ -36305,6 +38165,238 @@ namespace neuroml2 return !(x == y); } + // VoltageClampTriple + // + + VoltageClampTriple:: + VoltageClampTriple (const id_type& id, + const active_type& active, + const delay_type& delay, + const duration_type& duration, + const conditioningVoltage_type& conditioningVoltage, + const testingVoltage_type& testingVoltage, + const returnVoltage_type& returnVoltage, + const simpleSeriesResistance_type& simpleSeriesResistance) + : ::neuroml2::Standalone (id), + active_ (active, this), + delay_ (delay, this), + duration_ (duration, this), + conditioningVoltage_ (conditioningVoltage, this), + testingVoltage_ (testingVoltage, this), + returnVoltage_ (returnVoltage, this), + simpleSeriesResistance_ (simpleSeriesResistance, this) + { + } + + VoltageClampTriple:: + VoltageClampTriple (const VoltageClampTriple& x, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::Standalone (x, f, c), + active_ (x.active_, f, this), + delay_ (x.delay_, f, this), + duration_ (x.duration_, f, this), + conditioningVoltage_ (x.conditioningVoltage_, f, this), + testingVoltage_ (x.testingVoltage_, f, this), + returnVoltage_ (x.returnVoltage_, f, this), + simpleSeriesResistance_ (x.simpleSeriesResistance_, f, this) + { + } + + VoltageClampTriple:: + VoltageClampTriple (const ::xercesc::DOMElement& e, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::Standalone (e, f | ::xml_schema::flags::base, c), + active_ (this), + delay_ (this), + duration_ (this), + conditioningVoltage_ (this), + testingVoltage_ (this), + returnVoltage_ (this), + simpleSeriesResistance_ (this) + { + if ((f & ::xml_schema::flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); + this->parse (p, f); + } + } + + void VoltageClampTriple:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::flags f) + { + this->::neuroml2::Standalone::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 () == "active" && n.namespace_ ().empty ()) + { + this->active_.set (active_traits::create (i, f, this)); + continue; + } + + if (n.name () == "delay" && n.namespace_ ().empty ()) + { + this->delay_.set (delay_traits::create (i, f, this)); + continue; + } + + if (n.name () == "duration" && n.namespace_ ().empty ()) + { + this->duration_.set (duration_traits::create (i, f, this)); + continue; + } + + if (n.name () == "conditioningVoltage" && n.namespace_ ().empty ()) + { + this->conditioningVoltage_.set (conditioningVoltage_traits::create (i, f, this)); + continue; + } + + if (n.name () == "testingVoltage" && n.namespace_ ().empty ()) + { + this->testingVoltage_.set (testingVoltage_traits::create (i, f, this)); + continue; + } + + if (n.name () == "returnVoltage" && n.namespace_ ().empty ()) + { + this->returnVoltage_.set (returnVoltage_traits::create (i, f, this)); + continue; + } + + if (n.name () == "simpleSeriesResistance" && n.namespace_ ().empty ()) + { + this->simpleSeriesResistance_.set (simpleSeriesResistance_traits::create (i, f, this)); + continue; + } + } + + if (!active_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "active", + ""); + } + + if (!delay_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "delay", + ""); + } + + if (!duration_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "duration", + ""); + } + + if (!conditioningVoltage_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "conditioningVoltage", + ""); + } + + if (!testingVoltage_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "testingVoltage", + ""); + } + + if (!returnVoltage_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "returnVoltage", + ""); + } + + if (!simpleSeriesResistance_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "simpleSeriesResistance", + ""); + } + } + + VoltageClampTriple* VoltageClampTriple:: + _clone (::xml_schema::flags f, + ::xml_schema::container* c) const + { + return new class VoltageClampTriple (*this, f, c); + } + + VoltageClampTriple& VoltageClampTriple:: + operator= (const VoltageClampTriple& x) + { + if (this != &x) + { + static_cast< ::neuroml2::Standalone& > (*this) = x; + this->active_ = x.active_; + this->delay_ = x.delay_; + this->duration_ = x.duration_; + this->conditioningVoltage_ = x.conditioningVoltage_; + this->testingVoltage_ = x.testingVoltage_; + this->returnVoltage_ = x.returnVoltage_; + this->simpleSeriesResistance_ = x.simpleSeriesResistance_; + } + + return *this; + } + + VoltageClampTriple:: + ~VoltageClampTriple () + { + } + + bool + operator== (const VoltageClampTriple& x, const VoltageClampTriple& y) + { + if (!(static_cast< const ::neuroml2::Standalone& > (x) == + static_cast< const ::neuroml2::Standalone& > (y))) + return false; + + if (!(x.active () == y.active ())) + return false; + + if (!(x.delay () == y.delay ())) + return false; + + if (!(x.duration () == y.duration ())) + return false; + + if (!(x.conditioningVoltage () == y.conditioningVoltage ())) + return false; + + if (!(x.testingVoltage () == y.testingVoltage ())) + return false; + + if (!(x.returnVoltage () == y.returnVoltage ())) + return false; + + if (!(x.simpleSeriesResistance () == y.simpleSeriesResistance ())) + return false; + + return true; + } + + bool + operator!= (const VoltageClampTriple& x, const VoltageClampTriple& y) + { + return !(x == y); + } + // Spike // @@ -37007,6 +39099,114 @@ namespace neuroml2 return !(x == y); } + // SpikeGeneratorRefPoisson + // + + SpikeGeneratorRefPoisson:: + SpikeGeneratorRefPoisson (const id_type& id, + const averageRate_type& averageRate, + const minimumISI_type& minimumISI) + : ::neuroml2::SpikeGeneratorPoisson (id, + averageRate), + minimumISI_ (minimumISI, this) + { + } + + SpikeGeneratorRefPoisson:: + SpikeGeneratorRefPoisson (const SpikeGeneratorRefPoisson& x, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::SpikeGeneratorPoisson (x, f, c), + minimumISI_ (x.minimumISI_, f, this) + { + } + + SpikeGeneratorRefPoisson:: + SpikeGeneratorRefPoisson (const ::xercesc::DOMElement& e, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::SpikeGeneratorPoisson (e, f | ::xml_schema::flags::base, c), + minimumISI_ (this) + { + if ((f & ::xml_schema::flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); + this->parse (p, f); + } + } + + void SpikeGeneratorRefPoisson:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::flags f) + { + this->::neuroml2::SpikeGeneratorPoisson::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 () == "minimumISI" && n.namespace_ ().empty ()) + { + this->minimumISI_.set (minimumISI_traits::create (i, f, this)); + continue; + } + } + + if (!minimumISI_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "minimumISI", + ""); + } + } + + SpikeGeneratorRefPoisson* SpikeGeneratorRefPoisson:: + _clone (::xml_schema::flags f, + ::xml_schema::container* c) const + { + return new class SpikeGeneratorRefPoisson (*this, f, c); + } + + SpikeGeneratorRefPoisson& SpikeGeneratorRefPoisson:: + operator= (const SpikeGeneratorRefPoisson& x) + { + if (this != &x) + { + static_cast< ::neuroml2::SpikeGeneratorPoisson& > (*this) = x; + this->minimumISI_ = x.minimumISI_; + } + + return *this; + } + + SpikeGeneratorRefPoisson:: + ~SpikeGeneratorRefPoisson () + { + } + + bool + operator== (const SpikeGeneratorRefPoisson& x, const SpikeGeneratorRefPoisson& y) + { + if (!(static_cast< const ::neuroml2::SpikeGeneratorPoisson& > (x) == + static_cast< const ::neuroml2::SpikeGeneratorPoisson& > (y))) + return false; + + if (!(x.minimumISI () == y.minimumISI ())) + return false; + + return true; + } + + bool + operator!= (const SpikeGeneratorRefPoisson& x, const SpikeGeneratorRefPoisson& y) + { + return !(x == y); + } + // PoissonFiringSynapse // @@ -39533,6 +41733,133 @@ namespace neuroml2 return !(x == y); } + // BaseProjection + // + + BaseProjection:: + BaseProjection (const id_type& id, + const presynapticPopulation_type& presynapticPopulation, + const postsynapticPopulation_type& postsynapticPopulation) + : ::neuroml2::Base (id), + presynapticPopulation_ (presynapticPopulation, this), + postsynapticPopulation_ (postsynapticPopulation, this) + { + } + + BaseProjection:: + BaseProjection (const BaseProjection& x, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::Base (x, f, c), + presynapticPopulation_ (x.presynapticPopulation_, f, this), + postsynapticPopulation_ (x.postsynapticPopulation_, f, this) + { + } + + BaseProjection:: + BaseProjection (const ::xercesc::DOMElement& e, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::Base (e, f | ::xml_schema::flags::base, c), + presynapticPopulation_ (this), + postsynapticPopulation_ (this) + { + if ((f & ::xml_schema::flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, false, false, true); + this->parse (p, f); + } + } + + void BaseProjection:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::flags f) + { + this->::neuroml2::Base::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 () == "presynapticPopulation" && n.namespace_ ().empty ()) + { + this->presynapticPopulation_.set (presynapticPopulation_traits::create (i, f, this)); + continue; + } + + if (n.name () == "postsynapticPopulation" && n.namespace_ ().empty ()) + { + this->postsynapticPopulation_.set (postsynapticPopulation_traits::create (i, f, this)); + continue; + } + } + + if (!presynapticPopulation_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "presynapticPopulation", + ""); + } + + if (!postsynapticPopulation_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "postsynapticPopulation", + ""); + } + } + + BaseProjection* BaseProjection:: + _clone (::xml_schema::flags f, + ::xml_schema::container* c) const + { + return new class BaseProjection (*this, f, c); + } + + BaseProjection& BaseProjection:: + operator= (const BaseProjection& x) + { + if (this != &x) + { + static_cast< ::neuroml2::Base& > (*this) = x; + this->presynapticPopulation_ = x.presynapticPopulation_; + this->postsynapticPopulation_ = x.postsynapticPopulation_; + } + + return *this; + } + + BaseProjection:: + ~BaseProjection () + { + } + + bool + operator== (const BaseProjection& x, const BaseProjection& y) + { + if (!(static_cast< const ::neuroml2::Base& > (x) == + static_cast< const ::neuroml2::Base& > (y))) + return false; + + if (!(x.presynapticPopulation () == y.presynapticPopulation ())) + return false; + + if (!(x.postsynapticPopulation () == y.postsynapticPopulation ())) + return false; + + return true; + } + + bool + operator!= (const BaseProjection& x, const BaseProjection& y) + { + return !(x == y); + } + // Projection // @@ -39541,11 +41868,11 @@ namespace neuroml2 const presynapticPopulation_type& presynapticPopulation, const postsynapticPopulation_type& postsynapticPopulation, const synapse_type& synapse) - : ::neuroml2::Base (id), + : ::neuroml2::BaseProjection (id, + presynapticPopulation, + postsynapticPopulation), connection_ (this), connectionWD_ (this), - presynapticPopulation_ (presynapticPopulation, this), - postsynapticPopulation_ (postsynapticPopulation, this), synapse_ (synapse, this) { } @@ -39554,11 +41881,9 @@ namespace neuroml2 Projection (const Projection& x, ::xml_schema::flags f, ::xml_schema::container* c) - : ::neuroml2::Base (x, f, c), + : ::neuroml2::BaseProjection (x, f, c), connection_ (x.connection_, f, this), connectionWD_ (x.connectionWD_, f, this), - presynapticPopulation_ (x.presynapticPopulation_, f, this), - postsynapticPopulation_ (x.postsynapticPopulation_, f, this), synapse_ (x.synapse_, f, this) { } @@ -39567,11 +41892,9 @@ namespace neuroml2 Projection (const ::xercesc::DOMElement& e, ::xml_schema::flags f, ::xml_schema::container* c) - : ::neuroml2::Base (e, f | ::xml_schema::flags::base, c), + : ::neuroml2::BaseProjection (e, f | ::xml_schema::flags::base, c), connection_ (this), connectionWD_ (this), - presynapticPopulation_ (this), - postsynapticPopulation_ (this), synapse_ (this) { if ((f & ::xml_schema::flags::base) == 0) @@ -39585,7 +41908,7 @@ namespace neuroml2 parse (::xsd::cxx::xml::dom::parser< char >& p, ::xml_schema::flags f) { - this->::neuroml2::Base::parse (p, f); + this->::neuroml2::BaseProjection::parse (p, f); for (; p.more_content (); p.next_content (false)) { @@ -39626,18 +41949,6 @@ namespace neuroml2 const ::xsd::cxx::xml::qualified_name< char > n ( ::xsd::cxx::xml::dom::name< char > (i)); - if (n.name () == "presynapticPopulation" && n.namespace_ ().empty ()) - { - this->presynapticPopulation_.set (presynapticPopulation_traits::create (i, f, this)); - continue; - } - - if (n.name () == "postsynapticPopulation" && n.namespace_ ().empty ()) - { - this->postsynapticPopulation_.set (postsynapticPopulation_traits::create (i, f, this)); - continue; - } - if (n.name () == "synapse" && n.namespace_ ().empty ()) { this->synapse_.set (synapse_traits::create (i, f, this)); @@ -39645,20 +41956,6 @@ namespace neuroml2 } } - if (!presynapticPopulation_.present ()) - { - throw ::xsd::cxx::tree::expected_attribute< char > ( - "presynapticPopulation", - ""); - } - - if (!postsynapticPopulation_.present ()) - { - throw ::xsd::cxx::tree::expected_attribute< char > ( - "postsynapticPopulation", - ""); - } - if (!synapse_.present ()) { throw ::xsd::cxx::tree::expected_attribute< char > ( @@ -39679,11 +41976,9 @@ namespace neuroml2 { if (this != &x) { - static_cast< ::neuroml2::Base& > (*this) = x; + static_cast< ::neuroml2::BaseProjection& > (*this) = x; this->connection_ = x.connection_; this->connectionWD_ = x.connectionWD_; - this->presynapticPopulation_ = x.presynapticPopulation_; - this->postsynapticPopulation_ = x.postsynapticPopulation_; this->synapse_ = x.synapse_; } @@ -39698,8 +41993,8 @@ namespace neuroml2 bool operator== (const Projection& x, const Projection& y) { - if (!(static_cast< const ::neuroml2::Base& > (x) == - static_cast< const ::neuroml2::Base& > (y))) + if (!(static_cast< const ::neuroml2::BaseProjection& > (x) == + static_cast< const ::neuroml2::BaseProjection& > (y))) return false; if (!(x.connection () == y.connection ())) @@ -39708,12 +42003,6 @@ namespace neuroml2 if (!(x.connectionWD () == y.connectionWD ())) return false; - if (!(x.presynapticPopulation () == y.presynapticPopulation ())) - return false; - - if (!(x.postsynapticPopulation () == y.postsynapticPopulation ())) - return false; - if (!(x.synapse () == y.synapse ())) return false; @@ -40340,11 +42629,12 @@ namespace neuroml2 ElectricalProjection (const id_type& id, const presynapticPopulation_type& presynapticPopulation, const postsynapticPopulation_type& postsynapticPopulation) - : ::neuroml2::Base (id), + : ::neuroml2::BaseProjection (id, + presynapticPopulation, + postsynapticPopulation), electricalConnection_ (this), electricalConnectionInstance_ (this), - presynapticPopulation_ (presynapticPopulation, this), - postsynapticPopulation_ (postsynapticPopulation, this) + electricalConnectionInstanceW_ (this) { } @@ -40352,11 +42642,10 @@ namespace neuroml2 ElectricalProjection (const ElectricalProjection& x, ::xml_schema::flags f, ::xml_schema::container* c) - : ::neuroml2::Base (x, f, c), + : ::neuroml2::BaseProjection (x, f, c), electricalConnection_ (x.electricalConnection_, f, this), electricalConnectionInstance_ (x.electricalConnectionInstance_, f, this), - presynapticPopulation_ (x.presynapticPopulation_, f, this), - postsynapticPopulation_ (x.postsynapticPopulation_, f, this) + electricalConnectionInstanceW_ (x.electricalConnectionInstanceW_, f, this) { } @@ -40364,11 +42653,10 @@ namespace neuroml2 ElectricalProjection (const ::xercesc::DOMElement& e, ::xml_schema::flags f, ::xml_schema::container* c) - : ::neuroml2::Base (e, f | ::xml_schema::flags::base, c), + : ::neuroml2::BaseProjection (e, f | ::xml_schema::flags::base, c), electricalConnection_ (this), electricalConnectionInstance_ (this), - presynapticPopulation_ (this), - postsynapticPopulation_ (this) + electricalConnectionInstanceW_ (this) { if ((f & ::xml_schema::flags::base) == 0) { @@ -40381,7 +42669,7 @@ namespace neuroml2 parse (::xsd::cxx::xml::dom::parser< char >& p, ::xml_schema::flags f) { - this->::neuroml2::Base::parse (p, f); + this->::neuroml2::BaseProjection::parse (p, f); for (; p.more_content (); p.next_content (false)) { @@ -40411,42 +42699,18 @@ namespace neuroml2 continue; } - break; - } - - 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 () == "presynapticPopulation" && n.namespace_ ().empty ()) + // electricalConnectionInstanceW + // + if (n.name () == "electricalConnectionInstanceW" && n.namespace_ () == "http://www.neuroml.org/schema/neuroml2") { - this->presynapticPopulation_.set (presynapticPopulation_traits::create (i, f, this)); - continue; - } + ::std::unique_ptr< electricalConnectionInstanceW_type > r ( + electricalConnectionInstanceW_traits::create (i, f, this)); - if (n.name () == "postsynapticPopulation" && n.namespace_ ().empty ()) - { - this->postsynapticPopulation_.set (postsynapticPopulation_traits::create (i, f, this)); + this->electricalConnectionInstanceW_.push_back (::std::move (r)); continue; } - } - - if (!presynapticPopulation_.present ()) - { - throw ::xsd::cxx::tree::expected_attribute< char > ( - "presynapticPopulation", - ""); - } - if (!postsynapticPopulation_.present ()) - { - throw ::xsd::cxx::tree::expected_attribute< char > ( - "postsynapticPopulation", - ""); + break; } } @@ -40462,11 +42726,10 @@ namespace neuroml2 { if (this != &x) { - static_cast< ::neuroml2::Base& > (*this) = x; + static_cast< ::neuroml2::BaseProjection& > (*this) = x; this->electricalConnection_ = x.electricalConnection_; this->electricalConnectionInstance_ = x.electricalConnectionInstance_; - this->presynapticPopulation_ = x.presynapticPopulation_; - this->postsynapticPopulation_ = x.postsynapticPopulation_; + this->electricalConnectionInstanceW_ = x.electricalConnectionInstanceW_; } return *this; @@ -40480,8 +42743,8 @@ namespace neuroml2 bool operator== (const ElectricalProjection& x, const ElectricalProjection& y) { - if (!(static_cast< const ::neuroml2::Base& > (x) == - static_cast< const ::neuroml2::Base& > (y))) + if (!(static_cast< const ::neuroml2::BaseProjection& > (x) == + static_cast< const ::neuroml2::BaseProjection& > (y))) return false; if (!(x.electricalConnection () == y.electricalConnection ())) @@ -40490,10 +42753,7 @@ namespace neuroml2 if (!(x.electricalConnectionInstance () == y.electricalConnectionInstance ())) return false; - if (!(x.presynapticPopulation () == y.presynapticPopulation ())) - return false; - - if (!(x.postsynapticPopulation () == y.postsynapticPopulation ())) + if (!(x.electricalConnectionInstanceW () == y.electricalConnectionInstanceW ())) return false; return true; @@ -40658,6 +42918,118 @@ namespace neuroml2 { } + // ElectricalConnectionInstanceW + // + + ElectricalConnectionInstanceW:: + ElectricalConnectionInstanceW (const id_type& id, + const preCell_type& preCell, + const postCell_type& postCell, + const synapse_type& synapse, + const weight_type& weight) + : ::neuroml2::ElectricalConnectionInstance (id, + preCell, + postCell, + synapse), + weight_ (weight, this) + { + } + + ElectricalConnectionInstanceW:: + ElectricalConnectionInstanceW (const ElectricalConnectionInstanceW& x, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::ElectricalConnectionInstance (x, f, c), + weight_ (x.weight_, f, this) + { + } + + ElectricalConnectionInstanceW:: + ElectricalConnectionInstanceW (const ::xercesc::DOMElement& e, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::ElectricalConnectionInstance (e, f | ::xml_schema::flags::base, c), + weight_ (this) + { + if ((f & ::xml_schema::flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, false, false, true); + this->parse (p, f); + } + } + + void ElectricalConnectionInstanceW:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::flags f) + { + this->::neuroml2::ElectricalConnectionInstance::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 () == "weight" && n.namespace_ ().empty ()) + { + this->weight_.set (weight_traits::create (i, f, this)); + continue; + } + } + + if (!weight_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "weight", + ""); + } + } + + ElectricalConnectionInstanceW* ElectricalConnectionInstanceW:: + _clone (::xml_schema::flags f, + ::xml_schema::container* c) const + { + return new class ElectricalConnectionInstanceW (*this, f, c); + } + + ElectricalConnectionInstanceW& ElectricalConnectionInstanceW:: + operator= (const ElectricalConnectionInstanceW& x) + { + if (this != &x) + { + static_cast< ::neuroml2::ElectricalConnectionInstance& > (*this) = x; + this->weight_ = x.weight_; + } + + return *this; + } + + ElectricalConnectionInstanceW:: + ~ElectricalConnectionInstanceW () + { + } + + bool + operator== (const ElectricalConnectionInstanceW& x, const ElectricalConnectionInstanceW& y) + { + if (!(static_cast< const ::neuroml2::ElectricalConnectionInstance& > (x) == + static_cast< const ::neuroml2::ElectricalConnectionInstance& > (y))) + return false; + + if (!(x.weight () == y.weight ())) + return false; + + return true; + } + + bool + operator!= (const ElectricalConnectionInstanceW& x, const ElectricalConnectionInstanceW& y) + { + return !(x == y); + } + // ContinuousProjection // @@ -40665,11 +43037,12 @@ namespace neuroml2 ContinuousProjection (const id_type& id, const presynapticPopulation_type& presynapticPopulation, const postsynapticPopulation_type& postsynapticPopulation) - : ::neuroml2::Base (id), + : ::neuroml2::BaseProjection (id, + presynapticPopulation, + postsynapticPopulation), continuousConnection_ (this), continuousConnectionInstance_ (this), - presynapticPopulation_ (presynapticPopulation, this), - postsynapticPopulation_ (postsynapticPopulation, this) + continuousConnectionInstanceW_ (this) { } @@ -40677,11 +43050,10 @@ namespace neuroml2 ContinuousProjection (const ContinuousProjection& x, ::xml_schema::flags f, ::xml_schema::container* c) - : ::neuroml2::Base (x, f, c), + : ::neuroml2::BaseProjection (x, f, c), continuousConnection_ (x.continuousConnection_, f, this), continuousConnectionInstance_ (x.continuousConnectionInstance_, f, this), - presynapticPopulation_ (x.presynapticPopulation_, f, this), - postsynapticPopulation_ (x.postsynapticPopulation_, f, this) + continuousConnectionInstanceW_ (x.continuousConnectionInstanceW_, f, this) { } @@ -40689,11 +43061,10 @@ namespace neuroml2 ContinuousProjection (const ::xercesc::DOMElement& e, ::xml_schema::flags f, ::xml_schema::container* c) - : ::neuroml2::Base (e, f | ::xml_schema::flags::base, c), + : ::neuroml2::BaseProjection (e, f | ::xml_schema::flags::base, c), continuousConnection_ (this), continuousConnectionInstance_ (this), - presynapticPopulation_ (this), - postsynapticPopulation_ (this) + continuousConnectionInstanceW_ (this) { if ((f & ::xml_schema::flags::base) == 0) { @@ -40706,7 +43077,7 @@ namespace neuroml2 parse (::xsd::cxx::xml::dom::parser< char >& p, ::xml_schema::flags f) { - this->::neuroml2::Base::parse (p, f); + this->::neuroml2::BaseProjection::parse (p, f); for (; p.more_content (); p.next_content (false)) { @@ -40736,42 +43107,18 @@ namespace neuroml2 continue; } - break; - } - - 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 () == "presynapticPopulation" && n.namespace_ ().empty ()) + // continuousConnectionInstanceW + // + if (n.name () == "continuousConnectionInstanceW" && n.namespace_ () == "http://www.neuroml.org/schema/neuroml2") { - this->presynapticPopulation_.set (presynapticPopulation_traits::create (i, f, this)); - continue; - } + ::std::unique_ptr< continuousConnectionInstanceW_type > r ( + continuousConnectionInstanceW_traits::create (i, f, this)); - if (n.name () == "postsynapticPopulation" && n.namespace_ ().empty ()) - { - this->postsynapticPopulation_.set (postsynapticPopulation_traits::create (i, f, this)); + this->continuousConnectionInstanceW_.push_back (::std::move (r)); continue; } - } - - if (!presynapticPopulation_.present ()) - { - throw ::xsd::cxx::tree::expected_attribute< char > ( - "presynapticPopulation", - ""); - } - if (!postsynapticPopulation_.present ()) - { - throw ::xsd::cxx::tree::expected_attribute< char > ( - "postsynapticPopulation", - ""); + break; } } @@ -40787,11 +43134,10 @@ namespace neuroml2 { if (this != &x) { - static_cast< ::neuroml2::Base& > (*this) = x; + static_cast< ::neuroml2::BaseProjection& > (*this) = x; this->continuousConnection_ = x.continuousConnection_; this->continuousConnectionInstance_ = x.continuousConnectionInstance_; - this->presynapticPopulation_ = x.presynapticPopulation_; - this->postsynapticPopulation_ = x.postsynapticPopulation_; + this->continuousConnectionInstanceW_ = x.continuousConnectionInstanceW_; } return *this; @@ -40805,8 +43151,8 @@ namespace neuroml2 bool operator== (const ContinuousProjection& x, const ContinuousProjection& y) { - if (!(static_cast< const ::neuroml2::Base& > (x) == - static_cast< const ::neuroml2::Base& > (y))) + if (!(static_cast< const ::neuroml2::BaseProjection& > (x) == + static_cast< const ::neuroml2::BaseProjection& > (y))) return false; if (!(x.continuousConnection () == y.continuousConnection ())) @@ -40815,10 +43161,7 @@ namespace neuroml2 if (!(x.continuousConnectionInstance () == y.continuousConnectionInstance ())) return false; - if (!(x.presynapticPopulation () == y.presynapticPopulation ())) - return false; - - if (!(x.postsynapticPopulation () == y.postsynapticPopulation ())) + if (!(x.continuousConnectionInstanceW () == y.continuousConnectionInstanceW ())) return false; return true; @@ -41006,6 +43349,120 @@ namespace neuroml2 { } + // ContinuousConnectionInstanceW + // + + ContinuousConnectionInstanceW:: + ContinuousConnectionInstanceW (const id_type& id, + const preCell_type& preCell, + const postCell_type& postCell, + const preComponent_type& preComponent, + const postComponent_type& postComponent, + const weight_type& weight) + : ::neuroml2::ContinuousConnectionInstance (id, + preCell, + postCell, + preComponent, + postComponent), + weight_ (weight, this) + { + } + + ContinuousConnectionInstanceW:: + ContinuousConnectionInstanceW (const ContinuousConnectionInstanceW& x, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::ContinuousConnectionInstance (x, f, c), + weight_ (x.weight_, f, this) + { + } + + ContinuousConnectionInstanceW:: + ContinuousConnectionInstanceW (const ::xercesc::DOMElement& e, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::ContinuousConnectionInstance (e, f | ::xml_schema::flags::base, c), + weight_ (this) + { + if ((f & ::xml_schema::flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, false, false, true); + this->parse (p, f); + } + } + + void ContinuousConnectionInstanceW:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::flags f) + { + this->::neuroml2::ContinuousConnectionInstance::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 () == "weight" && n.namespace_ ().empty ()) + { + this->weight_.set (weight_traits::create (i, f, this)); + continue; + } + } + + if (!weight_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "weight", + ""); + } + } + + ContinuousConnectionInstanceW* ContinuousConnectionInstanceW:: + _clone (::xml_schema::flags f, + ::xml_schema::container* c) const + { + return new class ContinuousConnectionInstanceW (*this, f, c); + } + + ContinuousConnectionInstanceW& ContinuousConnectionInstanceW:: + operator= (const ContinuousConnectionInstanceW& x) + { + if (this != &x) + { + static_cast< ::neuroml2::ContinuousConnectionInstance& > (*this) = x; + this->weight_ = x.weight_; + } + + return *this; + } + + ContinuousConnectionInstanceW:: + ~ContinuousConnectionInstanceW () + { + } + + bool + operator== (const ContinuousConnectionInstanceW& x, const ContinuousConnectionInstanceW& y) + { + if (!(static_cast< const ::neuroml2::ContinuousConnectionInstance& > (x) == + static_cast< const ::neuroml2::ContinuousConnectionInstance& > (y))) + return false; + + if (!(x.weight () == y.weight ())) + return false; + + return true; + } + + bool + operator!= (const ContinuousConnectionInstanceW& x, const ContinuousConnectionInstanceW& y) + { + return !(x == y); + } + // ExplicitInput // @@ -41146,6 +43603,7 @@ namespace neuroml2 const component_type& component) : ::neuroml2::Base (id), input_ (this), + inputW_ (this), population_ (population, this), component_ (component, this) { @@ -41157,6 +43615,7 @@ namespace neuroml2 ::xml_schema::container* c) : ::neuroml2::Base (x, f, c), input_ (x.input_, f, this), + inputW_ (x.inputW_, f, this), population_ (x.population_, f, this), component_ (x.component_, f, this) { @@ -41168,6 +43627,7 @@ namespace neuroml2 ::xml_schema::container* c) : ::neuroml2::Base (e, f | ::xml_schema::flags::base, c), input_ (this), + inputW_ (this), population_ (this), component_ (this) { @@ -41201,6 +43661,17 @@ namespace neuroml2 continue; } + // inputW + // + if (n.name () == "inputW" && n.namespace_ () == "http://www.neuroml.org/schema/neuroml2") + { + ::std::unique_ptr< inputW_type > r ( + inputW_traits::create (i, f, this)); + + this->inputW_.push_back (::std::move (r)); + continue; + } + break; } @@ -41254,6 +43725,7 @@ namespace neuroml2 { static_cast< ::neuroml2::Base& > (*this) = x; this->input_ = x.input_; + this->inputW_ = x.inputW_; this->population_ = x.population_; this->component_ = x.component_; } @@ -41276,6 +43748,9 @@ namespace neuroml2 if (!(x.input () == y.input ())) return false; + if (!(x.inputW () == y.inputW ())) + return false; + if (!(x.population () == y.population ())) return false; @@ -41456,6 +43931,116 @@ namespace neuroml2 return !(x == y); } + // InputW + // + + InputW:: + InputW (const id_type& id, + const target_type& target, + const destination_type& destination, + const weight_type& weight) + : ::neuroml2::Input (id, + target, + destination), + weight_ (weight, this) + { + } + + InputW:: + InputW (const InputW& x, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::Input (x, f, c), + weight_ (x.weight_, f, this) + { + } + + InputW:: + InputW (const ::xercesc::DOMElement& e, + ::xml_schema::flags f, + ::xml_schema::container* c) + : ::neuroml2::Input (e, f | ::xml_schema::flags::base, c), + weight_ (this) + { + if ((f & ::xml_schema::flags::base) == 0) + { + ::xsd::cxx::xml::dom::parser< char > p (e, false, false, true); + this->parse (p, f); + } + } + + void InputW:: + parse (::xsd::cxx::xml::dom::parser< char >& p, + ::xml_schema::flags f) + { + this->::neuroml2::Input::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 () == "weight" && n.namespace_ ().empty ()) + { + this->weight_.set (weight_traits::create (i, f, this)); + continue; + } + } + + if (!weight_.present ()) + { + throw ::xsd::cxx::tree::expected_attribute< char > ( + "weight", + ""); + } + } + + InputW* InputW:: + _clone (::xml_schema::flags f, + ::xml_schema::container* c) const + { + return new class InputW (*this, f, c); + } + + InputW& InputW:: + operator= (const InputW& x) + { + if (this != &x) + { + static_cast< ::neuroml2::Input& > (*this) = x; + this->weight_ = x.weight_; + } + + return *this; + } + + InputW:: + ~InputW () + { + } + + bool + operator== (const InputW& x, const InputW& y) + { + if (!(static_cast< const ::neuroml2::Input& > (x) == + static_cast< const ::neuroml2::Input& > (y))) + return false; + + if (!(x.weight () == y.weight ())) + return false; + + return true; + } + + bool + operator!= (const InputW& x, const InputW& y) + { + return !(x == y); + } + // basePyNNCell // @@ -42465,24 +45050,24 @@ namespace neuroml2 const delta_T_type& delta_T, const tau_w_type& tau_w, const v_spike_type& v_spike) - : ::neuroml2::basePyNNIaFCondCell (id, - cm, - i_offset, - tau_syn_E, - tau_syn_I, - v_init, - tau_m, - tau_refrac, - v_reset, - v_rest, - v_thresh, - e_rev_E, - e_rev_I), - a_ (a, this), - b_ (b, this), - delta_T_ (delta_T, this), - tau_w_ (tau_w, this), - v_spike_ (v_spike, this) + : ::neuroml2::EIF_cond_exp_isfa_ista (id, + cm, + i_offset, + tau_syn_E, + tau_syn_I, + v_init, + tau_m, + tau_refrac, + v_reset, + v_rest, + v_thresh, + e_rev_E, + e_rev_I, + a, + b, + delta_T, + tau_w, + v_spike) { } @@ -42490,12 +45075,7 @@ namespace neuroml2 EIF_cond_alpha_isfa_ista (const EIF_cond_alpha_isfa_ista& x, ::xml_schema::flags f, ::xml_schema::container* c) - : ::neuroml2::basePyNNIaFCondCell (x, f, c), - a_ (x.a_, f, this), - b_ (x.b_, f, this), - delta_T_ (x.delta_T_, f, this), - tau_w_ (x.tau_w_, f, this), - v_spike_ (x.v_spike_, f, this) + : ::neuroml2::EIF_cond_exp_isfa_ista (x, f, c) { } @@ -42503,99 +45083,8 @@ namespace neuroml2 EIF_cond_alpha_isfa_ista (const ::xercesc::DOMElement& e, ::xml_schema::flags f, ::xml_schema::container* c) - : ::neuroml2::basePyNNIaFCondCell (e, f | ::xml_schema::flags::base, c), - a_ (this), - b_ (this), - delta_T_ (this), - tau_w_ (this), - v_spike_ (this) + : ::neuroml2::EIF_cond_exp_isfa_ista (e, f, c) { - if ((f & ::xml_schema::flags::base) == 0) - { - ::xsd::cxx::xml::dom::parser< char > p (e, true, false, true); - this->parse (p, f); - } - } - - void EIF_cond_alpha_isfa_ista:: - parse (::xsd::cxx::xml::dom::parser< char >& p, - ::xml_schema::flags f) - { - this->::neuroml2::basePyNNIaFCondCell::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 () == "a" && n.namespace_ ().empty ()) - { - this->a_.set (a_traits::create (i, f, this)); - continue; - } - - if (n.name () == "b" && n.namespace_ ().empty ()) - { - this->b_.set (b_traits::create (i, f, this)); - continue; - } - - if (n.name () == "delta_T" && n.namespace_ ().empty ()) - { - this->delta_T_.set (delta_T_traits::create (i, f, this)); - continue; - } - - if (n.name () == "tau_w" && n.namespace_ ().empty ()) - { - this->tau_w_.set (tau_w_traits::create (i, f, this)); - continue; - } - - if (n.name () == "v_spike" && n.namespace_ ().empty ()) - { - this->v_spike_.set (v_spike_traits::create (i, f, this)); - continue; - } - } - - if (!a_.present ()) - { - throw ::xsd::cxx::tree::expected_attribute< char > ( - "a", - ""); - } - - if (!b_.present ()) - { - throw ::xsd::cxx::tree::expected_attribute< char > ( - "b", - ""); - } - - if (!delta_T_.present ()) - { - throw ::xsd::cxx::tree::expected_attribute< char > ( - "delta_T", - ""); - } - - if (!tau_w_.present ()) - { - throw ::xsd::cxx::tree::expected_attribute< char > ( - "tau_w", - ""); - } - - if (!v_spike_.present ()) - { - throw ::xsd::cxx::tree::expected_attribute< char > ( - "v_spike", - ""); - } } EIF_cond_alpha_isfa_ista* EIF_cond_alpha_isfa_ista:: @@ -42605,58 +45094,11 @@ namespace neuroml2 return new class EIF_cond_alpha_isfa_ista (*this, f, c); } - EIF_cond_alpha_isfa_ista& EIF_cond_alpha_isfa_ista:: - operator= (const EIF_cond_alpha_isfa_ista& x) - { - if (this != &x) - { - static_cast< ::neuroml2::basePyNNIaFCondCell& > (*this) = x; - this->a_ = x.a_; - this->b_ = x.b_; - this->delta_T_ = x.delta_T_; - this->tau_w_ = x.tau_w_; - this->v_spike_ = x.v_spike_; - } - - return *this; - } - EIF_cond_alpha_isfa_ista:: ~EIF_cond_alpha_isfa_ista () { } - bool - operator== (const EIF_cond_alpha_isfa_ista& x, const EIF_cond_alpha_isfa_ista& y) - { - if (!(static_cast< const ::neuroml2::basePyNNIaFCondCell& > (x) == - static_cast< const ::neuroml2::basePyNNIaFCondCell& > (y))) - return false; - - if (!(x.a () == y.a ())) - return false; - - if (!(x.b () == y.b ())) - return false; - - if (!(x.delta_T () == y.delta_T ())) - return false; - - if (!(x.tau_w () == y.tau_w ())) - return false; - - if (!(x.v_spike () == y.v_spike ())) - return false; - - return true; - } - - bool - operator!= (const EIF_cond_alpha_isfa_ista& x, const EIF_cond_alpha_isfa_ista& y) - { - return !(x == y); - } - // HH_cond_exp // @@ -43686,6 +46128,12 @@ namespace neuroml2 return o; } + ::std::ostream& + operator<< (::std::ostream& o, const ZeroOrOne& i) + { + return o << static_cast< const ::xsd::cxx::tree::fundamental_base< ::xml_schema::double_, char, ::xml_schema::simple_type, ::xsd::cxx::tree::schema_type::double_ >& > (i); + } + ::std::ostream& operator<< (::std::ostream& o, const Notes& i) { @@ -43711,6 +46159,13 @@ namespace neuroml2 ::std::ostream& operator<< (::std::ostream& o, const ComponentType& i) { + for (ComponentType::Property_const_iterator + b (i.Property ().begin ()), e (i.Property ().end ()); + b != e; ++b) + { + o << ::std::endl << "Property: " << *b; + } + for (ComponentType::Parameter_const_iterator b (i.Parameter ().begin ()), e (i.Parameter ().end ()); b != e; ++b) @@ -43725,6 +46180,13 @@ namespace neuroml2 o << ::std::endl << "Constant: " << *b; } + for (ComponentType::Exposure_const_iterator + b (i.Exposure ().begin ()), e (i.Exposure ().end ()); + b != e; ++b) + { + o << ::std::endl << "Exposure: " << *b; + } + for (ComponentType::Requirement_const_iterator b (i.Requirement ().begin ()), e (i.Requirement ().end ()); b != e; ++b) @@ -43732,6 +46194,13 @@ namespace neuroml2 o << ::std::endl << "Requirement: " << *b; } + for (ComponentType::InstanceRequirement_const_iterator + b (i.InstanceRequirement ().begin ()), e (i.InstanceRequirement ().end ()); + b != e; ++b) + { + o << ::std::endl << "InstanceRequirement: " << *b; + } + for (ComponentType::Dynamics_const_iterator b (i.Dynamics ().begin ()), e (i.Dynamics ().end ()); b != e; ++b) @@ -43767,6 +46236,19 @@ namespace neuroml2 return o; } + ::std::ostream& + operator<< (::std::ostream& o, const Exposure& i) + { + o << ::std::endl << "name: " << i.name (); + o << ::std::endl << "dimension: " << i.dimension (); + if (i.description ()) + { + o << ::std::endl << "description: " << *i.description (); + } + + return o; + } + ::std::ostream& operator<< (::std::ostream& o, const NamedDimensionalType& i) { @@ -43780,6 +46262,24 @@ namespace neuroml2 return o; } + ::std::ostream& + operator<< (::std::ostream& o, const NamedDimensionalVariable& i) + { + o << ::std::endl << "name: " << i.name (); + o << ::std::endl << "dimension: " << i.dimension (); + if (i.description ()) + { + o << ::std::endl << "description: " << *i.description (); + } + + if (i.exposure ()) + { + o << ::std::endl << "exposure: " << *i.exposure (); + } + + return o; + } + ::std::ostream& operator<< (::std::ostream& o, const Parameter& i) { @@ -43788,6 +46288,19 @@ namespace neuroml2 return o; } + ::std::ostream& + operator<< (::std::ostream& o, const LEMS_Property& i) + { + o << static_cast< const ::neuroml2::NamedDimensionalType& > (i); + + if (i.defaultValue ()) + { + o << ::std::endl << "defaultValue: " << *i.defaultValue (); + } + + return o; + } + ::std::ostream& operator<< (::std::ostream& o, const Requirement& i) { @@ -43796,9 +46309,24 @@ namespace neuroml2 return o; } + ::std::ostream& + operator<< (::std::ostream& o, const InstanceRequirement& i) + { + o << ::std::endl << "name: " << i.name (); + o << ::std::endl << "type: " << i.type (); + return o; + } + ::std::ostream& operator<< (::std::ostream& o, const Dynamics& i) { + for (Dynamics::StateVariable_const_iterator + b (i.StateVariable ().begin ()), e (i.StateVariable ().end ()); + b != e; ++b) + { + o << ::std::endl << "StateVariable: " << *b; + } + for (Dynamics::DerivedVariable_const_iterator b (i.DerivedVariable ().begin ()), e (i.DerivedVariable ().end ()); b != e; ++b) @@ -43813,26 +46341,47 @@ namespace neuroml2 o << ::std::endl << "ConditionalDerivedVariable: " << *b; } + for (Dynamics::TimeDerivative_const_iterator + b (i.TimeDerivative ().begin ()), e (i.TimeDerivative ().end ()); + b != e; ++b) + { + o << ::std::endl << "TimeDerivative: " << *b; + } + return o; } ::std::ostream& operator<< (::std::ostream& o, const DerivedVariable& i) { - o << ::std::endl << "name: " << i.name (); - o << ::std::endl << "dimension: " << i.dimension (); - o << ::std::endl << "value: " << i.value (); - if (i.exposure ()) + o << static_cast< const ::neuroml2::NamedDimensionalVariable& > (i); + + if (i.value ()) { - o << ::std::endl << "exposure: " << *i.exposure (); + o << ::std::endl << "value: " << *i.value (); } + if (i.select ()) + { + o << ::std::endl << "select: " << *i.select (); + } + + return o; + } + + ::std::ostream& + operator<< (::std::ostream& o, const StateVariable& i) + { + o << static_cast< const ::neuroml2::NamedDimensionalVariable& > (i); + return o; } ::std::ostream& operator<< (::std::ostream& o, const ConditionalDerivedVariable& i) { + o << static_cast< const ::neuroml2::NamedDimensionalVariable& > (i); + for (ConditionalDerivedVariable::Case_const_iterator b (i.Case ().begin ()), e (i.Case ().end ()); b != e; ++b) @@ -43840,13 +46389,6 @@ namespace neuroml2 o << ::std::endl << "Case: " << *b; } - o << ::std::endl << "name: " << i.name (); - o << ::std::endl << "dimension: " << i.dimension (); - if (i.exposure ()) - { - o << ::std::endl << "exposure: " << *i.exposure (); - } - return o; } @@ -43862,10 +46404,18 @@ namespace neuroml2 return o; } + ::std::ostream& + operator<< (::std::ostream& o, const TimeDerivative& i) + { + o << ::std::endl << "variable: " << i.variable (); + o << ::std::endl << "value: " << i.value (); + return o; + } + ::std::ostream& operator<< (::std::ostream& o, const ZeroToOne& i) { - o << static_cast< const ::xsd::cxx::tree::fundamental_base< ::xml_schema::double_, char, ::xml_schema::simple_type, ::xsd::cxx::tree::schema_type::double_ >& > (i); + o << static_cast< const ::xsd::cxx::tree::fundamental_base< ::xml_schema::float_, char, ::xml_schema::simple_type >& > (i); return o; } @@ -43967,6 +46517,13 @@ namespace neuroml2 o << ::std::endl << "ionChannelHH: " << *b; } + for (NeuroMLDocument_base::ionChannelVShift_const_iterator + b (i.ionChannelVShift ().begin ()), e (i.ionChannelVShift ().end ()); + b != e; ++b) + { + o << ::std::endl << "ionChannelVShift: " << *b; + } + for (NeuroMLDocument_base::ionChannelKS_const_iterator b (i.ionChannelKS ().begin ()), e (i.ionChannelKS ().end ()); b != e; ++b) @@ -44030,6 +46587,13 @@ namespace neuroml2 o << ::std::endl << "blockingPlasticSynapse: " << *b; } + for (NeuroMLDocument_base::doubleSynapse_const_iterator + b (i.doubleSynapse ().begin ()), e (i.doubleSynapse ().end ()); + b != e; ++b) + { + o << ::std::endl << "doubleSynapse: " << *b; + } + for (NeuroMLDocument_base::gapJunction_const_iterator b (i.gapJunction ().begin ()), e (i.gapJunction ().end ()); b != e; ++b) @@ -44219,6 +46783,13 @@ namespace neuroml2 o << ::std::endl << "voltageClamp: " << *b; } + for (NeuroMLDocument_base::voltageClampTriple_const_iterator + b (i.voltageClampTriple ().begin ()), e (i.voltageClampTriple ().end ()); + b != e; ++b) + { + o << ::std::endl << "voltageClampTriple: " << *b; + } + for (NeuroMLDocument_base::spikeArray_const_iterator b (i.spikeArray ().begin ()), e (i.spikeArray ().end ()); b != e; ++b) @@ -44254,6 +46825,13 @@ namespace neuroml2 o << ::std::endl << "spikeGeneratorPoisson: " << *b; } + for (NeuroMLDocument_base::spikeGeneratorRefPoisson_const_iterator + b (i.spikeGeneratorRefPoisson ().begin ()), e (i.spikeGeneratorRefPoisson ().end ()); + b != e; ++b) + { + o << ::std::endl << "spikeGeneratorRefPoisson: " << *b; + } + for (NeuroMLDocument_base::poissonFiringSynapse_const_iterator b (i.poissonFiringSynapse ().begin ()), e (i.poissonFiringSynapse ().end ()); b != e; ++b) @@ -44372,11 +46950,7 @@ namespace neuroml2 ::std::ostream& operator<< (::std::ostream& o, const IncludeType& i) { - if (i.href ()) - { - o << ::std::endl << "href: " << *i.href (); - } - + o << ::std::endl << "href: " << i.href (); return o; } @@ -44507,6 +47081,15 @@ namespace neuroml2 return o; } + ::std::ostream& + operator<< (::std::ostream& o, const IonChannelVShift& i) + { + o << static_cast< const ::neuroml2::IonChannel& > (i); + + o << ::std::endl << "vShift: " << i.vShift (); + return o; + } + ::std::ostream& operator<< (::std::ostream& o, channelTypes::value i) { @@ -45109,6 +47692,18 @@ namespace neuroml2 return o; } + ::std::ostream& + operator<< (::std::ostream& o, const DoubleSynapse& i) + { + o << static_cast< const ::neuroml2::BaseVoltageDepSynapse& > (i); + + o << ::std::endl << "synapse1: " << i.synapse1 (); + o << ::std::endl << "synapse2: " << i.synapse2 (); + o << ::std::endl << "synapse1Path: " << i.synapse1Path (); + o << ::std::endl << "synapse2Path: " << i.synapse2Path (); + return o; + } + ::std::ostream& operator<< (::std::ostream& o, const BlockingPlasticSynapse& i) { @@ -45665,6 +48260,13 @@ namespace neuroml2 o << ::std::endl << "channelDensity: " << *b; } + for (MembraneProperties::channelDensityVShift_const_iterator + b (i.channelDensityVShift ().begin ()), e (i.channelDensityVShift ().end ()); + b != e; ++b) + { + o << ::std::endl << "channelDensityVShift: " << *b; + } + for (MembraneProperties::channelDensityNernst_const_iterator b (i.channelDensityNernst ().begin ()), e (i.channelDensityNernst ().end ()); b != e; ++b) @@ -45901,6 +48503,15 @@ namespace neuroml2 return o; } + ::std::ostream& + operator<< (::std::ostream& o, const ChannelDensityVShift& i) + { + o << static_cast< const ::neuroml2::ChannelDensity& > (i); + + o << ::std::endl << "vShift: " << i.vShift (); + return o; + } + ::std::ostream& operator<< (::std::ostream& o, const ChannelDensityNernst& i) { @@ -46232,6 +48843,21 @@ namespace neuroml2 return o; } + ::std::ostream& + operator<< (::std::ostream& o, const VoltageClampTriple& i) + { + o << static_cast< const ::neuroml2::Standalone& > (i); + + o << ::std::endl << "active: " << i.active (); + o << ::std::endl << "delay: " << i.delay (); + o << ::std::endl << "duration: " << i.duration (); + o << ::std::endl << "conditioningVoltage: " << i.conditioningVoltage (); + o << ::std::endl << "testingVoltage: " << i.testingVoltage (); + o << ::std::endl << "returnVoltage: " << i.returnVoltage (); + o << ::std::endl << "simpleSeriesResistance: " << i.simpleSeriesResistance (); + return o; + } + ::std::ostream& operator<< (::std::ostream& o, const Spike& i) { @@ -46301,6 +48927,15 @@ namespace neuroml2 return o; } + ::std::ostream& + operator<< (::std::ostream& o, const SpikeGeneratorRefPoisson& i) + { + o << static_cast< const ::neuroml2::SpikeGeneratorPoisson& > (i); + + o << ::std::endl << "minimumISI: " << i.minimumISI (); + return o; + } + ::std::ostream& operator<< (::std::ostream& o, const PoissonFiringSynapse& i) { @@ -46681,10 +49316,20 @@ namespace neuroml2 } ::std::ostream& - operator<< (::std::ostream& o, const Projection& i) + operator<< (::std::ostream& o, const BaseProjection& i) { o << static_cast< const ::neuroml2::Base& > (i); + o << ::std::endl << "presynapticPopulation: " << i.presynapticPopulation (); + o << ::std::endl << "postsynapticPopulation: " << i.postsynapticPopulation (); + return o; + } + + ::std::ostream& + operator<< (::std::ostream& o, const Projection& i) + { + o << static_cast< const ::neuroml2::BaseProjection& > (i); + for (Projection::connection_const_iterator b (i.connection ().begin ()), e (i.connection ().end ()); b != e; ++b) @@ -46699,8 +49344,6 @@ namespace neuroml2 o << ::std::endl << "connectionWD: " << *b; } - o << ::std::endl << "presynapticPopulation: " << i.presynapticPopulation (); - o << ::std::endl << "postsynapticPopulation: " << i.postsynapticPopulation (); o << ::std::endl << "synapse: " << i.synapse (); return o; } @@ -46762,7 +49405,7 @@ namespace neuroml2 ::std::ostream& operator<< (::std::ostream& o, const ElectricalProjection& i) { - o << static_cast< const ::neuroml2::Base& > (i); + o << static_cast< const ::neuroml2::BaseProjection& > (i); for (ElectricalProjection::electricalConnection_const_iterator b (i.electricalConnection ().begin ()), e (i.electricalConnection ().end ()); @@ -46778,8 +49421,13 @@ namespace neuroml2 o << ::std::endl << "electricalConnectionInstance: " << *b; } - o << ::std::endl << "presynapticPopulation: " << i.presynapticPopulation (); - o << ::std::endl << "postsynapticPopulation: " << i.postsynapticPopulation (); + for (ElectricalProjection::electricalConnectionInstanceW_const_iterator + b (i.electricalConnectionInstanceW ().begin ()), e (i.electricalConnectionInstanceW ().end ()); + b != e; ++b) + { + o << ::std::endl << "electricalConnectionInstanceW: " << *b; + } + return o; } @@ -46800,10 +49448,19 @@ namespace neuroml2 return o; } + ::std::ostream& + operator<< (::std::ostream& o, const ElectricalConnectionInstanceW& i) + { + o << static_cast< const ::neuroml2::ElectricalConnectionInstance& > (i); + + o << ::std::endl << "weight: " << i.weight (); + return o; + } + ::std::ostream& operator<< (::std::ostream& o, const ContinuousProjection& i) { - o << static_cast< const ::neuroml2::Base& > (i); + o << static_cast< const ::neuroml2::BaseProjection& > (i); for (ContinuousProjection::continuousConnection_const_iterator b (i.continuousConnection ().begin ()), e (i.continuousConnection ().end ()); @@ -46819,8 +49476,13 @@ namespace neuroml2 o << ::std::endl << "continuousConnectionInstance: " << *b; } - o << ::std::endl << "presynapticPopulation: " << i.presynapticPopulation (); - o << ::std::endl << "postsynapticPopulation: " << i.postsynapticPopulation (); + for (ContinuousProjection::continuousConnectionInstanceW_const_iterator + b (i.continuousConnectionInstanceW ().begin ()), e (i.continuousConnectionInstanceW ().end ()); + b != e; ++b) + { + o << ::std::endl << "continuousConnectionInstanceW: " << *b; + } + return o; } @@ -46842,6 +49504,15 @@ namespace neuroml2 return o; } + ::std::ostream& + operator<< (::std::ostream& o, const ContinuousConnectionInstanceW& i) + { + o << static_cast< const ::neuroml2::ContinuousConnectionInstance& > (i); + + o << ::std::endl << "weight: " << i.weight (); + return o; + } + ::std::ostream& operator<< (::std::ostream& o, const ExplicitInput& i) { @@ -46867,6 +49538,13 @@ namespace neuroml2 o << ::std::endl << "input: " << *b; } + for (InputList::inputW_const_iterator + b (i.inputW ().begin ()), e (i.inputW ().end ()); + b != e; ++b) + { + o << ::std::endl << "inputW: " << *b; + } + o << ::std::endl << "population: " << i.population (); o << ::std::endl << "component: " << i.component (); return o; @@ -46891,6 +49569,15 @@ namespace neuroml2 return o; } + ::std::ostream& + operator<< (::std::ostream& o, const InputW& i) + { + o << static_cast< const ::neuroml2::Input& > (i); + + o << ::std::endl << "weight: " << i.weight (); + return o; + } + ::std::ostream& operator<< (::std::ostream& o, const basePyNNCell& i) { @@ -46975,13 +49662,8 @@ namespace neuroml2 ::std::ostream& operator<< (::std::ostream& o, const EIF_cond_alpha_isfa_ista& i) { - o << static_cast< const ::neuroml2::basePyNNIaFCondCell& > (i); + o << static_cast< const ::neuroml2::EIF_cond_exp_isfa_ista& > (i); - o << ::std::endl << "a: " << i.a (); - o << ::std::endl << "b: " << i.b (); - o << ::std::endl << "delta_T: " << i.delta_T (); - o << ::std::endl << "tau_w: " << i.tau_w (); - o << ::std::endl << "v_spike: " << i.v_spike (); return o; } @@ -47792,6 +50474,25 @@ namespace neuroml2 l << static_cast< const ::xsd::cxx::tree::fundamental_base< ::xml_schema::double_, char, ::xml_schema::simple_type, ::xsd::cxx::tree::schema_type::double_ >& > (i); } + void + operator<< (::xercesc::DOMElement& e, const ZeroOrOne& i) + { + e << static_cast< const ::xsd::cxx::tree::fundamental_base< ::xml_schema::double_, char, ::xml_schema::simple_type, ::xsd::cxx::tree::schema_type::double_ >& > (i); + } + + void + operator<< (::xercesc::DOMAttr& a, const ZeroOrOne& i) + { + a << static_cast< const ::xsd::cxx::tree::fundamental_base< ::xml_schema::double_, char, ::xml_schema::simple_type, ::xsd::cxx::tree::schema_type::double_ >& > (i); + } + + void + operator<< (::xml_schema::list_stream& l, + const ZeroOrOne& i) + { + l << static_cast< const ::xsd::cxx::tree::fundamental_base< ::xml_schema::double_, char, ::xml_schema::simple_type, ::xsd::cxx::tree::schema_type::double_ >& > (i); + } + void operator<< (::xercesc::DOMElement& e, const Notes& i) { @@ -47850,6 +50551,21 @@ namespace neuroml2 { e << static_cast< const ::xml_schema::type& > (i); + // Property + // + for (ComponentType::Property_const_iterator + b (i.Property ().begin ()), n (i.Property ().end ()); + b != n; ++b) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "Property", + "http://www.neuroml.org/schema/neuroml2", + e)); + + s << *b; + } + // Parameter // for (ComponentType::Parameter_const_iterator @@ -47880,6 +50596,21 @@ namespace neuroml2 s << *b; } + // Exposure + // + for (ComponentType::Exposure_const_iterator + b (i.Exposure ().begin ()), n (i.Exposure ().end ()); + b != n; ++b) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "Exposure", + "http://www.neuroml.org/schema/neuroml2", + e)); + + s << *b; + } + // Requirement // for (ComponentType::Requirement_const_iterator @@ -47895,6 +50626,21 @@ namespace neuroml2 s << *b; } + // InstanceRequirement + // + for (ComponentType::InstanceRequirement_const_iterator + b (i.InstanceRequirement ().begin ()), n (i.InstanceRequirement ().end ()); + b != n; ++b) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "InstanceRequirement", + "http://www.neuroml.org/schema/neuroml2", + e)); + + s << *b; + } + // Dynamics // for (ComponentType::Dynamics_const_iterator @@ -47997,6 +50743,46 @@ namespace neuroml2 } } + void + operator<< (::xercesc::DOMElement& e, const Exposure& i) + { + e << static_cast< const ::xml_schema::type& > (i); + + // name + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "name", + e)); + + a << i.name (); + } + + // dimension + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "dimension", + e)); + + a << i.dimension (); + } + + // description + // + if (i.description ()) + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "description", + e)); + + a << *i.description (); + } + } + void operator<< (::xercesc::DOMElement& e, const NamedDimensionalType& i) { @@ -48037,23 +50823,136 @@ namespace neuroml2 } } + void + operator<< (::xercesc::DOMElement& e, const NamedDimensionalVariable& i) + { + e << static_cast< const ::xml_schema::type& > (i); + + // name + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "name", + e)); + + a << i.name (); + } + + // dimension + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "dimension", + e)); + + a << i.dimension (); + } + + // description + // + if (i.description ()) + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "description", + e)); + + a << *i.description (); + } + + // exposure + // + if (i.exposure ()) + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "exposure", + e)); + + a << *i.exposure (); + } + } + void operator<< (::xercesc::DOMElement& e, const Parameter& i) { e << static_cast< const ::neuroml2::NamedDimensionalType& > (i); } + void + operator<< (::xercesc::DOMElement& e, const LEMS_Property& i) + { + e << static_cast< const ::neuroml2::NamedDimensionalType& > (i); + + // defaultValue + // + if (i.defaultValue ()) + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "defaultValue", + e)); + + a << ::xml_schema::as_double(*i.defaultValue ()); + } + } + void operator<< (::xercesc::DOMElement& e, const Requirement& i) { e << static_cast< const ::neuroml2::NamedDimensionalType& > (i); } + void + operator<< (::xercesc::DOMElement& e, const InstanceRequirement& i) + { + e << static_cast< const ::xml_schema::type& > (i); + + // name + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "name", + e)); + + a << i.name (); + } + + // type + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "type", + e)); + + a << i.type (); + } + } + void operator<< (::xercesc::DOMElement& e, const Dynamics& i) { e << static_cast< const ::xml_schema::type& > (i); + // StateVariable + // + for (Dynamics::StateVariable_const_iterator + b (i.StateVariable ().begin ()), n (i.StateVariable ().end ()); + b != n; ++b) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "StateVariable", + "http://www.neuroml.org/schema/neuroml2", + e)); + + s << *b; + } + // DerivedVariable // for (Dynamics::DerivedVariable_const_iterator @@ -48083,63 +50982,63 @@ namespace neuroml2 s << *b; } - } - - void - operator<< (::xercesc::DOMElement& e, const DerivedVariable& i) - { - e << static_cast< const ::xml_schema::type& > (i); - // name + // TimeDerivative // + for (Dynamics::TimeDerivative_const_iterator + b (i.TimeDerivative ().begin ()), n (i.TimeDerivative ().end ()); + b != n; ++b) { - ::xercesc::DOMAttr& a ( - ::xsd::cxx::xml::dom::create_attribute ( - "name", + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "TimeDerivative", + "http://www.neuroml.org/schema/neuroml2", e)); - a << i.name (); + s << *b; } + } - // dimension - // - { - ::xercesc::DOMAttr& a ( - ::xsd::cxx::xml::dom::create_attribute ( - "dimension", - e)); - - a << i.dimension (); - } + void + operator<< (::xercesc::DOMElement& e, const DerivedVariable& i) + { + e << static_cast< const ::neuroml2::NamedDimensionalVariable& > (i); // value // + if (i.value ()) { ::xercesc::DOMAttr& a ( ::xsd::cxx::xml::dom::create_attribute ( "value", e)); - a << i.value (); + a << *i.value (); } - // exposure + // select // - if (i.exposure ()) + if (i.select ()) { ::xercesc::DOMAttr& a ( ::xsd::cxx::xml::dom::create_attribute ( - "exposure", + "select", e)); - a << *i.exposure (); + a << *i.select (); } } + void + operator<< (::xercesc::DOMElement& e, const StateVariable& i) + { + e << static_cast< const ::neuroml2::NamedDimensionalVariable& > (i); + } + void operator<< (::xercesc::DOMElement& e, const ConditionalDerivedVariable& i) { - e << static_cast< const ::xml_schema::type& > (i); + e << static_cast< const ::neuroml2::NamedDimensionalVariable& > (i); // Case // @@ -48155,57 +51054,51 @@ namespace neuroml2 s << *b; } + } - // name - // - { - ::xercesc::DOMAttr& a ( - ::xsd::cxx::xml::dom::create_attribute ( - "name", - e)); - - a << i.name (); - } + void + operator<< (::xercesc::DOMElement& e, const Case& i) + { + e << static_cast< const ::xml_schema::type& > (i); - // dimension + // condition // + if (i.condition ()) { ::xercesc::DOMAttr& a ( ::xsd::cxx::xml::dom::create_attribute ( - "dimension", + "condition", e)); - a << i.dimension (); + a << *i.condition (); } - // exposure + // value // - if (i.exposure ()) { ::xercesc::DOMAttr& a ( ::xsd::cxx::xml::dom::create_attribute ( - "exposure", + "value", e)); - a << *i.exposure (); + a << i.value (); } } void - operator<< (::xercesc::DOMElement& e, const Case& i) + operator<< (::xercesc::DOMElement& e, const TimeDerivative& i) { e << static_cast< const ::xml_schema::type& > (i); - // condition + // variable // - if (i.condition ()) { ::xercesc::DOMAttr& a ( ::xsd::cxx::xml::dom::create_attribute ( - "condition", + "variable", e)); - a << *i.condition (); + a << i.variable (); } // value @@ -48223,20 +51116,20 @@ namespace neuroml2 void operator<< (::xercesc::DOMElement& e, const ZeroToOne& i) { - e << static_cast< const ::xsd::cxx::tree::fundamental_base< ::xml_schema::double_, char, ::xml_schema::simple_type, ::xsd::cxx::tree::schema_type::double_ >& > (i); + e << static_cast< const ::xsd::cxx::tree::fundamental_base< ::xml_schema::float_, char, ::xml_schema::simple_type >& > (i); } void operator<< (::xercesc::DOMAttr& a, const ZeroToOne& i) { - a << static_cast< const ::xsd::cxx::tree::fundamental_base< ::xml_schema::double_, char, ::xml_schema::simple_type, ::xsd::cxx::tree::schema_type::double_ >& > (i); + a << static_cast< const ::xsd::cxx::tree::fundamental_base< ::xml_schema::float_, char, ::xml_schema::simple_type >& > (i); } void operator<< (::xml_schema::list_stream& l, const ZeroToOne& i) { - l << static_cast< const ::xsd::cxx::tree::fundamental_base< ::xml_schema::double_, char, ::xml_schema::simple_type, ::xsd::cxx::tree::schema_type::double_ >& > (i); + l << static_cast< const ::xsd::cxx::tree::fundamental_base< ::xml_schema::float_, char, ::xml_schema::simple_type >& > (i); } void @@ -48576,6 +51469,21 @@ namespace neuroml2 s << *b; } + // ionChannelVShift + // + for (NeuroMLDocument_base::ionChannelVShift_const_iterator + b (i.ionChannelVShift ().begin ()), n (i.ionChannelVShift ().end ()); + b != n; ++b) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "ionChannelVShift", + "http://www.neuroml.org/schema/neuroml2", + e)); + + s << *b; + } + // ionChannelKS // for (NeuroMLDocument_base::ionChannelKS_const_iterator @@ -48711,6 +51619,21 @@ namespace neuroml2 s << *b; } + // doubleSynapse + // + for (NeuroMLDocument_base::doubleSynapse_const_iterator + b (i.doubleSynapse ().begin ()), n (i.doubleSynapse ().end ()); + b != n; ++b) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "doubleSynapse", + "http://www.neuroml.org/schema/neuroml2", + e)); + + s << *b; + } + // gapJunction // for (NeuroMLDocument_base::gapJunction_const_iterator @@ -49116,6 +52039,21 @@ namespace neuroml2 s << *b; } + // voltageClampTriple + // + for (NeuroMLDocument_base::voltageClampTriple_const_iterator + b (i.voltageClampTriple ().begin ()), n (i.voltageClampTriple ().end ()); + b != n; ++b) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "voltageClampTriple", + "http://www.neuroml.org/schema/neuroml2", + e)); + + s << *b; + } + // spikeArray // for (NeuroMLDocument_base::spikeArray_const_iterator @@ -49191,6 +52129,21 @@ namespace neuroml2 s << *b; } + // spikeGeneratorRefPoisson + // + for (NeuroMLDocument_base::spikeGeneratorRefPoisson_const_iterator + b (i.spikeGeneratorRefPoisson ().begin ()), n (i.spikeGeneratorRefPoisson ().end ()); + b != n; ++b) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "spikeGeneratorRefPoisson", + "http://www.neuroml.org/schema/neuroml2", + e)); + + s << *b; + } + // poissonFiringSynapse // for (NeuroMLDocument_base::poissonFiringSynapse_const_iterator @@ -49439,14 +52392,13 @@ namespace neuroml2 // href // - if (i.href ()) { ::xercesc::DOMAttr& a ( ::xsd::cxx::xml::dom::create_attribute ( "href", e)); - a << *i.href (); + a << i.href (); } } @@ -49684,6 +52636,23 @@ namespace neuroml2 e << static_cast< const ::neuroml2::IonChannel& > (i); } + void + operator<< (::xercesc::DOMElement& e, const IonChannelVShift& i) + { + e << static_cast< const ::neuroml2::IonChannel& > (i); + + // vShift + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "vShift", + e)); + + a << i.vShift (); + } + } + void operator<< (::xercesc::DOMElement& e, const channelTypes& i) { @@ -51298,6 +54267,56 @@ namespace neuroml2 } } + void + operator<< (::xercesc::DOMElement& e, const DoubleSynapse& i) + { + e << static_cast< const ::neuroml2::BaseVoltageDepSynapse& > (i); + + // synapse1 + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "synapse1", + e)); + + a << i.synapse1 (); + } + + // synapse2 + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "synapse2", + e)); + + a << i.synapse2 (); + } + + // synapse1Path + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "synapse1Path", + e)); + + a << i.synapse1Path (); + } + + // synapse2Path + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "synapse2Path", + e)); + + a << i.synapse2Path (); + } + } + void operator<< (::xercesc::DOMElement& e, const BlockingPlasticSynapse& i) { @@ -52996,6 +56015,21 @@ namespace neuroml2 s << *b; } + // channelDensityVShift + // + for (MembraneProperties::channelDensityVShift_const_iterator + b (i.channelDensityVShift ().begin ()), n (i.channelDensityVShift ().end ()); + b != n; ++b) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "channelDensityVShift", + "http://www.neuroml.org/schema/neuroml2", + e)); + + s << *b; + } + // channelDensityNernst // for (MembraneProperties::channelDensityNernst_const_iterator @@ -53535,6 +56569,23 @@ namespace neuroml2 } } + void + operator<< (::xercesc::DOMElement& e, const ChannelDensityVShift& i) + { + e << static_cast< const ::neuroml2::ChannelDensity& > (i); + + // vShift + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "vShift", + e)); + + a << i.vShift (); + } + } + void operator<< (::xercesc::DOMElement& e, const ChannelDensityNernst& i) { @@ -54478,6 +57529,89 @@ namespace neuroml2 } } + void + operator<< (::xercesc::DOMElement& e, const VoltageClampTriple& i) + { + e << static_cast< const ::neuroml2::Standalone& > (i); + + // active + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "active", + e)); + + a << i.active (); + } + + // delay + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "delay", + e)); + + a << i.delay (); + } + + // duration + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "duration", + e)); + + a << i.duration (); + } + + // conditioningVoltage + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "conditioningVoltage", + e)); + + a << i.conditioningVoltage (); + } + + // testingVoltage + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "testingVoltage", + e)); + + a << i.testingVoltage (); + } + + // returnVoltage + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "returnVoltage", + e)); + + a << i.returnVoltage (); + } + + // simpleSeriesResistance + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "simpleSeriesResistance", + e)); + + a << i.simpleSeriesResistance (); + } + } + void operator<< (::xercesc::DOMElement& e, const Spike& i) { @@ -54621,6 +57755,23 @@ namespace neuroml2 } } + void + operator<< (::xercesc::DOMElement& e, const SpikeGeneratorRefPoisson& i) + { + e << static_cast< const ::neuroml2::SpikeGeneratorPoisson& > (i); + + // minimumISI + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "minimumISI", + e)); + + a << i.minimumISI (); + } + } + void operator<< (::xercesc::DOMElement& e, const PoissonFiringSynapse& i) { @@ -55499,10 +58650,38 @@ namespace neuroml2 } void - operator<< (::xercesc::DOMElement& e, const Projection& i) + operator<< (::xercesc::DOMElement& e, const BaseProjection& i) { e << static_cast< const ::neuroml2::Base& > (i); + // presynapticPopulation + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "presynapticPopulation", + e)); + + a << i.presynapticPopulation (); + } + + // postsynapticPopulation + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "postsynapticPopulation", + e)); + + a << i.postsynapticPopulation (); + } + } + + void + operator<< (::xercesc::DOMElement& e, const Projection& i) + { + e << static_cast< const ::neuroml2::BaseProjection& > (i); + // connection // for (Projection::connection_const_iterator @@ -55533,28 +58712,6 @@ namespace neuroml2 s << *b; } - // presynapticPopulation - // - { - ::xercesc::DOMAttr& a ( - ::xsd::cxx::xml::dom::create_attribute ( - "presynapticPopulation", - e)); - - a << i.presynapticPopulation (); - } - - // postsynapticPopulation - // - { - ::xercesc::DOMAttr& a ( - ::xsd::cxx::xml::dom::create_attribute ( - "postsynapticPopulation", - e)); - - a << i.postsynapticPopulation (); - } - // synapse // { @@ -55754,7 +58911,7 @@ namespace neuroml2 void operator<< (::xercesc::DOMElement& e, const ElectricalProjection& i) { - e << static_cast< const ::neuroml2::Base& > (i); + e << static_cast< const ::neuroml2::BaseProjection& > (i); // electricalConnection // @@ -55786,26 +58943,19 @@ namespace neuroml2 s << *b; } - // presynapticPopulation - // - { - ::xercesc::DOMAttr& a ( - ::xsd::cxx::xml::dom::create_attribute ( - "presynapticPopulation", - e)); - - a << i.presynapticPopulation (); - } - - // postsynapticPopulation + // electricalConnectionInstanceW // + for (ElectricalProjection::electricalConnectionInstanceW_const_iterator + b (i.electricalConnectionInstanceW ().begin ()), n (i.electricalConnectionInstanceW ().end ()); + b != n; ++b) { - ::xercesc::DOMAttr& a ( - ::xsd::cxx::xml::dom::create_attribute ( - "postsynapticPopulation", + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "electricalConnectionInstanceW", + "http://www.neuroml.org/schema/neuroml2", e)); - a << i.postsynapticPopulation (); + s << *b; } } @@ -55832,10 +58982,27 @@ namespace neuroml2 e << static_cast< const ::neuroml2::ElectricalConnection& > (i); } + void + operator<< (::xercesc::DOMElement& e, const ElectricalConnectionInstanceW& i) + { + e << static_cast< const ::neuroml2::ElectricalConnectionInstance& > (i); + + // weight + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "weight", + e)); + + a << i.weight (); + } + } + void operator<< (::xercesc::DOMElement& e, const ContinuousProjection& i) { - e << static_cast< const ::neuroml2::Base& > (i); + e << static_cast< const ::neuroml2::BaseProjection& > (i); // continuousConnection // @@ -55867,26 +59034,19 @@ namespace neuroml2 s << *b; } - // presynapticPopulation - // - { - ::xercesc::DOMAttr& a ( - ::xsd::cxx::xml::dom::create_attribute ( - "presynapticPopulation", - e)); - - a << i.presynapticPopulation (); - } - - // postsynapticPopulation + // continuousConnectionInstanceW // + for (ContinuousProjection::continuousConnectionInstanceW_const_iterator + b (i.continuousConnectionInstanceW ().begin ()), n (i.continuousConnectionInstanceW ().end ()); + b != n; ++b) { - ::xercesc::DOMAttr& a ( - ::xsd::cxx::xml::dom::create_attribute ( - "postsynapticPopulation", + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "continuousConnectionInstanceW", + "http://www.neuroml.org/schema/neuroml2", e)); - a << i.postsynapticPopulation (); + s << *b; } } @@ -55924,6 +59084,23 @@ namespace neuroml2 e << static_cast< const ::neuroml2::ContinuousConnection& > (i); } + void + operator<< (::xercesc::DOMElement& e, const ContinuousConnectionInstanceW& i) + { + e << static_cast< const ::neuroml2::ContinuousConnectionInstance& > (i); + + // weight + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "weight", + e)); + + a << i.weight (); + } + } + void operator<< (::xercesc::DOMElement& e, const ExplicitInput& i) { @@ -55984,6 +59161,21 @@ namespace neuroml2 s << *b; } + // inputW + // + for (InputList::inputW_const_iterator + b (i.inputW ().begin ()), n (i.inputW ().end ()); + b != n; ++b) + { + ::xercesc::DOMElement& s ( + ::xsd::cxx::xml::dom::create_element ( + "inputW", + "http://www.neuroml.org/schema/neuroml2", + e)); + + s << *b; + } + // population // { @@ -56070,6 +59262,23 @@ namespace neuroml2 } } + void + operator<< (::xercesc::DOMElement& e, const InputW& i) + { + e << static_cast< const ::neuroml2::Input& > (i); + + // weight + // + { + ::xercesc::DOMAttr& a ( + ::xsd::cxx::xml::dom::create_attribute ( + "weight", + e)); + + a << i.weight (); + } + } + void operator<< (::xercesc::DOMElement& e, const basePyNNCell& i) { @@ -56083,7 +59292,7 @@ namespace neuroml2 "cm", e)); - a << ::xml_schema::as_double(i.cm ()); + a << i.cm (); } // i_offset @@ -56094,7 +59303,7 @@ namespace neuroml2 "i_offset", e)); - a << ::xml_schema::as_double(i.i_offset ()); + a << i.i_offset (); } // tau_syn_E @@ -56105,7 +59314,7 @@ namespace neuroml2 "tau_syn_E", e)); - a << ::xml_schema::as_double(i.tau_syn_E ()); + a << i.tau_syn_E (); } // tau_syn_I @@ -56116,7 +59325,7 @@ namespace neuroml2 "tau_syn_I", e)); - a << ::xml_schema::as_double(i.tau_syn_I ()); + a << i.tau_syn_I (); } // v_init @@ -56127,7 +59336,7 @@ namespace neuroml2 "v_init", e)); - a << ::xml_schema::as_double(i.v_init ()); + a << i.v_init (); } } @@ -56144,7 +59353,7 @@ namespace neuroml2 "tau_m", e)); - a << ::xml_schema::as_double(i.tau_m ()); + a << i.tau_m (); } // tau_refrac @@ -56155,7 +59364,7 @@ namespace neuroml2 "tau_refrac", e)); - a << ::xml_schema::as_double(i.tau_refrac ()); + a << i.tau_refrac (); } // v_reset @@ -56166,7 +59375,7 @@ namespace neuroml2 "v_reset", e)); - a << ::xml_schema::as_double(i.v_reset ()); + a << i.v_reset (); } // v_rest @@ -56177,7 +59386,7 @@ namespace neuroml2 "v_rest", e)); - a << ::xml_schema::as_double(i.v_rest ()); + a << i.v_rest (); } // v_thresh @@ -56188,7 +59397,7 @@ namespace neuroml2 "v_thresh", e)); - a << ::xml_schema::as_double(i.v_thresh ()); + a << i.v_thresh (); } } @@ -56205,7 +59414,7 @@ namespace neuroml2 "e_rev_E", e)); - a << ::xml_schema::as_double(i.e_rev_E ()); + a << i.e_rev_E (); } // e_rev_I @@ -56216,7 +59425,7 @@ namespace neuroml2 "e_rev_I", e)); - a << ::xml_schema::as_double(i.e_rev_I ()); + a << i.e_rev_I (); } } @@ -56257,7 +59466,7 @@ namespace neuroml2 "a", e)); - a << ::xml_schema::as_double(i.a ()); + a << i.a (); } // b @@ -56268,7 +59477,7 @@ namespace neuroml2 "b", e)); - a << ::xml_schema::as_double(i.b ()); + a << i.b (); } // delta_T @@ -56279,7 +59488,7 @@ namespace neuroml2 "delta_T", e)); - a << ::xml_schema::as_double(i.delta_T ()); + a << i.delta_T (); } // tau_w @@ -56290,7 +59499,7 @@ namespace neuroml2 "tau_w", e)); - a << ::xml_schema::as_double(i.tau_w ()); + a << i.tau_w (); } // v_spike @@ -56301,69 +59510,14 @@ namespace neuroml2 "v_spike", e)); - a << ::xml_schema::as_double(i.v_spike ()); + a << i.v_spike (); } } void operator<< (::xercesc::DOMElement& e, const EIF_cond_alpha_isfa_ista& i) { - e << static_cast< const ::neuroml2::basePyNNIaFCondCell& > (i); - - // a - // - { - ::xercesc::DOMAttr& a ( - ::xsd::cxx::xml::dom::create_attribute ( - "a", - e)); - - a << ::xml_schema::as_double(i.a ()); - } - - // b - // - { - ::xercesc::DOMAttr& a ( - ::xsd::cxx::xml::dom::create_attribute ( - "b", - e)); - - a << ::xml_schema::as_double(i.b ()); - } - - // delta_T - // - { - ::xercesc::DOMAttr& a ( - ::xsd::cxx::xml::dom::create_attribute ( - "delta_T", - e)); - - a << ::xml_schema::as_double(i.delta_T ()); - } - - // tau_w - // - { - ::xercesc::DOMAttr& a ( - ::xsd::cxx::xml::dom::create_attribute ( - "tau_w", - e)); - - a << ::xml_schema::as_double(i.tau_w ()); - } - - // v_spike - // - { - ::xercesc::DOMAttr& a ( - ::xsd::cxx::xml::dom::create_attribute ( - "v_spike", - e)); - - a << ::xml_schema::as_double(i.v_spike ()); - } + e << static_cast< const ::neuroml2::EIF_cond_exp_isfa_ista& > (i); } void @@ -56379,7 +59533,7 @@ namespace neuroml2 "v_offset", e)); - a << ::xml_schema::as_double(i.v_offset ()); + a << i.v_offset (); } // e_rev_E @@ -56390,7 +59544,7 @@ namespace neuroml2 "e_rev_E", e)); - a << ::xml_schema::as_double(i.e_rev_E ()); + a << i.e_rev_E (); } // e_rev_I @@ -56401,7 +59555,7 @@ namespace neuroml2 "e_rev_I", e)); - a << ::xml_schema::as_double(i.e_rev_I ()); + a << i.e_rev_I (); } // e_rev_K @@ -56412,7 +59566,7 @@ namespace neuroml2 "e_rev_K", e)); - a << ::xml_schema::as_double(i.e_rev_K ()); + a << i.e_rev_K (); } // e_rev_Na @@ -56423,7 +59577,7 @@ namespace neuroml2 "e_rev_Na", e)); - a << ::xml_schema::as_double(i.e_rev_Na ()); + a << i.e_rev_Na (); } // e_rev_leak @@ -56434,7 +59588,7 @@ namespace neuroml2 "e_rev_leak", e)); - a << ::xml_schema::as_double(i.e_rev_leak ()); + a << i.e_rev_leak (); } // g_leak @@ -56445,7 +59599,7 @@ namespace neuroml2 "g_leak", e)); - a << ::xml_schema::as_double(i.g_leak ()); + a << i.g_leak (); } // gbar_K @@ -56456,7 +59610,7 @@ namespace neuroml2 "gbar_K", e)); - a << ::xml_schema::as_double(i.gbar_K ()); + a << i.gbar_K (); } // gbar_Na @@ -56467,7 +59621,7 @@ namespace neuroml2 "gbar_Na", e)); - a << ::xml_schema::as_double(i.gbar_Na ()); + a << i.gbar_Na (); } } @@ -56484,7 +59638,7 @@ namespace neuroml2 "tau_syn", e)); - a << ::xml_schema::as_double(i.tau_syn ()); + a << i.tau_syn (); } } @@ -56501,7 +59655,7 @@ namespace neuroml2 "e_rev", e)); - a << ::xml_schema::as_double(i.e_rev ()); + a << i.e_rev (); } } @@ -56518,7 +59672,7 @@ namespace neuroml2 "e_rev", e)); - a << ::xml_schema::as_double(i.e_rev ()); + a << i.e_rev (); } } diff --git a/src/schema/NeuroML_v2beta4.hxx b/src/schema/NeuroML_v2.1.hxx similarity index 93% rename from src/schema/NeuroML_v2beta4.hxx rename to src/schema/NeuroML_v2.1.hxx index 2b6cd73..1dd92bc 100644 --- a/src/schema/NeuroML_v2beta4.hxx +++ b/src/schema/NeuroML_v2.1.hxx @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2014 Code Synthesis Tools CC +// Copyright (c) 2005-2017 Code Synthesis Tools CC // // This program was generated by CodeSynthesis XSD, an XML Schema to // C++ data binding compiler. @@ -33,11 +33,11 @@ /** * @file - * @brief Generated from NeuroML_v2beta4.xsd. + * @brief Generated from NeuroML_v2.1.xsd. */ -#ifndef NEUROML_API_SCHEMA_NEURO_ML_V2BETA4_HXX -#define NEUROML_API_SCHEMA_NEURO_ML_V2BETA4_HXX +#ifndef NEUROML_API_SCHEMA_NEURO_ML_V2_1_HXX +#define NEUROML_API_SCHEMA_NEURO_ML_V2_1_HXX #ifndef XSD_CXX11 #define XSD_CXX11 @@ -59,7 +59,7 @@ #include -#if (XSD_INT_VERSION != 4000000L) +#if (XSD_INT_VERSION != 4009911L) #error XSD runtime version mismatch #endif @@ -645,18 +645,25 @@ namespace neuroml2 class NonNegativeInteger; class PositiveInteger; class DoubleGreaterThanZero; + class ZeroOrOne; class Notes; class Property; class Annotation; class ComponentType; class Constant; + class Exposure; class NamedDimensionalType; + class NamedDimensionalVariable; class Parameter; + class LEMS_Property; class Requirement; + class InstanceRequirement; class Dynamics; class DerivedVariable; + class StateVariable; class ConditionalDerivedVariable; class Case; + class TimeDerivative; class ZeroToOne; class BaseWithoutId; class Base; @@ -668,6 +675,7 @@ namespace neuroml2 class IonChannelKS; class IonChannel; class IonChannelHH; + class IonChannelVShift; class channelTypes; class Q10ConductanceScaling; class gateTypes; @@ -706,6 +714,7 @@ namespace neuroml2 class ExpOneSynapse; class ExpTwoSynapse; class ExpThreeSynapse; + class DoubleSynapse; class BlockingPlasticSynapse; class BlockTypes; class BlockMechanism; @@ -756,6 +765,7 @@ namespace neuroml2 class ChannelDensityNonUniformNernst; class ChannelDensityNonUniformGHK; class ChannelDensity; + class ChannelDensityVShift; class ChannelDensityNernst; class ChannelDensityNernstCa2; class ChannelDensityGHK; @@ -778,12 +788,14 @@ namespace neuroml2 class CompoundInput; class CompoundInputDL; class VoltageClamp; + class VoltageClampTriple; class Spike; class SpikeArray; class TimedSynapticInput; class SpikeGenerator; class SpikeGeneratorRandom; class SpikeGeneratorPoisson; + class SpikeGeneratorRefPoisson; class PoissonFiringSynapse; class TransientPoissonFiringSynapse; class Network; @@ -802,6 +814,7 @@ namespace neuroml2 class Location; class CellSet; class SynapticConnection; + class BaseProjection; class Projection; class BaseConnection; class BaseConnectionOldFormat; @@ -812,12 +825,15 @@ namespace neuroml2 class ElectricalProjection; class ElectricalConnection; class ElectricalConnectionInstance; + class ElectricalConnectionInstanceW; class ContinuousProjection; class ContinuousConnection; class ContinuousConnectionInstance; + class ContinuousConnectionInstanceW; class ExplicitInput; class InputList; class Input; + class InputW; class basePyNNCell; class basePyNNIaFCell; class basePyNNIaFCondCell; @@ -3511,6 +3527,89 @@ namespace neuroml2 ~DoubleGreaterThanZero (); }; + /** + * @brief Enumeration class corresponding to the %ZeroOrOne + * schema type. + * + * Value which is either 0 or 1 + */ + class ZeroOrOne: public ::xsd::cxx::tree::fundamental_base< ::xml_schema::double_, char, ::xml_schema::simple_type, ::xsd::cxx::tree::schema_type::double_ > + { + public: + /** + * @brief Create an instance from a fundamental type value. + * + * @param v A fundamental type value. + */ + ZeroOrOne (::xml_schema::double_ v); + + /** + * @brief Create an instance from a DOM element. + * + * @param e A DOM element to extract the data from. + * @param f Flags to create the new instance with. + * @param c A pointer to the object that will contain the new + * instance. + */ + ZeroOrOne (const ::xercesc::DOMElement& e, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Create an instance from a DOM attribute. + * + * @param a A DOM attribute to extract the data from. + * @param f Flags to create the new instance with. + * @param c A pointer to the object that will contain the new + * instance. + */ + ZeroOrOne (const ::xercesc::DOMAttr& a, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Create an instance from a string fragment. + * + * @param s A string fragment to extract the data from. + * @param e A pointer to DOM element containing the string fragment. + * @param f Flags to create the new instance with. + * @param c A pointer to the object that will contain the new + * instance. + */ + ZeroOrOne (const ::std::string& s, + const ::xercesc::DOMElement* e, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy constructor. + * + * @param x An instance to make a copy of. + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * + * For polymorphic object models use the @c _clone function instead. + */ + ZeroOrOne (const ZeroOrOne& x, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy the instance polymorphically. + * + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * @return A pointer to the dynamically allocated copy. + * + * This function ensures that the dynamic type of the instance is + * used for copying and should be used for polymorphic object + * models instead of the copy constructor. + */ + virtual ZeroOrOne* + _clone (::xml_schema::flags f = 0, + ::xml_schema::container* c = 0) const; + }; + /** * @brief Class corresponding to the %Notes schema type. * @@ -3951,9 +4050,9 @@ namespace neuroml2 { public: /** - * @name Parameter + * @name Property * - * @brief Accessor and modifier functions for the %Parameter + * @brief Accessor and modifier functions for the %Property * sequence element. */ //@{ @@ -3961,27 +4060,27 @@ namespace neuroml2 /** * @brief Element type. */ - typedef ::neuroml2::Parameter Parameter_type; + typedef ::neuroml2::LEMS_Property Property_type; /** * @brief Element sequence container type. */ - typedef ::xsd::cxx::tree::sequence< Parameter_type > Parameter_sequence; + typedef ::xsd::cxx::tree::sequence< Property_type > Property_sequence; /** * @brief Element iterator type. */ - typedef Parameter_sequence::iterator Parameter_iterator; + typedef Property_sequence::iterator Property_iterator; /** * @brief Element constant iterator type. */ - typedef Parameter_sequence::const_iterator Parameter_const_iterator; + typedef Property_sequence::const_iterator Property_const_iterator; /** * @brief Element traits type. */ - typedef ::xsd::cxx::tree::traits< Parameter_type, char > Parameter_traits; + typedef ::xsd::cxx::tree::traits< Property_type, char > Property_traits; /** * @brief Return a read-only (constant) reference to the element @@ -3989,16 +4088,16 @@ namespace neuroml2 * * @return A constant reference to the sequence container. */ - const Parameter_sequence& - Parameter () const; + const Property_sequence& + Property () const; /** * @brief Return a read-write reference to the element sequence. * * @return A reference to the sequence container. */ - Parameter_sequence& - Parameter (); + Property_sequence& + Property (); /** * @brief Copy elements from a given sequence. @@ -4010,14 +4109,14 @@ namespace neuroml2 * sequence and all old elements will be lost. */ void - Parameter (const Parameter_sequence& s); + Property (const Property_sequence& s); //@} /** - * @name Constant + * @name Parameter * - * @brief Accessor and modifier functions for the %Constant + * @brief Accessor and modifier functions for the %Parameter * sequence element. */ //@{ @@ -4025,27 +4124,27 @@ namespace neuroml2 /** * @brief Element type. */ - typedef ::neuroml2::Constant Constant_type; + typedef ::neuroml2::Parameter Parameter_type; /** * @brief Element sequence container type. */ - typedef ::xsd::cxx::tree::sequence< Constant_type > Constant_sequence; + typedef ::xsd::cxx::tree::sequence< Parameter_type > Parameter_sequence; /** * @brief Element iterator type. */ - typedef Constant_sequence::iterator Constant_iterator; + typedef Parameter_sequence::iterator Parameter_iterator; /** * @brief Element constant iterator type. */ - typedef Constant_sequence::const_iterator Constant_const_iterator; + typedef Parameter_sequence::const_iterator Parameter_const_iterator; /** * @brief Element traits type. */ - typedef ::xsd::cxx::tree::traits< Constant_type, char > Constant_traits; + typedef ::xsd::cxx::tree::traits< Parameter_type, char > Parameter_traits; /** * @brief Return a read-only (constant) reference to the element @@ -4053,16 +4152,16 @@ namespace neuroml2 * * @return A constant reference to the sequence container. */ - const Constant_sequence& - Constant () const; + const Parameter_sequence& + Parameter () const; /** * @brief Return a read-write reference to the element sequence. * * @return A reference to the sequence container. */ - Constant_sequence& - Constant (); + Parameter_sequence& + Parameter (); /** * @brief Copy elements from a given sequence. @@ -4074,14 +4173,14 @@ namespace neuroml2 * sequence and all old elements will be lost. */ void - Constant (const Constant_sequence& s); + Parameter (const Parameter_sequence& s); //@} /** - * @name Requirement + * @name Constant * - * @brief Accessor and modifier functions for the %Requirement + * @brief Accessor and modifier functions for the %Constant * sequence element. */ //@{ @@ -4089,27 +4188,27 @@ namespace neuroml2 /** * @brief Element type. */ - typedef ::neuroml2::Requirement Requirement_type; + typedef ::neuroml2::Constant Constant_type; /** * @brief Element sequence container type. */ - typedef ::xsd::cxx::tree::sequence< Requirement_type > Requirement_sequence; + typedef ::xsd::cxx::tree::sequence< Constant_type > Constant_sequence; /** * @brief Element iterator type. */ - typedef Requirement_sequence::iterator Requirement_iterator; + typedef Constant_sequence::iterator Constant_iterator; /** * @brief Element constant iterator type. */ - typedef Requirement_sequence::const_iterator Requirement_const_iterator; + typedef Constant_sequence::const_iterator Constant_const_iterator; /** * @brief Element traits type. */ - typedef ::xsd::cxx::tree::traits< Requirement_type, char > Requirement_traits; + typedef ::xsd::cxx::tree::traits< Constant_type, char > Constant_traits; /** * @brief Return a read-only (constant) reference to the element @@ -4117,16 +4216,16 @@ namespace neuroml2 * * @return A constant reference to the sequence container. */ - const Requirement_sequence& - Requirement () const; + const Constant_sequence& + Constant () const; /** * @brief Return a read-write reference to the element sequence. * * @return A reference to the sequence container. */ - Requirement_sequence& - Requirement (); + Constant_sequence& + Constant (); /** * @brief Copy elements from a given sequence. @@ -4138,14 +4237,14 @@ namespace neuroml2 * sequence and all old elements will be lost. */ void - Requirement (const Requirement_sequence& s); + Constant (const Constant_sequence& s); //@} /** - * @name Dynamics + * @name Exposure * - * @brief Accessor and modifier functions for the %Dynamics + * @brief Accessor and modifier functions for the %Exposure * sequence element. */ //@{ @@ -4153,27 +4252,27 @@ namespace neuroml2 /** * @brief Element type. */ - typedef ::neuroml2::Dynamics Dynamics_type; + typedef ::neuroml2::Exposure Exposure_type; /** * @brief Element sequence container type. */ - typedef ::xsd::cxx::tree::sequence< Dynamics_type > Dynamics_sequence; + typedef ::xsd::cxx::tree::sequence< Exposure_type > Exposure_sequence; /** * @brief Element iterator type. */ - typedef Dynamics_sequence::iterator Dynamics_iterator; + typedef Exposure_sequence::iterator Exposure_iterator; /** * @brief Element constant iterator type. */ - typedef Dynamics_sequence::const_iterator Dynamics_const_iterator; + typedef Exposure_sequence::const_iterator Exposure_const_iterator; /** * @brief Element traits type. */ - typedef ::xsd::cxx::tree::traits< Dynamics_type, char > Dynamics_traits; + typedef ::xsd::cxx::tree::traits< Exposure_type, char > Exposure_traits; /** * @brief Return a read-only (constant) reference to the element @@ -4181,16 +4280,16 @@ namespace neuroml2 * * @return A constant reference to the sequence container. */ - const Dynamics_sequence& - Dynamics () const; + const Exposure_sequence& + Exposure () const; /** * @brief Return a read-write reference to the element sequence. * * @return A reference to the sequence container. */ - Dynamics_sequence& - Dynamics (); + Exposure_sequence& + Exposure (); /** * @brief Copy elements from a given sequence. @@ -4202,329 +4301,202 @@ namespace neuroml2 * sequence and all old elements will be lost. */ void - Dynamics (const Dynamics_sequence& s); + Exposure (const Exposure_sequence& s); //@} /** - * @name name + * @name Requirement * - * @brief Accessor and modifier functions for the %name - * required attribute. + * @brief Accessor and modifier functions for the %Requirement + * sequence element. */ //@{ /** - * @brief Attribute type. + * @brief Element type. */ - typedef ::xml_schema::string name_type; + typedef ::neuroml2::Requirement Requirement_type; /** - * @brief Attribute traits type. + * @brief Element sequence container type. */ - typedef ::xsd::cxx::tree::traits< name_type, char > name_traits; + typedef ::xsd::cxx::tree::sequence< Requirement_type > Requirement_sequence; /** - * @brief Return a read-only (constant) reference to the attribute. - * - * @return A constant reference to the attribute. + * @brief Element iterator type. */ - const name_type& - name () const; + typedef Requirement_sequence::iterator Requirement_iterator; /** - * @brief Return a read-write reference to the attribute. - * - * @return A reference to the attribute. + * @brief Element constant iterator type. */ - name_type& - name (); + typedef Requirement_sequence::const_iterator Requirement_const_iterator; /** - * @brief Set the attribute value. + * @brief Element traits type. + */ + typedef ::xsd::cxx::tree::traits< Requirement_type, char > Requirement_traits; + + /** + * @brief Return a read-only (constant) reference to the element + * sequence. * - * @param x A new value to set. + * @return A constant reference to the sequence container. + */ + const Requirement_sequence& + Requirement () const; + + /** + * @brief Return a read-write reference to the element sequence. * - * This function makes a copy of its argument and sets it as - * the new value of the attribute. + * @return A reference to the sequence container. */ - void - name (const name_type& x); + Requirement_sequence& + Requirement (); /** - * @brief Set the attribute value without copying. + * @brief Copy elements from a given sequence. * - * @param p A new value to use. + * @param s A sequence to copy elements from. * - * This function will try to use the passed value directly - * instead of making a copy. + * For each element in @a s this function makes a copy and adds it + * to the sequence. Note that this operation completely changes the + * sequence and all old elements will be lost. */ void - name (::std::unique_ptr< name_type > p); + Requirement (const Requirement_sequence& s); //@} /** - * @name extends + * @name InstanceRequirement * - * @brief Accessor and modifier functions for the %extends - * optional attribute. + * @brief Accessor and modifier functions for the %InstanceRequirement + * sequence element. */ //@{ /** - * @brief Attribute type. + * @brief Element type. */ - typedef ::xml_schema::string extends_type; + typedef ::neuroml2::InstanceRequirement InstanceRequirement_type; /** - * @brief Attribute optional container type. + * @brief Element sequence container type. */ - typedef ::xsd::cxx::tree::optional< extends_type > extends_optional; + typedef ::xsd::cxx::tree::sequence< InstanceRequirement_type > InstanceRequirement_sequence; /** - * @brief Attribute traits type. + * @brief Element iterator type. */ - typedef ::xsd::cxx::tree::traits< extends_type, char > extends_traits; + typedef InstanceRequirement_sequence::iterator InstanceRequirement_iterator; /** - * @brief Return a read-only (constant) reference to the attribute - * container. - * - * @return A constant reference to the optional container. + * @brief Element constant iterator type. */ - const extends_optional& - extends () const; + typedef InstanceRequirement_sequence::const_iterator InstanceRequirement_const_iterator; /** - * @brief Return a read-write reference to the attribute container. - * - * @return A reference to the optional container. + * @brief Element traits type. */ - extends_optional& - extends (); + typedef ::xsd::cxx::tree::traits< InstanceRequirement_type, char > InstanceRequirement_traits; /** - * @brief Set the attribute value. - * - * @param x A new value to set. + * @brief Return a read-only (constant) reference to the element + * sequence. * - * This function makes a copy of its argument and sets it as - * the new value of the attribute. + * @return A constant reference to the sequence container. */ - void - extends (const extends_type& x); + const InstanceRequirement_sequence& + InstanceRequirement () const; /** - * @brief Set the attribute value. - * - * @param x An optional container with the new value to set. + * @brief Return a read-write reference to the element sequence. * - * If the value is present in @a x then this function makes a copy - * of this value and sets it as the new value of the attribute. - * Otherwise the attribute container is set the 'not present' state. + * @return A reference to the sequence container. */ - void - extends (const extends_optional& x); + InstanceRequirement_sequence& + InstanceRequirement (); /** - * @brief Set the attribute value without copying. + * @brief Copy elements from a given sequence. * - * @param p A new value to use. + * @param s A sequence to copy elements from. * - * This function will try to use the passed value directly instead - * of making a copy. + * For each element in @a s this function makes a copy and adds it + * to the sequence. Note that this operation completely changes the + * sequence and all old elements will be lost. */ void - extends (::std::unique_ptr< extends_type > p); + InstanceRequirement (const InstanceRequirement_sequence& s); //@} /** - * @name description + * @name Dynamics * - * @brief Accessor and modifier functions for the %description - * optional attribute. + * @brief Accessor and modifier functions for the %Dynamics + * sequence element. */ //@{ /** - * @brief Attribute type. + * @brief Element type. */ - typedef ::xml_schema::string description_type; + typedef ::neuroml2::Dynamics Dynamics_type; /** - * @brief Attribute optional container type. + * @brief Element sequence container type. */ - typedef ::xsd::cxx::tree::optional< description_type > description_optional; + typedef ::xsd::cxx::tree::sequence< Dynamics_type > Dynamics_sequence; /** - * @brief Attribute traits type. + * @brief Element iterator type. */ - typedef ::xsd::cxx::tree::traits< description_type, char > description_traits; + typedef Dynamics_sequence::iterator Dynamics_iterator; /** - * @brief Return a read-only (constant) reference to the attribute - * container. - * - * @return A constant reference to the optional container. + * @brief Element constant iterator type. */ - const description_optional& - description () const; + typedef Dynamics_sequence::const_iterator Dynamics_const_iterator; /** - * @brief Return a read-write reference to the attribute container. - * - * @return A reference to the optional container. + * @brief Element traits type. */ - description_optional& - description (); + typedef ::xsd::cxx::tree::traits< Dynamics_type, char > Dynamics_traits; /** - * @brief Set the attribute value. - * - * @param x A new value to set. + * @brief Return a read-only (constant) reference to the element + * sequence. * - * This function makes a copy of its argument and sets it as - * the new value of the attribute. + * @return A constant reference to the sequence container. */ - void - description (const description_type& x); + const Dynamics_sequence& + Dynamics () const; /** - * @brief Set the attribute value. - * - * @param x An optional container with the new value to set. + * @brief Return a read-write reference to the element sequence. * - * If the value is present in @a x then this function makes a copy - * of this value and sets it as the new value of the attribute. - * Otherwise the attribute container is set the 'not present' state. + * @return A reference to the sequence container. */ - void - description (const description_optional& x); + Dynamics_sequence& + Dynamics (); /** - * @brief Set the attribute value without copying. + * @brief Copy elements from a given sequence. * - * @param p A new value to use. + * @param s A sequence to copy elements from. * - * This function will try to use the passed value directly instead - * of making a copy. + * For each element in @a s this function makes a copy and adds it + * to the sequence. Note that this operation completely changes the + * sequence and all old elements will be lost. */ void - description (::std::unique_ptr< description_type > p); - - //@} - - /** - * @name Constructors - */ - //@{ - - /** - * @brief Create an instance from the ultimate base and - * initializers for required elements and attributes. - */ - ComponentType (const name_type&); - - /** - * @brief Create an instance from a DOM element. - * - * @param e A DOM element to extract the data from. - * @param f Flags to create the new instance with. - * @param c A pointer to the object that will contain the new - * instance. - */ - ComponentType (const ::xercesc::DOMElement& e, - ::xml_schema::flags f = 0, - ::xml_schema::container* c = 0); - - /** - * @brief Copy constructor. - * - * @param x An instance to make a copy of. - * @param f Flags to create the copy with. - * @param c A pointer to the object that will contain the copy. - * - * For polymorphic object models use the @c _clone function instead. - */ - ComponentType (const ComponentType& x, - ::xml_schema::flags f = 0, - ::xml_schema::container* c = 0); - - /** - * @brief Copy the instance polymorphically. - * - * @param f Flags to create the copy with. - * @param c A pointer to the object that will contain the copy. - * @return A pointer to the dynamically allocated copy. - * - * This function ensures that the dynamic type of the instance is - * used for copying and should be used for polymorphic object - * models instead of the copy constructor. - */ - virtual ComponentType* - _clone (::xml_schema::flags f = 0, - ::xml_schema::container* c = 0) const; - - /** - * @brief Copy assignment operator. - * - * @param x An instance to make a copy of. - * @return A reference to itself. - * - * For polymorphic object models use the @c _clone function instead. - */ - ComponentType& - operator= (const ComponentType& x); + Dynamics (const Dynamics_sequence& s); //@} - /** - * @brief Destructor. - */ - virtual - ~ComponentType (); - - // Implementation. - // - - //@cond - - protected: - void - parse (::xsd::cxx::xml::dom::parser< char >&, - ::xml_schema::flags); - - protected: - Parameter_sequence Parameter_; - Constant_sequence Constant_; - Requirement_sequence Requirement_; - Dynamics_sequence Dynamics_; - ::xsd::cxx::tree::one< name_type > name_; - extends_optional extends_; - description_optional description_; - - //@endcond - }; - - bool - operator== (const ComponentType&, const ComponentType&); - - bool - operator!= (const ComponentType&, const ComponentType&); - - - /** - * @brief Class corresponding to the %Constant schema type. - * - * LEMS ComponentType for Constant. - * - * @nosubgrouping - */ - class Constant: public ::xml_schema::type - { - public: /** * @name name * @@ -4584,38 +4556,44 @@ namespace neuroml2 //@} /** - * @name dimension + * @name extends * - * @brief Accessor and modifier functions for the %dimension - * required attribute. + * @brief Accessor and modifier functions for the %extends + * optional attribute. */ //@{ /** * @brief Attribute type. */ - typedef ::xml_schema::string dimension_type; + typedef ::xml_schema::string extends_type; + + /** + * @brief Attribute optional container type. + */ + typedef ::xsd::cxx::tree::optional< extends_type > extends_optional; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< dimension_type, char > dimension_traits; + typedef ::xsd::cxx::tree::traits< extends_type, char > extends_traits; /** - * @brief Return a read-only (constant) reference to the attribute. + * @brief Return a read-only (constant) reference to the attribute + * container. * - * @return A constant reference to the attribute. + * @return A constant reference to the optional container. */ - const dimension_type& - dimension () const; + const extends_optional& + extends () const; /** - * @brief Return a read-write reference to the attribute. + * @brief Return a read-write reference to the attribute container. * - * @return A reference to the attribute. + * @return A reference to the optional container. */ - dimension_type& - dimension (); + extends_optional& + extends (); /** * @brief Set the attribute value. @@ -4626,76 +4604,30 @@ namespace neuroml2 * the new value of the attribute. */ void - dimension (const dimension_type& x); - - /** - * @brief Set the attribute value without copying. - * - * @param p A new value to use. - * - * This function will try to use the passed value directly - * instead of making a copy. - */ - void - dimension (::std::unique_ptr< dimension_type > p); - - //@} - - /** - * @name value - * - * @brief Accessor and modifier functions for the %value - * required attribute. - */ - //@{ - - /** - * @brief Attribute type. - */ - typedef ::neuroml2::Nml2Quantity value_type; - - /** - * @brief Attribute traits type. - */ - typedef ::xsd::cxx::tree::traits< value_type, char > value_traits; - - /** - * @brief Return a read-only (constant) reference to the attribute. - * - * @return A constant reference to the attribute. - */ - const value_type& - value () const; - - /** - * @brief Return a read-write reference to the attribute. - * - * @return A reference to the attribute. - */ - value_type& - value (); + extends (const extends_type& x); /** * @brief Set the attribute value. * - * @param x A new value to set. + * @param x An optional container with the new value to set. * - * This function makes a copy of its argument and sets it as - * the new value of the attribute. + * If the value is present in @a x then this function makes a copy + * of this value and sets it as the new value of the attribute. + * Otherwise the attribute container is set the 'not present' state. */ void - value (const value_type& x); + extends (const extends_optional& x); /** * @brief Set the attribute value without copying. * * @param p A new value to use. * - * This function will try to use the passed value directly - * instead of making a copy. + * This function will try to use the passed value directly instead + * of making a copy. */ void - value (::std::unique_ptr< value_type > p); + extends (::std::unique_ptr< extends_type > p); //@} @@ -4784,9 +4716,7 @@ namespace neuroml2 * @brief Create an instance from the ultimate base and * initializers for required elements and attributes. */ - Constant (const name_type&, - const dimension_type&, - const value_type&); + ComponentType (const name_type&); /** * @brief Create an instance from a DOM element. @@ -4796,9 +4726,9 @@ namespace neuroml2 * @param c A pointer to the object that will contain the new * instance. */ - Constant (const ::xercesc::DOMElement& e, - ::xml_schema::flags f = 0, - ::xml_schema::container* c = 0); + ComponentType (const ::xercesc::DOMElement& e, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); /** * @brief Copy constructor. @@ -4809,9 +4739,9 @@ namespace neuroml2 * * For polymorphic object models use the @c _clone function instead. */ - Constant (const Constant& x, - ::xml_schema::flags f = 0, - ::xml_schema::container* c = 0); + ComponentType (const ComponentType& x, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); /** * @brief Copy the instance polymorphically. @@ -4824,7 +4754,7 @@ namespace neuroml2 * used for copying and should be used for polymorphic object * models instead of the copy constructor. */ - virtual Constant* + virtual ComponentType* _clone (::xml_schema::flags f = 0, ::xml_schema::container* c = 0) const; @@ -4836,8 +4766,8 @@ namespace neuroml2 * * For polymorphic object models use the @c _clone function instead. */ - Constant& - operator= (const Constant& x); + ComponentType& + operator= (const ComponentType& x); //@} @@ -4845,7 +4775,7 @@ namespace neuroml2 * @brief Destructor. */ virtual - ~Constant (); + ~ComponentType (); // Implementation. // @@ -4858,27 +4788,35 @@ namespace neuroml2 ::xml_schema::flags); protected: + Property_sequence Property_; + Parameter_sequence Parameter_; + Constant_sequence Constant_; + Exposure_sequence Exposure_; + Requirement_sequence Requirement_; + InstanceRequirement_sequence InstanceRequirement_; + Dynamics_sequence Dynamics_; ::xsd::cxx::tree::one< name_type > name_; - ::xsd::cxx::tree::one< dimension_type > dimension_; - ::xsd::cxx::tree::one< value_type > value_; + extends_optional extends_; description_optional description_; //@endcond }; bool - operator== (const Constant&, const Constant&); + operator== (const ComponentType&, const ComponentType&); bool - operator!= (const Constant&, const Constant&); + operator!= (const ComponentType&, const ComponentType&); /** - * @brief Class corresponding to the %NamedDimensionalType schema type. + * @brief Class corresponding to the %Constant schema type. + * + * LEMS ComponentType for Constant. * * @nosubgrouping */ - class NamedDimensionalType: public ::xml_schema::type + class Constant: public ::xml_schema::type { public: /** @@ -4943,7 +4881,7 @@ namespace neuroml2 * @name dimension * * @brief Accessor and modifier functions for the %dimension - * optional attribute with a default value. + * required attribute. */ //@{ @@ -4995,14 +4933,63 @@ namespace neuroml2 void dimension (::std::unique_ptr< dimension_type > p); + //@} + /** - * @brief Return the default value for the attribute. + * @name value * - * @return A read-only (constant) reference to the attribute's - * default value. + * @brief Accessor and modifier functions for the %value + * required attribute. + */ + //@{ + + /** + * @brief Attribute type. + */ + typedef ::neuroml2::Nml2Quantity value_type; + + /** + * @brief Attribute traits type. + */ + typedef ::xsd::cxx::tree::traits< value_type, char > value_traits; + + /** + * @brief Return a read-only (constant) reference to the attribute. + * + * @return A constant reference to the attribute. + */ + const value_type& + value () const; + + /** + * @brief Return a read-write reference to the attribute. + * + * @return A reference to the attribute. + */ + value_type& + value (); + + /** + * @brief Set the attribute value. + * + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. + */ + void + value (const value_type& x); + + /** + * @brief Set the attribute value without copying. + * + * @param p A new value to use. + * + * This function will try to use the passed value directly + * instead of making a copy. */ - static const dimension_type& - dimension_default_value (); + void + value (::std::unique_ptr< value_type > p); //@} @@ -5091,7 +5078,9 @@ namespace neuroml2 * @brief Create an instance from the ultimate base and * initializers for required elements and attributes. */ - NamedDimensionalType (const name_type&); + Constant (const name_type&, + const dimension_type&, + const value_type&); /** * @brief Create an instance from a DOM element. @@ -5101,9 +5090,9 @@ namespace neuroml2 * @param c A pointer to the object that will contain the new * instance. */ - NamedDimensionalType (const ::xercesc::DOMElement& e, - ::xml_schema::flags f = 0, - ::xml_schema::container* c = 0); + Constant (const ::xercesc::DOMElement& e, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); /** * @brief Copy constructor. @@ -5114,9 +5103,9 @@ namespace neuroml2 * * For polymorphic object models use the @c _clone function instead. */ - NamedDimensionalType (const NamedDimensionalType& x, - ::xml_schema::flags f = 0, - ::xml_schema::container* c = 0); + Constant (const Constant& x, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); /** * @brief Copy the instance polymorphically. @@ -5129,7 +5118,7 @@ namespace neuroml2 * used for copying and should be used for polymorphic object * models instead of the copy constructor. */ - virtual NamedDimensionalType* + virtual Constant* _clone (::xml_schema::flags f = 0, ::xml_schema::container* c = 0) const; @@ -5141,8 +5130,8 @@ namespace neuroml2 * * For polymorphic object models use the @c _clone function instead. */ - NamedDimensionalType& - operator= (const NamedDimensionalType& x); + Constant& + operator= (const Constant& x); //@} @@ -5150,7 +5139,7 @@ namespace neuroml2 * @brief Destructor. */ virtual - ~NamedDimensionalType (); + ~Constant (); // Implementation. // @@ -5165,290 +5154,218 @@ namespace neuroml2 protected: ::xsd::cxx::tree::one< name_type > name_; ::xsd::cxx::tree::one< dimension_type > dimension_; - static const dimension_type dimension_default_value_; + ::xsd::cxx::tree::one< value_type > value_; description_optional description_; //@endcond }; bool - operator== (const NamedDimensionalType&, const NamedDimensionalType&); + operator== (const Constant&, const Constant&); bool - operator!= (const NamedDimensionalType&, const NamedDimensionalType&); + operator!= (const Constant&, const Constant&); /** - * @brief Class corresponding to the %Parameter schema type. + * @brief Class corresponding to the %Exposure schema type. + * + * LEMS Exposure (ComponentType property) * * @nosubgrouping */ - class Parameter: public ::neuroml2::NamedDimensionalType + class Exposure: public ::xml_schema::type { public: /** - * @name Constructors + * @name name + * + * @brief Accessor and modifier functions for the %name + * required attribute. */ //@{ /** - * @brief Create an instance from the ultimate base and - * initializers for required elements and attributes. - */ - Parameter (const name_type&); - - /** - * @brief Create an instance from a DOM element. - * - * @param e A DOM element to extract the data from. - * @param f Flags to create the new instance with. - * @param c A pointer to the object that will contain the new - * instance. + * @brief Attribute type. */ - Parameter (const ::xercesc::DOMElement& e, - ::xml_schema::flags f = 0, - ::xml_schema::container* c = 0); + typedef ::xml_schema::string name_type; /** - * @brief Copy constructor. - * - * @param x An instance to make a copy of. - * @param f Flags to create the copy with. - * @param c A pointer to the object that will contain the copy. - * - * For polymorphic object models use the @c _clone function instead. + * @brief Attribute traits type. */ - Parameter (const Parameter& x, - ::xml_schema::flags f = 0, - ::xml_schema::container* c = 0); + typedef ::xsd::cxx::tree::traits< name_type, char > name_traits; /** - * @brief Copy the instance polymorphically. - * - * @param f Flags to create the copy with. - * @param c A pointer to the object that will contain the copy. - * @return A pointer to the dynamically allocated copy. + * @brief Return a read-only (constant) reference to the attribute. * - * This function ensures that the dynamic type of the instance is - * used for copying and should be used for polymorphic object - * models instead of the copy constructor. - */ - virtual Parameter* - _clone (::xml_schema::flags f = 0, - ::xml_schema::container* c = 0) const; - - //@} - - /** - * @brief Destructor. - */ - virtual - ~Parameter (); - }; - - /** - * @brief Class corresponding to the %Requirement schema type. - * - * @nosubgrouping - */ - class Requirement: public ::neuroml2::NamedDimensionalType - { - public: - /** - * @name Constructors - */ - //@{ - - /** - * @brief Create an instance from the ultimate base and - * initializers for required elements and attributes. + * @return A constant reference to the attribute. */ - Requirement (const name_type&); + const name_type& + name () const; /** - * @brief Create an instance from a DOM element. + * @brief Return a read-write reference to the attribute. * - * @param e A DOM element to extract the data from. - * @param f Flags to create the new instance with. - * @param c A pointer to the object that will contain the new - * instance. + * @return A reference to the attribute. */ - Requirement (const ::xercesc::DOMElement& e, - ::xml_schema::flags f = 0, - ::xml_schema::container* c = 0); + name_type& + name (); /** - * @brief Copy constructor. + * @brief Set the attribute value. * - * @param x An instance to make a copy of. - * @param f Flags to create the copy with. - * @param c A pointer to the object that will contain the copy. + * @param x A new value to set. * - * For polymorphic object models use the @c _clone function instead. + * This function makes a copy of its argument and sets it as + * the new value of the attribute. */ - Requirement (const Requirement& x, - ::xml_schema::flags f = 0, - ::xml_schema::container* c = 0); + void + name (const name_type& x); /** - * @brief Copy the instance polymorphically. + * @brief Set the attribute value without copying. * - * @param f Flags to create the copy with. - * @param c A pointer to the object that will contain the copy. - * @return A pointer to the dynamically allocated copy. + * @param p A new value to use. * - * This function ensures that the dynamic type of the instance is - * used for copying and should be used for polymorphic object - * models instead of the copy constructor. + * This function will try to use the passed value directly + * instead of making a copy. */ - virtual Requirement* - _clone (::xml_schema::flags f = 0, - ::xml_schema::container* c = 0) const; + void + name (::std::unique_ptr< name_type > p); //@} /** - * @brief Destructor. - */ - virtual - ~Requirement (); - }; - - /** - * @brief Class corresponding to the %Dynamics schema type. - * - * LEMS ComponentType for Dynamics - * - * @nosubgrouping - */ - class Dynamics: public ::xml_schema::type - { - public: - /** - * @name DerivedVariable + * @name dimension * - * @brief Accessor and modifier functions for the %DerivedVariable - * sequence element. + * @brief Accessor and modifier functions for the %dimension + * required attribute. */ //@{ /** - * @brief Element type. - */ - typedef ::neuroml2::DerivedVariable DerivedVariable_type; - - /** - * @brief Element sequence container type. - */ - typedef ::xsd::cxx::tree::sequence< DerivedVariable_type > DerivedVariable_sequence; - - /** - * @brief Element iterator type. + * @brief Attribute type. */ - typedef DerivedVariable_sequence::iterator DerivedVariable_iterator; + typedef ::xml_schema::string dimension_type; /** - * @brief Element constant iterator type. + * @brief Attribute traits type. */ - typedef DerivedVariable_sequence::const_iterator DerivedVariable_const_iterator; + typedef ::xsd::cxx::tree::traits< dimension_type, char > dimension_traits; /** - * @brief Element traits type. + * @brief Return a read-only (constant) reference to the attribute. + * + * @return A constant reference to the attribute. */ - typedef ::xsd::cxx::tree::traits< DerivedVariable_type, char > DerivedVariable_traits; + const dimension_type& + dimension () const; /** - * @brief Return a read-only (constant) reference to the element - * sequence. + * @brief Return a read-write reference to the attribute. * - * @return A constant reference to the sequence container. + * @return A reference to the attribute. */ - const DerivedVariable_sequence& - DerivedVariable () const; + dimension_type& + dimension (); /** - * @brief Return a read-write reference to the element sequence. + * @brief Set the attribute value. * - * @return A reference to the sequence container. + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. */ - DerivedVariable_sequence& - DerivedVariable (); + void + dimension (const dimension_type& x); /** - * @brief Copy elements from a given sequence. + * @brief Set the attribute value without copying. * - * @param s A sequence to copy elements from. + * @param p A new value to use. * - * For each element in @a s this function makes a copy and adds it - * to the sequence. Note that this operation completely changes the - * sequence and all old elements will be lost. + * This function will try to use the passed value directly + * instead of making a copy. */ void - DerivedVariable (const DerivedVariable_sequence& s); + dimension (::std::unique_ptr< dimension_type > p); //@} /** - * @name ConditionalDerivedVariable + * @name description * - * @brief Accessor and modifier functions for the %ConditionalDerivedVariable - * sequence element. + * @brief Accessor and modifier functions for the %description + * optional attribute. */ //@{ /** - * @brief Element type. + * @brief Attribute type. */ - typedef ::neuroml2::ConditionalDerivedVariable ConditionalDerivedVariable_type; + typedef ::xml_schema::string description_type; /** - * @brief Element sequence container type. + * @brief Attribute optional container type. */ - typedef ::xsd::cxx::tree::sequence< ConditionalDerivedVariable_type > ConditionalDerivedVariable_sequence; + typedef ::xsd::cxx::tree::optional< description_type > description_optional; /** - * @brief Element iterator type. + * @brief Attribute traits type. */ - typedef ConditionalDerivedVariable_sequence::iterator ConditionalDerivedVariable_iterator; + typedef ::xsd::cxx::tree::traits< description_type, char > description_traits; /** - * @brief Element constant iterator type. + * @brief Return a read-only (constant) reference to the attribute + * container. + * + * @return A constant reference to the optional container. */ - typedef ConditionalDerivedVariable_sequence::const_iterator ConditionalDerivedVariable_const_iterator; + const description_optional& + description () const; /** - * @brief Element traits type. + * @brief Return a read-write reference to the attribute container. + * + * @return A reference to the optional container. */ - typedef ::xsd::cxx::tree::traits< ConditionalDerivedVariable_type, char > ConditionalDerivedVariable_traits; + description_optional& + description (); /** - * @brief Return a read-only (constant) reference to the element - * sequence. + * @brief Set the attribute value. * - * @return A constant reference to the sequence container. + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. */ - const ConditionalDerivedVariable_sequence& - ConditionalDerivedVariable () const; + void + description (const description_type& x); /** - * @brief Return a read-write reference to the element sequence. + * @brief Set the attribute value. * - * @return A reference to the sequence container. + * @param x An optional container with the new value to set. + * + * If the value is present in @a x then this function makes a copy + * of this value and sets it as the new value of the attribute. + * Otherwise the attribute container is set the 'not present' state. */ - ConditionalDerivedVariable_sequence& - ConditionalDerivedVariable (); + void + description (const description_optional& x); /** - * @brief Copy elements from a given sequence. + * @brief Set the attribute value without copying. * - * @param s A sequence to copy elements from. + * @param p A new value to use. * - * For each element in @a s this function makes a copy and adds it - * to the sequence. Note that this operation completely changes the - * sequence and all old elements will be lost. + * This function will try to use the passed value directly instead + * of making a copy. */ void - ConditionalDerivedVariable (const ConditionalDerivedVariable_sequence& s); + description (::std::unique_ptr< description_type > p); //@} @@ -5461,7 +5378,8 @@ namespace neuroml2 * @brief Create an instance from the ultimate base and * initializers for required elements and attributes. */ - Dynamics (); + Exposure (const name_type&, + const dimension_type&); /** * @brief Create an instance from a DOM element. @@ -5471,7 +5389,7 @@ namespace neuroml2 * @param c A pointer to the object that will contain the new * instance. */ - Dynamics (const ::xercesc::DOMElement& e, + Exposure (const ::xercesc::DOMElement& e, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); @@ -5484,7 +5402,7 @@ namespace neuroml2 * * For polymorphic object models use the @c _clone function instead. */ - Dynamics (const Dynamics& x, + Exposure (const Exposure& x, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); @@ -5499,7 +5417,7 @@ namespace neuroml2 * used for copying and should be used for polymorphic object * models instead of the copy constructor. */ - virtual Dynamics* + virtual Exposure* _clone (::xml_schema::flags f = 0, ::xml_schema::container* c = 0) const; @@ -5511,8 +5429,8 @@ namespace neuroml2 * * For polymorphic object models use the @c _clone function instead. */ - Dynamics& - operator= (const Dynamics& x); + Exposure& + operator= (const Exposure& x); //@} @@ -5520,7 +5438,7 @@ namespace neuroml2 * @brief Destructor. */ virtual - ~Dynamics (); + ~Exposure (); // Implementation. // @@ -5533,27 +5451,26 @@ namespace neuroml2 ::xml_schema::flags); protected: - DerivedVariable_sequence DerivedVariable_; - ConditionalDerivedVariable_sequence ConditionalDerivedVariable_; + ::xsd::cxx::tree::one< name_type > name_; + ::xsd::cxx::tree::one< dimension_type > dimension_; + description_optional description_; //@endcond }; bool - operator== (const Dynamics&, const Dynamics&); + operator== (const Exposure&, const Exposure&); bool - operator!= (const Dynamics&, const Dynamics&); + operator!= (const Exposure&, const Exposure&); /** - * @brief Class corresponding to the %DerivedVariable schema type. - * - * LEMS ComponentType for DerivedVariable + * @brief Class corresponding to the %NamedDimensionalType schema type. * * @nosubgrouping */ - class DerivedVariable: public ::xml_schema::type + class NamedDimensionalType: public ::xml_schema::type { public: /** @@ -5673,67 +5590,9 @@ namespace neuroml2 //@} /** - * @name value + * @name description * - * @brief Accessor and modifier functions for the %value - * required attribute. - */ - //@{ - - /** - * @brief Attribute type. - */ - typedef ::xml_schema::string value_type; - - /** - * @brief Attribute traits type. - */ - typedef ::xsd::cxx::tree::traits< value_type, char > value_traits; - - /** - * @brief Return a read-only (constant) reference to the attribute. - * - * @return A constant reference to the attribute. - */ - const value_type& - value () const; - - /** - * @brief Return a read-write reference to the attribute. - * - * @return A reference to the attribute. - */ - value_type& - value (); - - /** - * @brief Set the attribute value. - * - * @param x A new value to set. - * - * This function makes a copy of its argument and sets it as - * the new value of the attribute. - */ - void - value (const value_type& x); - - /** - * @brief Set the attribute value without copying. - * - * @param p A new value to use. - * - * This function will try to use the passed value directly - * instead of making a copy. - */ - void - value (::std::unique_ptr< value_type > p); - - //@} - - /** - * @name exposure - * - * @brief Accessor and modifier functions for the %exposure + * @brief Accessor and modifier functions for the %description * optional attribute. */ //@{ @@ -5741,17 +5600,17 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::string exposure_type; + typedef ::xml_schema::string description_type; /** * @brief Attribute optional container type. */ - typedef ::xsd::cxx::tree::optional< exposure_type > exposure_optional; + typedef ::xsd::cxx::tree::optional< description_type > description_optional; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< exposure_type, char > exposure_traits; + typedef ::xsd::cxx::tree::traits< description_type, char > description_traits; /** * @brief Return a read-only (constant) reference to the attribute @@ -5759,16 +5618,16 @@ namespace neuroml2 * * @return A constant reference to the optional container. */ - const exposure_optional& - exposure () const; + const description_optional& + description () const; /** * @brief Return a read-write reference to the attribute container. * * @return A reference to the optional container. */ - exposure_optional& - exposure (); + description_optional& + description (); /** * @brief Set the attribute value. @@ -5779,7 +5638,7 @@ namespace neuroml2 * the new value of the attribute. */ void - exposure (const exposure_type& x); + description (const description_type& x); /** * @brief Set the attribute value. @@ -5791,7 +5650,7 @@ namespace neuroml2 * Otherwise the attribute container is set the 'not present' state. */ void - exposure (const exposure_optional& x); + description (const description_optional& x); /** * @brief Set the attribute value without copying. @@ -5802,7 +5661,7 @@ namespace neuroml2 * of making a copy. */ void - exposure (::std::unique_ptr< exposure_type > p); + description (::std::unique_ptr< description_type > p); //@} @@ -5815,9 +5674,8 @@ namespace neuroml2 * @brief Create an instance from the ultimate base and * initializers for required elements and attributes. */ - DerivedVariable (const name_type&, - const dimension_type&, - const value_type&); + NamedDimensionalType (const name_type&, + const dimension_type&); /** * @brief Create an instance from a DOM element. @@ -5827,9 +5685,9 @@ namespace neuroml2 * @param c A pointer to the object that will contain the new * instance. */ - DerivedVariable (const ::xercesc::DOMElement& e, - ::xml_schema::flags f = 0, - ::xml_schema::container* c = 0); + NamedDimensionalType (const ::xercesc::DOMElement& e, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); /** * @brief Copy constructor. @@ -5840,9 +5698,9 @@ namespace neuroml2 * * For polymorphic object models use the @c _clone function instead. */ - DerivedVariable (const DerivedVariable& x, - ::xml_schema::flags f = 0, - ::xml_schema::container* c = 0); + NamedDimensionalType (const NamedDimensionalType& x, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); /** * @brief Copy the instance polymorphically. @@ -5855,7 +5713,7 @@ namespace neuroml2 * used for copying and should be used for polymorphic object * models instead of the copy constructor. */ - virtual DerivedVariable* + virtual NamedDimensionalType* _clone (::xml_schema::flags f = 0, ::xml_schema::container* c = 0) const; @@ -5867,8 +5725,8 @@ namespace neuroml2 * * For polymorphic object models use the @c _clone function instead. */ - DerivedVariable& - operator= (const DerivedVariable& x); + NamedDimensionalType& + operator= (const NamedDimensionalType& x); //@} @@ -5876,7 +5734,7 @@ namespace neuroml2 * @brief Destructor. */ virtual - ~DerivedVariable (); + ~NamedDimensionalType (); // Implementation. // @@ -5891,97 +5749,88 @@ namespace neuroml2 protected: ::xsd::cxx::tree::one< name_type > name_; ::xsd::cxx::tree::one< dimension_type > dimension_; - ::xsd::cxx::tree::one< value_type > value_; - exposure_optional exposure_; + description_optional description_; //@endcond }; bool - operator== (const DerivedVariable&, const DerivedVariable&); + operator== (const NamedDimensionalType&, const NamedDimensionalType&); bool - operator!= (const DerivedVariable&, const DerivedVariable&); + operator!= (const NamedDimensionalType&, const NamedDimensionalType&); /** - * @brief Class corresponding to the %ConditionalDerivedVariable schema type. - * - * LEMS ComponentType for ConditionalDerivedVariable + * @brief Class corresponding to the %NamedDimensionalVariable schema type. * * @nosubgrouping */ - class ConditionalDerivedVariable: public ::xml_schema::type + class NamedDimensionalVariable: public ::xml_schema::type { public: /** - * @name Case + * @name name * - * @brief Accessor and modifier functions for the %Case - * sequence element. + * @brief Accessor and modifier functions for the %name + * required attribute. */ //@{ /** - * @brief Element type. - */ - typedef ::neuroml2::Case Case_type; - - /** - * @brief Element sequence container type. - */ - typedef ::xsd::cxx::tree::sequence< Case_type > Case_sequence; - - /** - * @brief Element iterator type. + * @brief Attribute type. */ - typedef Case_sequence::iterator Case_iterator; + typedef ::xml_schema::string name_type; /** - * @brief Element constant iterator type. + * @brief Attribute traits type. */ - typedef Case_sequence::const_iterator Case_const_iterator; + typedef ::xsd::cxx::tree::traits< name_type, char > name_traits; /** - * @brief Element traits type. + * @brief Return a read-only (constant) reference to the attribute. + * + * @return A constant reference to the attribute. */ - typedef ::xsd::cxx::tree::traits< Case_type, char > Case_traits; + const name_type& + name () const; /** - * @brief Return a read-only (constant) reference to the element - * sequence. + * @brief Return a read-write reference to the attribute. * - * @return A constant reference to the sequence container. + * @return A reference to the attribute. */ - const Case_sequence& - Case () const; + name_type& + name (); /** - * @brief Return a read-write reference to the element sequence. + * @brief Set the attribute value. * - * @return A reference to the sequence container. + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. */ - Case_sequence& - Case (); + void + name (const name_type& x); /** - * @brief Copy elements from a given sequence. + * @brief Set the attribute value without copying. * - * @param s A sequence to copy elements from. + * @param p A new value to use. * - * For each element in @a s this function makes a copy and adds it - * to the sequence. Note that this operation completely changes the - * sequence and all old elements will be lost. + * This function will try to use the passed value directly + * instead of making a copy. */ void - Case (const Case_sequence& s); + name (::std::unique_ptr< name_type > p); //@} /** - * @name name + * @name dimension * - * @brief Accessor and modifier functions for the %name + * @brief Accessor and modifier functions for the %dimension * required attribute. */ //@{ @@ -5989,28 +5838,28 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::string name_type; + typedef ::xml_schema::string dimension_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< name_type, char > name_traits; + typedef ::xsd::cxx::tree::traits< dimension_type, char > dimension_traits; /** * @brief Return a read-only (constant) reference to the attribute. * * @return A constant reference to the attribute. */ - const name_type& - name () const; + const dimension_type& + dimension () const; /** * @brief Return a read-write reference to the attribute. * * @return A reference to the attribute. */ - name_type& - name (); + dimension_type& + dimension (); /** * @brief Set the attribute value. @@ -6021,7 +5870,7 @@ namespace neuroml2 * the new value of the attribute. */ void - name (const name_type& x); + dimension (const dimension_type& x); /** * @brief Set the attribute value without copying. @@ -6032,43 +5881,49 @@ namespace neuroml2 * instead of making a copy. */ void - name (::std::unique_ptr< name_type > p); + dimension (::std::unique_ptr< dimension_type > p); //@} /** - * @name dimension + * @name description * - * @brief Accessor and modifier functions for the %dimension - * required attribute. + * @brief Accessor and modifier functions for the %description + * optional attribute. */ //@{ /** * @brief Attribute type. */ - typedef ::xml_schema::string dimension_type; + typedef ::xml_schema::string description_type; + + /** + * @brief Attribute optional container type. + */ + typedef ::xsd::cxx::tree::optional< description_type > description_optional; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< dimension_type, char > dimension_traits; + typedef ::xsd::cxx::tree::traits< description_type, char > description_traits; /** - * @brief Return a read-only (constant) reference to the attribute. + * @brief Return a read-only (constant) reference to the attribute + * container. * - * @return A constant reference to the attribute. + * @return A constant reference to the optional container. */ - const dimension_type& - dimension () const; + const description_optional& + description () const; /** - * @brief Return a read-write reference to the attribute. + * @brief Return a read-write reference to the attribute container. * - * @return A reference to the attribute. + * @return A reference to the optional container. */ - dimension_type& - dimension (); + description_optional& + description (); /** * @brief Set the attribute value. @@ -6079,18 +5934,30 @@ namespace neuroml2 * the new value of the attribute. */ void - dimension (const dimension_type& x); + description (const description_type& x); + + /** + * @brief Set the attribute value. + * + * @param x An optional container with the new value to set. + * + * If the value is present in @a x then this function makes a copy + * of this value and sets it as the new value of the attribute. + * Otherwise the attribute container is set the 'not present' state. + */ + void + description (const description_optional& x); /** * @brief Set the attribute value without copying. * * @param p A new value to use. * - * This function will try to use the passed value directly - * instead of making a copy. + * This function will try to use the passed value directly instead + * of making a copy. */ void - dimension (::std::unique_ptr< dimension_type > p); + description (::std::unique_ptr< description_type > p); //@} @@ -6179,8 +6046,8 @@ namespace neuroml2 * @brief Create an instance from the ultimate base and * initializers for required elements and attributes. */ - ConditionalDerivedVariable (const name_type&, - const dimension_type&); + NamedDimensionalVariable (const name_type&, + const dimension_type&); /** * @brief Create an instance from a DOM element. @@ -6190,9 +6057,9 @@ namespace neuroml2 * @param c A pointer to the object that will contain the new * instance. */ - ConditionalDerivedVariable (const ::xercesc::DOMElement& e, - ::xml_schema::flags f = 0, - ::xml_schema::container* c = 0); + NamedDimensionalVariable (const ::xercesc::DOMElement& e, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); /** * @brief Copy constructor. @@ -6203,9 +6070,9 @@ namespace neuroml2 * * For polymorphic object models use the @c _clone function instead. */ - ConditionalDerivedVariable (const ConditionalDerivedVariable& x, - ::xml_schema::flags f = 0, - ::xml_schema::container* c = 0); + NamedDimensionalVariable (const NamedDimensionalVariable& x, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); /** * @brief Copy the instance polymorphically. @@ -6218,7 +6085,7 @@ namespace neuroml2 * used for copying and should be used for polymorphic object * models instead of the copy constructor. */ - virtual ConditionalDerivedVariable* + virtual NamedDimensionalVariable* _clone (::xml_schema::flags f = 0, ::xml_schema::container* c = 0) const; @@ -6230,8 +6097,8 @@ namespace neuroml2 * * For polymorphic object models use the @c _clone function instead. */ - ConditionalDerivedVariable& - operator= (const ConditionalDerivedVariable& x); + NamedDimensionalVariable& + operator= (const NamedDimensionalVariable& x); //@} @@ -6239,7 +6106,7 @@ namespace neuroml2 * @brief Destructor. */ virtual - ~ConditionalDerivedVariable (); + ~NamedDimensionalVariable (); // Implementation. // @@ -6252,14 +6119,1392 @@ namespace neuroml2 ::xml_schema::flags); protected: - Case_sequence Case_; ::xsd::cxx::tree::one< name_type > name_; ::xsd::cxx::tree::one< dimension_type > dimension_; + description_optional description_; exposure_optional exposure_; //@endcond }; + bool + operator== (const NamedDimensionalVariable&, const NamedDimensionalVariable&); + + bool + operator!= (const NamedDimensionalVariable&, const NamedDimensionalVariable&); + + + /** + * @brief Class corresponding to the %Parameter schema type. + * + * @nosubgrouping + */ + class Parameter: public ::neuroml2::NamedDimensionalType + { + public: + /** + * @name Constructors + */ + //@{ + + /** + * @brief Create an instance from the ultimate base and + * initializers for required elements and attributes. + */ + Parameter (const name_type&, + const dimension_type&); + + /** + * @brief Create an instance from a DOM element. + * + * @param e A DOM element to extract the data from. + * @param f Flags to create the new instance with. + * @param c A pointer to the object that will contain the new + * instance. + */ + Parameter (const ::xercesc::DOMElement& e, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy constructor. + * + * @param x An instance to make a copy of. + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * + * For polymorphic object models use the @c _clone function instead. + */ + Parameter (const Parameter& x, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy the instance polymorphically. + * + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * @return A pointer to the dynamically allocated copy. + * + * This function ensures that the dynamic type of the instance is + * used for copying and should be used for polymorphic object + * models instead of the copy constructor. + */ + virtual Parameter* + _clone (::xml_schema::flags f = 0, + ::xml_schema::container* c = 0) const; + + //@} + + /** + * @brief Destructor. + */ + virtual + ~Parameter (); + }; + + /** + * @brief Class corresponding to the %LEMS_Property schema type. + * + * @nosubgrouping + */ + class LEMS_Property: public ::neuroml2::NamedDimensionalType + { + public: + /** + * @name defaultValue + * + * @brief Accessor and modifier functions for the %defaultValue + * optional attribute. + */ + //@{ + + /** + * @brief Attribute type. + */ + typedef ::xml_schema::double_ defaultValue_type; + + /** + * @brief Attribute optional container type. + */ + typedef ::xsd::cxx::tree::optional< defaultValue_type > defaultValue_optional; + + /** + * @brief Attribute traits type. + */ + typedef ::xsd::cxx::tree::traits< defaultValue_type, char, ::xsd::cxx::tree::schema_type::double_ > defaultValue_traits; + + /** + * @brief Return a read-only (constant) reference to the attribute + * container. + * + * @return A constant reference to the optional container. + */ + const defaultValue_optional& + defaultValue () const; + + /** + * @brief Return a read-write reference to the attribute container. + * + * @return A reference to the optional container. + */ + defaultValue_optional& + defaultValue (); + + /** + * @brief Set the attribute value. + * + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. + */ + void + defaultValue (const defaultValue_type& x); + + /** + * @brief Set the attribute value. + * + * @param x An optional container with the new value to set. + * + * If the value is present in @a x then this function makes a copy + * of this value and sets it as the new value of the attribute. + * Otherwise the attribute container is set the 'not present' state. + */ + void + defaultValue (const defaultValue_optional& x); + + //@} + + /** + * @name Constructors + */ + //@{ + + /** + * @brief Create an instance from the ultimate base and + * initializers for required elements and attributes. + */ + LEMS_Property (const name_type&, + const dimension_type&); + + /** + * @brief Create an instance from a DOM element. + * + * @param e A DOM element to extract the data from. + * @param f Flags to create the new instance with. + * @param c A pointer to the object that will contain the new + * instance. + */ + LEMS_Property (const ::xercesc::DOMElement& e, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy constructor. + * + * @param x An instance to make a copy of. + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * + * For polymorphic object models use the @c _clone function instead. + */ + LEMS_Property (const LEMS_Property& x, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy the instance polymorphically. + * + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * @return A pointer to the dynamically allocated copy. + * + * This function ensures that the dynamic type of the instance is + * used for copying and should be used for polymorphic object + * models instead of the copy constructor. + */ + virtual LEMS_Property* + _clone (::xml_schema::flags f = 0, + ::xml_schema::container* c = 0) const; + + /** + * @brief Copy assignment operator. + * + * @param x An instance to make a copy of. + * @return A reference to itself. + * + * For polymorphic object models use the @c _clone function instead. + */ + LEMS_Property& + operator= (const LEMS_Property& x); + + //@} + + /** + * @brief Destructor. + */ + virtual + ~LEMS_Property (); + + // Implementation. + // + + //@cond + + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::flags); + + protected: + defaultValue_optional defaultValue_; + + //@endcond + }; + + bool + operator== (const LEMS_Property&, const LEMS_Property&); + + bool + operator!= (const LEMS_Property&, const LEMS_Property&); + + + /** + * @brief Class corresponding to the %Requirement schema type. + * + * @nosubgrouping + */ + class Requirement: public ::neuroml2::NamedDimensionalType + { + public: + /** + * @name Constructors + */ + //@{ + + /** + * @brief Create an instance from the ultimate base and + * initializers for required elements and attributes. + */ + Requirement (const name_type&, + const dimension_type&); + + /** + * @brief Create an instance from a DOM element. + * + * @param e A DOM element to extract the data from. + * @param f Flags to create the new instance with. + * @param c A pointer to the object that will contain the new + * instance. + */ + Requirement (const ::xercesc::DOMElement& e, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy constructor. + * + * @param x An instance to make a copy of. + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * + * For polymorphic object models use the @c _clone function instead. + */ + Requirement (const Requirement& x, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy the instance polymorphically. + * + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * @return A pointer to the dynamically allocated copy. + * + * This function ensures that the dynamic type of the instance is + * used for copying and should be used for polymorphic object + * models instead of the copy constructor. + */ + virtual Requirement* + _clone (::xml_schema::flags f = 0, + ::xml_schema::container* c = 0) const; + + //@} + + /** + * @brief Destructor. + */ + virtual + ~Requirement (); + }; + + /** + * @brief Class corresponding to the %InstanceRequirement schema type. + * + * @nosubgrouping + */ + class InstanceRequirement: public ::xml_schema::type + { + public: + /** + * @name name + * + * @brief Accessor and modifier functions for the %name + * required attribute. + */ + //@{ + + /** + * @brief Attribute type. + */ + typedef ::xml_schema::string name_type; + + /** + * @brief Attribute traits type. + */ + typedef ::xsd::cxx::tree::traits< name_type, char > name_traits; + + /** + * @brief Return a read-only (constant) reference to the attribute. + * + * @return A constant reference to the attribute. + */ + const name_type& + name () const; + + /** + * @brief Return a read-write reference to the attribute. + * + * @return A reference to the attribute. + */ + name_type& + name (); + + /** + * @brief Set the attribute value. + * + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. + */ + void + name (const name_type& x); + + /** + * @brief Set the attribute value without copying. + * + * @param p A new value to use. + * + * This function will try to use the passed value directly + * instead of making a copy. + */ + void + name (::std::unique_ptr< name_type > p); + + //@} + + /** + * @name type + * + * @brief Accessor and modifier functions for the %type + * required attribute. + */ + //@{ + + /** + * @brief Attribute type. + */ + typedef ::xml_schema::string type_type; + + /** + * @brief Attribute traits type. + */ + typedef ::xsd::cxx::tree::traits< type_type, char > type_traits; + + /** + * @brief Return a read-only (constant) reference to the attribute. + * + * @return A constant reference to the attribute. + */ + const type_type& + type () const; + + /** + * @brief Return a read-write reference to the attribute. + * + * @return A reference to the attribute. + */ + type_type& + type (); + + /** + * @brief Set the attribute value. + * + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. + */ + void + type (const type_type& x); + + /** + * @brief Set the attribute value without copying. + * + * @param p A new value to use. + * + * This function will try to use the passed value directly + * instead of making a copy. + */ + void + type (::std::unique_ptr< type_type > p); + + //@} + + /** + * @name Constructors + */ + //@{ + + /** + * @brief Create an instance from the ultimate base and + * initializers for required elements and attributes. + */ + InstanceRequirement (const name_type&, + const type_type&); + + /** + * @brief Create an instance from a DOM element. + * + * @param e A DOM element to extract the data from. + * @param f Flags to create the new instance with. + * @param c A pointer to the object that will contain the new + * instance. + */ + InstanceRequirement (const ::xercesc::DOMElement& e, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy constructor. + * + * @param x An instance to make a copy of. + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * + * For polymorphic object models use the @c _clone function instead. + */ + InstanceRequirement (const InstanceRequirement& x, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy the instance polymorphically. + * + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * @return A pointer to the dynamically allocated copy. + * + * This function ensures that the dynamic type of the instance is + * used for copying and should be used for polymorphic object + * models instead of the copy constructor. + */ + virtual InstanceRequirement* + _clone (::xml_schema::flags f = 0, + ::xml_schema::container* c = 0) const; + + /** + * @brief Copy assignment operator. + * + * @param x An instance to make a copy of. + * @return A reference to itself. + * + * For polymorphic object models use the @c _clone function instead. + */ + InstanceRequirement& + operator= (const InstanceRequirement& x); + + //@} + + /** + * @brief Destructor. + */ + virtual + ~InstanceRequirement (); + + // Implementation. + // + + //@cond + + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::flags); + + protected: + ::xsd::cxx::tree::one< name_type > name_; + ::xsd::cxx::tree::one< type_type > type_; + + //@endcond + }; + + bool + operator== (const InstanceRequirement&, const InstanceRequirement&); + + bool + operator!= (const InstanceRequirement&, const InstanceRequirement&); + + + /** + * @brief Class corresponding to the %Dynamics schema type. + * + * LEMS ComponentType for Dynamics + * + * @nosubgrouping + */ + class Dynamics: public ::xml_schema::type + { + public: + /** + * @name StateVariable + * + * @brief Accessor and modifier functions for the %StateVariable + * sequence element. + */ + //@{ + + /** + * @brief Element type. + */ + typedef ::neuroml2::StateVariable StateVariable_type; + + /** + * @brief Element sequence container type. + */ + typedef ::xsd::cxx::tree::sequence< StateVariable_type > StateVariable_sequence; + + /** + * @brief Element iterator type. + */ + typedef StateVariable_sequence::iterator StateVariable_iterator; + + /** + * @brief Element constant iterator type. + */ + typedef StateVariable_sequence::const_iterator StateVariable_const_iterator; + + /** + * @brief Element traits type. + */ + typedef ::xsd::cxx::tree::traits< StateVariable_type, char > StateVariable_traits; + + /** + * @brief Return a read-only (constant) reference to the element + * sequence. + * + * @return A constant reference to the sequence container. + */ + const StateVariable_sequence& + StateVariable () const; + + /** + * @brief Return a read-write reference to the element sequence. + * + * @return A reference to the sequence container. + */ + StateVariable_sequence& + StateVariable (); + + /** + * @brief Copy elements from a given sequence. + * + * @param s A sequence to copy elements from. + * + * For each element in @a s this function makes a copy and adds it + * to the sequence. Note that this operation completely changes the + * sequence and all old elements will be lost. + */ + void + StateVariable (const StateVariable_sequence& s); + + //@} + + /** + * @name DerivedVariable + * + * @brief Accessor and modifier functions for the %DerivedVariable + * sequence element. + */ + //@{ + + /** + * @brief Element type. + */ + typedef ::neuroml2::DerivedVariable DerivedVariable_type; + + /** + * @brief Element sequence container type. + */ + typedef ::xsd::cxx::tree::sequence< DerivedVariable_type > DerivedVariable_sequence; + + /** + * @brief Element iterator type. + */ + typedef DerivedVariable_sequence::iterator DerivedVariable_iterator; + + /** + * @brief Element constant iterator type. + */ + typedef DerivedVariable_sequence::const_iterator DerivedVariable_const_iterator; + + /** + * @brief Element traits type. + */ + typedef ::xsd::cxx::tree::traits< DerivedVariable_type, char > DerivedVariable_traits; + + /** + * @brief Return a read-only (constant) reference to the element + * sequence. + * + * @return A constant reference to the sequence container. + */ + const DerivedVariable_sequence& + DerivedVariable () const; + + /** + * @brief Return a read-write reference to the element sequence. + * + * @return A reference to the sequence container. + */ + DerivedVariable_sequence& + DerivedVariable (); + + /** + * @brief Copy elements from a given sequence. + * + * @param s A sequence to copy elements from. + * + * For each element in @a s this function makes a copy and adds it + * to the sequence. Note that this operation completely changes the + * sequence and all old elements will be lost. + */ + void + DerivedVariable (const DerivedVariable_sequence& s); + + //@} + + /** + * @name ConditionalDerivedVariable + * + * @brief Accessor and modifier functions for the %ConditionalDerivedVariable + * sequence element. + */ + //@{ + + /** + * @brief Element type. + */ + typedef ::neuroml2::ConditionalDerivedVariable ConditionalDerivedVariable_type; + + /** + * @brief Element sequence container type. + */ + typedef ::xsd::cxx::tree::sequence< ConditionalDerivedVariable_type > ConditionalDerivedVariable_sequence; + + /** + * @brief Element iterator type. + */ + typedef ConditionalDerivedVariable_sequence::iterator ConditionalDerivedVariable_iterator; + + /** + * @brief Element constant iterator type. + */ + typedef ConditionalDerivedVariable_sequence::const_iterator ConditionalDerivedVariable_const_iterator; + + /** + * @brief Element traits type. + */ + typedef ::xsd::cxx::tree::traits< ConditionalDerivedVariable_type, char > ConditionalDerivedVariable_traits; + + /** + * @brief Return a read-only (constant) reference to the element + * sequence. + * + * @return A constant reference to the sequence container. + */ + const ConditionalDerivedVariable_sequence& + ConditionalDerivedVariable () const; + + /** + * @brief Return a read-write reference to the element sequence. + * + * @return A reference to the sequence container. + */ + ConditionalDerivedVariable_sequence& + ConditionalDerivedVariable (); + + /** + * @brief Copy elements from a given sequence. + * + * @param s A sequence to copy elements from. + * + * For each element in @a s this function makes a copy and adds it + * to the sequence. Note that this operation completely changes the + * sequence and all old elements will be lost. + */ + void + ConditionalDerivedVariable (const ConditionalDerivedVariable_sequence& s); + + //@} + + /** + * @name TimeDerivative + * + * @brief Accessor and modifier functions for the %TimeDerivative + * sequence element. + */ + //@{ + + /** + * @brief Element type. + */ + typedef ::neuroml2::TimeDerivative TimeDerivative_type; + + /** + * @brief Element sequence container type. + */ + typedef ::xsd::cxx::tree::sequence< TimeDerivative_type > TimeDerivative_sequence; + + /** + * @brief Element iterator type. + */ + typedef TimeDerivative_sequence::iterator TimeDerivative_iterator; + + /** + * @brief Element constant iterator type. + */ + typedef TimeDerivative_sequence::const_iterator TimeDerivative_const_iterator; + + /** + * @brief Element traits type. + */ + typedef ::xsd::cxx::tree::traits< TimeDerivative_type, char > TimeDerivative_traits; + + /** + * @brief Return a read-only (constant) reference to the element + * sequence. + * + * @return A constant reference to the sequence container. + */ + const TimeDerivative_sequence& + TimeDerivative () const; + + /** + * @brief Return a read-write reference to the element sequence. + * + * @return A reference to the sequence container. + */ + TimeDerivative_sequence& + TimeDerivative (); + + /** + * @brief Copy elements from a given sequence. + * + * @param s A sequence to copy elements from. + * + * For each element in @a s this function makes a copy and adds it + * to the sequence. Note that this operation completely changes the + * sequence and all old elements will be lost. + */ + void + TimeDerivative (const TimeDerivative_sequence& s); + + //@} + + /** + * @name Constructors + */ + //@{ + + /** + * @brief Create an instance from the ultimate base and + * initializers for required elements and attributes. + */ + Dynamics (); + + /** + * @brief Create an instance from a DOM element. + * + * @param e A DOM element to extract the data from. + * @param f Flags to create the new instance with. + * @param c A pointer to the object that will contain the new + * instance. + */ + Dynamics (const ::xercesc::DOMElement& e, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy constructor. + * + * @param x An instance to make a copy of. + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * + * For polymorphic object models use the @c _clone function instead. + */ + Dynamics (const Dynamics& x, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy the instance polymorphically. + * + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * @return A pointer to the dynamically allocated copy. + * + * This function ensures that the dynamic type of the instance is + * used for copying and should be used for polymorphic object + * models instead of the copy constructor. + */ + virtual Dynamics* + _clone (::xml_schema::flags f = 0, + ::xml_schema::container* c = 0) const; + + /** + * @brief Copy assignment operator. + * + * @param x An instance to make a copy of. + * @return A reference to itself. + * + * For polymorphic object models use the @c _clone function instead. + */ + Dynamics& + operator= (const Dynamics& x); + + //@} + + /** + * @brief Destructor. + */ + virtual + ~Dynamics (); + + // Implementation. + // + + //@cond + + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::flags); + + protected: + StateVariable_sequence StateVariable_; + DerivedVariable_sequence DerivedVariable_; + ConditionalDerivedVariable_sequence ConditionalDerivedVariable_; + TimeDerivative_sequence TimeDerivative_; + + //@endcond + }; + + bool + operator== (const Dynamics&, const Dynamics&); + + bool + operator!= (const Dynamics&, const Dynamics&); + + + /** + * @brief Class corresponding to the %DerivedVariable schema type. + * + * LEMS ComponentType for DerivedVariable + * + * @nosubgrouping + */ + class DerivedVariable: public ::neuroml2::NamedDimensionalVariable + { + public: + /** + * @name value + * + * @brief Accessor and modifier functions for the %value + * optional attribute. + */ + //@{ + + /** + * @brief Attribute type. + */ + typedef ::xml_schema::string value_type; + + /** + * @brief Attribute optional container type. + */ + typedef ::xsd::cxx::tree::optional< value_type > value_optional; + + /** + * @brief Attribute traits type. + */ + typedef ::xsd::cxx::tree::traits< value_type, char > value_traits; + + /** + * @brief Return a read-only (constant) reference to the attribute + * container. + * + * @return A constant reference to the optional container. + */ + const value_optional& + value () const; + + /** + * @brief Return a read-write reference to the attribute container. + * + * @return A reference to the optional container. + */ + value_optional& + value (); + + /** + * @brief Set the attribute value. + * + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. + */ + void + value (const value_type& x); + + /** + * @brief Set the attribute value. + * + * @param x An optional container with the new value to set. + * + * If the value is present in @a x then this function makes a copy + * of this value and sets it as the new value of the attribute. + * Otherwise the attribute container is set the 'not present' state. + */ + void + value (const value_optional& x); + + /** + * @brief Set the attribute value without copying. + * + * @param p A new value to use. + * + * This function will try to use the passed value directly instead + * of making a copy. + */ + void + value (::std::unique_ptr< value_type > p); + + //@} + + /** + * @name select + * + * @brief Accessor and modifier functions for the %select + * optional attribute. + */ + //@{ + + /** + * @brief Attribute type. + */ + typedef ::xml_schema::string select_type; + + /** + * @brief Attribute optional container type. + */ + typedef ::xsd::cxx::tree::optional< select_type > select_optional; + + /** + * @brief Attribute traits type. + */ + typedef ::xsd::cxx::tree::traits< select_type, char > select_traits; + + /** + * @brief Return a read-only (constant) reference to the attribute + * container. + * + * @return A constant reference to the optional container. + */ + const select_optional& + select () const; + + /** + * @brief Return a read-write reference to the attribute container. + * + * @return A reference to the optional container. + */ + select_optional& + select (); + + /** + * @brief Set the attribute value. + * + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. + */ + void + select (const select_type& x); + + /** + * @brief Set the attribute value. + * + * @param x An optional container with the new value to set. + * + * If the value is present in @a x then this function makes a copy + * of this value and sets it as the new value of the attribute. + * Otherwise the attribute container is set the 'not present' state. + */ + void + select (const select_optional& x); + + /** + * @brief Set the attribute value without copying. + * + * @param p A new value to use. + * + * This function will try to use the passed value directly instead + * of making a copy. + */ + void + select (::std::unique_ptr< select_type > p); + + //@} + + /** + * @name Constructors + */ + //@{ + + /** + * @brief Create an instance from the ultimate base and + * initializers for required elements and attributes. + */ + DerivedVariable (const name_type&, + const dimension_type&); + + /** + * @brief Create an instance from a DOM element. + * + * @param e A DOM element to extract the data from. + * @param f Flags to create the new instance with. + * @param c A pointer to the object that will contain the new + * instance. + */ + DerivedVariable (const ::xercesc::DOMElement& e, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy constructor. + * + * @param x An instance to make a copy of. + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * + * For polymorphic object models use the @c _clone function instead. + */ + DerivedVariable (const DerivedVariable& x, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy the instance polymorphically. + * + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * @return A pointer to the dynamically allocated copy. + * + * This function ensures that the dynamic type of the instance is + * used for copying and should be used for polymorphic object + * models instead of the copy constructor. + */ + virtual DerivedVariable* + _clone (::xml_schema::flags f = 0, + ::xml_schema::container* c = 0) const; + + /** + * @brief Copy assignment operator. + * + * @param x An instance to make a copy of. + * @return A reference to itself. + * + * For polymorphic object models use the @c _clone function instead. + */ + DerivedVariable& + operator= (const DerivedVariable& x); + + //@} + + /** + * @brief Destructor. + */ + virtual + ~DerivedVariable (); + + // Implementation. + // + + //@cond + + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::flags); + + protected: + value_optional value_; + select_optional select_; + + //@endcond + }; + + bool + operator== (const DerivedVariable&, const DerivedVariable&); + + bool + operator!= (const DerivedVariable&, const DerivedVariable&); + + + /** + * @brief Class corresponding to the %StateVariable schema type. + * + * @nosubgrouping + */ + class StateVariable: public ::neuroml2::NamedDimensionalVariable + { + public: + /** + * @name Constructors + */ + //@{ + + /** + * @brief Create an instance from the ultimate base and + * initializers for required elements and attributes. + */ + StateVariable (const name_type&, + const dimension_type&); + + /** + * @brief Create an instance from a DOM element. + * + * @param e A DOM element to extract the data from. + * @param f Flags to create the new instance with. + * @param c A pointer to the object that will contain the new + * instance. + */ + StateVariable (const ::xercesc::DOMElement& e, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy constructor. + * + * @param x An instance to make a copy of. + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * + * For polymorphic object models use the @c _clone function instead. + */ + StateVariable (const StateVariable& x, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy the instance polymorphically. + * + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * @return A pointer to the dynamically allocated copy. + * + * This function ensures that the dynamic type of the instance is + * used for copying and should be used for polymorphic object + * models instead of the copy constructor. + */ + virtual StateVariable* + _clone (::xml_schema::flags f = 0, + ::xml_schema::container* c = 0) const; + + //@} + + /** + * @brief Destructor. + */ + virtual + ~StateVariable (); + }; + + /** + * @brief Class corresponding to the %ConditionalDerivedVariable schema type. + * + * @nosubgrouping + */ + class ConditionalDerivedVariable: public ::neuroml2::NamedDimensionalVariable + { + public: + /** + * @name Case + * + * @brief Accessor and modifier functions for the %Case + * sequence element. + */ + //@{ + + /** + * @brief Element type. + */ + typedef ::neuroml2::Case Case_type; + + /** + * @brief Element sequence container type. + */ + typedef ::xsd::cxx::tree::sequence< Case_type > Case_sequence; + + /** + * @brief Element iterator type. + */ + typedef Case_sequence::iterator Case_iterator; + + /** + * @brief Element constant iterator type. + */ + typedef Case_sequence::const_iterator Case_const_iterator; + + /** + * @brief Element traits type. + */ + typedef ::xsd::cxx::tree::traits< Case_type, char > Case_traits; + + /** + * @brief Return a read-only (constant) reference to the element + * sequence. + * + * @return A constant reference to the sequence container. + */ + const Case_sequence& + Case () const; + + /** + * @brief Return a read-write reference to the element sequence. + * + * @return A reference to the sequence container. + */ + Case_sequence& + Case (); + + /** + * @brief Copy elements from a given sequence. + * + * @param s A sequence to copy elements from. + * + * For each element in @a s this function makes a copy and adds it + * to the sequence. Note that this operation completely changes the + * sequence and all old elements will be lost. + */ + void + Case (const Case_sequence& s); + + //@} + + /** + * @name Constructors + */ + //@{ + + /** + * @brief Create an instance from the ultimate base and + * initializers for required elements and attributes. + */ + ConditionalDerivedVariable (const name_type&, + const dimension_type&); + + /** + * @brief Create an instance from a DOM element. + * + * @param e A DOM element to extract the data from. + * @param f Flags to create the new instance with. + * @param c A pointer to the object that will contain the new + * instance. + */ + ConditionalDerivedVariable (const ::xercesc::DOMElement& e, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy constructor. + * + * @param x An instance to make a copy of. + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * + * For polymorphic object models use the @c _clone function instead. + */ + ConditionalDerivedVariable (const ConditionalDerivedVariable& x, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy the instance polymorphically. + * + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * @return A pointer to the dynamically allocated copy. + * + * This function ensures that the dynamic type of the instance is + * used for copying and should be used for polymorphic object + * models instead of the copy constructor. + */ + virtual ConditionalDerivedVariable* + _clone (::xml_schema::flags f = 0, + ::xml_schema::container* c = 0) const; + + /** + * @brief Copy assignment operator. + * + * @param x An instance to make a copy of. + * @return A reference to itself. + * + * For polymorphic object models use the @c _clone function instead. + */ + ConditionalDerivedVariable& + operator= (const ConditionalDerivedVariable& x); + + //@} + + /** + * @brief Destructor. + */ + virtual + ~ConditionalDerivedVariable (); + + // Implementation. + // + + //@cond + + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::flags); + + protected: + Case_sequence Case_; + + //@endcond + }; + bool operator== (const ConditionalDerivedVariable&, const ConditionalDerivedVariable&); @@ -6503,14 +7748,233 @@ namespace neuroml2 operator!= (const Case&, const Case&); + /** + * @brief Class corresponding to the %TimeDerivative schema type. + * + * @nosubgrouping + */ + class TimeDerivative: public ::xml_schema::type + { + public: + /** + * @name variable + * + * @brief Accessor and modifier functions for the %variable + * required attribute. + */ + //@{ + + /** + * @brief Attribute type. + */ + typedef ::xml_schema::string variable_type; + + /** + * @brief Attribute traits type. + */ + typedef ::xsd::cxx::tree::traits< variable_type, char > variable_traits; + + /** + * @brief Return a read-only (constant) reference to the attribute. + * + * @return A constant reference to the attribute. + */ + const variable_type& + variable () const; + + /** + * @brief Return a read-write reference to the attribute. + * + * @return A reference to the attribute. + */ + variable_type& + variable (); + + /** + * @brief Set the attribute value. + * + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. + */ + void + variable (const variable_type& x); + + /** + * @brief Set the attribute value without copying. + * + * @param p A new value to use. + * + * This function will try to use the passed value directly + * instead of making a copy. + */ + void + variable (::std::unique_ptr< variable_type > p); + + //@} + + /** + * @name value + * + * @brief Accessor and modifier functions for the %value + * required attribute. + */ + //@{ + + /** + * @brief Attribute type. + */ + typedef ::xml_schema::string value_type; + + /** + * @brief Attribute traits type. + */ + typedef ::xsd::cxx::tree::traits< value_type, char > value_traits; + + /** + * @brief Return a read-only (constant) reference to the attribute. + * + * @return A constant reference to the attribute. + */ + const value_type& + value () const; + + /** + * @brief Return a read-write reference to the attribute. + * + * @return A reference to the attribute. + */ + value_type& + value (); + + /** + * @brief Set the attribute value. + * + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. + */ + void + value (const value_type& x); + + /** + * @brief Set the attribute value without copying. + * + * @param p A new value to use. + * + * This function will try to use the passed value directly + * instead of making a copy. + */ + void + value (::std::unique_ptr< value_type > p); + + //@} + + /** + * @name Constructors + */ + //@{ + + /** + * @brief Create an instance from the ultimate base and + * initializers for required elements and attributes. + */ + TimeDerivative (const variable_type&, + const value_type&); + + /** + * @brief Create an instance from a DOM element. + * + * @param e A DOM element to extract the data from. + * @param f Flags to create the new instance with. + * @param c A pointer to the object that will contain the new + * instance. + */ + TimeDerivative (const ::xercesc::DOMElement& e, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy constructor. + * + * @param x An instance to make a copy of. + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * + * For polymorphic object models use the @c _clone function instead. + */ + TimeDerivative (const TimeDerivative& x, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy the instance polymorphically. + * + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * @return A pointer to the dynamically allocated copy. + * + * This function ensures that the dynamic type of the instance is + * used for copying and should be used for polymorphic object + * models instead of the copy constructor. + */ + virtual TimeDerivative* + _clone (::xml_schema::flags f = 0, + ::xml_schema::container* c = 0) const; + + /** + * @brief Copy assignment operator. + * + * @param x An instance to make a copy of. + * @return A reference to itself. + * + * For polymorphic object models use the @c _clone function instead. + */ + TimeDerivative& + operator= (const TimeDerivative& x); + + //@} + + /** + * @brief Destructor. + */ + virtual + ~TimeDerivative (); + + // Implementation. + // + + //@cond + + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::flags); + + protected: + ::xsd::cxx::tree::one< variable_type > variable_; + ::xsd::cxx::tree::one< value_type > value_; + + //@endcond + }; + + bool + operator== (const TimeDerivative&, const TimeDerivative&); + + bool + operator!= (const TimeDerivative&, const TimeDerivative&); + + /** * @brief Class corresponding to the %ZeroToOne schema type. * - * Double restricted to between 1 and 0 + * Float value restricted to between 1 and 0 * * @nosubgrouping */ - class ZeroToOne: public ::xsd::cxx::tree::fundamental_base< ::xml_schema::double_, char, ::xml_schema::simple_type, ::xsd::cxx::tree::schema_type::double_ > + class ZeroToOne: public ::xsd::cxx::tree::fundamental_base< ::xml_schema::float_, char, ::xml_schema::simple_type > { public: /** @@ -6522,7 +7986,7 @@ namespace neuroml2 * @brief Create an instance from the ultimate base and * initializers for required elements and attributes. */ - ZeroToOne (const ::xml_schema::double_&); + ZeroToOne (const ::xml_schema::float_&); /** * @brief Create an instance from a DOM element. @@ -7733,6 +9197,70 @@ namespace neuroml2 //@} + /** + * @name ionChannelVShift + * + * @brief Accessor and modifier functions for the %ionChannelVShift + * sequence element. + */ + //@{ + + /** + * @brief Element type. + */ + typedef ::neuroml2::IonChannelVShift ionChannelVShift_type; + + /** + * @brief Element sequence container type. + */ + typedef ::xsd::cxx::tree::sequence< ionChannelVShift_type > ionChannelVShift_sequence; + + /** + * @brief Element iterator type. + */ + typedef ionChannelVShift_sequence::iterator ionChannelVShift_iterator; + + /** + * @brief Element constant iterator type. + */ + typedef ionChannelVShift_sequence::const_iterator ionChannelVShift_const_iterator; + + /** + * @brief Element traits type. + */ + typedef ::xsd::cxx::tree::traits< ionChannelVShift_type, char > ionChannelVShift_traits; + + /** + * @brief Return a read-only (constant) reference to the element + * sequence. + * + * @return A constant reference to the sequence container. + */ + const ionChannelVShift_sequence& + ionChannelVShift () const; + + /** + * @brief Return a read-write reference to the element sequence. + * + * @return A reference to the sequence container. + */ + ionChannelVShift_sequence& + ionChannelVShift (); + + /** + * @brief Copy elements from a given sequence. + * + * @param s A sequence to copy elements from. + * + * For each element in @a s this function makes a copy and adds it + * to the sequence. Note that this operation completely changes the + * sequence and all old elements will be lost. + */ + void + ionChannelVShift (const ionChannelVShift_sequence& s); + + //@} + /** * @name ionChannelKS * @@ -8309,6 +9837,70 @@ namespace neuroml2 //@} + /** + * @name doubleSynapse + * + * @brief Accessor and modifier functions for the %doubleSynapse + * sequence element. + */ + //@{ + + /** + * @brief Element type. + */ + typedef ::neuroml2::DoubleSynapse doubleSynapse_type; + + /** + * @brief Element sequence container type. + */ + typedef ::xsd::cxx::tree::sequence< doubleSynapse_type > doubleSynapse_sequence; + + /** + * @brief Element iterator type. + */ + typedef doubleSynapse_sequence::iterator doubleSynapse_iterator; + + /** + * @brief Element constant iterator type. + */ + typedef doubleSynapse_sequence::const_iterator doubleSynapse_const_iterator; + + /** + * @brief Element traits type. + */ + typedef ::xsd::cxx::tree::traits< doubleSynapse_type, char > doubleSynapse_traits; + + /** + * @brief Return a read-only (constant) reference to the element + * sequence. + * + * @return A constant reference to the sequence container. + */ + const doubleSynapse_sequence& + doubleSynapse () const; + + /** + * @brief Return a read-write reference to the element sequence. + * + * @return A reference to the sequence container. + */ + doubleSynapse_sequence& + doubleSynapse (); + + /** + * @brief Copy elements from a given sequence. + * + * @param s A sequence to copy elements from. + * + * For each element in @a s this function makes a copy and adds it + * to the sequence. Note that this operation completely changes the + * sequence and all old elements will be lost. + */ + void + doubleSynapse (const doubleSynapse_sequence& s); + + //@} + /** * @name gapJunction * @@ -10037,6 +11629,70 @@ namespace neuroml2 //@} + /** + * @name voltageClampTriple + * + * @brief Accessor and modifier functions for the %voltageClampTriple + * sequence element. + */ + //@{ + + /** + * @brief Element type. + */ + typedef ::neuroml2::VoltageClampTriple voltageClampTriple_type; + + /** + * @brief Element sequence container type. + */ + typedef ::xsd::cxx::tree::sequence< voltageClampTriple_type > voltageClampTriple_sequence; + + /** + * @brief Element iterator type. + */ + typedef voltageClampTriple_sequence::iterator voltageClampTriple_iterator; + + /** + * @brief Element constant iterator type. + */ + typedef voltageClampTriple_sequence::const_iterator voltageClampTriple_const_iterator; + + /** + * @brief Element traits type. + */ + typedef ::xsd::cxx::tree::traits< voltageClampTriple_type, char > voltageClampTriple_traits; + + /** + * @brief Return a read-only (constant) reference to the element + * sequence. + * + * @return A constant reference to the sequence container. + */ + const voltageClampTriple_sequence& + voltageClampTriple () const; + + /** + * @brief Return a read-write reference to the element sequence. + * + * @return A reference to the sequence container. + */ + voltageClampTriple_sequence& + voltageClampTriple (); + + /** + * @brief Copy elements from a given sequence. + * + * @param s A sequence to copy elements from. + * + * For each element in @a s this function makes a copy and adds it + * to the sequence. Note that this operation completely changes the + * sequence and all old elements will be lost. + */ + void + voltageClampTriple (const voltageClampTriple_sequence& s); + + //@} + /** * @name spikeArray * @@ -10357,6 +12013,70 @@ namespace neuroml2 //@} + /** + * @name spikeGeneratorRefPoisson + * + * @brief Accessor and modifier functions for the %spikeGeneratorRefPoisson + * sequence element. + */ + //@{ + + /** + * @brief Element type. + */ + typedef ::neuroml2::SpikeGeneratorRefPoisson spikeGeneratorRefPoisson_type; + + /** + * @brief Element sequence container type. + */ + typedef ::xsd::cxx::tree::sequence< spikeGeneratorRefPoisson_type > spikeGeneratorRefPoisson_sequence; + + /** + * @brief Element iterator type. + */ + typedef spikeGeneratorRefPoisson_sequence::iterator spikeGeneratorRefPoisson_iterator; + + /** + * @brief Element constant iterator type. + */ + typedef spikeGeneratorRefPoisson_sequence::const_iterator spikeGeneratorRefPoisson_const_iterator; + + /** + * @brief Element traits type. + */ + typedef ::xsd::cxx::tree::traits< spikeGeneratorRefPoisson_type, char > spikeGeneratorRefPoisson_traits; + + /** + * @brief Return a read-only (constant) reference to the element + * sequence. + * + * @return A constant reference to the sequence container. + */ + const spikeGeneratorRefPoisson_sequence& + spikeGeneratorRefPoisson () const; + + /** + * @brief Return a read-write reference to the element sequence. + * + * @return A reference to the sequence container. + */ + spikeGeneratorRefPoisson_sequence& + spikeGeneratorRefPoisson (); + + /** + * @brief Copy elements from a given sequence. + * + * @param s A sequence to copy elements from. + * + * For each element in @a s this function makes a copy and adds it + * to the sequence. Note that this operation completely changes the + * sequence and all old elements will be lost. + */ + void + spikeGeneratorRefPoisson (const spikeGeneratorRefPoisson_sequence& s); + + //@} + /** * @name poissonFiringSynapse * @@ -11468,6 +13188,7 @@ namespace neuroml2 morphology_sequence morphology_; ionChannel_sequence ionChannel_; ionChannelHH_sequence ionChannelHH_; + ionChannelVShift_sequence ionChannelVShift_; ionChannelKS_sequence ionChannelKS_; decayingPoolConcentrationModel_sequence decayingPoolConcentrationModel_; fixedFactorConcentrationModel_sequence fixedFactorConcentrationModel_; @@ -11477,6 +13198,7 @@ namespace neuroml2 expTwoSynapse_sequence expTwoSynapse_; expThreeSynapse_sequence expThreeSynapse_; blockingPlasticSynapse_sequence blockingPlasticSynapse_; + doubleSynapse_sequence doubleSynapse_; gapJunction_sequence gapJunction_; silentSynapse_sequence silentSynapse_; linearGradedSynapse_sequence linearGradedSynapse_; @@ -11504,11 +13226,13 @@ namespace neuroml2 compoundInput_sequence compoundInput_; compoundInputDL_sequence compoundInputDL_; voltageClamp_sequence voltageClamp_; + voltageClampTriple_sequence voltageClampTriple_; spikeArray_sequence spikeArray_; timedSynapticInput_sequence timedSynapticInput_; spikeGenerator_sequence spikeGenerator_; spikeGeneratorRandom_sequence spikeGeneratorRandom_; spikeGeneratorPoisson_sequence spikeGeneratorPoisson_; + spikeGeneratorRefPoisson_sequence spikeGeneratorRefPoisson_; poissonFiringSynapse_sequence poissonFiringSynapse_; transientPoissonFiringSynapse_sequence transientPoissonFiringSynapse_; IF_curr_alpha_sequence IF_curr_alpha_; @@ -11548,7 +13272,7 @@ namespace neuroml2 * @name href * * @brief Accessor and modifier functions for the %href - * optional attribute. + * required attribute. */ //@{ @@ -11557,31 +13281,25 @@ namespace neuroml2 */ typedef ::xml_schema::uri href_type; - /** - * @brief Attribute optional container type. - */ - typedef ::xsd::cxx::tree::optional< href_type > href_optional; - /** * @brief Attribute traits type. */ typedef ::xsd::cxx::tree::traits< href_type, char > href_traits; /** - * @brief Return a read-only (constant) reference to the attribute - * container. + * @brief Return a read-only (constant) reference to the attribute. * - * @return A constant reference to the optional container. + * @return A constant reference to the attribute. */ - const href_optional& + const href_type& href () const; /** - * @brief Return a read-write reference to the attribute container. + * @brief Return a read-write reference to the attribute. * - * @return A reference to the optional container. + * @return A reference to the attribute. */ - href_optional& + href_type& href (); /** @@ -11595,25 +13313,13 @@ namespace neuroml2 void href (const href_type& x); - /** - * @brief Set the attribute value. - * - * @param x An optional container with the new value to set. - * - * If the value is present in @a x then this function makes a copy - * of this value and sets it as the new value of the attribute. - * Otherwise the attribute container is set the 'not present' state. - */ - void - href (const href_optional& x); - /** * @brief Set the attribute value without copying. * * @param p A new value to use. * - * This function will try to use the passed value directly instead - * of making a copy. + * This function will try to use the passed value directly + * instead of making a copy. */ void href (::std::unique_ptr< href_type > p); @@ -11629,7 +13335,7 @@ namespace neuroml2 * @brief Create an instance from the ultimate base and * initializers for required elements and attributes. */ - IncludeType (); + IncludeType (const href_type&); /** * @brief Create an instance from a DOM element. @@ -11701,7 +13407,7 @@ namespace neuroml2 ::xml_schema::flags); protected: - href_optional href_; + ::xsd::cxx::tree::one< href_type > href_; //@endcond }; @@ -13128,6 +14834,170 @@ namespace neuroml2 ~IonChannelHH (); }; + /** + * @brief Class corresponding to the %IonChannelVShift schema type. + * + * Same as ionChannel, but with a vShift parameter to change voltage + * activation of gates. The exact usage of vShift in expressions for + * rates is determined by the individual gates. + * + * @nosubgrouping + */ + class IonChannelVShift: public ::neuroml2::IonChannel + { + public: + /** + * @name vShift + * + * @brief Accessor and modifier functions for the %vShift + * required attribute. + */ + //@{ + + /** + * @brief Attribute type. + */ + typedef ::neuroml2::Nml2Quantity_voltage vShift_type; + + /** + * @brief Attribute traits type. + */ + typedef ::xsd::cxx::tree::traits< vShift_type, char > vShift_traits; + + /** + * @brief Return a read-only (constant) reference to the attribute. + * + * @return A constant reference to the attribute. + */ + const vShift_type& + vShift () const; + + /** + * @brief Return a read-write reference to the attribute. + * + * @return A reference to the attribute. + */ + vShift_type& + vShift (); + + /** + * @brief Set the attribute value. + * + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. + */ + void + vShift (const vShift_type& x); + + /** + * @brief Set the attribute value without copying. + * + * @param p A new value to use. + * + * This function will try to use the passed value directly + * instead of making a copy. + */ + void + vShift (::std::unique_ptr< vShift_type > p); + + //@} + + /** + * @name Constructors + */ + //@{ + + /** + * @brief Create an instance from the ultimate base and + * initializers for required elements and attributes. + */ + IonChannelVShift (const id_type&, + const vShift_type&); + + /** + * @brief Create an instance from a DOM element. + * + * @param e A DOM element to extract the data from. + * @param f Flags to create the new instance with. + * @param c A pointer to the object that will contain the new + * instance. + */ + IonChannelVShift (const ::xercesc::DOMElement& e, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy constructor. + * + * @param x An instance to make a copy of. + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * + * For polymorphic object models use the @c _clone function instead. + */ + IonChannelVShift (const IonChannelVShift& x, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy the instance polymorphically. + * + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * @return A pointer to the dynamically allocated copy. + * + * This function ensures that the dynamic type of the instance is + * used for copying and should be used for polymorphic object + * models instead of the copy constructor. + */ + virtual IonChannelVShift* + _clone (::xml_schema::flags f = 0, + ::xml_schema::container* c = 0) const; + + /** + * @brief Copy assignment operator. + * + * @param x An instance to make a copy of. + * @return A reference to itself. + * + * For polymorphic object models use the @c _clone function instead. + */ + IonChannelVShift& + operator= (const IonChannelVShift& x); + + //@} + + /** + * @brief Destructor. + */ + virtual + ~IonChannelVShift (); + + // Implementation. + // + + //@cond + + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::flags); + + protected: + ::xsd::cxx::tree::one< vShift_type > vShift_; + + //@endcond + }; + + bool + operator== (const IonChannelVShift&, const IonChannelVShift&); + + bool + operator!= (const IonChannelVShift&, const IonChannelVShift&); + + /** * @brief Enumeration class corresponding to the %channelTypes * schema type. @@ -24056,11 +25926,293 @@ namespace neuroml2 * @brief Create an instance from the ultimate base and * initializers for required elements and attributes. */ - ExpTwoSynapse (const id_type&, - const gbase_type&, - const erev_type&, - const tauDecay_type&, - const tauRise_type&); + ExpTwoSynapse (const id_type&, + const gbase_type&, + const erev_type&, + const tauDecay_type&, + const tauRise_type&); + + /** + * @brief Create an instance from a DOM element. + * + * @param e A DOM element to extract the data from. + * @param f Flags to create the new instance with. + * @param c A pointer to the object that will contain the new + * instance. + */ + ExpTwoSynapse (const ::xercesc::DOMElement& e, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy constructor. + * + * @param x An instance to make a copy of. + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * + * For polymorphic object models use the @c _clone function instead. + */ + ExpTwoSynapse (const ExpTwoSynapse& x, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy the instance polymorphically. + * + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * @return A pointer to the dynamically allocated copy. + * + * This function ensures that the dynamic type of the instance is + * used for copying and should be used for polymorphic object + * models instead of the copy constructor. + */ + virtual ExpTwoSynapse* + _clone (::xml_schema::flags f = 0, + ::xml_schema::container* c = 0) const; + + /** + * @brief Copy assignment operator. + * + * @param x An instance to make a copy of. + * @return A reference to itself. + * + * For polymorphic object models use the @c _clone function instead. + */ + ExpTwoSynapse& + operator= (const ExpTwoSynapse& x); + + //@} + + /** + * @brief Destructor. + */ + virtual + ~ExpTwoSynapse (); + + // Implementation. + // + + //@cond + + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::flags); + + protected: + ::xsd::cxx::tree::one< tauDecay_type > tauDecay_; + ::xsd::cxx::tree::one< tauRise_type > tauRise_; + + //@endcond + }; + + bool + operator== (const ExpTwoSynapse&, const ExpTwoSynapse&); + + bool + operator!= (const ExpTwoSynapse&, const ExpTwoSynapse&); + + + /** + * @brief Class corresponding to the %ExpThreeSynapse schema type. + * + * @nosubgrouping + */ + class ExpThreeSynapse: public ::neuroml2::BaseConductanceBasedSynapseTwo + { + public: + /** + * @name tauDecay1 + * + * @brief Accessor and modifier functions for the %tauDecay1 + * required attribute. + */ + //@{ + + /** + * @brief Attribute type. + */ + typedef ::neuroml2::Nml2Quantity_time tauDecay1_type; + + /** + * @brief Attribute traits type. + */ + typedef ::xsd::cxx::tree::traits< tauDecay1_type, char > tauDecay1_traits; + + /** + * @brief Return a read-only (constant) reference to the attribute. + * + * @return A constant reference to the attribute. + */ + const tauDecay1_type& + tauDecay1 () const; + + /** + * @brief Return a read-write reference to the attribute. + * + * @return A reference to the attribute. + */ + tauDecay1_type& + tauDecay1 (); + + /** + * @brief Set the attribute value. + * + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. + */ + void + tauDecay1 (const tauDecay1_type& x); + + /** + * @brief Set the attribute value without copying. + * + * @param p A new value to use. + * + * This function will try to use the passed value directly + * instead of making a copy. + */ + void + tauDecay1 (::std::unique_ptr< tauDecay1_type > p); + + //@} + + /** + * @name tauDecay2 + * + * @brief Accessor and modifier functions for the %tauDecay2 + * required attribute. + */ + //@{ + + /** + * @brief Attribute type. + */ + typedef ::neuroml2::Nml2Quantity_time tauDecay2_type; + + /** + * @brief Attribute traits type. + */ + typedef ::xsd::cxx::tree::traits< tauDecay2_type, char > tauDecay2_traits; + + /** + * @brief Return a read-only (constant) reference to the attribute. + * + * @return A constant reference to the attribute. + */ + const tauDecay2_type& + tauDecay2 () const; + + /** + * @brief Return a read-write reference to the attribute. + * + * @return A reference to the attribute. + */ + tauDecay2_type& + tauDecay2 (); + + /** + * @brief Set the attribute value. + * + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. + */ + void + tauDecay2 (const tauDecay2_type& x); + + /** + * @brief Set the attribute value without copying. + * + * @param p A new value to use. + * + * This function will try to use the passed value directly + * instead of making a copy. + */ + void + tauDecay2 (::std::unique_ptr< tauDecay2_type > p); + + //@} + + /** + * @name tauRise + * + * @brief Accessor and modifier functions for the %tauRise + * required attribute. + */ + //@{ + + /** + * @brief Attribute type. + */ + typedef ::neuroml2::Nml2Quantity_time tauRise_type; + + /** + * @brief Attribute traits type. + */ + typedef ::xsd::cxx::tree::traits< tauRise_type, char > tauRise_traits; + + /** + * @brief Return a read-only (constant) reference to the attribute. + * + * @return A constant reference to the attribute. + */ + const tauRise_type& + tauRise () const; + + /** + * @brief Return a read-write reference to the attribute. + * + * @return A reference to the attribute. + */ + tauRise_type& + tauRise (); + + /** + * @brief Set the attribute value. + * + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. + */ + void + tauRise (const tauRise_type& x); + + /** + * @brief Set the attribute value without copying. + * + * @param p A new value to use. + * + * This function will try to use the passed value directly + * instead of making a copy. + */ + void + tauRise (::std::unique_ptr< tauRise_type > p); + + //@} + + /** + * @name Constructors + */ + //@{ + + /** + * @brief Create an instance from the ultimate base and + * initializers for required elements and attributes. + */ + ExpThreeSynapse (const id_type&, + const gbase1_type&, + const gbase2_type&, + const erev_type&, + const tauDecay1_type&, + const tauDecay2_type&, + const tauRise_type&); /** * @brief Create an instance from a DOM element. @@ -24070,9 +26222,9 @@ namespace neuroml2 * @param c A pointer to the object that will contain the new * instance. */ - ExpTwoSynapse (const ::xercesc::DOMElement& e, - ::xml_schema::flags f = 0, - ::xml_schema::container* c = 0); + ExpThreeSynapse (const ::xercesc::DOMElement& e, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); /** * @brief Copy constructor. @@ -24083,9 +26235,9 @@ namespace neuroml2 * * For polymorphic object models use the @c _clone function instead. */ - ExpTwoSynapse (const ExpTwoSynapse& x, - ::xml_schema::flags f = 0, - ::xml_schema::container* c = 0); + ExpThreeSynapse (const ExpThreeSynapse& x, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); /** * @brief Copy the instance polymorphically. @@ -24098,7 +26250,7 @@ namespace neuroml2 * used for copying and should be used for polymorphic object * models instead of the copy constructor. */ - virtual ExpTwoSynapse* + virtual ExpThreeSynapse* _clone (::xml_schema::flags f = 0, ::xml_schema::container* c = 0) const; @@ -24110,8 +26262,8 @@ namespace neuroml2 * * For polymorphic object models use the @c _clone function instead. */ - ExpTwoSynapse& - operator= (const ExpTwoSynapse& x); + ExpThreeSynapse& + operator= (const ExpThreeSynapse& x); //@} @@ -24119,7 +26271,7 @@ namespace neuroml2 * @brief Destructor. */ virtual - ~ExpTwoSynapse (); + ~ExpThreeSynapse (); // Implementation. // @@ -24132,31 +26284,32 @@ namespace neuroml2 ::xml_schema::flags); protected: - ::xsd::cxx::tree::one< tauDecay_type > tauDecay_; + ::xsd::cxx::tree::one< tauDecay1_type > tauDecay1_; + ::xsd::cxx::tree::one< tauDecay2_type > tauDecay2_; ::xsd::cxx::tree::one< tauRise_type > tauRise_; //@endcond }; bool - operator== (const ExpTwoSynapse&, const ExpTwoSynapse&); + operator== (const ExpThreeSynapse&, const ExpThreeSynapse&); bool - operator!= (const ExpTwoSynapse&, const ExpTwoSynapse&); + operator!= (const ExpThreeSynapse&, const ExpThreeSynapse&); /** - * @brief Class corresponding to the %ExpThreeSynapse schema type. + * @brief Class corresponding to the %DoubleSynapse schema type. * * @nosubgrouping */ - class ExpThreeSynapse: public ::neuroml2::BaseConductanceBasedSynapseTwo + class DoubleSynapse: public ::neuroml2::BaseVoltageDepSynapse { public: /** - * @name tauDecay1 + * @name synapse1 * - * @brief Accessor and modifier functions for the %tauDecay1 + * @brief Accessor and modifier functions for the %synapse1 * required attribute. */ //@{ @@ -24164,28 +26317,28 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::neuroml2::Nml2Quantity_time tauDecay1_type; + typedef ::neuroml2::NmlId synapse1_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< tauDecay1_type, char > tauDecay1_traits; + typedef ::xsd::cxx::tree::traits< synapse1_type, char > synapse1_traits; /** * @brief Return a read-only (constant) reference to the attribute. * * @return A constant reference to the attribute. */ - const tauDecay1_type& - tauDecay1 () const; + const synapse1_type& + synapse1 () const; /** * @brief Return a read-write reference to the attribute. * * @return A reference to the attribute. */ - tauDecay1_type& - tauDecay1 (); + synapse1_type& + synapse1 (); /** * @brief Set the attribute value. @@ -24196,7 +26349,7 @@ namespace neuroml2 * the new value of the attribute. */ void - tauDecay1 (const tauDecay1_type& x); + synapse1 (const synapse1_type& x); /** * @brief Set the attribute value without copying. @@ -24207,14 +26360,14 @@ namespace neuroml2 * instead of making a copy. */ void - tauDecay1 (::std::unique_ptr< tauDecay1_type > p); + synapse1 (::std::unique_ptr< synapse1_type > p); //@} /** - * @name tauDecay2 + * @name synapse2 * - * @brief Accessor and modifier functions for the %tauDecay2 + * @brief Accessor and modifier functions for the %synapse2 * required attribute. */ //@{ @@ -24222,28 +26375,28 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::neuroml2::Nml2Quantity_time tauDecay2_type; + typedef ::neuroml2::NmlId synapse2_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< tauDecay2_type, char > tauDecay2_traits; + typedef ::xsd::cxx::tree::traits< synapse2_type, char > synapse2_traits; /** * @brief Return a read-only (constant) reference to the attribute. * * @return A constant reference to the attribute. */ - const tauDecay2_type& - tauDecay2 () const; + const synapse2_type& + synapse2 () const; /** * @brief Return a read-write reference to the attribute. * * @return A reference to the attribute. */ - tauDecay2_type& - tauDecay2 (); + synapse2_type& + synapse2 (); /** * @brief Set the attribute value. @@ -24254,7 +26407,7 @@ namespace neuroml2 * the new value of the attribute. */ void - tauDecay2 (const tauDecay2_type& x); + synapse2 (const synapse2_type& x); /** * @brief Set the attribute value without copying. @@ -24265,14 +26418,14 @@ namespace neuroml2 * instead of making a copy. */ void - tauDecay2 (::std::unique_ptr< tauDecay2_type > p); + synapse2 (::std::unique_ptr< synapse2_type > p); //@} /** - * @name tauRise + * @name synapse1Path * - * @brief Accessor and modifier functions for the %tauRise + * @brief Accessor and modifier functions for the %synapse1Path * required attribute. */ //@{ @@ -24280,28 +26433,28 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::neuroml2::Nml2Quantity_time tauRise_type; + typedef ::xml_schema::string synapse1Path_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< tauRise_type, char > tauRise_traits; + typedef ::xsd::cxx::tree::traits< synapse1Path_type, char > synapse1Path_traits; /** * @brief Return a read-only (constant) reference to the attribute. * * @return A constant reference to the attribute. */ - const tauRise_type& - tauRise () const; + const synapse1Path_type& + synapse1Path () const; /** * @brief Return a read-write reference to the attribute. * * @return A reference to the attribute. */ - tauRise_type& - tauRise (); + synapse1Path_type& + synapse1Path (); /** * @brief Set the attribute value. @@ -24312,7 +26465,7 @@ namespace neuroml2 * the new value of the attribute. */ void - tauRise (const tauRise_type& x); + synapse1Path (const synapse1Path_type& x); /** * @brief Set the attribute value without copying. @@ -24323,7 +26476,65 @@ namespace neuroml2 * instead of making a copy. */ void - tauRise (::std::unique_ptr< tauRise_type > p); + synapse1Path (::std::unique_ptr< synapse1Path_type > p); + + //@} + + /** + * @name synapse2Path + * + * @brief Accessor and modifier functions for the %synapse2Path + * required attribute. + */ + //@{ + + /** + * @brief Attribute type. + */ + typedef ::xml_schema::string synapse2Path_type; + + /** + * @brief Attribute traits type. + */ + typedef ::xsd::cxx::tree::traits< synapse2Path_type, char > synapse2Path_traits; + + /** + * @brief Return a read-only (constant) reference to the attribute. + * + * @return A constant reference to the attribute. + */ + const synapse2Path_type& + synapse2Path () const; + + /** + * @brief Return a read-write reference to the attribute. + * + * @return A reference to the attribute. + */ + synapse2Path_type& + synapse2Path (); + + /** + * @brief Set the attribute value. + * + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. + */ + void + synapse2Path (const synapse2Path_type& x); + + /** + * @brief Set the attribute value without copying. + * + * @param p A new value to use. + * + * This function will try to use the passed value directly + * instead of making a copy. + */ + void + synapse2Path (::std::unique_ptr< synapse2Path_type > p); //@} @@ -24336,13 +26547,11 @@ namespace neuroml2 * @brief Create an instance from the ultimate base and * initializers for required elements and attributes. */ - ExpThreeSynapse (const id_type&, - const gbase1_type&, - const gbase2_type&, - const erev_type&, - const tauDecay1_type&, - const tauDecay2_type&, - const tauRise_type&); + DoubleSynapse (const id_type&, + const synapse1_type&, + const synapse2_type&, + const synapse1Path_type&, + const synapse2Path_type&); /** * @brief Create an instance from a DOM element. @@ -24352,9 +26561,9 @@ namespace neuroml2 * @param c A pointer to the object that will contain the new * instance. */ - ExpThreeSynapse (const ::xercesc::DOMElement& e, - ::xml_schema::flags f = 0, - ::xml_schema::container* c = 0); + DoubleSynapse (const ::xercesc::DOMElement& e, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); /** * @brief Copy constructor. @@ -24365,9 +26574,9 @@ namespace neuroml2 * * For polymorphic object models use the @c _clone function instead. */ - ExpThreeSynapse (const ExpThreeSynapse& x, - ::xml_schema::flags f = 0, - ::xml_schema::container* c = 0); + DoubleSynapse (const DoubleSynapse& x, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); /** * @brief Copy the instance polymorphically. @@ -24380,7 +26589,7 @@ namespace neuroml2 * used for copying and should be used for polymorphic object * models instead of the copy constructor. */ - virtual ExpThreeSynapse* + virtual DoubleSynapse* _clone (::xml_schema::flags f = 0, ::xml_schema::container* c = 0) const; @@ -24392,8 +26601,8 @@ namespace neuroml2 * * For polymorphic object models use the @c _clone function instead. */ - ExpThreeSynapse& - operator= (const ExpThreeSynapse& x); + DoubleSynapse& + operator= (const DoubleSynapse& x); //@} @@ -24401,7 +26610,7 @@ namespace neuroml2 * @brief Destructor. */ virtual - ~ExpThreeSynapse (); + ~DoubleSynapse (); // Implementation. // @@ -24414,18 +26623,19 @@ namespace neuroml2 ::xml_schema::flags); protected: - ::xsd::cxx::tree::one< tauDecay1_type > tauDecay1_; - ::xsd::cxx::tree::one< tauDecay2_type > tauDecay2_; - ::xsd::cxx::tree::one< tauRise_type > tauRise_; + ::xsd::cxx::tree::one< synapse1_type > synapse1_; + ::xsd::cxx::tree::one< synapse2_type > synapse2_; + ::xsd::cxx::tree::one< synapse1Path_type > synapse1Path_; + ::xsd::cxx::tree::one< synapse2Path_type > synapse2Path_; //@endcond }; bool - operator== (const ExpThreeSynapse&, const ExpThreeSynapse&); + operator== (const DoubleSynapse&, const DoubleSynapse&); bool - operator!= (const ExpThreeSynapse&, const ExpThreeSynapse&); + operator!= (const DoubleSynapse&, const DoubleSynapse&); /** @@ -35975,6 +38185,70 @@ namespace neuroml2 //@} + /** + * @name channelDensityVShift + * + * @brief Accessor and modifier functions for the %channelDensityVShift + * sequence element. + */ + //@{ + + /** + * @brief Element type. + */ + typedef ::neuroml2::ChannelDensityVShift channelDensityVShift_type; + + /** + * @brief Element sequence container type. + */ + typedef ::xsd::cxx::tree::sequence< channelDensityVShift_type > channelDensityVShift_sequence; + + /** + * @brief Element iterator type. + */ + typedef channelDensityVShift_sequence::iterator channelDensityVShift_iterator; + + /** + * @brief Element constant iterator type. + */ + typedef channelDensityVShift_sequence::const_iterator channelDensityVShift_const_iterator; + + /** + * @brief Element traits type. + */ + typedef ::xsd::cxx::tree::traits< channelDensityVShift_type, char > channelDensityVShift_traits; + + /** + * @brief Return a read-only (constant) reference to the element + * sequence. + * + * @return A constant reference to the sequence container. + */ + const channelDensityVShift_sequence& + channelDensityVShift () const; + + /** + * @brief Return a read-write reference to the element sequence. + * + * @return A reference to the sequence container. + */ + channelDensityVShift_sequence& + channelDensityVShift (); + + /** + * @brief Copy elements from a given sequence. + * + * @param s A sequence to copy elements from. + * + * For each element in @a s this function makes a copy and adds it + * to the sequence. Note that this operation completely changes the + * sequence and all old elements will be lost. + */ + void + channelDensityVShift (const channelDensityVShift_sequence& s); + + //@} + /** * @name channelDensityNernst * @@ -36634,6 +38908,7 @@ namespace neuroml2 protected: channelPopulation_sequence channelPopulation_; channelDensity_sequence channelDensity_; + channelDensityVShift_sequence channelDensityVShift_; channelDensityNernst_sequence channelDensityNernst_; channelDensityGHK_sequence channelDensityGHK_; channelDensityGHK2_sequence channelDensityGHK2_; @@ -39515,6 +41790,169 @@ namespace neuroml2 operator!= (const ChannelDensity&, const ChannelDensity&); + /** + * @brief Class corresponding to the %ChannelDensityVShift schema type. + * + * @nosubgrouping + */ + class ChannelDensityVShift: public ::neuroml2::ChannelDensity + { + public: + /** + * @name vShift + * + * @brief Accessor and modifier functions for the %vShift + * required attribute. + */ + //@{ + + /** + * @brief Attribute type. + */ + typedef ::neuroml2::Nml2Quantity_voltage vShift_type; + + /** + * @brief Attribute traits type. + */ + typedef ::xsd::cxx::tree::traits< vShift_type, char > vShift_traits; + + /** + * @brief Return a read-only (constant) reference to the attribute. + * + * @return A constant reference to the attribute. + */ + const vShift_type& + vShift () const; + + /** + * @brief Return a read-write reference to the attribute. + * + * @return A reference to the attribute. + */ + vShift_type& + vShift (); + + /** + * @brief Set the attribute value. + * + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. + */ + void + vShift (const vShift_type& x); + + /** + * @brief Set the attribute value without copying. + * + * @param p A new value to use. + * + * This function will try to use the passed value directly + * instead of making a copy. + */ + void + vShift (::std::unique_ptr< vShift_type > p); + + //@} + + /** + * @name Constructors + */ + //@{ + + /** + * @brief Create an instance from the ultimate base and + * initializers for required elements and attributes. + */ + ChannelDensityVShift (const id_type&, + const ionChannel_type&, + const erev_type&, + const ion_type&, + const vShift_type&); + + /** + * @brief Create an instance from a DOM element. + * + * @param e A DOM element to extract the data from. + * @param f Flags to create the new instance with. + * @param c A pointer to the object that will contain the new + * instance. + */ + ChannelDensityVShift (const ::xercesc::DOMElement& e, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy constructor. + * + * @param x An instance to make a copy of. + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * + * For polymorphic object models use the @c _clone function instead. + */ + ChannelDensityVShift (const ChannelDensityVShift& x, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy the instance polymorphically. + * + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * @return A pointer to the dynamically allocated copy. + * + * This function ensures that the dynamic type of the instance is + * used for copying and should be used for polymorphic object + * models instead of the copy constructor. + */ + virtual ChannelDensityVShift* + _clone (::xml_schema::flags f = 0, + ::xml_schema::container* c = 0) const; + + /** + * @brief Copy assignment operator. + * + * @param x An instance to make a copy of. + * @return A reference to itself. + * + * For polymorphic object models use the @c _clone function instead. + */ + ChannelDensityVShift& + operator= (const ChannelDensityVShift& x); + + //@} + + /** + * @brief Destructor. + */ + virtual + ~ChannelDensityVShift (); + + // Implementation. + // + + //@cond + + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::flags); + + protected: + ::xsd::cxx::tree::one< vShift_type > vShift_; + + //@endcond + }; + + bool + operator== (const ChannelDensityVShift&, const ChannelDensityVShift&); + + bool + operator!= (const ChannelDensityVShift&, const ChannelDensityVShift&); + + /** * @brief Class corresponding to the %ChannelDensityNernst schema type. * @@ -41949,7 +44387,7 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::string type_type; + typedef ::xml_schema::simple_type type_type; /** * @brief Attribute traits type. @@ -45802,9 +48240,407 @@ namespace neuroml2 //@} /** - * @name targetVoltage + * @name targetVoltage + * + * @brief Accessor and modifier functions for the %targetVoltage + * required attribute. + */ + //@{ + + /** + * @brief Attribute type. + */ + typedef ::neuroml2::Nml2Quantity_voltage targetVoltage_type; + + /** + * @brief Attribute traits type. + */ + typedef ::xsd::cxx::tree::traits< targetVoltage_type, char > targetVoltage_traits; + + /** + * @brief Return a read-only (constant) reference to the attribute. + * + * @return A constant reference to the attribute. + */ + const targetVoltage_type& + targetVoltage () const; + + /** + * @brief Return a read-write reference to the attribute. + * + * @return A reference to the attribute. + */ + targetVoltage_type& + targetVoltage (); + + /** + * @brief Set the attribute value. + * + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. + */ + void + targetVoltage (const targetVoltage_type& x); + + /** + * @brief Set the attribute value without copying. + * + * @param p A new value to use. + * + * This function will try to use the passed value directly + * instead of making a copy. + */ + void + targetVoltage (::std::unique_ptr< targetVoltage_type > p); + + //@} + + /** + * @name simpleSeriesResistance + * + * @brief Accessor and modifier functions for the %simpleSeriesResistance + * required attribute. + */ + //@{ + + /** + * @brief Attribute type. + */ + typedef ::neuroml2::Nml2Quantity_resistance simpleSeriesResistance_type; + + /** + * @brief Attribute traits type. + */ + typedef ::xsd::cxx::tree::traits< simpleSeriesResistance_type, char > simpleSeriesResistance_traits; + + /** + * @brief Return a read-only (constant) reference to the attribute. + * + * @return A constant reference to the attribute. + */ + const simpleSeriesResistance_type& + simpleSeriesResistance () const; + + /** + * @brief Return a read-write reference to the attribute. + * + * @return A reference to the attribute. + */ + simpleSeriesResistance_type& + simpleSeriesResistance (); + + /** + * @brief Set the attribute value. + * + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. + */ + void + simpleSeriesResistance (const simpleSeriesResistance_type& x); + + /** + * @brief Set the attribute value without copying. + * + * @param p A new value to use. + * + * This function will try to use the passed value directly + * instead of making a copy. + */ + void + simpleSeriesResistance (::std::unique_ptr< simpleSeriesResistance_type > p); + + //@} + + /** + * @name Constructors + */ + //@{ + + /** + * @brief Create an instance from the ultimate base and + * initializers for required elements and attributes. + */ + VoltageClamp (const id_type&, + const delay_type&, + const duration_type&, + const targetVoltage_type&, + const simpleSeriesResistance_type&); + + /** + * @brief Create an instance from a DOM element. + * + * @param e A DOM element to extract the data from. + * @param f Flags to create the new instance with. + * @param c A pointer to the object that will contain the new + * instance. + */ + VoltageClamp (const ::xercesc::DOMElement& e, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy constructor. + * + * @param x An instance to make a copy of. + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * + * For polymorphic object models use the @c _clone function instead. + */ + VoltageClamp (const VoltageClamp& x, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy the instance polymorphically. + * + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * @return A pointer to the dynamically allocated copy. + * + * This function ensures that the dynamic type of the instance is + * used for copying and should be used for polymorphic object + * models instead of the copy constructor. + */ + virtual VoltageClamp* + _clone (::xml_schema::flags f = 0, + ::xml_schema::container* c = 0) const; + + /** + * @brief Copy assignment operator. + * + * @param x An instance to make a copy of. + * @return A reference to itself. + * + * For polymorphic object models use the @c _clone function instead. + */ + VoltageClamp& + operator= (const VoltageClamp& x); + + //@} + + /** + * @brief Destructor. + */ + virtual + ~VoltageClamp (); + + // Implementation. + // + + //@cond + + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::flags); + + protected: + ::xsd::cxx::tree::one< delay_type > delay_; + ::xsd::cxx::tree::one< duration_type > duration_; + ::xsd::cxx::tree::one< targetVoltage_type > targetVoltage_; + ::xsd::cxx::tree::one< simpleSeriesResistance_type > simpleSeriesResistance_; + + //@endcond + }; + + bool + operator== (const VoltageClamp&, const VoltageClamp&); + + bool + operator!= (const VoltageClamp&, const VoltageClamp&); + + + /** + * @brief Class corresponding to the %VoltageClampTriple schema type. + * + * @nosubgrouping + */ + class VoltageClampTriple: public ::neuroml2::Standalone + { + public: + /** + * @name active + * + * @brief Accessor and modifier functions for the %active + * required attribute. + */ + //@{ + + /** + * @brief Attribute type. + */ + typedef ::neuroml2::ZeroOrOne active_type; + + /** + * @brief Attribute traits type. + */ + typedef ::xsd::cxx::tree::traits< active_type, char > active_traits; + + /** + * @brief Return a read-only (constant) reference to the attribute. + * + * @return A constant reference to the attribute. + */ + const active_type& + active () const; + + /** + * @brief Return a read-write reference to the attribute. + * + * @return A reference to the attribute. + */ + active_type& + active (); + + /** + * @brief Set the attribute value. + * + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. + */ + void + active (const active_type& x); + + /** + * @brief Set the attribute value without copying. + * + * @param p A new value to use. + * + * This function will try to use the passed value directly + * instead of making a copy. + */ + void + active (::std::unique_ptr< active_type > p); + + //@} + + /** + * @name delay + * + * @brief Accessor and modifier functions for the %delay + * required attribute. + */ + //@{ + + /** + * @brief Attribute type. + */ + typedef ::neuroml2::Nml2Quantity_time delay_type; + + /** + * @brief Attribute traits type. + */ + typedef ::xsd::cxx::tree::traits< delay_type, char > delay_traits; + + /** + * @brief Return a read-only (constant) reference to the attribute. + * + * @return A constant reference to the attribute. + */ + const delay_type& + delay () const; + + /** + * @brief Return a read-write reference to the attribute. + * + * @return A reference to the attribute. + */ + delay_type& + delay (); + + /** + * @brief Set the attribute value. + * + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. + */ + void + delay (const delay_type& x); + + /** + * @brief Set the attribute value without copying. + * + * @param p A new value to use. + * + * This function will try to use the passed value directly + * instead of making a copy. + */ + void + delay (::std::unique_ptr< delay_type > p); + + //@} + + /** + * @name duration + * + * @brief Accessor and modifier functions for the %duration + * required attribute. + */ + //@{ + + /** + * @brief Attribute type. + */ + typedef ::neuroml2::Nml2Quantity_time duration_type; + + /** + * @brief Attribute traits type. + */ + typedef ::xsd::cxx::tree::traits< duration_type, char > duration_traits; + + /** + * @brief Return a read-only (constant) reference to the attribute. + * + * @return A constant reference to the attribute. + */ + const duration_type& + duration () const; + + /** + * @brief Return a read-write reference to the attribute. + * + * @return A reference to the attribute. + */ + duration_type& + duration (); + + /** + * @brief Set the attribute value. + * + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. + */ + void + duration (const duration_type& x); + + /** + * @brief Set the attribute value without copying. + * + * @param p A new value to use. + * + * This function will try to use the passed value directly + * instead of making a copy. + */ + void + duration (::std::unique_ptr< duration_type > p); + + //@} + + /** + * @name conditioningVoltage * - * @brief Accessor and modifier functions for the %targetVoltage + * @brief Accessor and modifier functions for the %conditioningVoltage * required attribute. */ //@{ @@ -45812,28 +48648,28 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::neuroml2::Nml2Quantity_voltage targetVoltage_type; + typedef ::neuroml2::Nml2Quantity_voltage conditioningVoltage_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< targetVoltage_type, char > targetVoltage_traits; + typedef ::xsd::cxx::tree::traits< conditioningVoltage_type, char > conditioningVoltage_traits; /** * @brief Return a read-only (constant) reference to the attribute. * * @return A constant reference to the attribute. */ - const targetVoltage_type& - targetVoltage () const; + const conditioningVoltage_type& + conditioningVoltage () const; /** * @brief Return a read-write reference to the attribute. * * @return A reference to the attribute. */ - targetVoltage_type& - targetVoltage (); + conditioningVoltage_type& + conditioningVoltage (); /** * @brief Set the attribute value. @@ -45844,7 +48680,7 @@ namespace neuroml2 * the new value of the attribute. */ void - targetVoltage (const targetVoltage_type& x); + conditioningVoltage (const conditioningVoltage_type& x); /** * @brief Set the attribute value without copying. @@ -45855,7 +48691,123 @@ namespace neuroml2 * instead of making a copy. */ void - targetVoltage (::std::unique_ptr< targetVoltage_type > p); + conditioningVoltage (::std::unique_ptr< conditioningVoltage_type > p); + + //@} + + /** + * @name testingVoltage + * + * @brief Accessor and modifier functions for the %testingVoltage + * required attribute. + */ + //@{ + + /** + * @brief Attribute type. + */ + typedef ::neuroml2::Nml2Quantity_voltage testingVoltage_type; + + /** + * @brief Attribute traits type. + */ + typedef ::xsd::cxx::tree::traits< testingVoltage_type, char > testingVoltage_traits; + + /** + * @brief Return a read-only (constant) reference to the attribute. + * + * @return A constant reference to the attribute. + */ + const testingVoltage_type& + testingVoltage () const; + + /** + * @brief Return a read-write reference to the attribute. + * + * @return A reference to the attribute. + */ + testingVoltage_type& + testingVoltage (); + + /** + * @brief Set the attribute value. + * + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. + */ + void + testingVoltage (const testingVoltage_type& x); + + /** + * @brief Set the attribute value without copying. + * + * @param p A new value to use. + * + * This function will try to use the passed value directly + * instead of making a copy. + */ + void + testingVoltage (::std::unique_ptr< testingVoltage_type > p); + + //@} + + /** + * @name returnVoltage + * + * @brief Accessor and modifier functions for the %returnVoltage + * required attribute. + */ + //@{ + + /** + * @brief Attribute type. + */ + typedef ::neuroml2::Nml2Quantity_voltage returnVoltage_type; + + /** + * @brief Attribute traits type. + */ + typedef ::xsd::cxx::tree::traits< returnVoltage_type, char > returnVoltage_traits; + + /** + * @brief Return a read-only (constant) reference to the attribute. + * + * @return A constant reference to the attribute. + */ + const returnVoltage_type& + returnVoltage () const; + + /** + * @brief Return a read-write reference to the attribute. + * + * @return A reference to the attribute. + */ + returnVoltage_type& + returnVoltage (); + + /** + * @brief Set the attribute value. + * + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. + */ + void + returnVoltage (const returnVoltage_type& x); + + /** + * @brief Set the attribute value without copying. + * + * @param p A new value to use. + * + * This function will try to use the passed value directly + * instead of making a copy. + */ + void + returnVoltage (::std::unique_ptr< returnVoltage_type > p); //@} @@ -45926,11 +48878,14 @@ namespace neuroml2 * @brief Create an instance from the ultimate base and * initializers for required elements and attributes. */ - VoltageClamp (const id_type&, - const delay_type&, - const duration_type&, - const targetVoltage_type&, - const simpleSeriesResistance_type&); + VoltageClampTriple (const id_type&, + const active_type&, + const delay_type&, + const duration_type&, + const conditioningVoltage_type&, + const testingVoltage_type&, + const returnVoltage_type&, + const simpleSeriesResistance_type&); /** * @brief Create an instance from a DOM element. @@ -45940,9 +48895,9 @@ namespace neuroml2 * @param c A pointer to the object that will contain the new * instance. */ - VoltageClamp (const ::xercesc::DOMElement& e, - ::xml_schema::flags f = 0, - ::xml_schema::container* c = 0); + VoltageClampTriple (const ::xercesc::DOMElement& e, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); /** * @brief Copy constructor. @@ -45953,9 +48908,9 @@ namespace neuroml2 * * For polymorphic object models use the @c _clone function instead. */ - VoltageClamp (const VoltageClamp& x, - ::xml_schema::flags f = 0, - ::xml_schema::container* c = 0); + VoltageClampTriple (const VoltageClampTriple& x, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); /** * @brief Copy the instance polymorphically. @@ -45968,7 +48923,7 @@ namespace neuroml2 * used for copying and should be used for polymorphic object * models instead of the copy constructor. */ - virtual VoltageClamp* + virtual VoltageClampTriple* _clone (::xml_schema::flags f = 0, ::xml_schema::container* c = 0) const; @@ -45980,8 +48935,8 @@ namespace neuroml2 * * For polymorphic object models use the @c _clone function instead. */ - VoltageClamp& - operator= (const VoltageClamp& x); + VoltageClampTriple& + operator= (const VoltageClampTriple& x); //@} @@ -45989,7 +48944,7 @@ namespace neuroml2 * @brief Destructor. */ virtual - ~VoltageClamp (); + ~VoltageClampTriple (); // Implementation. // @@ -46002,19 +48957,22 @@ namespace neuroml2 ::xml_schema::flags); protected: + ::xsd::cxx::tree::one< active_type > active_; ::xsd::cxx::tree::one< delay_type > delay_; ::xsd::cxx::tree::one< duration_type > duration_; - ::xsd::cxx::tree::one< targetVoltage_type > targetVoltage_; + ::xsd::cxx::tree::one< conditioningVoltage_type > conditioningVoltage_; + ::xsd::cxx::tree::one< testingVoltage_type > testingVoltage_; + ::xsd::cxx::tree::one< returnVoltage_type > returnVoltage_; ::xsd::cxx::tree::one< simpleSeriesResistance_type > simpleSeriesResistance_; //@endcond }; bool - operator== (const VoltageClamp&, const VoltageClamp&); + operator== (const VoltageClampTriple&, const VoltageClampTriple&); bool - operator!= (const VoltageClamp&, const VoltageClamp&); + operator!= (const VoltageClampTriple&, const VoltageClampTriple&); /** @@ -47167,6 +50125,167 @@ namespace neuroml2 operator!= (const SpikeGeneratorPoisson&, const SpikeGeneratorPoisson&); + /** + * @brief Class corresponding to the %SpikeGeneratorRefPoisson schema type. + * + * @nosubgrouping + */ + class SpikeGeneratorRefPoisson: public ::neuroml2::SpikeGeneratorPoisson + { + public: + /** + * @name minimumISI + * + * @brief Accessor and modifier functions for the %minimumISI + * required attribute. + */ + //@{ + + /** + * @brief Attribute type. + */ + typedef ::neuroml2::Nml2Quantity_time minimumISI_type; + + /** + * @brief Attribute traits type. + */ + typedef ::xsd::cxx::tree::traits< minimumISI_type, char > minimumISI_traits; + + /** + * @brief Return a read-only (constant) reference to the attribute. + * + * @return A constant reference to the attribute. + */ + const minimumISI_type& + minimumISI () const; + + /** + * @brief Return a read-write reference to the attribute. + * + * @return A reference to the attribute. + */ + minimumISI_type& + minimumISI (); + + /** + * @brief Set the attribute value. + * + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. + */ + void + minimumISI (const minimumISI_type& x); + + /** + * @brief Set the attribute value without copying. + * + * @param p A new value to use. + * + * This function will try to use the passed value directly + * instead of making a copy. + */ + void + minimumISI (::std::unique_ptr< minimumISI_type > p); + + //@} + + /** + * @name Constructors + */ + //@{ + + /** + * @brief Create an instance from the ultimate base and + * initializers for required elements and attributes. + */ + SpikeGeneratorRefPoisson (const id_type&, + const averageRate_type&, + const minimumISI_type&); + + /** + * @brief Create an instance from a DOM element. + * + * @param e A DOM element to extract the data from. + * @param f Flags to create the new instance with. + * @param c A pointer to the object that will contain the new + * instance. + */ + SpikeGeneratorRefPoisson (const ::xercesc::DOMElement& e, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy constructor. + * + * @param x An instance to make a copy of. + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * + * For polymorphic object models use the @c _clone function instead. + */ + SpikeGeneratorRefPoisson (const SpikeGeneratorRefPoisson& x, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy the instance polymorphically. + * + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * @return A pointer to the dynamically allocated copy. + * + * This function ensures that the dynamic type of the instance is + * used for copying and should be used for polymorphic object + * models instead of the copy constructor. + */ + virtual SpikeGeneratorRefPoisson* + _clone (::xml_schema::flags f = 0, + ::xml_schema::container* c = 0) const; + + /** + * @brief Copy assignment operator. + * + * @param x An instance to make a copy of. + * @return A reference to itself. + * + * For polymorphic object models use the @c _clone function instead. + */ + SpikeGeneratorRefPoisson& + operator= (const SpikeGeneratorRefPoisson& x); + + //@} + + /** + * @brief Destructor. + */ + virtual + ~SpikeGeneratorRefPoisson (); + + // Implementation. + // + + //@cond + + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::flags); + + protected: + ::xsd::cxx::tree::one< minimumISI_type > minimumISI_; + + //@endcond + }; + + bool + operator== (const SpikeGeneratorRefPoisson&, const SpikeGeneratorRefPoisson&); + + bool + operator!= (const SpikeGeneratorRefPoisson&, const SpikeGeneratorRefPoisson&); + + /** * @brief Class corresponding to the %PoissonFiringSynapse schema type. * @@ -52999,14 +56118,238 @@ namespace neuroml2 operator!= (const SynapticConnection&, const SynapticConnection&); + /** + * @brief Class corresponding to the %BaseProjection schema type. + * + * Base for projection (set of synaptic connections) between two + * populations + * + * @nosubgrouping + */ + class BaseProjection: public ::neuroml2::Base + { + public: + /** + * @name presynapticPopulation + * + * @brief Accessor and modifier functions for the %presynapticPopulation + * required attribute. + */ + //@{ + + /** + * @brief Attribute type. + */ + typedef ::neuroml2::NmlId presynapticPopulation_type; + + /** + * @brief Attribute traits type. + */ + typedef ::xsd::cxx::tree::traits< presynapticPopulation_type, char > presynapticPopulation_traits; + + /** + * @brief Return a read-only (constant) reference to the attribute. + * + * @return A constant reference to the attribute. + */ + const presynapticPopulation_type& + presynapticPopulation () const; + + /** + * @brief Return a read-write reference to the attribute. + * + * @return A reference to the attribute. + */ + presynapticPopulation_type& + presynapticPopulation (); + + /** + * @brief Set the attribute value. + * + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. + */ + void + presynapticPopulation (const presynapticPopulation_type& x); + + /** + * @brief Set the attribute value without copying. + * + * @param p A new value to use. + * + * This function will try to use the passed value directly + * instead of making a copy. + */ + void + presynapticPopulation (::std::unique_ptr< presynapticPopulation_type > p); + + //@} + + /** + * @name postsynapticPopulation + * + * @brief Accessor and modifier functions for the %postsynapticPopulation + * required attribute. + */ + //@{ + + /** + * @brief Attribute type. + */ + typedef ::neuroml2::NmlId postsynapticPopulation_type; + + /** + * @brief Attribute traits type. + */ + typedef ::xsd::cxx::tree::traits< postsynapticPopulation_type, char > postsynapticPopulation_traits; + + /** + * @brief Return a read-only (constant) reference to the attribute. + * + * @return A constant reference to the attribute. + */ + const postsynapticPopulation_type& + postsynapticPopulation () const; + + /** + * @brief Return a read-write reference to the attribute. + * + * @return A reference to the attribute. + */ + postsynapticPopulation_type& + postsynapticPopulation (); + + /** + * @brief Set the attribute value. + * + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. + */ + void + postsynapticPopulation (const postsynapticPopulation_type& x); + + /** + * @brief Set the attribute value without copying. + * + * @param p A new value to use. + * + * This function will try to use the passed value directly + * instead of making a copy. + */ + void + postsynapticPopulation (::std::unique_ptr< postsynapticPopulation_type > p); + + //@} + + /** + * @name Constructors + */ + //@{ + + /** + * @brief Create an instance from the ultimate base and + * initializers for required elements and attributes. + */ + BaseProjection (const id_type&, + const presynapticPopulation_type&, + const postsynapticPopulation_type&); + + /** + * @brief Create an instance from a DOM element. + * + * @param e A DOM element to extract the data from. + * @param f Flags to create the new instance with. + * @param c A pointer to the object that will contain the new + * instance. + */ + BaseProjection (const ::xercesc::DOMElement& e, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy constructor. + * + * @param x An instance to make a copy of. + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * + * For polymorphic object models use the @c _clone function instead. + */ + BaseProjection (const BaseProjection& x, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy the instance polymorphically. + * + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * @return A pointer to the dynamically allocated copy. + * + * This function ensures that the dynamic type of the instance is + * used for copying and should be used for polymorphic object + * models instead of the copy constructor. + */ + virtual BaseProjection* + _clone (::xml_schema::flags f = 0, + ::xml_schema::container* c = 0) const; + + /** + * @brief Copy assignment operator. + * + * @param x An instance to make a copy of. + * @return A reference to itself. + * + * For polymorphic object models use the @c _clone function instead. + */ + BaseProjection& + operator= (const BaseProjection& x); + + //@} + + /** + * @brief Destructor. + */ + virtual + ~BaseProjection (); + + // Implementation. + // + + //@cond + + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::flags); + + protected: + ::xsd::cxx::tree::one< presynapticPopulation_type > presynapticPopulation_; + ::xsd::cxx::tree::one< postsynapticPopulation_type > postsynapticPopulation_; + + //@endcond + }; + + bool + operator== (const BaseProjection&, const BaseProjection&); + + bool + operator!= (const BaseProjection&, const BaseProjection&); + + /** * @brief Class corresponding to the %Projection schema type. * - * Projection (set of synaptic connections) between two populations + * Projection (set of synaptic connections) between two populations. + * Chemical/event based synaptic transmission * * @nosubgrouping */ - class Projection: public ::neuroml2::Base + class Projection: public ::neuroml2::BaseProjection { public: /** @@ -53137,122 +56480,6 @@ namespace neuroml2 //@} - /** - * @name presynapticPopulation - * - * @brief Accessor and modifier functions for the %presynapticPopulation - * required attribute. - */ - //@{ - - /** - * @brief Attribute type. - */ - typedef ::neuroml2::NmlId presynapticPopulation_type; - - /** - * @brief Attribute traits type. - */ - typedef ::xsd::cxx::tree::traits< presynapticPopulation_type, char > presynapticPopulation_traits; - - /** - * @brief Return a read-only (constant) reference to the attribute. - * - * @return A constant reference to the attribute. - */ - const presynapticPopulation_type& - presynapticPopulation () const; - - /** - * @brief Return a read-write reference to the attribute. - * - * @return A reference to the attribute. - */ - presynapticPopulation_type& - presynapticPopulation (); - - /** - * @brief Set the attribute value. - * - * @param x A new value to set. - * - * This function makes a copy of its argument and sets it as - * the new value of the attribute. - */ - void - presynapticPopulation (const presynapticPopulation_type& x); - - /** - * @brief Set the attribute value without copying. - * - * @param p A new value to use. - * - * This function will try to use the passed value directly - * instead of making a copy. - */ - void - presynapticPopulation (::std::unique_ptr< presynapticPopulation_type > p); - - //@} - - /** - * @name postsynapticPopulation - * - * @brief Accessor and modifier functions for the %postsynapticPopulation - * required attribute. - */ - //@{ - - /** - * @brief Attribute type. - */ - typedef ::neuroml2::NmlId postsynapticPopulation_type; - - /** - * @brief Attribute traits type. - */ - typedef ::xsd::cxx::tree::traits< postsynapticPopulation_type, char > postsynapticPopulation_traits; - - /** - * @brief Return a read-only (constant) reference to the attribute. - * - * @return A constant reference to the attribute. - */ - const postsynapticPopulation_type& - postsynapticPopulation () const; - - /** - * @brief Return a read-write reference to the attribute. - * - * @return A reference to the attribute. - */ - postsynapticPopulation_type& - postsynapticPopulation (); - - /** - * @brief Set the attribute value. - * - * @param x A new value to set. - * - * This function makes a copy of its argument and sets it as - * the new value of the attribute. - */ - void - postsynapticPopulation (const postsynapticPopulation_type& x); - - /** - * @brief Set the attribute value without copying. - * - * @param p A new value to use. - * - * This function will try to use the passed value directly - * instead of making a copy. - */ - void - postsynapticPopulation (::std::unique_ptr< postsynapticPopulation_type > p); - - //@} - /** * @name synapse * @@ -53397,8 +56624,6 @@ namespace neuroml2 protected: connection_sequence connection_; connectionWD_sequence connectionWD_; - ::xsd::cxx::tree::one< presynapticPopulation_type > presynapticPopulation_; - ::xsd::cxx::tree::one< postsynapticPopulation_type > postsynapticPopulation_; ::xsd::cxx::tree::one< synapse_type > synapse_; //@endcond @@ -54759,7 +57984,7 @@ namespace neuroml2 * * @nosubgrouping */ - class ElectricalProjection: public ::neuroml2::Base + class ElectricalProjection: public ::neuroml2::BaseProjection { public: /** @@ -54891,118 +58116,66 @@ namespace neuroml2 //@} /** - * @name presynapticPopulation + * @name electricalConnectionInstanceW * - * @brief Accessor and modifier functions for the %presynapticPopulation - * required attribute. + * @brief Accessor and modifier functions for the %electricalConnectionInstanceW + * sequence element. */ //@{ /** - * @brief Attribute type. - */ - typedef ::neuroml2::NmlId presynapticPopulation_type; - - /** - * @brief Attribute traits type. - */ - typedef ::xsd::cxx::tree::traits< presynapticPopulation_type, char > presynapticPopulation_traits; - - /** - * @brief Return a read-only (constant) reference to the attribute. - * - * @return A constant reference to the attribute. - */ - const presynapticPopulation_type& - presynapticPopulation () const; - - /** - * @brief Return a read-write reference to the attribute. - * - * @return A reference to the attribute. - */ - presynapticPopulation_type& - presynapticPopulation (); - - /** - * @brief Set the attribute value. - * - * @param x A new value to set. - * - * This function makes a copy of its argument and sets it as - * the new value of the attribute. - */ - void - presynapticPopulation (const presynapticPopulation_type& x); - - /** - * @brief Set the attribute value without copying. - * - * @param p A new value to use. - * - * This function will try to use the passed value directly - * instead of making a copy. + * @brief Element type. */ - void - presynapticPopulation (::std::unique_ptr< presynapticPopulation_type > p); - - //@} + typedef ::neuroml2::ElectricalConnectionInstanceW electricalConnectionInstanceW_type; /** - * @name postsynapticPopulation - * - * @brief Accessor and modifier functions for the %postsynapticPopulation - * required attribute. + * @brief Element sequence container type. */ - //@{ + typedef ::xsd::cxx::tree::sequence< electricalConnectionInstanceW_type > electricalConnectionInstanceW_sequence; /** - * @brief Attribute type. + * @brief Element iterator type. */ - typedef ::neuroml2::NmlId postsynapticPopulation_type; + typedef electricalConnectionInstanceW_sequence::iterator electricalConnectionInstanceW_iterator; /** - * @brief Attribute traits type. + * @brief Element constant iterator type. */ - typedef ::xsd::cxx::tree::traits< postsynapticPopulation_type, char > postsynapticPopulation_traits; + typedef electricalConnectionInstanceW_sequence::const_iterator electricalConnectionInstanceW_const_iterator; /** - * @brief Return a read-only (constant) reference to the attribute. - * - * @return A constant reference to the attribute. + * @brief Element traits type. */ - const postsynapticPopulation_type& - postsynapticPopulation () const; + typedef ::xsd::cxx::tree::traits< electricalConnectionInstanceW_type, char > electricalConnectionInstanceW_traits; /** - * @brief Return a read-write reference to the attribute. + * @brief Return a read-only (constant) reference to the element + * sequence. * - * @return A reference to the attribute. + * @return A constant reference to the sequence container. */ - postsynapticPopulation_type& - postsynapticPopulation (); + const electricalConnectionInstanceW_sequence& + electricalConnectionInstanceW () const; /** - * @brief Set the attribute value. - * - * @param x A new value to set. + * @brief Return a read-write reference to the element sequence. * - * This function makes a copy of its argument and sets it as - * the new value of the attribute. + * @return A reference to the sequence container. */ - void - postsynapticPopulation (const postsynapticPopulation_type& x); + electricalConnectionInstanceW_sequence& + electricalConnectionInstanceW (); /** - * @brief Set the attribute value without copying. + * @brief Copy elements from a given sequence. * - * @param p A new value to use. + * @param s A sequence to copy elements from. * - * This function will try to use the passed value directly - * instead of making a copy. + * For each element in @a s this function makes a copy and adds it + * to the sequence. Note that this operation completely changes the + * sequence and all old elements will be lost. */ void - postsynapticPopulation (::std::unique_ptr< postsynapticPopulation_type > p); + electricalConnectionInstanceW (const electricalConnectionInstanceW_sequence& s); //@} @@ -55091,8 +58264,7 @@ namespace neuroml2 protected: electricalConnection_sequence electricalConnection_; electricalConnectionInstance_sequence electricalConnectionInstance_; - ::xsd::cxx::tree::one< presynapticPopulation_type > presynapticPopulation_; - ::xsd::cxx::tree::one< postsynapticPopulation_type > postsynapticPopulation_; + electricalConnectionInstanceW_sequence electricalConnectionInstanceW_; //@endcond }; @@ -55342,6 +58514,161 @@ namespace neuroml2 ~ElectricalConnectionInstance (); }; + /** + * @brief Class corresponding to the %ElectricalConnectionInstanceW schema type. + * + * Projection between two populations consisting of analog connections + * (e.g. graded synapses). Includes setting of weight for the connection + * + * @nosubgrouping + */ + class ElectricalConnectionInstanceW: public ::neuroml2::ElectricalConnectionInstance + { + public: + /** + * @name weight + * + * @brief Accessor and modifier functions for the %weight + * required attribute. + */ + //@{ + + /** + * @brief Attribute type. + */ + typedef ::xml_schema::float_ weight_type; + + /** + * @brief Attribute traits type. + */ + typedef ::xsd::cxx::tree::traits< weight_type, char > weight_traits; + + /** + * @brief Return a read-only (constant) reference to the attribute. + * + * @return A constant reference to the attribute. + */ + const weight_type& + weight () const; + + /** + * @brief Return a read-write reference to the attribute. + * + * @return A reference to the attribute. + */ + weight_type& + weight (); + + /** + * @brief Set the attribute value. + * + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. + */ + void + weight (const weight_type& x); + + //@} + + /** + * @name Constructors + */ + //@{ + + /** + * @brief Create an instance from the ultimate base and + * initializers for required elements and attributes. + */ + ElectricalConnectionInstanceW (const id_type&, + const preCell_type&, + const postCell_type&, + const synapse_type&, + const weight_type&); + + /** + * @brief Create an instance from a DOM element. + * + * @param e A DOM element to extract the data from. + * @param f Flags to create the new instance with. + * @param c A pointer to the object that will contain the new + * instance. + */ + ElectricalConnectionInstanceW (const ::xercesc::DOMElement& e, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy constructor. + * + * @param x An instance to make a copy of. + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * + * For polymorphic object models use the @c _clone function instead. + */ + ElectricalConnectionInstanceW (const ElectricalConnectionInstanceW& x, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy the instance polymorphically. + * + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * @return A pointer to the dynamically allocated copy. + * + * This function ensures that the dynamic type of the instance is + * used for copying and should be used for polymorphic object + * models instead of the copy constructor. + */ + virtual ElectricalConnectionInstanceW* + _clone (::xml_schema::flags f = 0, + ::xml_schema::container* c = 0) const; + + /** + * @brief Copy assignment operator. + * + * @param x An instance to make a copy of. + * @return A reference to itself. + * + * For polymorphic object models use the @c _clone function instead. + */ + ElectricalConnectionInstanceW& + operator= (const ElectricalConnectionInstanceW& x); + + //@} + + /** + * @brief Destructor. + */ + virtual + ~ElectricalConnectionInstanceW (); + + // Implementation. + // + + //@cond + + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::flags); + + protected: + ::xsd::cxx::tree::one< weight_type > weight_; + + //@endcond + }; + + bool + operator== (const ElectricalConnectionInstanceW&, const ElectricalConnectionInstanceW&); + + bool + operator!= (const ElectricalConnectionInstanceW&, const ElectricalConnectionInstanceW&); + + /** * @brief Class corresponding to the %ContinuousProjection schema type. * @@ -55350,7 +58677,7 @@ namespace neuroml2 * * @nosubgrouping */ - class ContinuousProjection: public ::neuroml2::Base + class ContinuousProjection: public ::neuroml2::BaseProjection { public: /** @@ -55482,118 +58809,66 @@ namespace neuroml2 //@} /** - * @name presynapticPopulation + * @name continuousConnectionInstanceW * - * @brief Accessor and modifier functions for the %presynapticPopulation - * required attribute. + * @brief Accessor and modifier functions for the %continuousConnectionInstanceW + * sequence element. */ //@{ /** - * @brief Attribute type. - */ - typedef ::neuroml2::NmlId presynapticPopulation_type; - - /** - * @brief Attribute traits type. - */ - typedef ::xsd::cxx::tree::traits< presynapticPopulation_type, char > presynapticPopulation_traits; - - /** - * @brief Return a read-only (constant) reference to the attribute. - * - * @return A constant reference to the attribute. - */ - const presynapticPopulation_type& - presynapticPopulation () const; - - /** - * @brief Return a read-write reference to the attribute. - * - * @return A reference to the attribute. - */ - presynapticPopulation_type& - presynapticPopulation (); - - /** - * @brief Set the attribute value. - * - * @param x A new value to set. - * - * This function makes a copy of its argument and sets it as - * the new value of the attribute. - */ - void - presynapticPopulation (const presynapticPopulation_type& x); - - /** - * @brief Set the attribute value without copying. - * - * @param p A new value to use. - * - * This function will try to use the passed value directly - * instead of making a copy. + * @brief Element type. */ - void - presynapticPopulation (::std::unique_ptr< presynapticPopulation_type > p); - - //@} + typedef ::neuroml2::ContinuousConnectionInstanceW continuousConnectionInstanceW_type; /** - * @name postsynapticPopulation - * - * @brief Accessor and modifier functions for the %postsynapticPopulation - * required attribute. + * @brief Element sequence container type. */ - //@{ + typedef ::xsd::cxx::tree::sequence< continuousConnectionInstanceW_type > continuousConnectionInstanceW_sequence; /** - * @brief Attribute type. + * @brief Element iterator type. */ - typedef ::neuroml2::NmlId postsynapticPopulation_type; + typedef continuousConnectionInstanceW_sequence::iterator continuousConnectionInstanceW_iterator; /** - * @brief Attribute traits type. + * @brief Element constant iterator type. */ - typedef ::xsd::cxx::tree::traits< postsynapticPopulation_type, char > postsynapticPopulation_traits; + typedef continuousConnectionInstanceW_sequence::const_iterator continuousConnectionInstanceW_const_iterator; /** - * @brief Return a read-only (constant) reference to the attribute. - * - * @return A constant reference to the attribute. + * @brief Element traits type. */ - const postsynapticPopulation_type& - postsynapticPopulation () const; + typedef ::xsd::cxx::tree::traits< continuousConnectionInstanceW_type, char > continuousConnectionInstanceW_traits; /** - * @brief Return a read-write reference to the attribute. + * @brief Return a read-only (constant) reference to the element + * sequence. * - * @return A reference to the attribute. + * @return A constant reference to the sequence container. */ - postsynapticPopulation_type& - postsynapticPopulation (); + const continuousConnectionInstanceW_sequence& + continuousConnectionInstanceW () const; /** - * @brief Set the attribute value. - * - * @param x A new value to set. + * @brief Return a read-write reference to the element sequence. * - * This function makes a copy of its argument and sets it as - * the new value of the attribute. + * @return A reference to the sequence container. */ - void - postsynapticPopulation (const postsynapticPopulation_type& x); + continuousConnectionInstanceW_sequence& + continuousConnectionInstanceW (); /** - * @brief Set the attribute value without copying. + * @brief Copy elements from a given sequence. * - * @param p A new value to use. + * @param s A sequence to copy elements from. * - * This function will try to use the passed value directly - * instead of making a copy. + * For each element in @a s this function makes a copy and adds it + * to the sequence. Note that this operation completely changes the + * sequence and all old elements will be lost. */ void - postsynapticPopulation (::std::unique_ptr< postsynapticPopulation_type > p); + continuousConnectionInstanceW (const continuousConnectionInstanceW_sequence& s); //@} @@ -55682,8 +58957,7 @@ namespace neuroml2 protected: continuousConnection_sequence continuousConnection_; continuousConnectionInstance_sequence continuousConnectionInstance_; - ::xsd::cxx::tree::one< presynapticPopulation_type > presynapticPopulation_; - ::xsd::cxx::tree::one< postsynapticPopulation_type > postsynapticPopulation_; + continuousConnectionInstanceW_sequence continuousConnectionInstanceW_; //@endcond }; @@ -55993,6 +59267,162 @@ namespace neuroml2 ~ContinuousConnectionInstance (); }; + /** + * @brief Class corresponding to the %ContinuousConnectionInstanceW schema type. + * + * Individual continuous/analog synaptic connection - instance based. + * Includes setting of _weight for the connection + * + * @nosubgrouping + */ + class ContinuousConnectionInstanceW: public ::neuroml2::ContinuousConnectionInstance + { + public: + /** + * @name weight + * + * @brief Accessor and modifier functions for the %weight + * required attribute. + */ + //@{ + + /** + * @brief Attribute type. + */ + typedef ::xml_schema::float_ weight_type; + + /** + * @brief Attribute traits type. + */ + typedef ::xsd::cxx::tree::traits< weight_type, char > weight_traits; + + /** + * @brief Return a read-only (constant) reference to the attribute. + * + * @return A constant reference to the attribute. + */ + const weight_type& + weight () const; + + /** + * @brief Return a read-write reference to the attribute. + * + * @return A reference to the attribute. + */ + weight_type& + weight (); + + /** + * @brief Set the attribute value. + * + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. + */ + void + weight (const weight_type& x); + + //@} + + /** + * @name Constructors + */ + //@{ + + /** + * @brief Create an instance from the ultimate base and + * initializers for required elements and attributes. + */ + ContinuousConnectionInstanceW (const id_type&, + const preCell_type&, + const postCell_type&, + const preComponent_type&, + const postComponent_type&, + const weight_type&); + + /** + * @brief Create an instance from a DOM element. + * + * @param e A DOM element to extract the data from. + * @param f Flags to create the new instance with. + * @param c A pointer to the object that will contain the new + * instance. + */ + ContinuousConnectionInstanceW (const ::xercesc::DOMElement& e, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy constructor. + * + * @param x An instance to make a copy of. + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * + * For polymorphic object models use the @c _clone function instead. + */ + ContinuousConnectionInstanceW (const ContinuousConnectionInstanceW& x, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy the instance polymorphically. + * + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * @return A pointer to the dynamically allocated copy. + * + * This function ensures that the dynamic type of the instance is + * used for copying and should be used for polymorphic object + * models instead of the copy constructor. + */ + virtual ContinuousConnectionInstanceW* + _clone (::xml_schema::flags f = 0, + ::xml_schema::container* c = 0) const; + + /** + * @brief Copy assignment operator. + * + * @param x An instance to make a copy of. + * @return A reference to itself. + * + * For polymorphic object models use the @c _clone function instead. + */ + ContinuousConnectionInstanceW& + operator= (const ContinuousConnectionInstanceW& x); + + //@} + + /** + * @brief Destructor. + */ + virtual + ~ContinuousConnectionInstanceW (); + + // Implementation. + // + + //@cond + + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::flags); + + protected: + ::xsd::cxx::tree::one< weight_type > weight_; + + //@endcond + }; + + bool + operator== (const ContinuousConnectionInstanceW&, const ContinuousConnectionInstanceW&); + + bool + operator!= (const ContinuousConnectionInstanceW&, const ContinuousConnectionInstanceW&); + + /** * @brief Class corresponding to the %ExplicitInput schema type. * @@ -56296,7 +59726,8 @@ namespace neuroml2 /** * @brief Class corresponding to the %InputList schema type. * - * Subject to change as it gets tested with LEMS + * List of inputs to a population. Currents will be provided by the + * specified component. * * @nosubgrouping */ @@ -56367,6 +59798,70 @@ namespace neuroml2 //@} + /** + * @name inputW + * + * @brief Accessor and modifier functions for the %inputW + * sequence element. + */ + //@{ + + /** + * @brief Element type. + */ + typedef ::neuroml2::InputW inputW_type; + + /** + * @brief Element sequence container type. + */ + typedef ::xsd::cxx::tree::sequence< inputW_type > inputW_sequence; + + /** + * @brief Element iterator type. + */ + typedef inputW_sequence::iterator inputW_iterator; + + /** + * @brief Element constant iterator type. + */ + typedef inputW_sequence::const_iterator inputW_const_iterator; + + /** + * @brief Element traits type. + */ + typedef ::xsd::cxx::tree::traits< inputW_type, char > inputW_traits; + + /** + * @brief Return a read-only (constant) reference to the element + * sequence. + * + * @return A constant reference to the sequence container. + */ + const inputW_sequence& + inputW () const; + + /** + * @brief Return a read-write reference to the element sequence. + * + * @return A reference to the sequence container. + */ + inputW_sequence& + inputW (); + + /** + * @brief Copy elements from a given sequence. + * + * @param s A sequence to copy elements from. + * + * For each element in @a s this function makes a copy and adds it + * to the sequence. Note that this operation completely changes the + * sequence and all old elements will be lost. + */ + void + inputW (const inputW_sequence& s); + + //@} + /** * @name population * @@ -56567,6 +60062,7 @@ namespace neuroml2 protected: input_sequence input_; + inputW_sequence inputW_; ::xsd::cxx::tree::one< population_type > population_; ::xsd::cxx::tree::one< component_type > component_; @@ -56583,7 +60079,7 @@ namespace neuroml2 /** * @brief Class corresponding to the %Input schema type. * - * Subject to change as it gets tested with LEMS + * Individual input to the cell specified by target * * @nosubgrouping */ @@ -57015,6 +60511,160 @@ namespace neuroml2 operator!= (const Input&, const Input&); + /** + * @brief Class corresponding to the %InputW schema type. + * + * Individual input to the cell specified by target. Includes setting of + * _weight for the connection + * + * @nosubgrouping + */ + class InputW: public ::neuroml2::Input + { + public: + /** + * @name weight + * + * @brief Accessor and modifier functions for the %weight + * required attribute. + */ + //@{ + + /** + * @brief Attribute type. + */ + typedef ::xml_schema::float_ weight_type; + + /** + * @brief Attribute traits type. + */ + typedef ::xsd::cxx::tree::traits< weight_type, char > weight_traits; + + /** + * @brief Return a read-only (constant) reference to the attribute. + * + * @return A constant reference to the attribute. + */ + const weight_type& + weight () const; + + /** + * @brief Return a read-write reference to the attribute. + * + * @return A reference to the attribute. + */ + weight_type& + weight (); + + /** + * @brief Set the attribute value. + * + * @param x A new value to set. + * + * This function makes a copy of its argument and sets it as + * the new value of the attribute. + */ + void + weight (const weight_type& x); + + //@} + + /** + * @name Constructors + */ + //@{ + + /** + * @brief Create an instance from the ultimate base and + * initializers for required elements and attributes. + */ + InputW (const id_type&, + const target_type&, + const destination_type&, + const weight_type&); + + /** + * @brief Create an instance from a DOM element. + * + * @param e A DOM element to extract the data from. + * @param f Flags to create the new instance with. + * @param c A pointer to the object that will contain the new + * instance. + */ + InputW (const ::xercesc::DOMElement& e, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy constructor. + * + * @param x An instance to make a copy of. + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * + * For polymorphic object models use the @c _clone function instead. + */ + InputW (const InputW& x, + ::xml_schema::flags f = 0, + ::xml_schema::container* c = 0); + + /** + * @brief Copy the instance polymorphically. + * + * @param f Flags to create the copy with. + * @param c A pointer to the object that will contain the copy. + * @return A pointer to the dynamically allocated copy. + * + * This function ensures that the dynamic type of the instance is + * used for copying and should be used for polymorphic object + * models instead of the copy constructor. + */ + virtual InputW* + _clone (::xml_schema::flags f = 0, + ::xml_schema::container* c = 0) const; + + /** + * @brief Copy assignment operator. + * + * @param x An instance to make a copy of. + * @return A reference to itself. + * + * For polymorphic object models use the @c _clone function instead. + */ + InputW& + operator= (const InputW& x); + + //@} + + /** + * @brief Destructor. + */ + virtual + ~InputW (); + + // Implementation. + // + + //@cond + + protected: + void + parse (::xsd::cxx::xml::dom::parser< char >&, + ::xml_schema::flags); + + protected: + ::xsd::cxx::tree::one< weight_type > weight_; + + //@endcond + }; + + bool + operator== (const InputW&, const InputW&); + + bool + operator!= (const InputW&, const InputW&); + + /** * @brief Class corresponding to the %basePyNNCell schema type. * @@ -57034,12 +60684,12 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::double_ cm_type; + typedef ::xml_schema::float_ cm_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< cm_type, char, ::xsd::cxx::tree::schema_type::double_ > cm_traits; + typedef ::xsd::cxx::tree::traits< cm_type, char > cm_traits; /** * @brief Return a read-only (constant) reference to the attribute. @@ -57081,12 +60731,12 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::double_ i_offset_type; + typedef ::xml_schema::float_ i_offset_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< i_offset_type, char, ::xsd::cxx::tree::schema_type::double_ > i_offset_traits; + typedef ::xsd::cxx::tree::traits< i_offset_type, char > i_offset_traits; /** * @brief Return a read-only (constant) reference to the attribute. @@ -57128,12 +60778,12 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::double_ tau_syn_E_type; + typedef ::xml_schema::float_ tau_syn_E_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< tau_syn_E_type, char, ::xsd::cxx::tree::schema_type::double_ > tau_syn_E_traits; + typedef ::xsd::cxx::tree::traits< tau_syn_E_type, char > tau_syn_E_traits; /** * @brief Return a read-only (constant) reference to the attribute. @@ -57175,12 +60825,12 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::double_ tau_syn_I_type; + typedef ::xml_schema::float_ tau_syn_I_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< tau_syn_I_type, char, ::xsd::cxx::tree::schema_type::double_ > tau_syn_I_traits; + typedef ::xsd::cxx::tree::traits< tau_syn_I_type, char > tau_syn_I_traits; /** * @brief Return a read-only (constant) reference to the attribute. @@ -57222,12 +60872,12 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::double_ v_init_type; + typedef ::xml_schema::float_ v_init_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< v_init_type, char, ::xsd::cxx::tree::schema_type::double_ > v_init_traits; + typedef ::xsd::cxx::tree::traits< v_init_type, char > v_init_traits; /** * @brief Return a read-only (constant) reference to the attribute. @@ -57379,12 +61029,12 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::double_ tau_m_type; + typedef ::xml_schema::float_ tau_m_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< tau_m_type, char, ::xsd::cxx::tree::schema_type::double_ > tau_m_traits; + typedef ::xsd::cxx::tree::traits< tau_m_type, char > tau_m_traits; /** * @brief Return a read-only (constant) reference to the attribute. @@ -57426,12 +61076,12 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::double_ tau_refrac_type; + typedef ::xml_schema::float_ tau_refrac_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< tau_refrac_type, char, ::xsd::cxx::tree::schema_type::double_ > tau_refrac_traits; + typedef ::xsd::cxx::tree::traits< tau_refrac_type, char > tau_refrac_traits; /** * @brief Return a read-only (constant) reference to the attribute. @@ -57473,12 +61123,12 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::double_ v_reset_type; + typedef ::xml_schema::float_ v_reset_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< v_reset_type, char, ::xsd::cxx::tree::schema_type::double_ > v_reset_traits; + typedef ::xsd::cxx::tree::traits< v_reset_type, char > v_reset_traits; /** * @brief Return a read-only (constant) reference to the attribute. @@ -57520,12 +61170,12 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::double_ v_rest_type; + typedef ::xml_schema::float_ v_rest_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< v_rest_type, char, ::xsd::cxx::tree::schema_type::double_ > v_rest_traits; + typedef ::xsd::cxx::tree::traits< v_rest_type, char > v_rest_traits; /** * @brief Return a read-only (constant) reference to the attribute. @@ -57567,12 +61217,12 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::double_ v_thresh_type; + typedef ::xml_schema::float_ v_thresh_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< v_thresh_type, char, ::xsd::cxx::tree::schema_type::double_ > v_thresh_traits; + typedef ::xsd::cxx::tree::traits< v_thresh_type, char > v_thresh_traits; /** * @brief Return a read-only (constant) reference to the attribute. @@ -57729,12 +61379,12 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::double_ e_rev_E_type; + typedef ::xml_schema::float_ e_rev_E_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< e_rev_E_type, char, ::xsd::cxx::tree::schema_type::double_ > e_rev_E_traits; + typedef ::xsd::cxx::tree::traits< e_rev_E_type, char > e_rev_E_traits; /** * @brief Return a read-only (constant) reference to the attribute. @@ -57776,12 +61426,12 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::double_ e_rev_I_type; + typedef ::xml_schema::float_ e_rev_I_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< e_rev_I_type, char, ::xsd::cxx::tree::schema_type::double_ > e_rev_I_traits; + typedef ::xsd::cxx::tree::traits< e_rev_I_type, char > e_rev_I_traits; /** * @brief Return a read-only (constant) reference to the attribute. @@ -58253,12 +61903,12 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::double_ a_type; + typedef ::xml_schema::float_ a_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< a_type, char, ::xsd::cxx::tree::schema_type::double_ > a_traits; + typedef ::xsd::cxx::tree::traits< a_type, char > a_traits; /** * @brief Return a read-only (constant) reference to the attribute. @@ -58300,12 +61950,12 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::double_ b_type; + typedef ::xml_schema::float_ b_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< b_type, char, ::xsd::cxx::tree::schema_type::double_ > b_traits; + typedef ::xsd::cxx::tree::traits< b_type, char > b_traits; /** * @brief Return a read-only (constant) reference to the attribute. @@ -58347,12 +61997,12 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::double_ delta_T_type; + typedef ::xml_schema::float_ delta_T_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< delta_T_type, char, ::xsd::cxx::tree::schema_type::double_ > delta_T_traits; + typedef ::xsd::cxx::tree::traits< delta_T_type, char > delta_T_traits; /** * @brief Return a read-only (constant) reference to the attribute. @@ -58394,12 +62044,12 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::double_ tau_w_type; + typedef ::xml_schema::float_ tau_w_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< tau_w_type, char, ::xsd::cxx::tree::schema_type::double_ > tau_w_traits; + typedef ::xsd::cxx::tree::traits< tau_w_type, char > tau_w_traits; /** * @brief Return a read-only (constant) reference to the attribute. @@ -58441,12 +62091,12 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::double_ v_spike_type; + typedef ::xml_schema::float_ v_spike_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< v_spike_type, char, ::xsd::cxx::tree::schema_type::double_ > v_spike_traits; + typedef ::xsd::cxx::tree::traits< v_spike_type, char > v_spike_traits; /** * @brief Return a read-only (constant) reference to the attribute. @@ -58596,244 +62246,9 @@ namespace neuroml2 * * @nosubgrouping */ - class EIF_cond_alpha_isfa_ista: public ::neuroml2::basePyNNIaFCondCell + class EIF_cond_alpha_isfa_ista: public ::neuroml2::EIF_cond_exp_isfa_ista { public: - /** - * @name a - * - * @brief Accessor and modifier functions for the %a - * required attribute. - */ - //@{ - - /** - * @brief Attribute type. - */ - typedef ::xml_schema::double_ a_type; - - /** - * @brief Attribute traits type. - */ - typedef ::xsd::cxx::tree::traits< a_type, char, ::xsd::cxx::tree::schema_type::double_ > a_traits; - - /** - * @brief Return a read-only (constant) reference to the attribute. - * - * @return A constant reference to the attribute. - */ - const a_type& - a () const; - - /** - * @brief Return a read-write reference to the attribute. - * - * @return A reference to the attribute. - */ - a_type& - a (); - - /** - * @brief Set the attribute value. - * - * @param x A new value to set. - * - * This function makes a copy of its argument and sets it as - * the new value of the attribute. - */ - void - a (const a_type& x); - - //@} - - /** - * @name b - * - * @brief Accessor and modifier functions for the %b - * required attribute. - */ - //@{ - - /** - * @brief Attribute type. - */ - typedef ::xml_schema::double_ b_type; - - /** - * @brief Attribute traits type. - */ - typedef ::xsd::cxx::tree::traits< b_type, char, ::xsd::cxx::tree::schema_type::double_ > b_traits; - - /** - * @brief Return a read-only (constant) reference to the attribute. - * - * @return A constant reference to the attribute. - */ - const b_type& - b () const; - - /** - * @brief Return a read-write reference to the attribute. - * - * @return A reference to the attribute. - */ - b_type& - b (); - - /** - * @brief Set the attribute value. - * - * @param x A new value to set. - * - * This function makes a copy of its argument and sets it as - * the new value of the attribute. - */ - void - b (const b_type& x); - - //@} - - /** - * @name delta_T - * - * @brief Accessor and modifier functions for the %delta_T - * required attribute. - */ - //@{ - - /** - * @brief Attribute type. - */ - typedef ::xml_schema::double_ delta_T_type; - - /** - * @brief Attribute traits type. - */ - typedef ::xsd::cxx::tree::traits< delta_T_type, char, ::xsd::cxx::tree::schema_type::double_ > delta_T_traits; - - /** - * @brief Return a read-only (constant) reference to the attribute. - * - * @return A constant reference to the attribute. - */ - const delta_T_type& - delta_T () const; - - /** - * @brief Return a read-write reference to the attribute. - * - * @return A reference to the attribute. - */ - delta_T_type& - delta_T (); - - /** - * @brief Set the attribute value. - * - * @param x A new value to set. - * - * This function makes a copy of its argument and sets it as - * the new value of the attribute. - */ - void - delta_T (const delta_T_type& x); - - //@} - - /** - * @name tau_w - * - * @brief Accessor and modifier functions for the %tau_w - * required attribute. - */ - //@{ - - /** - * @brief Attribute type. - */ - typedef ::xml_schema::double_ tau_w_type; - - /** - * @brief Attribute traits type. - */ - typedef ::xsd::cxx::tree::traits< tau_w_type, char, ::xsd::cxx::tree::schema_type::double_ > tau_w_traits; - - /** - * @brief Return a read-only (constant) reference to the attribute. - * - * @return A constant reference to the attribute. - */ - const tau_w_type& - tau_w () const; - - /** - * @brief Return a read-write reference to the attribute. - * - * @return A reference to the attribute. - */ - tau_w_type& - tau_w (); - - /** - * @brief Set the attribute value. - * - * @param x A new value to set. - * - * This function makes a copy of its argument and sets it as - * the new value of the attribute. - */ - void - tau_w (const tau_w_type& x); - - //@} - - /** - * @name v_spike - * - * @brief Accessor and modifier functions for the %v_spike - * required attribute. - */ - //@{ - - /** - * @brief Attribute type. - */ - typedef ::xml_schema::double_ v_spike_type; - - /** - * @brief Attribute traits type. - */ - typedef ::xsd::cxx::tree::traits< v_spike_type, char, ::xsd::cxx::tree::schema_type::double_ > v_spike_traits; - - /** - * @brief Return a read-only (constant) reference to the attribute. - * - * @return A constant reference to the attribute. - */ - const v_spike_type& - v_spike () const; - - /** - * @brief Return a read-write reference to the attribute. - * - * @return A reference to the attribute. - */ - v_spike_type& - v_spike (); - - /** - * @brief Set the attribute value. - * - * @param x A new value to set. - * - * This function makes a copy of its argument and sets it as - * the new value of the attribute. - */ - void - v_spike (const v_spike_type& x); - - //@} - /** * @name Constructors */ @@ -58902,17 +62317,6 @@ namespace neuroml2 _clone (::xml_schema::flags f = 0, ::xml_schema::container* c = 0) const; - /** - * @brief Copy assignment operator. - * - * @param x An instance to make a copy of. - * @return A reference to itself. - * - * For polymorphic object models use the @c _clone function instead. - */ - EIF_cond_alpha_isfa_ista& - operator= (const EIF_cond_alpha_isfa_ista& x); - //@} /** @@ -58920,34 +62324,8 @@ namespace neuroml2 */ virtual ~EIF_cond_alpha_isfa_ista (); - - // Implementation. - // - - //@cond - - protected: - void - parse (::xsd::cxx::xml::dom::parser< char >&, - ::xml_schema::flags); - - protected: - ::xsd::cxx::tree::one< a_type > a_; - ::xsd::cxx::tree::one< b_type > b_; - ::xsd::cxx::tree::one< delta_T_type > delta_T_; - ::xsd::cxx::tree::one< tau_w_type > tau_w_; - ::xsd::cxx::tree::one< v_spike_type > v_spike_; - - //@endcond }; - bool - operator== (const EIF_cond_alpha_isfa_ista&, const EIF_cond_alpha_isfa_ista&); - - bool - operator!= (const EIF_cond_alpha_isfa_ista&, const EIF_cond_alpha_isfa_ista&); - - /** * @brief Class corresponding to the %HH_cond_exp schema type. * @@ -58967,12 +62345,12 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::double_ v_offset_type; + typedef ::xml_schema::float_ v_offset_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< v_offset_type, char, ::xsd::cxx::tree::schema_type::double_ > v_offset_traits; + typedef ::xsd::cxx::tree::traits< v_offset_type, char > v_offset_traits; /** * @brief Return a read-only (constant) reference to the attribute. @@ -59014,12 +62392,12 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::double_ e_rev_E_type; + typedef ::xml_schema::float_ e_rev_E_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< e_rev_E_type, char, ::xsd::cxx::tree::schema_type::double_ > e_rev_E_traits; + typedef ::xsd::cxx::tree::traits< e_rev_E_type, char > e_rev_E_traits; /** * @brief Return a read-only (constant) reference to the attribute. @@ -59061,12 +62439,12 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::double_ e_rev_I_type; + typedef ::xml_schema::float_ e_rev_I_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< e_rev_I_type, char, ::xsd::cxx::tree::schema_type::double_ > e_rev_I_traits; + typedef ::xsd::cxx::tree::traits< e_rev_I_type, char > e_rev_I_traits; /** * @brief Return a read-only (constant) reference to the attribute. @@ -59108,12 +62486,12 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::double_ e_rev_K_type; + typedef ::xml_schema::float_ e_rev_K_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< e_rev_K_type, char, ::xsd::cxx::tree::schema_type::double_ > e_rev_K_traits; + typedef ::xsd::cxx::tree::traits< e_rev_K_type, char > e_rev_K_traits; /** * @brief Return a read-only (constant) reference to the attribute. @@ -59155,12 +62533,12 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::double_ e_rev_Na_type; + typedef ::xml_schema::float_ e_rev_Na_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< e_rev_Na_type, char, ::xsd::cxx::tree::schema_type::double_ > e_rev_Na_traits; + typedef ::xsd::cxx::tree::traits< e_rev_Na_type, char > e_rev_Na_traits; /** * @brief Return a read-only (constant) reference to the attribute. @@ -59202,12 +62580,12 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::double_ e_rev_leak_type; + typedef ::xml_schema::float_ e_rev_leak_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< e_rev_leak_type, char, ::xsd::cxx::tree::schema_type::double_ > e_rev_leak_traits; + typedef ::xsd::cxx::tree::traits< e_rev_leak_type, char > e_rev_leak_traits; /** * @brief Return a read-only (constant) reference to the attribute. @@ -59249,12 +62627,12 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::double_ g_leak_type; + typedef ::xml_schema::float_ g_leak_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< g_leak_type, char, ::xsd::cxx::tree::schema_type::double_ > g_leak_traits; + typedef ::xsd::cxx::tree::traits< g_leak_type, char > g_leak_traits; /** * @brief Return a read-only (constant) reference to the attribute. @@ -59296,12 +62674,12 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::double_ gbar_K_type; + typedef ::xml_schema::float_ gbar_K_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< gbar_K_type, char, ::xsd::cxx::tree::schema_type::double_ > gbar_K_traits; + typedef ::xsd::cxx::tree::traits< gbar_K_type, char > gbar_K_traits; /** * @brief Return a read-only (constant) reference to the attribute. @@ -59343,12 +62721,12 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::double_ gbar_Na_type; + typedef ::xml_schema::float_ gbar_Na_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< gbar_Na_type, char, ::xsd::cxx::tree::schema_type::double_ > gbar_Na_traits; + typedef ::xsd::cxx::tree::traits< gbar_Na_type, char > gbar_Na_traits; /** * @brief Return a read-only (constant) reference to the attribute. @@ -59513,12 +62891,12 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::double_ tau_syn_type; + typedef ::xml_schema::float_ tau_syn_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< tau_syn_type, char, ::xsd::cxx::tree::schema_type::double_ > tau_syn_traits; + typedef ::xsd::cxx::tree::traits< tau_syn_type, char > tau_syn_traits; /** * @brief Return a read-only (constant) reference to the attribute. @@ -59662,12 +63040,12 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::double_ e_rev_type; + typedef ::xml_schema::float_ e_rev_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< e_rev_type, char, ::xsd::cxx::tree::schema_type::double_ > e_rev_traits; + typedef ::xsd::cxx::tree::traits< e_rev_type, char > e_rev_traits; /** * @brief Return a read-only (constant) reference to the attribute. @@ -59812,12 +63190,12 @@ namespace neuroml2 /** * @brief Attribute type. */ - typedef ::xml_schema::double_ e_rev_type; + typedef ::xml_schema::float_ e_rev_type; /** * @brief Attribute traits type. */ - typedef ::xsd::cxx::tree::traits< e_rev_type, char, ::xsd::cxx::tree::schema_type::double_ > e_rev_traits; + typedef ::xsd::cxx::tree::traits< e_rev_type, char > e_rev_traits; /** * @brief Return a read-only (constant) reference to the attribute. @@ -60437,6 +63815,9 @@ namespace neuroml2 ::std::ostream& operator<< (::std::ostream&, const DoubleGreaterThanZero&); + ::std::ostream& + operator<< (::std::ostream&, const ZeroOrOne&); + ::std::ostream& operator<< (::std::ostream&, const Notes&); @@ -60452,27 +63833,45 @@ namespace neuroml2 ::std::ostream& operator<< (::std::ostream&, const Constant&); + ::std::ostream& + operator<< (::std::ostream&, const Exposure&); + ::std::ostream& operator<< (::std::ostream&, const NamedDimensionalType&); + ::std::ostream& + operator<< (::std::ostream&, const NamedDimensionalVariable&); + ::std::ostream& operator<< (::std::ostream&, const Parameter&); + ::std::ostream& + operator<< (::std::ostream&, const LEMS_Property&); + ::std::ostream& operator<< (::std::ostream&, const Requirement&); + ::std::ostream& + operator<< (::std::ostream&, const InstanceRequirement&); + ::std::ostream& operator<< (::std::ostream&, const Dynamics&); ::std::ostream& operator<< (::std::ostream&, const DerivedVariable&); + ::std::ostream& + operator<< (::std::ostream&, const StateVariable&); + ::std::ostream& operator<< (::std::ostream&, const ConditionalDerivedVariable&); ::std::ostream& operator<< (::std::ostream&, const Case&); + ::std::ostream& + operator<< (::std::ostream&, const TimeDerivative&); + ::std::ostream& operator<< (::std::ostream&, const ZeroToOne&); @@ -60503,6 +63902,9 @@ namespace neuroml2 ::std::ostream& operator<< (::std::ostream&, const IonChannelHH&); + ::std::ostream& + operator<< (::std::ostream&, const IonChannelVShift&); + ::std::ostream& operator<< (::std::ostream&, channelTypes::value); @@ -60623,6 +64025,9 @@ namespace neuroml2 ::std::ostream& operator<< (::std::ostream&, const ExpThreeSynapse&); + ::std::ostream& + operator<< (::std::ostream&, const DoubleSynapse&); + ::std::ostream& operator<< (::std::ostream&, const BlockingPlasticSynapse&); @@ -60776,6 +64181,9 @@ namespace neuroml2 ::std::ostream& operator<< (::std::ostream&, const ChannelDensity&); + ::std::ostream& + operator<< (::std::ostream&, const ChannelDensityVShift&); + ::std::ostream& operator<< (::std::ostream&, const ChannelDensityNernst&); @@ -60842,6 +64250,9 @@ namespace neuroml2 ::std::ostream& operator<< (::std::ostream&, const VoltageClamp&); + ::std::ostream& + operator<< (::std::ostream&, const VoltageClampTriple&); + ::std::ostream& operator<< (::std::ostream&, const Spike&); @@ -60860,6 +64271,9 @@ namespace neuroml2 ::std::ostream& operator<< (::std::ostream&, const SpikeGeneratorPoisson&); + ::std::ostream& + operator<< (::std::ostream&, const SpikeGeneratorRefPoisson&); + ::std::ostream& operator<< (::std::ostream&, const PoissonFiringSynapse&); @@ -60923,6 +64337,9 @@ namespace neuroml2 ::std::ostream& operator<< (::std::ostream&, const SynapticConnection&); + ::std::ostream& + operator<< (::std::ostream&, const BaseProjection&); + ::std::ostream& operator<< (::std::ostream&, const Projection&); @@ -60950,6 +64367,9 @@ namespace neuroml2 ::std::ostream& operator<< (::std::ostream&, const ElectricalConnectionInstance&); + ::std::ostream& + operator<< (::std::ostream&, const ElectricalConnectionInstanceW&); + ::std::ostream& operator<< (::std::ostream&, const ContinuousProjection&); @@ -60959,6 +64379,9 @@ namespace neuroml2 ::std::ostream& operator<< (::std::ostream&, const ContinuousConnectionInstance&); + ::std::ostream& + operator<< (::std::ostream&, const ContinuousConnectionInstanceW&); + ::std::ostream& operator<< (::std::ostream&, const ExplicitInput&); @@ -60968,6 +64391,9 @@ namespace neuroml2 ::std::ostream& operator<< (::std::ostream&, const Input&); + ::std::ostream& + operator<< (::std::ostream&, const InputW&); + ::std::ostream& operator<< (::std::ostream&, const basePyNNCell&); @@ -61531,6 +64957,16 @@ namespace neuroml2 operator<< (::xml_schema::list_stream&, const DoubleGreaterThanZero&); + void + operator<< (::xercesc::DOMElement&, const ZeroOrOne&); + + void + operator<< (::xercesc::DOMAttr&, const ZeroOrOne&); + + void + operator<< (::xml_schema::list_stream&, + const ZeroOrOne&); + void operator<< (::xercesc::DOMElement&, const Notes&); @@ -61553,27 +64989,45 @@ namespace neuroml2 void operator<< (::xercesc::DOMElement&, const Constant&); + void + operator<< (::xercesc::DOMElement&, const Exposure&); + void operator<< (::xercesc::DOMElement&, const NamedDimensionalType&); + void + operator<< (::xercesc::DOMElement&, const NamedDimensionalVariable&); + void operator<< (::xercesc::DOMElement&, const Parameter&); + void + operator<< (::xercesc::DOMElement&, const LEMS_Property&); + void operator<< (::xercesc::DOMElement&, const Requirement&); + void + operator<< (::xercesc::DOMElement&, const InstanceRequirement&); + void operator<< (::xercesc::DOMElement&, const Dynamics&); void operator<< (::xercesc::DOMElement&, const DerivedVariable&); + void + operator<< (::xercesc::DOMElement&, const StateVariable&); + void operator<< (::xercesc::DOMElement&, const ConditionalDerivedVariable&); void operator<< (::xercesc::DOMElement&, const Case&); + void + operator<< (::xercesc::DOMElement&, const TimeDerivative&); + void operator<< (::xercesc::DOMElement&, const ZeroToOne&); @@ -61772,6 +65226,9 @@ namespace neuroml2 void operator<< (::xercesc::DOMElement&, const IonChannelHH&); + void + operator<< (::xercesc::DOMElement&, const IonChannelVShift&); + void operator<< (::xercesc::DOMElement&, const channelTypes&); @@ -61900,6 +65357,9 @@ namespace neuroml2 void operator<< (::xercesc::DOMElement&, const ExpThreeSynapse&); + void + operator<< (::xercesc::DOMElement&, const DoubleSynapse&); + void operator<< (::xercesc::DOMElement&, const BlockingPlasticSynapse&); @@ -62065,6 +65525,9 @@ namespace neuroml2 void operator<< (::xercesc::DOMElement&, const ChannelDensity&); + void + operator<< (::xercesc::DOMElement&, const ChannelDensityVShift&); + void operator<< (::xercesc::DOMElement&, const ChannelDensityNernst&); @@ -62131,6 +65594,9 @@ namespace neuroml2 void operator<< (::xercesc::DOMElement&, const VoltageClamp&); + void + operator<< (::xercesc::DOMElement&, const VoltageClampTriple&); + void operator<< (::xercesc::DOMElement&, const Spike&); @@ -62149,6 +65615,9 @@ namespace neuroml2 void operator<< (::xercesc::DOMElement&, const SpikeGeneratorPoisson&); + void + operator<< (::xercesc::DOMElement&, const SpikeGeneratorRefPoisson&); + void operator<< (::xercesc::DOMElement&, const PoissonFiringSynapse&); @@ -62224,6 +65693,9 @@ namespace neuroml2 void operator<< (::xercesc::DOMElement&, const SynapticConnection&); + void + operator<< (::xercesc::DOMElement&, const BaseProjection&); + void operator<< (::xercesc::DOMElement&, const Projection&); @@ -62251,6 +65723,9 @@ namespace neuroml2 void operator<< (::xercesc::DOMElement&, const ElectricalConnectionInstance&); + void + operator<< (::xercesc::DOMElement&, const ElectricalConnectionInstanceW&); + void operator<< (::xercesc::DOMElement&, const ContinuousProjection&); @@ -62260,6 +65735,9 @@ namespace neuroml2 void operator<< (::xercesc::DOMElement&, const ContinuousConnectionInstance&); + void + operator<< (::xercesc::DOMElement&, const ContinuousConnectionInstanceW&); + void operator<< (::xercesc::DOMElement&, const ExplicitInput&); @@ -62269,6 +65747,9 @@ namespace neuroml2 void operator<< (::xercesc::DOMElement&, const Input&); + void + operator<< (::xercesc::DOMElement&, const InputW&); + void operator<< (::xercesc::DOMElement&, const basePyNNCell&); @@ -62327,4 +65808,4 @@ namespace neuroml2 // // End epilogue. -#endif // NEUROML_API_SCHEMA_NEURO_ML_V2BETA4_HXX +#endif // NEUROML_API_SCHEMA_NEURO_ML_V2_1_HXX diff --git a/src/schema/NeuroML_v2beta4.xsd b/src/schema/NeuroML_v2.1.xsd similarity index 91% rename from src/schema/NeuroML_v2beta4.xsd rename to src/schema/NeuroML_v2.1.xsd index 1abc4d0..32352f7 100644 --- a/src/schema/NeuroML_v2beta4.xsd +++ b/src/schema/NeuroML_v2.1.xsd @@ -238,6 +238,16 @@ + + + + Value which is either 0 or 1 + + + + + + @@ -281,9 +291,12 @@ Contains an extension to NeuroML by creating custom LEMS ComponentType. + + + @@ -307,76 +320,120 @@ - + + + LEMS Exposure (ComponentType property) + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + LEMS ComponentType for Dynamics + + - - - LEMS ComponentType for DerivedVariable - - - - - - - - - - - - LEMS ComponentType for ConditionalDerivedVariable - - - - - - - - - - - + + + LEMS ComponentType for DerivedVariable + + + + + + + + + + + + + + + + + + + + + LEMS ComponentType for ConditionalDerivedVariable + + + + + + + - + + + + + - Double restricted to between 1 and 0 + Float value restricted to between 1 and 0 - + @@ -417,6 +474,8 @@ remove one of these --> + + @@ -451,8 +510,8 @@ - - + + @@ -511,6 +570,7 @@ + @@ -554,6 +614,8 @@ minOccurs="0" maxOccurs="unbounded"/> + + + + + Same as ionChannel, but with a vShift parameter to change voltage activation of gates. The exact usage of vShift in expressions for rates is determined by the individual gates. + + + + + + + + @@ -1190,6 +1265,21 @@ + + + + + + + + + + + + + + + @@ -1653,6 +1743,7 @@ + @@ -1886,6 +1977,17 @@ + + + + + + + + + + + @@ -2047,7 +2149,7 @@ Specifying the ion here again is redundant, the ion name should be the same as id. Kept for now - until LEMS implementation can select by id. TODO: remove. + until LEMS implementation can select by id. TODO: remove. @@ -2069,7 +2171,7 @@ - + @@ -2260,9 +2362,9 @@ + minOccurs="0" maxOccurs="unbounded"/> + minOccurs="0" maxOccurs="unbounded"/> @@ -2276,9 +2378,9 @@ + minOccurs="0" maxOccurs="unbounded"/> + minOccurs="0" maxOccurs="unbounded"/> @@ -2303,6 +2405,32 @@ + + + + + + + + + + + + + + + @@ -2372,6 +2500,15 @@ + + + + + + + + @@ -2385,7 +2522,7 @@ - + - + - Projection (set of synaptic connections) between two populations + Base for projection (set of synaptic connections) between two populations + + + + + + + + + Projection (set of synaptic connections) between two populations. Chemical/event based synaptic transmission + + + - - @@ -2699,13 +2846,12 @@ Projection between two populations consisting of electrical connections (gap junctions) - + + - - @@ -2731,6 +2877,17 @@ + + + + Projection between two populations consisting of analog connections (e.g. graded synapses). Includes setting of weight for the connection + + + + + + + @@ -2738,13 +2895,12 @@ Projection between two populations consisting of analog connections (e.g. graded synapses) - + + - - @@ -2773,6 +2929,18 @@ + + + Individual continuous/analog synaptic connection - instance based. Includes setting of _weight for the connection + + + + + + + + + Single explicit input. Introduced to test inputs in LEMS. Will probably be removed in favour of @@ -2786,12 +2954,13 @@ - Subject to change as it gets tested with LEMS + List of inputs to a population. Currents will be provided by the specified component. - + + @@ -2799,9 +2968,10 @@ + - Subject to change as it gets tested with LEMS + Individual input to the cell specified by target @@ -2809,6 +2979,18 @@ + + + + + Individual input to the cell specified by target. Includes setting of _weight for the connection + + + + + + + @@ -2820,11 +3002,11 @@ - - - - - + + + + + @@ -2834,11 +3016,11 @@ - - - - - + + + + + @@ -2848,8 +3030,8 @@ - - + + @@ -2897,11 +3079,11 @@ - - - - - + + + + + @@ -2909,12 +3091,7 @@ - - - - - - + @@ -2924,15 +3101,15 @@ - - - - - - - - - + + + + + + + + + @@ -2942,7 +3119,7 @@ - + @@ -2952,7 +3129,7 @@ - + @@ -2962,7 +3139,7 @@ - + From 79a38b9ffb346b46afdaa8e3dad5674cfdd8a70e Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Fri, 5 Mar 2021 14:53:49 +0000 Subject: [PATCH 02/17] chore: do not bundle xsd --- CMakeLists.txt | 5 - libxsd/FLOSSE | 89 - libxsd/GPLv2 | 340 -- libxsd/LICENSE | 26 - libxsd/README | 12 - libxsd/xsd/cxx/auto-array.hxx | 119 - libxsd/xsd/cxx/compilers/vc-8/post.hxx | 5 - libxsd/xsd/cxx/compilers/vc-8/pre.hxx | 27 - libxsd/xsd/cxx/config.hxx | 47 - libxsd/xsd/cxx/exceptions.hxx | 20 - libxsd/xsd/cxx/parser/document.hxx | 89 - libxsd/xsd/cxx/parser/document.txx | 128 - libxsd/xsd/cxx/parser/elements.hxx | 94 - libxsd/xsd/cxx/parser/elements.txx | 59 - libxsd/xsd/cxx/parser/error-handler.hxx | 56 - libxsd/xsd/cxx/parser/error-handler.txx | 40 - libxsd/xsd/cxx/parser/exceptions.hxx | 152 - libxsd/xsd/cxx/parser/exceptions.ixx | 128 - libxsd/xsd/cxx/parser/exceptions.txx | 58 - libxsd/xsd/cxx/parser/expat/elements.hxx | 362 -- libxsd/xsd/cxx/parser/expat/elements.txx | 821 ---- libxsd/xsd/cxx/parser/map.hxx | 78 - libxsd/xsd/cxx/parser/map.ixx | 26 - libxsd/xsd/cxx/parser/map.txx | 30 - .../xsd/cxx/parser/non-validating/parser.hxx | 247 -- .../xsd/cxx/parser/non-validating/parser.txx | 463 -- .../non-validating/xml-schema-pimpl.hxx | 792 ---- .../non-validating/xml-schema-pimpl.ixx | 128 - .../non-validating/xml-schema-pimpl.txx | 2067 --------- .../non-validating/xml-schema-pskel.hxx | 648 --- .../non-validating/xml-schema-pskel.ixx | 1248 ------ .../non-validating/xml-schema-pskel.txx | 68 - libxsd/xsd/cxx/parser/schema-exceptions.hxx | 186 - libxsd/xsd/cxx/parser/schema-exceptions.ixx | 144 - libxsd/xsd/cxx/parser/schema-exceptions.txx | 74 - libxsd/xsd/cxx/parser/substitution-map.hxx | 240 - libxsd/xsd/cxx/parser/substitution-map.txx | 83 - .../xsd/cxx/parser/validating/exceptions.hxx | 152 - .../xsd/cxx/parser/validating/exceptions.ixx | 162 - .../xsd/cxx/parser/validating/exceptions.txx | 96 - .../cxx/parser/validating/inheritance-map.hxx | 100 - .../cxx/parser/validating/inheritance-map.txx | 72 - libxsd/xsd/cxx/parser/validating/parser.hxx | 470 -- libxsd/xsd/cxx/parser/validating/parser.txx | 666 --- .../parser/validating/xml-schema-pimpl.hxx | 1122 ----- .../parser/validating/xml-schema-pimpl.ixx | 675 --- .../parser/validating/xml-schema-pimpl.txx | 2757 ------------ .../parser/validating/xml-schema-pskel.hxx | 648 --- .../parser/validating/xml-schema-pskel.ixx | 1248 ------ .../parser/validating/xml-schema-pskel.txx | 68 - libxsd/xsd/cxx/parser/xerces/elements.hxx | 464 -- libxsd/xsd/cxx/parser/xerces/elements.txx | 948 ---- libxsd/xsd/cxx/parser/xml-schema.hxx | 571 --- libxsd/xsd/cxx/parser/xml-schema.ixx | 1021 ----- libxsd/xsd/cxx/parser/xml-schema.txx | 33 - libxsd/xsd/cxx/post.hxx | 9 - libxsd/xsd/cxx/pre.hxx | 11 - libxsd/xsd/cxx/ro-string.hxx | 429 -- libxsd/xsd/cxx/ro-string.txx | 132 - libxsd/xsd/cxx/tree/ace-cdr-stream-common.hxx | 25 - .../cxx/tree/ace-cdr-stream-extraction.hxx | 347 -- .../xsd/cxx/tree/ace-cdr-stream-insertion.hxx | 248 -- libxsd/xsd/cxx/tree/bits/literals.hxx | 260 -- libxsd/xsd/cxx/tree/bits/literals.ixx | 875 ---- libxsd/xsd/cxx/tree/buffer.hxx | 336 -- libxsd/xsd/cxx/tree/buffer.txx | 146 - libxsd/xsd/cxx/tree/comparison-map.hxx | 112 - libxsd/xsd/cxx/tree/comparison-map.txx | 299 -- libxsd/xsd/cxx/tree/containers-wildcard.hxx | 1334 ------ libxsd/xsd/cxx/tree/containers.hxx | 1208 ----- libxsd/xsd/cxx/tree/containers.txx | 296 -- libxsd/xsd/cxx/tree/date-time-extraction.txx | 156 - libxsd/xsd/cxx/tree/date-time-insertion.txx | 187 - libxsd/xsd/cxx/tree/date-time-ostream.txx | 323 -- libxsd/xsd/cxx/tree/date-time.hxx | 1950 -------- libxsd/xsd/cxx/tree/date-time.ixx | 892 ---- libxsd/xsd/cxx/tree/date-time.txx | 93 - libxsd/xsd/cxx/tree/element-map.hxx | 147 - libxsd/xsd/cxx/tree/element-map.txx | 70 - libxsd/xsd/cxx/tree/elements.hxx | 1858 -------- libxsd/xsd/cxx/tree/elements.ixx | 266 -- libxsd/xsd/cxx/tree/elements.txx | 56 - libxsd/xsd/cxx/tree/error-handler.hxx | 61 - libxsd/xsd/cxx/tree/error-handler.txx | 31 - libxsd/xsd/cxx/tree/exceptions.hxx | 1033 ----- libxsd/xsd/cxx/tree/exceptions.txx | 509 --- libxsd/xsd/cxx/tree/facet.hxx | 42 - libxsd/xsd/cxx/tree/istream-fwd.hxx | 20 - libxsd/xsd/cxx/tree/istream.hxx | 454 -- libxsd/xsd/cxx/tree/iterator-adapter.hxx | 270 -- libxsd/xsd/cxx/tree/list.hxx | 134 - libxsd/xsd/cxx/tree/ostream.hxx | 291 -- libxsd/xsd/cxx/tree/parsing.hxx | 11 - libxsd/xsd/cxx/tree/parsing.txx | 919 ---- libxsd/xsd/cxx/tree/parsing/boolean.hxx | 75 - libxsd/xsd/cxx/tree/parsing/byte.hxx | 79 - libxsd/xsd/cxx/tree/parsing/date-time.txx | 701 --- libxsd/xsd/cxx/tree/parsing/decimal.hxx | 84 - libxsd/xsd/cxx/tree/parsing/double.hxx | 93 - libxsd/xsd/cxx/tree/parsing/element-map.txx | 41 - libxsd/xsd/cxx/tree/parsing/float.hxx | 93 - libxsd/xsd/cxx/tree/parsing/int.hxx | 79 - libxsd/xsd/cxx/tree/parsing/long.hxx | 79 - libxsd/xsd/cxx/tree/parsing/short.hxx | 79 - libxsd/xsd/cxx/tree/parsing/unsigned-byte.hxx | 79 - libxsd/xsd/cxx/tree/parsing/unsigned-int.hxx | 79 - libxsd/xsd/cxx/tree/parsing/unsigned-long.hxx | 79 - .../xsd/cxx/tree/parsing/unsigned-short.hxx | 79 - libxsd/xsd/cxx/tree/serialization.hxx | 65 - libxsd/xsd/cxx/tree/serialization.txx | 790 ---- libxsd/xsd/cxx/tree/serialization/boolean.hxx | 51 - libxsd/xsd/cxx/tree/serialization/byte.hxx | 45 - .../xsd/cxx/tree/serialization/date-time.txx | 619 --- libxsd/xsd/cxx/tree/serialization/decimal.hxx | 125 - libxsd/xsd/cxx/tree/serialization/double.hxx | 95 - .../cxx/tree/serialization/element-map.txx | 39 - libxsd/xsd/cxx/tree/serialization/float.hxx | 93 - libxsd/xsd/cxx/tree/serialization/int.hxx | 45 - libxsd/xsd/cxx/tree/serialization/long.hxx | 45 - libxsd/xsd/cxx/tree/serialization/short.hxx | 45 - .../cxx/tree/serialization/unsigned-byte.hxx | 45 - .../cxx/tree/serialization/unsigned-int.hxx | 45 - .../cxx/tree/serialization/unsigned-long.hxx | 45 - .../cxx/tree/serialization/unsigned-short.hxx | 45 - libxsd/xsd/cxx/tree/std-ostream-map.hxx | 113 - libxsd/xsd/cxx/tree/std-ostream-map.txx | 292 -- libxsd/xsd/cxx/tree/std-ostream-operators.hxx | 277 -- libxsd/xsd/cxx/tree/stream-extraction-map.hxx | 106 - libxsd/xsd/cxx/tree/stream-extraction-map.txx | 332 -- libxsd/xsd/cxx/tree/stream-extraction.hxx | 305 -- libxsd/xsd/cxx/tree/stream-insertion-map.hxx | 153 - libxsd/xsd/cxx/tree/stream-insertion-map.txx | 356 -- libxsd/xsd/cxx/tree/stream-insertion.hxx | 276 -- libxsd/xsd/cxx/tree/text.hxx | 29 - libxsd/xsd/cxx/tree/text.txx | 62 - libxsd/xsd/cxx/tree/type-factory-map.hxx | 174 - libxsd/xsd/cxx/tree/type-factory-map.txx | 479 -- libxsd/xsd/cxx/tree/type-serializer-map.hxx | 235 - libxsd/xsd/cxx/tree/type-serializer-map.txx | 573 --- libxsd/xsd/cxx/tree/types.hxx | 3943 ----------------- libxsd/xsd/cxx/tree/types.txx | 524 --- libxsd/xsd/cxx/tree/xdr-stream-common.hxx | 25 - libxsd/xsd/cxx/tree/xdr-stream-extraction.hxx | 307 -- libxsd/xsd/cxx/tree/xdr-stream-insertion.hxx | 271 -- libxsd/xsd/cxx/version.hxx | 28 - libxsd/xsd/cxx/xml/bits/literals.hxx | 82 - libxsd/xsd/cxx/xml/bits/literals.ixx | 260 -- libxsd/xsd/cxx/xml/char-iso8859-1.hxx | 71 - libxsd/xsd/cxx/xml/char-iso8859-1.txx | 111 - libxsd/xsd/cxx/xml/char-lcp.hxx | 55 - libxsd/xsd/cxx/xml/char-lcp.txx | 74 - libxsd/xsd/cxx/xml/char-utf8.hxx | 56 - libxsd/xsd/cxx/xml/char-utf8.txx | 303 -- libxsd/xsd/cxx/xml/dom/auto-ptr.hxx | 233 - .../cxx/xml/dom/bits/error-handler-proxy.hxx | 60 - .../cxx/xml/dom/bits/error-handler-proxy.txx | 67 - libxsd/xsd/cxx/xml/dom/elements.hxx | 35 - libxsd/xsd/cxx/xml/dom/elements.txx | 56 - libxsd/xsd/cxx/xml/dom/parsing-header.hxx | 23 - libxsd/xsd/cxx/xml/dom/parsing-source.hxx | 153 - libxsd/xsd/cxx/xml/dom/parsing-source.txx | 380 -- .../xsd/cxx/xml/dom/serialization-header.hxx | 80 - .../xsd/cxx/xml/dom/serialization-header.txx | 181 - .../xsd/cxx/xml/dom/serialization-source.hxx | 182 - .../xsd/cxx/xml/dom/serialization-source.txx | 363 -- libxsd/xsd/cxx/xml/dom/wildcard-source.hxx | 30 - libxsd/xsd/cxx/xml/dom/wildcard-source.txx | 37 - libxsd/xsd/cxx/xml/elements.hxx | 117 - libxsd/xsd/cxx/xml/elements.txx | 72 - libxsd/xsd/cxx/xml/error-handler.hxx | 58 - libxsd/xsd/cxx/xml/exceptions.hxx | 19 - libxsd/xsd/cxx/xml/qualified-name.hxx | 83 - .../cxx/xml/sax/bits/error-handler-proxy.hxx | 79 - .../cxx/xml/sax/bits/error-handler-proxy.txx | 77 - libxsd/xsd/cxx/xml/sax/std-input-source.hxx | 152 - libxsd/xsd/cxx/xml/std-memory-manager.hxx | 54 - libxsd/xsd/cxx/xml/string.hxx | 90 - libxsd/xsd/cxx/xml/string.ixx | 170 - libxsd/xsd/cxx/xml/string.txx | 162 - libxsd/xsd/cxx/zc-istream.hxx | 216 - libxsd/xsd/cxx/zc-istream.txx | 93 - 181 files changed, 53462 deletions(-) delete mode 100644 libxsd/FLOSSE delete mode 100644 libxsd/GPLv2 delete mode 100644 libxsd/LICENSE delete mode 100644 libxsd/README delete mode 100644 libxsd/xsd/cxx/auto-array.hxx delete mode 100644 libxsd/xsd/cxx/compilers/vc-8/post.hxx delete mode 100644 libxsd/xsd/cxx/compilers/vc-8/pre.hxx delete mode 100644 libxsd/xsd/cxx/config.hxx delete mode 100644 libxsd/xsd/cxx/exceptions.hxx delete mode 100644 libxsd/xsd/cxx/parser/document.hxx delete mode 100644 libxsd/xsd/cxx/parser/document.txx delete mode 100644 libxsd/xsd/cxx/parser/elements.hxx delete mode 100644 libxsd/xsd/cxx/parser/elements.txx delete mode 100644 libxsd/xsd/cxx/parser/error-handler.hxx delete mode 100644 libxsd/xsd/cxx/parser/error-handler.txx delete mode 100644 libxsd/xsd/cxx/parser/exceptions.hxx delete mode 100644 libxsd/xsd/cxx/parser/exceptions.ixx delete mode 100644 libxsd/xsd/cxx/parser/exceptions.txx delete mode 100644 libxsd/xsd/cxx/parser/expat/elements.hxx delete mode 100644 libxsd/xsd/cxx/parser/expat/elements.txx delete mode 100644 libxsd/xsd/cxx/parser/map.hxx delete mode 100644 libxsd/xsd/cxx/parser/map.ixx delete mode 100644 libxsd/xsd/cxx/parser/map.txx delete mode 100644 libxsd/xsd/cxx/parser/non-validating/parser.hxx delete mode 100644 libxsd/xsd/cxx/parser/non-validating/parser.txx delete mode 100644 libxsd/xsd/cxx/parser/non-validating/xml-schema-pimpl.hxx delete mode 100644 libxsd/xsd/cxx/parser/non-validating/xml-schema-pimpl.ixx delete mode 100644 libxsd/xsd/cxx/parser/non-validating/xml-schema-pimpl.txx delete mode 100644 libxsd/xsd/cxx/parser/non-validating/xml-schema-pskel.hxx delete mode 100644 libxsd/xsd/cxx/parser/non-validating/xml-schema-pskel.ixx delete mode 100644 libxsd/xsd/cxx/parser/non-validating/xml-schema-pskel.txx delete mode 100644 libxsd/xsd/cxx/parser/schema-exceptions.hxx delete mode 100644 libxsd/xsd/cxx/parser/schema-exceptions.ixx delete mode 100644 libxsd/xsd/cxx/parser/schema-exceptions.txx delete mode 100644 libxsd/xsd/cxx/parser/substitution-map.hxx delete mode 100644 libxsd/xsd/cxx/parser/substitution-map.txx delete mode 100644 libxsd/xsd/cxx/parser/validating/exceptions.hxx delete mode 100644 libxsd/xsd/cxx/parser/validating/exceptions.ixx delete mode 100644 libxsd/xsd/cxx/parser/validating/exceptions.txx delete mode 100644 libxsd/xsd/cxx/parser/validating/inheritance-map.hxx delete mode 100644 libxsd/xsd/cxx/parser/validating/inheritance-map.txx delete mode 100644 libxsd/xsd/cxx/parser/validating/parser.hxx delete mode 100644 libxsd/xsd/cxx/parser/validating/parser.txx delete mode 100644 libxsd/xsd/cxx/parser/validating/xml-schema-pimpl.hxx delete mode 100644 libxsd/xsd/cxx/parser/validating/xml-schema-pimpl.ixx delete mode 100644 libxsd/xsd/cxx/parser/validating/xml-schema-pimpl.txx delete mode 100644 libxsd/xsd/cxx/parser/validating/xml-schema-pskel.hxx delete mode 100644 libxsd/xsd/cxx/parser/validating/xml-schema-pskel.ixx delete mode 100644 libxsd/xsd/cxx/parser/validating/xml-schema-pskel.txx delete mode 100644 libxsd/xsd/cxx/parser/xerces/elements.hxx delete mode 100644 libxsd/xsd/cxx/parser/xerces/elements.txx delete mode 100644 libxsd/xsd/cxx/parser/xml-schema.hxx delete mode 100644 libxsd/xsd/cxx/parser/xml-schema.ixx delete mode 100644 libxsd/xsd/cxx/parser/xml-schema.txx delete mode 100644 libxsd/xsd/cxx/post.hxx delete mode 100644 libxsd/xsd/cxx/pre.hxx delete mode 100644 libxsd/xsd/cxx/ro-string.hxx delete mode 100644 libxsd/xsd/cxx/ro-string.txx delete mode 100644 libxsd/xsd/cxx/tree/ace-cdr-stream-common.hxx delete mode 100644 libxsd/xsd/cxx/tree/ace-cdr-stream-extraction.hxx delete mode 100644 libxsd/xsd/cxx/tree/ace-cdr-stream-insertion.hxx delete mode 100644 libxsd/xsd/cxx/tree/bits/literals.hxx delete mode 100644 libxsd/xsd/cxx/tree/bits/literals.ixx delete mode 100644 libxsd/xsd/cxx/tree/buffer.hxx delete mode 100644 libxsd/xsd/cxx/tree/buffer.txx delete mode 100644 libxsd/xsd/cxx/tree/comparison-map.hxx delete mode 100644 libxsd/xsd/cxx/tree/comparison-map.txx delete mode 100644 libxsd/xsd/cxx/tree/containers-wildcard.hxx delete mode 100644 libxsd/xsd/cxx/tree/containers.hxx delete mode 100644 libxsd/xsd/cxx/tree/containers.txx delete mode 100644 libxsd/xsd/cxx/tree/date-time-extraction.txx delete mode 100644 libxsd/xsd/cxx/tree/date-time-insertion.txx delete mode 100644 libxsd/xsd/cxx/tree/date-time-ostream.txx delete mode 100644 libxsd/xsd/cxx/tree/date-time.hxx delete mode 100644 libxsd/xsd/cxx/tree/date-time.ixx delete mode 100644 libxsd/xsd/cxx/tree/date-time.txx delete mode 100644 libxsd/xsd/cxx/tree/element-map.hxx delete mode 100644 libxsd/xsd/cxx/tree/element-map.txx delete mode 100644 libxsd/xsd/cxx/tree/elements.hxx delete mode 100644 libxsd/xsd/cxx/tree/elements.ixx delete mode 100644 libxsd/xsd/cxx/tree/elements.txx delete mode 100644 libxsd/xsd/cxx/tree/error-handler.hxx delete mode 100644 libxsd/xsd/cxx/tree/error-handler.txx delete mode 100644 libxsd/xsd/cxx/tree/exceptions.hxx delete mode 100644 libxsd/xsd/cxx/tree/exceptions.txx delete mode 100644 libxsd/xsd/cxx/tree/facet.hxx delete mode 100644 libxsd/xsd/cxx/tree/istream-fwd.hxx delete mode 100644 libxsd/xsd/cxx/tree/istream.hxx delete mode 100644 libxsd/xsd/cxx/tree/iterator-adapter.hxx delete mode 100644 libxsd/xsd/cxx/tree/list.hxx delete mode 100644 libxsd/xsd/cxx/tree/ostream.hxx delete mode 100644 libxsd/xsd/cxx/tree/parsing.hxx delete mode 100644 libxsd/xsd/cxx/tree/parsing.txx delete mode 100644 libxsd/xsd/cxx/tree/parsing/boolean.hxx delete mode 100644 libxsd/xsd/cxx/tree/parsing/byte.hxx delete mode 100644 libxsd/xsd/cxx/tree/parsing/date-time.txx delete mode 100644 libxsd/xsd/cxx/tree/parsing/decimal.hxx delete mode 100644 libxsd/xsd/cxx/tree/parsing/double.hxx delete mode 100644 libxsd/xsd/cxx/tree/parsing/element-map.txx delete mode 100644 libxsd/xsd/cxx/tree/parsing/float.hxx delete mode 100644 libxsd/xsd/cxx/tree/parsing/int.hxx delete mode 100644 libxsd/xsd/cxx/tree/parsing/long.hxx delete mode 100644 libxsd/xsd/cxx/tree/parsing/short.hxx delete mode 100644 libxsd/xsd/cxx/tree/parsing/unsigned-byte.hxx delete mode 100644 libxsd/xsd/cxx/tree/parsing/unsigned-int.hxx delete mode 100644 libxsd/xsd/cxx/tree/parsing/unsigned-long.hxx delete mode 100644 libxsd/xsd/cxx/tree/parsing/unsigned-short.hxx delete mode 100644 libxsd/xsd/cxx/tree/serialization.hxx delete mode 100644 libxsd/xsd/cxx/tree/serialization.txx delete mode 100644 libxsd/xsd/cxx/tree/serialization/boolean.hxx delete mode 100644 libxsd/xsd/cxx/tree/serialization/byte.hxx delete mode 100644 libxsd/xsd/cxx/tree/serialization/date-time.txx delete mode 100644 libxsd/xsd/cxx/tree/serialization/decimal.hxx delete mode 100644 libxsd/xsd/cxx/tree/serialization/double.hxx delete mode 100644 libxsd/xsd/cxx/tree/serialization/element-map.txx delete mode 100644 libxsd/xsd/cxx/tree/serialization/float.hxx delete mode 100644 libxsd/xsd/cxx/tree/serialization/int.hxx delete mode 100644 libxsd/xsd/cxx/tree/serialization/long.hxx delete mode 100644 libxsd/xsd/cxx/tree/serialization/short.hxx delete mode 100644 libxsd/xsd/cxx/tree/serialization/unsigned-byte.hxx delete mode 100644 libxsd/xsd/cxx/tree/serialization/unsigned-int.hxx delete mode 100644 libxsd/xsd/cxx/tree/serialization/unsigned-long.hxx delete mode 100644 libxsd/xsd/cxx/tree/serialization/unsigned-short.hxx delete mode 100644 libxsd/xsd/cxx/tree/std-ostream-map.hxx delete mode 100644 libxsd/xsd/cxx/tree/std-ostream-map.txx delete mode 100644 libxsd/xsd/cxx/tree/std-ostream-operators.hxx delete mode 100644 libxsd/xsd/cxx/tree/stream-extraction-map.hxx delete mode 100644 libxsd/xsd/cxx/tree/stream-extraction-map.txx delete mode 100644 libxsd/xsd/cxx/tree/stream-extraction.hxx delete mode 100644 libxsd/xsd/cxx/tree/stream-insertion-map.hxx delete mode 100644 libxsd/xsd/cxx/tree/stream-insertion-map.txx delete mode 100644 libxsd/xsd/cxx/tree/stream-insertion.hxx delete mode 100644 libxsd/xsd/cxx/tree/text.hxx delete mode 100644 libxsd/xsd/cxx/tree/text.txx delete mode 100644 libxsd/xsd/cxx/tree/type-factory-map.hxx delete mode 100644 libxsd/xsd/cxx/tree/type-factory-map.txx delete mode 100644 libxsd/xsd/cxx/tree/type-serializer-map.hxx delete mode 100644 libxsd/xsd/cxx/tree/type-serializer-map.txx delete mode 100644 libxsd/xsd/cxx/tree/types.hxx delete mode 100644 libxsd/xsd/cxx/tree/types.txx delete mode 100644 libxsd/xsd/cxx/tree/xdr-stream-common.hxx delete mode 100644 libxsd/xsd/cxx/tree/xdr-stream-extraction.hxx delete mode 100644 libxsd/xsd/cxx/tree/xdr-stream-insertion.hxx delete mode 100644 libxsd/xsd/cxx/version.hxx delete mode 100644 libxsd/xsd/cxx/xml/bits/literals.hxx delete mode 100644 libxsd/xsd/cxx/xml/bits/literals.ixx delete mode 100644 libxsd/xsd/cxx/xml/char-iso8859-1.hxx delete mode 100644 libxsd/xsd/cxx/xml/char-iso8859-1.txx delete mode 100644 libxsd/xsd/cxx/xml/char-lcp.hxx delete mode 100644 libxsd/xsd/cxx/xml/char-lcp.txx delete mode 100644 libxsd/xsd/cxx/xml/char-utf8.hxx delete mode 100644 libxsd/xsd/cxx/xml/char-utf8.txx delete mode 100644 libxsd/xsd/cxx/xml/dom/auto-ptr.hxx delete mode 100644 libxsd/xsd/cxx/xml/dom/bits/error-handler-proxy.hxx delete mode 100644 libxsd/xsd/cxx/xml/dom/bits/error-handler-proxy.txx delete mode 100644 libxsd/xsd/cxx/xml/dom/elements.hxx delete mode 100644 libxsd/xsd/cxx/xml/dom/elements.txx delete mode 100644 libxsd/xsd/cxx/xml/dom/parsing-header.hxx delete mode 100644 libxsd/xsd/cxx/xml/dom/parsing-source.hxx delete mode 100644 libxsd/xsd/cxx/xml/dom/parsing-source.txx delete mode 100644 libxsd/xsd/cxx/xml/dom/serialization-header.hxx delete mode 100644 libxsd/xsd/cxx/xml/dom/serialization-header.txx delete mode 100644 libxsd/xsd/cxx/xml/dom/serialization-source.hxx delete mode 100644 libxsd/xsd/cxx/xml/dom/serialization-source.txx delete mode 100644 libxsd/xsd/cxx/xml/dom/wildcard-source.hxx delete mode 100644 libxsd/xsd/cxx/xml/dom/wildcard-source.txx delete mode 100644 libxsd/xsd/cxx/xml/elements.hxx delete mode 100644 libxsd/xsd/cxx/xml/elements.txx delete mode 100644 libxsd/xsd/cxx/xml/error-handler.hxx delete mode 100644 libxsd/xsd/cxx/xml/exceptions.hxx delete mode 100644 libxsd/xsd/cxx/xml/qualified-name.hxx delete mode 100644 libxsd/xsd/cxx/xml/sax/bits/error-handler-proxy.hxx delete mode 100644 libxsd/xsd/cxx/xml/sax/bits/error-handler-proxy.txx delete mode 100644 libxsd/xsd/cxx/xml/sax/std-input-source.hxx delete mode 100644 libxsd/xsd/cxx/xml/std-memory-manager.hxx delete mode 100644 libxsd/xsd/cxx/xml/string.hxx delete mode 100644 libxsd/xsd/cxx/xml/string.ixx delete mode 100644 libxsd/xsd/cxx/xml/string.txx delete mode 100644 libxsd/xsd/cxx/zc-istream.hxx delete mode 100644 libxsd/xsd/cxx/zc-istream.txx diff --git a/CMakeLists.txt b/CMakeLists.txt index 0488f74..378e702 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,11 +74,6 @@ if (XSD_FOUND) ${PROJECT_SOURCE_DIR}/src/schema COMMENT "Copying new XSD wrappers to source tree" VERBATIM) -else (XSD_FOUND) - # Use pre-generated sources & CodeSynthesis headers shipped with the project - set(XSD_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/libxsd") - list(APPEND NeuroML_INCLUDES "${XSD_INCLUDE_DIR}" "${PROJECT_SOURCE_DIR}/src/schema") - set(NeuroML_SCHEMA_SRCS "${PROJECT_SOURCE_DIR}/src/schema/${NeuroML_SCHEMA_NAME}.cxx") endif (XSD_FOUND) # The main API library diff --git a/libxsd/FLOSSE b/libxsd/FLOSSE deleted file mode 100644 index cbf8b2c..0000000 --- a/libxsd/FLOSSE +++ /dev/null @@ -1,89 +0,0 @@ -1. Intent - -We want specified Free/Libre and Open Source Software ("FLOSS") to be -able to use the specified GPL-licensed XSD runtime library (libxsd) and -XSD generated code (collectively called the "Program") despite the fact -that not all FLOSS licenses are compatible with version 2 of the GNU -General Public License (the "GPL"). - -It is our intent to allow distribution of the entire Derivative Work -(including the Program) under one or more of the FLOSS licenses listed -in section 3 (section 2.a). It is also our intent to disallow simple -relicensing of the Program for the sole purpose of using it in -proprietary applications (section 2.b and 2.c). As an example, consider -two hypothetical scenarios: - - a) You created a program that uses the XSD generated code and the XSD - runtime library to access information in XML instance documents. - Your program performs useful computations based on this information - (sections 2.b and 2.c are satisfied). You distribute your program, - including the XSD generated code and the XSD runtime library under - the BSD license and make it available at no charge to all third - parties (section 2.a is satisfied). Later you (or someone else) may - choose to base their proprietary application on your code since the - BSD license does not prohibit it. - - This scenario falls under this FLOSS Exception. - - - b) You created a library that uses the XSD generated code and the XSD - runtime library to access information in XML instance documents. You - did not add to the library any other useful code that uses the XSD - generated code or the XSD runtime library (neither section 2.b nor - 2.c is satisfied). You distribute your library, including the XSD - generated code and the XSD runtime library under the BSD license and - make it available at no charge to all third parties (section 2.a - is satisfied). Later you base your proprietary application on this - library since the BSD license does not prohibit it. - - This scenario does not fall under this FLOSS Exception (neither - section 2.b nor 2.c is satisfied). You created the library for the - sole purpose of making the XSD generated code and the XSD runtime - library available to your proprietary application. - - -2. Legal Terms and Conditions - -As a special exception to the terms and conditions of version 2 of -the GPL you are free to distribute a verbatim copy of the Program -as part of the Derivative Work that is formed from the Program or -any part thereof and one or more works (each, a "FLOSS Work") as -long as you also meet all of these conditions: - - a) You must cause the Derivative Work that in whole or in part - contains or is derived from the Program or any part thereof, - to be licensed as a whole at no charge to all third parties - under the terms of one or more of the licenses listed in - section 3. - - b) The Derivative Work should contain one or more FLOSS Work that - can be reasonably considered as derived from the Program or some - part thereof. - - c) The Derivative Work should not contain any part of the Program - that cannot be reasonably considered as a base of one or more - FLOSS Work. - - -3. FLOSS License List - - a) Any license listed in the "GPL-Compatible Free Software Licenses" - and the "GPL-Incompatible Free Software Licenses" sections of the - License List as published by the Free Software Foundation (FSF): - - http://www.gnu.org/licenses/license-list.html - - -4. Definitions - -Terms used, but not defined, herein shall have the meaning provided in -the GPL. - -Derivative Work means a derivative work under copyright law. - - -5. Applicability - -You may choose to redistribute a copy of the Program exclusively under -the terms of the GPL by removing the FLOSS Exception notice from that -copy of the Program. diff --git a/libxsd/GPLv2 b/libxsd/GPLv2 deleted file mode 100644 index 3912109..0000000 --- a/libxsd/GPLv2 +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/libxsd/LICENSE b/libxsd/LICENSE deleted file mode 100644 index 42346bf..0000000 --- a/libxsd/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License version 2 as -published by the Free Software Foundation. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -In addition, as a special exception, Code Synthesis Tools CC gives -permission to link this program with the Xerces-C++ library (or with -modified versions of Xerces-C++ that use the same license as Xerces-C++), -and distribute linked combinations including the two. You must obey -the GNU General Public License version 2 in all respects for all of -the code used other than Xerces-C++. If you modify this copy of the -program, you may extend this exception to your version of the program, -but you are not obligated to do so. If you do not wish to do so, delete -this exception statement from your version. - -In addition, Code Synthesis Tools CC makes a special exception for -the Free/Libre and Open Source Software (FLOSS) which is described -in the accompanying FLOSSE file. diff --git a/libxsd/README b/libxsd/README deleted file mode 100644 index 25fd38a..0000000 --- a/libxsd/README +++ /dev/null @@ -1,12 +0,0 @@ -libxsd is a runtime library for language mappings generated by -CodeSynthesis XSD, a W3C XML Schema to C++ data binding compiler. - -See the LICENSE file for distribution conditions. - -See the INSTALL file for prerequisites and installation instructions. - -The project page is at http://www.codesynthesis.com/projects/xsd/ - -Send bug reports or any other feedback to the xsd-users@codesynthesis.com -mailing list. - diff --git a/libxsd/xsd/cxx/auto-array.hxx b/libxsd/xsd/cxx/auto-array.hxx deleted file mode 100644 index 584785e..0000000 --- a/libxsd/xsd/cxx/auto-array.hxx +++ /dev/null @@ -1,119 +0,0 @@ -// file : xsd/cxx/auto-array.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_AUTO_ARRAY_HXX -#define XSD_CXX_AUTO_ARRAY_HXX - -#include // XSD_CXX11 - -#ifdef XSD_CXX11 -# error use std::unique_ptr instead of non-standard auto_array -#endif - -#include // std::size_t - -namespace xsd -{ - namespace cxx - { - template - struct std_array_deleter - { - void - operator() (T* p) const - { - delete[] p; - } - }; - - // Simple automatic array. The second template parameter is - // an optional deleter type. If not specified, delete[] - // is used. - // - template > - struct auto_array - { - auto_array (T a[]) - : a_ (a), d_ (0) - { - } - - auto_array (T a[], const D& d) - : a_ (a), d_ (&d) - { - } - - ~auto_array () - { - if (d_ != 0) - (*d_) (a_); - else - delete[] a_; - } - - T& - operator[] (std::size_t index) const - { - return a_[index]; - } - - T* - get () const - { - return a_; - } - - T* - release () - { - T* tmp (a_); - a_ = 0; - return tmp; - } - - void - reset (T a[] = 0) - { - if (a_ != a) - { - if (d_ != 0) - (*d_) (a_); - else - delete[] a_; - - a_ = a; - } - } - - typedef void (auto_array::*bool_convertible)(); - - operator bool_convertible () const - { - return a_ ? &auto_array::true_ : 0; - } - - private: - auto_array (const auto_array&); - - auto_array& - operator= (const auto_array&); - - private: - void - true_ (); - - private: - T* a_; - const D* d_; - }; - - template - void auto_array:: - true_ () - { - } - } -} - -#endif // XSD_CXX_AUTO_ARRAY_HXX diff --git a/libxsd/xsd/cxx/compilers/vc-8/post.hxx b/libxsd/xsd/cxx/compilers/vc-8/post.hxx deleted file mode 100644 index a8d25a6..0000000 --- a/libxsd/xsd/cxx/compilers/vc-8/post.hxx +++ /dev/null @@ -1,5 +0,0 @@ -// file : xsd/cxx/compilers/vc-8/post.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#pragma warning (pop) diff --git a/libxsd/xsd/cxx/compilers/vc-8/pre.hxx b/libxsd/xsd/cxx/compilers/vc-8/pre.hxx deleted file mode 100644 index 82ca41d..0000000 --- a/libxsd/xsd/cxx/compilers/vc-8/pre.hxx +++ /dev/null @@ -1,27 +0,0 @@ -// file : xsd/cxx/compilers/vc-8/pre.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -// These warnings had to be disabled "for good". -// -#pragma warning (disable:4250) // inherits via dominance -#pragma warning (disable:4661) // no definition for explicit instantiation - - -// Push warning state. -// -#pragma warning (push, 3) - - -// Disabled warnings. -// -#pragma warning (disable:4355) // passing 'this' to a member -#pragma warning (disable:4800) // forcing value to bool -#pragma warning (disable:4275) // non dll-interface base -#pragma warning (disable:4251) // base needs to have dll-interface -#pragma warning (disable:4224) // nonstandard extension (/Za option) - - -// Elevated warnings. -// -#pragma warning (2:4239) // standard doesn't allow this conversion diff --git a/libxsd/xsd/cxx/config.hxx b/libxsd/xsd/cxx/config.hxx deleted file mode 100644 index 076b107..0000000 --- a/libxsd/xsd/cxx/config.hxx +++ /dev/null @@ -1,47 +0,0 @@ -// file : xsd/cxx/config.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_CONFIG_HXX -#define XSD_CXX_CONFIG_HXX - -#include - -// Available C++11 features. -// -#ifdef XSD_CXX11 -#ifdef _MSC_VER -# if _MSC_VER >= 1600 -# define XSD_CXX11_NULLPTR -# if _MSC_VER >= 1800 -# define XSD_CXX11_TEMPLATE_ALIAS -# endif -# endif -#else -# if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L -# ifdef __GNUC__ -# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4 -# define XSD_CXX11_NULLPTR -# endif -# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || __GNUC__ > 4 -# define XSD_CXX11_TEMPLATE_ALIAS -# endif -# else -# define XSD_CXX11_NULLPTR -# define XSD_CXX11_TEMPLATE_ALIAS -# endif -# endif -#endif -#endif // XSD_CXX11 - -#ifdef XSD_CXX11 -# define XSD_AUTO_PTR std::unique_ptr -#else -# define XSD_AUTO_PTR std::auto_ptr -#endif - -// Macro to suppress the unused variable warning. -// -#define XSD_UNUSED(x) (void)x - -#endif // XSD_CXX_CONFIG_HXX diff --git a/libxsd/xsd/cxx/exceptions.hxx b/libxsd/xsd/cxx/exceptions.hxx deleted file mode 100644 index 45f5dc6..0000000 --- a/libxsd/xsd/cxx/exceptions.hxx +++ /dev/null @@ -1,20 +0,0 @@ -// file : xsd/cxx/exceptions.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_EXCEPTIONS_HXX -#define XSD_CXX_EXCEPTIONS_HXX - -#include // std::exception - -namespace xsd -{ - namespace cxx - { - struct exception: std::exception - { - }; - } -} - -#endif // XSD_CXX_EXCEPTIONS_HXX diff --git a/libxsd/xsd/cxx/parser/document.hxx b/libxsd/xsd/cxx/parser/document.hxx deleted file mode 100644 index 731808b..0000000 --- a/libxsd/xsd/cxx/parser/document.hxx +++ /dev/null @@ -1,89 +0,0 @@ -// file : xsd/cxx/parser/document.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_PARSER_DOCUMENT_HXX -#define XSD_CXX_PARSER_DOCUMENT_HXX - -#include -#include // std::size_t - -#include -#include - -namespace xsd -{ - namespace cxx - { - namespace parser - { - // If you want to use a different underlying XML parser, all you - // need to do is to route events to this interface. - // - template - class document - { - public: - virtual - ~document (); - - document (parser_base& root, - const std::basic_string& ns, - const std::basic_string& name); - - public: - // The type argument is a type name and namespace from the - // xsi:type attribute in the form " " with - // the space and namespace part absent if the type does not - // have a namespace or 0 if xsi:type is not present. - // - void - start_element (const ro_string& ns, - const ro_string& name, - const ro_string* type); - - void - end_element (const ro_string& ns, const ro_string& name); - - void - attribute (const ro_string& ns, - const ro_string& name, - const ro_string& value); - - void - characters (const ro_string&); - - protected: - document (); - - // This function is called to obtain the root element type parser. - // If the returned pointed is 0 then the whole document content - // is ignored. - // - virtual parser_base* - start_root_element (const ro_string& ns, - const ro_string& name, - const ro_string* type); - - // This function is called to indicate the completion of document - // parsing. The parser argument contains the pointer returned by - // start_root_element. - // - virtual void - end_root_element (const ro_string& ns, - const ro_string& name, - parser_base* parser); - - private: - parser_base* root_; - std::basic_string ns_; - std::basic_string name_; - std::size_t depth_; - }; - } - } -} - -#include - -#endif // XSD_CXX_PARSER_DOCUMENT_HXX diff --git a/libxsd/xsd/cxx/parser/document.txx b/libxsd/xsd/cxx/parser/document.txx deleted file mode 100644 index 3c25574..0000000 --- a/libxsd/xsd/cxx/parser/document.txx +++ /dev/null @@ -1,128 +0,0 @@ -// file : xsd/cxx/parser/document.txx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#include - -#include - -namespace xsd -{ - namespace cxx - { - namespace parser - { - // document - // - template - document:: - ~document () - { - } - - template - document:: - document (parser_base& root, - const std::basic_string& ns, - const std::basic_string& name) - : root_ (&root), ns_ (ns), name_ (name), depth_ (0) - { - } - - template - document:: - document () - : root_ (0), depth_ (0) - { - } - - template - void document:: - start_element (const ro_string& ns, - const ro_string& name, - const ro_string* type) - { - if (depth_++ > 0) - { - if (root_) - root_->_start_element (ns, name, type); - } - else - { - root_ = start_root_element (ns, name, type); - - if (root_) - { - // pre () is called by the user. - // - root_->_pre_impl (); - } - } - } - - template - void document:: - end_element (const ro_string& ns, const ro_string& name) - { - assert (depth_ > 0); - - if (--depth_ > 0) - { - if (root_) - root_->_end_element (ns, name); - } - else - { - if (root_) - { - root_->_post_impl (); - // - // post() is called by the user. - } - - end_root_element (ns, name, root_); - } - } - - template - void document:: - attribute (const ro_string& ns, - const ro_string& name, - const ro_string& value) - { - if (root_) - root_->_attribute (ns, name, value); - } - - template - void document:: - characters (const ro_string& s) - { - if (root_) - root_->_characters (s); - } - - template - parser_base* document:: - start_root_element (const ro_string& ns, - const ro_string& name, - const ro_string*) - { - if (name_ == name && ns_ == ns) - { - return root_; - } - else - throw expected_element (ns_, name_, ns, name); - } - - template - void document:: - end_root_element (const ro_string&, - const ro_string&, - parser_base*) - { - } - } - } -} diff --git a/libxsd/xsd/cxx/parser/elements.hxx b/libxsd/xsd/cxx/parser/elements.hxx deleted file mode 100644 index 2f814d1..0000000 --- a/libxsd/xsd/cxx/parser/elements.hxx +++ /dev/null @@ -1,94 +0,0 @@ -// file : xsd/cxx/parser/elements.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_PARSER_ELEMENTS_HXX -#define XSD_CXX_PARSER_ELEMENTS_HXX - -#include - -namespace xsd -{ - namespace cxx - { - namespace parser - { - // pre() and post() are overridable pre/post callbacks, i.e., the - // derived parser can override them without calling the base version. - // _pre() and _post() are not overridable pre/post callbacks in the - // sense that the derived parser may override them but has to call - // the base version. The call sequence is as shown below: - // - // pre () - // _pre () - // _post () - // post () - // - template - class parser_base - { - public: - virtual - ~parser_base (); - - virtual void - pre (); - - virtual void - _pre (); - - // The type argument is a type name and namespace from the - // xsi:type attribute in the form " " with - // the space and namespace part absent if the type does not - // have a namespace or 0 if xsi:type is not present. - // - virtual void - _start_element (const ro_string& ns, - const ro_string& name, - const ro_string* type) = 0; - - virtual void - _end_element (const ro_string& ns, - const ro_string& name) = 0; - - virtual void - _attribute (const ro_string& ns, - const ro_string& name, - const ro_string& value) = 0; - - virtual void - _characters (const ro_string&) = 0; - - virtual void - _post (); - - // The post() signature varies depending on the parser return - // type. - // - - // Implementation callbacks for _pre and _post. The _pre and _post - // callbacks should never be called directly. Instead, the *_impl - // versions should be used. By default _pre_impl and _post_impl - // simply call _pre and _post respectively. - // - virtual void - _pre_impl (); - - virtual void - _post_impl (); - - public: - // Dynamic type in the form " " with - // the space and namespace part absent if the type does - // not have a namespace. Used in polymorphism-aware code. - // - virtual const C* - _dynamic_type () const; - }; - } - } -} - -#include - -#endif // XSD_CXX_PARSER_ELEMENTS_HXX diff --git a/libxsd/xsd/cxx/parser/elements.txx b/libxsd/xsd/cxx/parser/elements.txx deleted file mode 100644 index 3aaf017..0000000 --- a/libxsd/xsd/cxx/parser/elements.txx +++ /dev/null @@ -1,59 +0,0 @@ -// file : xsd/cxx/parser/elements.txx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -namespace xsd -{ - namespace cxx - { - namespace parser - { - // parser_base - // - template - parser_base:: - ~parser_base () - { - } - - template - void parser_base:: - pre () - { - } - - template - void parser_base:: - _pre () - { - } - - template - void parser_base:: - _post () - { - } - - template - void parser_base:: - _pre_impl () - { - _pre (); - } - - template - void parser_base:: - _post_impl () - { - _post (); - } - - template - const C* parser_base:: - _dynamic_type () const - { - return 0; - } - } - } -} diff --git a/libxsd/xsd/cxx/parser/error-handler.hxx b/libxsd/xsd/cxx/parser/error-handler.hxx deleted file mode 100644 index 1352bec..0000000 --- a/libxsd/xsd/cxx/parser/error-handler.hxx +++ /dev/null @@ -1,56 +0,0 @@ -// file : xsd/cxx/parser/error-handler.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_PARSER_ERROR_HANDLER_HXX -#define XSD_CXX_PARSER_ERROR_HANDLER_HXX - -#include - -#include - -namespace xsd -{ - namespace cxx - { - namespace parser - { - template - class error_handler: public xml::error_handler - { - public: - typedef typename xml::error_handler::severity severity; - - error_handler () - : failed_ (false) - { - } - - virtual bool - handle (const std::basic_string& id, - unsigned long line, - unsigned long column, - severity s, - const std::basic_string& message); - - void - throw_if_failed () const; - - void - reset () - { - failed_ = false; - diagnostics_.clear (); - } - - private: - bool failed_; - diagnostics diagnostics_; - }; - } - } -} - -#include - -#endif // XSD_CXX_PARSER_ERROR_HANDLER_HXX diff --git a/libxsd/xsd/cxx/parser/error-handler.txx b/libxsd/xsd/cxx/parser/error-handler.txx deleted file mode 100644 index db247a7..0000000 --- a/libxsd/xsd/cxx/parser/error-handler.txx +++ /dev/null @@ -1,40 +0,0 @@ -// file : xsd/cxx/parser/error-handler.txx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -namespace xsd -{ - namespace cxx - { - namespace parser - { - template - bool error_handler:: - handle (const std::basic_string& id, - unsigned long line, - unsigned long column, - severity s, - const std::basic_string& message) - { - diagnostics_.push_back ( - error (s == severity::warning - ? cxx::parser::severity::warning - : cxx::parser::severity::error, - id, line, column, message)); - - if (!failed_ && s != severity::warning) - failed_ = true; - - return true; - } - - template - void error_handler:: - throw_if_failed () const - { - if (failed_) - throw parsing (diagnostics_); - } - } - } -} diff --git a/libxsd/xsd/cxx/parser/exceptions.hxx b/libxsd/xsd/cxx/parser/exceptions.hxx deleted file mode 100644 index 04cf30f..0000000 --- a/libxsd/xsd/cxx/parser/exceptions.hxx +++ /dev/null @@ -1,152 +0,0 @@ -// file : xsd/cxx/parser/exceptions.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_PARSER_EXCEPTIONS_HXX -#define XSD_CXX_PARSER_EXCEPTIONS_HXX - -#include -#include -#include - -#include // xsd::cxx::exception -#include - -namespace xsd -{ - namespace cxx - { - namespace parser - { - // - // - template - struct exception: xsd::cxx::exception - { - friend - std::basic_ostream& - operator<< (std::basic_ostream& os, const exception& e) - { - e.print (os); - return os; - } - - protected: - virtual void - print (std::basic_ostream&) const = 0; - }; - - - // - // - struct severity - { - enum value - { - warning, - error - }; - - severity (value v) : v_ (v) {} - operator value () const { return v_; } - - private: - value v_; - }; - - template - struct error - { - error (cxx::parser::severity, - const std::basic_string& id, - unsigned long line, - unsigned long column, - const std::basic_string& message); - - cxx::parser::severity - severity () const - { - return severity_; - } - - const std::basic_string& - id () const - { - return id_; - } - - unsigned long - line () const - { - return line_; - } - - unsigned long - column () const - { - return column_; - } - - const std::basic_string& - message () const - { - return message_; - } - - private: - cxx::parser::severity severity_; - std::basic_string id_; - unsigned long line_; - unsigned long column_; - std::basic_string message_; - }; - - // See exceptions.ixx for operator<< (error). - - - // - // - template - struct diagnostics: std::vector > - { - }; - - // See exceptions.ixx for operator<< (diagnostics). - - // - // - template - struct parsing: exception - { - virtual - ~parsing () throw (); - - parsing (); - - parsing (const cxx::parser::diagnostics&); - - const cxx::parser::diagnostics& - diagnostics () const - { - return diagnostics_; - } - - virtual const char* - what () const throw (); - - protected: - virtual void - print (std::basic_ostream&) const; - - private: - cxx::parser::diagnostics diagnostics_; - }; - } - } -} - -#include - -#endif // XSD_CXX_PARSER_EXCEPTIONS_HXX - -#include diff --git a/libxsd/xsd/cxx/parser/exceptions.ixx b/libxsd/xsd/cxx/parser/exceptions.ixx deleted file mode 100644 index f7489f3..0000000 --- a/libxsd/xsd/cxx/parser/exceptions.ixx +++ /dev/null @@ -1,128 +0,0 @@ -// file : xsd/cxx/parser/exceptions.ixx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#if defined(XSD_CXX_PARSER_USE_CHAR) || !defined(XSD_CXX_PARSER_USE_WCHAR) - -#ifndef XSD_CXX_PARSER_EXCEPTIONS_IXX_CHAR -#define XSD_CXX_PARSER_EXCEPTIONS_IXX_CHAR - -namespace xsd -{ - namespace cxx - { - namespace parser - { - // error - // - inline - std::basic_ostream& - operator<< (std::basic_ostream& os, const error& e) - { - return os << e.id () << ':' << e.line () << ':' << e.column () - << (e.severity () == severity::error - ? " error: " - : " warning: ") << e.message (); - } - - - // diagnostics - // - inline - std::basic_ostream& - operator<< (std::basic_ostream& os, const diagnostics& d) - { - for (diagnostics::const_iterator b (d.begin ()), i (b); - i != d.end (); - ++i) - { - if (i != b) - os << "\n"; - - os << *i; - } - - return os; - } - - // parsing - // - template<> - inline - void parsing:: - print (std::basic_ostream& os) const - { - if (diagnostics_.empty ()) - os << "instance document parsing failed"; - else - os << diagnostics_; - } - } - } -} - -#endif // XSD_CXX_PARSER_EXCEPTIONS_IXX_CHAR -#endif // XSD_CXX_PARSER_USE_CHAR - - -#if defined(XSD_CXX_PARSER_USE_WCHAR) || !defined(XSD_CXX_PARSER_USE_CHAR) - -#ifndef XSD_CXX_PARSER_EXCEPTIONS_IXX_WCHAR -#define XSD_CXX_PARSER_EXCEPTIONS_IXX_WCHAR - -namespace xsd -{ - namespace cxx - { - namespace parser - { - // error - // - inline - std::basic_ostream& - operator<< (std::basic_ostream& os, const error& e) - { - return os << e.id () << L':' << e.line () << L':' << e.column () - << (e.severity () == severity::error - ? L" error: " - : L" warning: ") << e.message (); - } - - // diagnostics - // - inline - std::basic_ostream& - operator<< (std::basic_ostream& os, - const diagnostics& d) - { - for (diagnostics::const_iterator b (d.begin ()), i (b); - i != d.end (); - ++i) - { - if (i != b) - os << L"\n"; - - os << *i; - } - - return os; - } - - // parsing - // - template<> - inline - void parsing:: - print (std::basic_ostream& os) const - { - if (diagnostics_.empty ()) - os << L"instance document parsing failed"; - else - os << diagnostics_; - } - } - } -} - -#endif // XSD_CXX_PARSER_EXCEPTIONS_IXX_WCHAR -#endif // XSD_CXX_PARSER_USE_WCHAR diff --git a/libxsd/xsd/cxx/parser/exceptions.txx b/libxsd/xsd/cxx/parser/exceptions.txx deleted file mode 100644 index d0e52b6..0000000 --- a/libxsd/xsd/cxx/parser/exceptions.txx +++ /dev/null @@ -1,58 +0,0 @@ -// file : xsd/cxx/parser/exceptions.txx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -namespace xsd -{ - namespace cxx - { - namespace parser - { - // error - // - template - error:: - error (cxx::parser::severity s, - const std::basic_string& id, - unsigned long line, - unsigned long column, - const std::basic_string& message) - : severity_ (s), - id_ (id), - line_ (line), - column_ (column), - message_ (message) - { - } - - - // parsing - // - template - parsing:: - ~parsing () throw () - { - } - - template - parsing:: - parsing () - { - } - - template - parsing:: - parsing (const cxx::parser::diagnostics& diagnostics) - : diagnostics_ (diagnostics) - { - } - - template - const char* parsing:: - what () const throw () - { - return "instance document parsing failed"; - } - } - } -} diff --git a/libxsd/xsd/cxx/parser/expat/elements.hxx b/libxsd/xsd/cxx/parser/expat/elements.hxx deleted file mode 100644 index 86e7a73..0000000 --- a/libxsd/xsd/cxx/parser/expat/elements.hxx +++ /dev/null @@ -1,362 +0,0 @@ -// file : xsd/cxx/parser/expat/elements.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_PARSER_EXPAT_ELEMENTS_HXX -#define XSD_CXX_PARSER_EXPAT_ELEMENTS_HXX - -#include // XSD_CXX11 - -#include -#include -#include // std::size_t -#include - -#ifdef XSD_CXX11 -# include // std::unique_ptr -#endif - -#include - -// We only support UTF-8 expat for now. -// -#ifdef XML_UNICODE -#error UTF-16 expat (XML_UNICODE defined) is not supported -#endif - -#include - -#include -#include -#include -#include -#include - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace expat - { -#ifdef XSD_CXX11 - struct parser_deleter - { - void - operator() (XML_Parser p) const - { - if (p != 0) - XML_ParserFree (p); - } - }; - - typedef std::unique_ptr parser_auto_ptr; -#else - // Simple auto pointer for Expat's XML_Parser object. - // - struct parser_auto_ptr - { - ~parser_auto_ptr () - { - if (parser_ != 0) - XML_ParserFree (parser_); - } - - explicit - parser_auto_ptr (XML_Parser parser = 0) - : parser_ (parser) - { - } - - parser_auto_ptr& - operator= (XML_Parser parser) - { - if (parser_ != 0) - XML_ParserFree (parser_); - - parser_ = parser; - return *this; - } - - XML_Parser - get () const - { - return parser_; - } - - private: - parser_auto_ptr (const parser_auto_ptr&); - - parser_auto_ptr& - operator= (const parser_auto_ptr&); - - private: - XML_Parser parser_; - }; -#endif // XSD_CXX11 - - // - // - template - struct document: cxx::parser::document // VC likes it qualified - { - public: - document (parser_base&, - const C* root_element_name, - bool polymorphic = false); - - document (parser_base&, - const std::basic_string& root_element_name, - bool polymorphic = false); - - document (parser_base&, - const C* root_element_namespace, - const C* root_element_name, - bool polymorphic = false); - - document (parser_base&, - const std::basic_string& root_element_namespace, - const std::basic_string& root_element_name, - bool polymorphic = false); - - protected: - document (bool polymorphic = false); - - public: - // Parse a local file. The file is accessed with std::ifstream - // in binary mode. The std::ios_base::failure exception is used - // to report io errors (badbit and failbit). - void - parse (const std::basic_string& file); - - // Parse a local file with a user-provided error_handler - // object. The file is accessed with std::ifstream in binary - // mode. The std::ios_base::failure exception is used to report - // io errors (badbit and failbit). - // - void - parse (const std::basic_string& file, xml::error_handler&); - - public: - // System id is a "system" identifier of the resources (e.g., - // URI or a full file path). Public id is a "public" identifier - // of the resource (e.g., application-specific name or relative - // file path). System id is used to resolve relative paths. - // In diagnostics messages system id is used if public id is - // not available. Otherwise public id is used. - // - - // Parse std::istream. - // - void - parse (std::istream&); - - // Parse std::istream with a user-provided error_handler object. - // - void - parse (std::istream&, xml::error_handler&); - - // Parse std::istream with a system id. - // - void - parse (std::istream&, const std::basic_string& system_id); - - // Parse std::istream with a system id and a user-provided - // error_handler object. - // - void - parse (std::istream&, - const std::basic_string& system_id, - xml::error_handler&); - - // Parse std::istream with system and public ids. - // - void - parse (std::istream&, - const std::basic_string& system_id, - const std::basic_string& public_id); - - // Parse std::istream with system and public ids and a user-provided - // error_handler object. - // - void - parse (std::istream&, - const std::basic_string& system_id, - const std::basic_string& public_id, - xml::error_handler&); - - public: - // Parse a chunk of input. You can call these functions multiple - // times with the last call having the last argument true. - // - void - parse (const void* data, std::size_t size, bool last); - - void - parse (const void* data, std::size_t size, bool last, - xml::error_handler&); - - void - parse (const void* data, std::size_t size, bool last, - const std::basic_string& system_id); - - void - parse (const void* data, std::size_t size, bool last, - const std::basic_string& system_id, - xml::error_handler&); - - void - parse (const void* data, std::size_t size, bool last, - const std::basic_string& system_id, - const std::basic_string& public_id); - - void - parse (const void* data, std::size_t size, bool last, - const std::basic_string& system_id, - const std::basic_string& public_id, - xml::error_handler&); - - public: - // Low-level Expat-specific parsing API. A typical use case - // would look like this (pseudo-code): - // - // xxx_pimpl root; - // document doc (root, "root"); - // - // root.pre (); - // doc.parse_begin (xml_parser, "file.xml"); - // - // while (more_stuff_to_parse &&) - // { - // // Call XML_Parse or XML_ParseBuffer. - // - // if (status == XML_STATUS_ERROR) - // break; - // } - // - // // Call parse_end even in case of an error to translate - // // XML and Schema errors to exceptions or error_handler - // // calls. - // // - // doc.parse_end (); - // result_type result (root.post_xxx ()); - // - // Notes: - // - // 1. If your XML instances use XML namespaces, the - // XML_ParserCreateNS functions should be used to create the - // XML parser. Space (XML_Char (' ')) should be used as a - // separator (the second argument to XML_ParserCreateNS). - // - void - parse_begin (XML_Parser); - - void - parse_begin (XML_Parser, const std::basic_string& public_id); - - void - parse_begin (XML_Parser, xml::error_handler&); - - void - parse_begin (XML_Parser, - const std::basic_string& public_id, - xml::error_handler&); - void - parse_end (); - - // Event routing. - // - public: - static void XMLCALL - start_element_thunk_ (void*, const XML_Char*, const XML_Char**); - - static void XMLCALL - end_element_thunk_ (void*, const XML_Char*); - - static void XMLCALL - characters_thunk_ (void*, const XML_Char*, int); - - static void XMLCALL - start_namespace_decl_thunk_ ( - void*, const XML_Char*, const XML_Char*); - - static void XMLCALL - end_namespace_decl_thunk_ (void*, const XML_Char*); - - protected: - void - start_element_ (const XML_Char* ns_name, const XML_Char** atts); - - void - end_element_ (const XML_Char* ns_name); - - void - characters_ (const XML_Char* s, std::size_t n); - - void - start_namespace_decl_ (const XML_Char* prefix, const XML_Char* ns); - - void - end_namespace_decl_ (const XML_Char* prefix); - - protected: - void - set (); - - void - clear (); - - bool - parse (std::istream&, - const std::basic_string* system_id, - const std::basic_string* public_id, - xml::error_handler&); - - bool - parse (const void* data, std::size_t size, bool last, - const std::basic_string* system_id, - const std::basic_string* public_id, - xml::error_handler&); - - - void - translate_schema_exception (const schema_exception& e); - - protected: - XML_Parser xml_parser_; - parser_auto_ptr auto_xml_parser_; - - xml::error_handler* eh_; - error_handler default_eh_; - std::basic_string public_id_; - - bool polymorphic_; - - // Namespace-prefix mapping. Only maintained in the polymorphic - // case. - // - struct ns_decl - { - ns_decl (const std::basic_string& p, - const std::basic_string& n) - : prefix (p), ns (n) - { - } - - std::basic_string prefix; - std::basic_string ns; - }; - - typedef std::vector ns_decls; - - ns_decls ns_decls_; - }; - } - } - } -} - -#include - -#endif // XSD_CXX_PARSER_EXPAT_ELEMENTS_HXX diff --git a/libxsd/xsd/cxx/parser/expat/elements.txx b/libxsd/xsd/cxx/parser/expat/elements.txx deleted file mode 100644 index d3fc0d9..0000000 --- a/libxsd/xsd/cxx/parser/expat/elements.txx +++ /dev/null @@ -1,821 +0,0 @@ -// file : xsd/cxx/parser/expat/elements.txx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#include // std::bad_alloc -#include -#include -#include // std::strchr -#include - -#include // xml::bits::{xml_prefix, etc} - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace expat - { - - // document - // - - template - document:: - document (parser_base& p, - const std::basic_string& name, - bool polymorphic) - : cxx::parser::document (p, std::basic_string (), name), - xml_parser_ (0), - eh_ (0), - polymorphic_ (polymorphic) - { - } - - template - document:: - document (parser_base& p, - const C* name, - bool polymorphic) - : cxx::parser::document (p, std::basic_string (), name), - xml_parser_ (0), - eh_ (0), - polymorphic_ (polymorphic) - { - } - - template - document:: - document (parser_base& p, - const C* ns, - const C* name, - bool polymorphic) - : cxx::parser::document (p, ns, name), - xml_parser_ (0), - eh_ (0), - polymorphic_ (polymorphic) - { - } - - template - document:: - document (parser_base& p, - const std::basic_string& ns, - const std::basic_string& name, - bool polymorphic) - : cxx::parser::document (p, ns, name), - xml_parser_ (0), - eh_ (0), - polymorphic_ (polymorphic) - { - } - - template - document:: - document (bool polymorphic) - : xml_parser_ (0), - eh_ (0), - polymorphic_ (polymorphic) - { - } - - // file - // - - template - void document:: - parse (const std::basic_string& file) - { - std::ifstream ifs; - ifs.exceptions (std::ios_base::badbit | std::ios_base::failbit); - ifs.open (file.c_str (), std::ios_base::in | std::ios_base::binary); - - parse (ifs, file); - } - - template - void document:: - parse (const std::basic_string& file, xml::error_handler& eh) - { - std::ifstream ifs; - ifs.exceptions (std::ios_base::badbit | std::ios_base::failbit); - ifs.open (file.c_str (), std::ios_base::in | std::ios_base::binary); - - parse (ifs, file, eh); - } - - - // istream - // - - template - void document:: - parse (std::istream& is) - { - parse (is, 0, 0, default_eh_); - } - - template - void document:: - parse (std::istream& is, xml::error_handler& eh) - { - if (!parse (is, 0, 0, eh)) - throw parsing (); - } - - template - void document:: - parse (std::istream& is, const std::basic_string& system_id) - { - default_eh_.reset (); - parse (is, &system_id, 0, default_eh_); - } - - template - void document:: - parse (std::istream& is, - const std::basic_string& system_id, - xml::error_handler& eh) - { - if (!parse (is, &system_id, 0, eh)) - throw parsing (); - } - - template - void document:: - parse (std::istream& is, - const std::basic_string& system_id, - const std::basic_string& public_id) - { - default_eh_.reset (); - parse (is, &system_id, &public_id, default_eh_); - } - - template - void document:: - parse (std::istream& is, - const std::basic_string& system_id, - const std::basic_string& public_id, - xml::error_handler& eh) - { - if (!parse (is, &system_id, &public_id, eh)) - throw parsing (); - } - - // data - // - - template - void document:: - parse (const void* data, std::size_t size, bool last) - { - default_eh_.reset (); - parse (data, size, last, 0, 0, default_eh_); - } - - template - void document:: - parse (const void* data, std::size_t size, bool last, - xml::error_handler& eh) - { - if (!parse (data, size, last, 0, 0, eh)) - throw parsing (); - } - - template - void document:: - parse (const void* data, std::size_t size, bool last, - const std::basic_string& system_id) - { - default_eh_.reset (); - parse (data, size, last, &system_id, 0, default_eh_); - } - - template - void document:: - parse (const void* data, std::size_t size, bool last, - const std::basic_string& system_id, - xml::error_handler& eh) - { - if (!parse (data, size, last, &system_id, 0, eh)) - throw parsing (); - } - - template - void document:: - parse (const void* data, std::size_t size, bool last, - const std::basic_string& system_id, - const std::basic_string& public_id) - { - default_eh_.reset (); - parse (data, size, last, &system_id, &public_id, default_eh_); - } - - template - void document:: - parse (const void* data, std::size_t size, bool last, - const std::basic_string& system_id, - const std::basic_string& public_id, - xml::error_handler& eh) - { - if (!parse (data, size, last, &system_id, &public_id, eh)) - throw parsing (); - } - - // Implementation details. - // - - namespace bits - { - struct stream_exception_controller - { - ~stream_exception_controller () - { - std::ios_base::iostate s = is_.rdstate (); - s &= ~std::ios_base::failbit; - - // If our error state (sans failbit) intersects with the - // exception state then that means we have an active - // exception and changing error/exception state will - // cause another to be thrown. - // - if (!(old_state_ & s)) - { - // Clear failbit if it was caused by eof. - // - if (is_.fail () && is_.eof ()) - is_.clear (s); - - is_.exceptions (old_state_); - } - } - - stream_exception_controller (std::istream& is) - : is_ (is), old_state_ (is_.exceptions ()) - { - is_.exceptions (old_state_ & ~std::ios_base::failbit); - } - - private: - stream_exception_controller (const stream_exception_controller&); - - stream_exception_controller& - operator= (const stream_exception_controller&); - - private: - std::istream& is_; - std::ios_base::iostate old_state_; - }; - }; - - template - bool document:: - parse (std::istream& is, - const std::basic_string* system_id, - const std::basic_string* public_id, - xml::error_handler& eh) - { - parser_auto_ptr parser (XML_ParserCreateNS (0, XML_Char (' '))); - - if (parser == 0) - throw std::bad_alloc (); - - if (system_id || public_id) - parse_begin (parser, system_id ? *system_id : *public_id, eh); - else - parse_begin (parser, eh); - - // Temporarily unset the exception failbit. Also clear the - // fail bit when we reset the old state if it was caused - // by eof. - // - bits::stream_exception_controller sec (is); - - char buf[16384]; // 4 x page size. - - bool r (true); - - do - { - is.read (buf, sizeof (buf)); - - if (is.bad () || (is.fail () && !is.eof ())) - { - // If the stream is not using exceptions then the user - // will have to test for stream failures before calling - // post. - // - break; - } - - if (XML_Parse ( - parser, buf, is.gcount (), is.eof ()) == XML_STATUS_ERROR) - { - r = false; - break; - } - } while (!is.eof ()); - - parse_end (); - return r; - } - - template - bool document:: - parse (const void* data, - std::size_t size, - bool last, - const std::basic_string* system_id, - const std::basic_string* public_id, - xml::error_handler& eh) - { - // First call. - // - if (auto_xml_parser_.get () == 0) - { - auto_xml_parser_ = XML_ParserCreateNS (0, XML_Char (' ')); - - if (auto_xml_parser_.get () == 0) - throw std::bad_alloc (); - - if (system_id || public_id) - parse_begin (auto_xml_parser_.get (), - system_id ? *system_id : *public_id, eh); - else - parse_begin (auto_xml_parser_.get (), eh); - } - - bool r (XML_Parse (xml_parser_, - static_cast (data), - static_cast (size), - last) != XML_STATUS_ERROR); - parse_end (); - return r; - } - - // XML_Parser - // - - template - void document:: - parse_begin (XML_Parser parser) - { - xml_parser_ = parser; - eh_ = &default_eh_; - public_id_.clear (); - set (); - } - - template - void document:: - parse_begin (XML_Parser parser, - const std::basic_string& public_id) - { - xml_parser_ = parser; - eh_ = &default_eh_; - public_id_ = public_id; - set (); - } - - template - void document:: - parse_begin (XML_Parser parser, xml::error_handler& eh) - { - xml_parser_ = parser; - eh_ = &eh; - public_id_.clear (); - set (); - } - - template - void document:: - parse_begin (XML_Parser parser, - const std::basic_string& public_id, - xml::error_handler& eh) - { - xml_parser_ = parser; - eh_ = &eh; - public_id_ = public_id; - set (); - } - - template - void document:: - parse_end () - { - XML_Error e (XML_GetErrorCode (xml_parser_)); - - if (e == XML_ERROR_NONE || e == XML_ERROR_ABORTED) - { - clear (); - xml_parser_ = 0; - auto_xml_parser_ = 0; - } - else - { - unsigned long l = XML_GetCurrentLineNumber (xml_parser_); - unsigned long c = XML_GetCurrentColumnNumber (xml_parser_); - std::basic_string message (XML_ErrorString (e)); - - eh_->handle (public_id_, - l, c, - xml::error_handler::severity::fatal, - message); - - clear (); - xml_parser_ = 0; - auto_xml_parser_ = 0; - - // We don't want to throw an empty parsing exception here - // since the user probably already knows about the error. - } - - if (eh_ == &default_eh_) - default_eh_.throw_if_failed (); - } - - // - // - template - void document:: - set () - { - assert (xml_parser_ != 0); - - XML_SetUserData(xml_parser_, this); - - XML_SetStartElementHandler (xml_parser_, start_element_thunk_); - XML_SetEndElementHandler (xml_parser_, end_element_thunk_); - XML_SetCharacterDataHandler (xml_parser_, characters_thunk_); - - if (polymorphic_) - { - XML_SetNamespaceDeclHandler (xml_parser_, - start_namespace_decl_thunk_, - end_namespace_decl_thunk_); - } - } - - template - void document:: - clear () - { - assert (xml_parser_ != 0); - - XML_SetUserData (xml_parser_, 0); - XML_SetStartElementHandler (xml_parser_, 0); - XML_SetEndElementHandler (xml_parser_, 0); - XML_SetCharacterDataHandler (xml_parser_, 0); - - if (polymorphic_) - XML_SetNamespaceDeclHandler (xml_parser_, 0, 0); - } - - template - void document:: - translate_schema_exception (const schema_exception& e) - { - unsigned long l = XML_GetCurrentLineNumber (xml_parser_); - unsigned long c = XML_GetCurrentColumnNumber (xml_parser_); - - eh_->handle (public_id_, - l, c, - xml::error_handler::severity::fatal, - e.message ()); - - XML_StopParser (xml_parser_, false); - } - - // Event routing. - // - - // Expat thunks. - // - template - void XMLCALL document:: - start_element_thunk_ (void* data, - const XML_Char* ns_name, - const XML_Char** atts) - { - document& d (*reinterpret_cast (data)); - d.start_element_ (ns_name, atts); - } - - template - void XMLCALL document:: - end_element_thunk_ (void* data, const XML_Char* ns_name) - { - document& d (*reinterpret_cast (data)); - d.end_element_ (ns_name); - } - - template - void XMLCALL document:: - characters_thunk_ (void* data, const XML_Char* s, int n) - { - document& d (*reinterpret_cast (data)); - d.characters_ (s, static_cast (n)); - } - - template - void XMLCALL document:: - start_namespace_decl_thunk_ (void* data, - const XML_Char* prefix, - const XML_Char* ns) - { - document& d (*reinterpret_cast (data)); - d.start_namespace_decl_ (prefix, ns); - } - - template - void XMLCALL document:: - end_namespace_decl_thunk_ (void* data, const XML_Char* prefix) - { - document& d (*reinterpret_cast (data)); - d.end_namespace_decl_ (prefix); - } - - namespace bits - { - inline void - split_name (const XML_Char* s, - const char*& ns, std::size_t& ns_s, - const char*& name, std::size_t& name_s) - { - const char* p (std::strchr (s, ' ')); - - if (p) - { - ns = s; - ns_s = p - s; - name = p + 1; - } - else - { - ns = s; - ns_s = 0; - name = s; - } - - name_s = std::char_traits::length (name); - } - } - - template - void document:: - start_element_ (const XML_Char* ns_name, const XML_Char** atts) - { - // Current Expat (2.0.0) has a (mis)-feature of a possibility of - // calling callbacks even after the non-resumable XML_StopParser - // call. The following code accounts for this. - // - { - XML_ParsingStatus s; - XML_GetParsingStatus (xml_parser_, &s); - if (s.parsing == XML_FINISHED) - return; - } - - typedef std::basic_string string; - - const char* ns_p; - const char* name_p; - size_t ns_s, name_s; - - bits::split_name (ns_name, ns_p, ns_s, name_p, name_s); - - { - const ro_string ns (ns_p, ns_s), name (name_p, name_s); - - if (!polymorphic_) - { - try - { - this->start_element (ns, name, 0); - } - catch (const schema_exception& e) - { - translate_schema_exception (e); - return; - } - } - else - { - // Search for the xsi:type attribute. - // - const XML_Char** p = atts; // VC8 can't handle p (atts) - for (; *p != 0; p += 2) - { - bits::split_name (*p, ns_p, ns_s, name_p, name_s); - const ro_string ns (ns_p, ns_s), name (name_p, name_s); - - if (name == xml::bits::type () && - ns == xml::bits::xsi_namespace ()) - break; - } - - if (*p == 0) - { - try - { - this->start_element (ns, name, 0); - } - catch (const schema_exception& e) - { - translate_schema_exception (e); - return; - } - } - else - { - // @@ Need proper QName validation. - // - // Get the qualified type name and try to resolve it. - // - ro_string qn (*(p + 1)); - - ro_string tp, tn; - typename ro_string::size_type pos (qn.find (C (':'))); - - try - { - if (pos != ro_string::npos) - { - tp.assign (qn.data (), pos); - tn.assign (qn.data () + pos + 1); - - if (tp.empty ()) - throw dynamic_type (qn); - } - else - tn.assign (qn.data (), qn.size ()); - - if (tn.empty ()) - throw dynamic_type (qn); - - // Search our namespace declaration stack. Note that - // we need to do this even if prefix is empty. Sun CC - // 5.7 blows if we use const_reverse_iterator. - // - ro_string tns; - for (typename ns_decls::reverse_iterator - it (ns_decls_.rbegin ()), e (ns_decls_.rend ()); - it != e; ++it) - { - if (it->prefix == tp) - { - tns.assign (it->ns); - break; - } - } - - if (!tp.empty () && tns.empty ()) - { - // The 'xml' prefix requires special handling. - // - if (tp == xml::bits::xml_prefix ()) - tns.assign (xml::bits::xml_namespace ()); - else - throw dynamic_type (qn); - } - - // Construct the compound type id. - // - string id (tn.data (), tn.size ()); - - if (!tns.empty ()) - { - id += C (' '); - id.append (tns.data (), tns.size ()); - } - - ro_string ro_id (id); - this->start_element (ns, name, &ro_id); - } - catch (const schema_exception& e) - { - translate_schema_exception (e); - return; - } - } - } - } - - for (; *atts != 0; atts += 2) - { - bits::split_name (*atts, ns_p, ns_s, name_p, name_s); - - const ro_string ns (ns_p, ns_s), name (name_p, name_s); - const ro_string value (*(atts + 1)); - - try - { - this->attribute (ns, name, value); - } - catch (const schema_exception& e) - { - translate_schema_exception (e); - break; - } - } - } - - template - void document:: - end_element_ (const XML_Char* ns_name) - { - // Current Expat (2.0.0) has a (mis)-feature of a possibility of - // calling callbacks even after the non-resumable XML_StopParser - // call. The following code accounts for this. - // - { - XML_ParsingStatus s; - XML_GetParsingStatus (xml_parser_, &s); - if (s.parsing == XML_FINISHED) - return; - } - - const char* ns_p; - const char* name_p; - size_t ns_s, name_s; - - bits::split_name (ns_name, ns_p, ns_s, name_p, name_s); - - const ro_string ns (ns_p, ns_s), name (name_p, name_s); - - try - { - this->end_element (ns, name); - } - catch (const schema_exception& e) - { - translate_schema_exception (e); - } - } - - template - void document:: - characters_ (const XML_Char* s, std::size_t n) - { - // Current Expat (2.0.0) has a (mis)-feature of a possibility of - // calling callbacks even after the non-resumable XML_StopParser - // call. The following code accounts for this. - // - { - XML_ParsingStatus s; - XML_GetParsingStatus (xml_parser_, &s); - if (s.parsing == XML_FINISHED) - return; - } - - if (n != 0) - { - const ro_string str (s, n); - - try - { - this->characters (str); - } - catch (const schema_exception& e) - { - translate_schema_exception (e); - } - } - } - - template - void document:: - start_namespace_decl_ (const XML_Char* p, const XML_Char* ns) - { - // prefix is 0 for default namespace - // namespace is 0 when unsetting default namespace - // - if (polymorphic_) - ns_decls_.push_back (ns_decl ((p ? p : ""), (ns ? ns : ""))); - } - - template - void document:: - end_namespace_decl_ (const XML_Char* p) - { - // prefix is 0 for default namespace - // - if (polymorphic_) - { - // Here we assume the prefixes are removed in the reverse - // order of them being added. This appears to how every - // sensible implementation works. - // - assert (p - ? ns_decls_.back ().prefix == p - : ns_decls_.back ().prefix.empty ()); - - ns_decls_.pop_back (); - } - } - } - } - } -} diff --git a/libxsd/xsd/cxx/parser/map.hxx b/libxsd/xsd/cxx/parser/map.hxx deleted file mode 100644 index d097f16..0000000 --- a/libxsd/xsd/cxx/parser/map.hxx +++ /dev/null @@ -1,78 +0,0 @@ -// file : xsd/cxx/parser/map.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_PARSER_MAP_HXX -#define XSD_CXX_PARSER_MAP_HXX - -#include -#include - -#include -#include - -namespace xsd -{ - namespace cxx - { - namespace parser - { - // Parser map. Used in the polymorphic document parsing. - // - template - struct parser_map - { - virtual - ~parser_map (); - - // The type argument is the type name and namespace from the - // xsi:type attribute or substitution group map in the form - // " " with the space and namespace part - // absent if the type does not have a namespace. - // - virtual parser_base* - find (const ro_string& type) const = 0; - }; - - - // Parser map implementation. - // - template - struct parser_map_impl: parser_map - { - parser_map_impl (); - - void - insert (parser_base&); - - virtual parser_base* - find (const ro_string& type) const; - - private: - parser_map_impl (const parser_map_impl&); - - parser_map_impl& - operator= (const parser_map_impl&); - - private: - struct string_comparison - { - bool - operator() (const C* x, const C* y) const - { - ro_string s (x); - return s.compare (y) < 0; - } - }; - - typedef std::map*, string_comparison> map; - map map_; - }; - } - } -} - -#include -#include - -#endif // XSD_CXX_PARSER_MAP_HXX diff --git a/libxsd/xsd/cxx/parser/map.ixx b/libxsd/xsd/cxx/parser/map.ixx deleted file mode 100644 index 96fc937..0000000 --- a/libxsd/xsd/cxx/parser/map.ixx +++ /dev/null @@ -1,26 +0,0 @@ -// file : xsd/cxx/parser/map.ixx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -namespace xsd -{ - namespace cxx - { - namespace parser - { - // parser_map_impl - // - template - inline parser_map_impl::parser_map_impl () - { - } - - template - inline void parser_map_impl:: - insert (parser_base& parser) - { - map_[parser._dynamic_type ()] = &parser; - } - } - } -} diff --git a/libxsd/xsd/cxx/parser/map.txx b/libxsd/xsd/cxx/parser/map.txx deleted file mode 100644 index 3f85760..0000000 --- a/libxsd/xsd/cxx/parser/map.txx +++ /dev/null @@ -1,30 +0,0 @@ -// file : xsd/cxx/parser/map.txx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -namespace xsd -{ - namespace cxx - { - namespace parser - { - // parser_map - // - template - parser_map:: - ~parser_map () - { - } - - // parser_map_impl - // - template - parser_base* parser_map_impl:: - find (const ro_string& type) const - { - typename map::const_iterator i (map_.find (type.data ())); - return i != map_.end () ? i->second : 0; - } - } - } -} diff --git a/libxsd/xsd/cxx/parser/non-validating/parser.hxx b/libxsd/xsd/cxx/parser/non-validating/parser.hxx deleted file mode 100644 index 4ecc4f1..0000000 --- a/libxsd/xsd/cxx/parser/non-validating/parser.hxx +++ /dev/null @@ -1,247 +0,0 @@ -// file : xsd/cxx/parser/non-validating/parser.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_PARSER_NON_VALIDATING_PARSER_HXX -#define XSD_CXX_PARSER_NON_VALIDATING_PARSER_HXX - -#include -#include -#include // std::size_t - -#include -#include - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace non_validating - { - // - // - template - struct empty_content: parser_base - { - // The _*_any_* functions are called when wildcard content - // is encountered. Use them to handle mixed content models, - // any/anyAttribute, and anyType/anySimpleType. By default - // these functions do nothing. - // - - // The type argument is a type name and namespace from the - // xsi:type attribute in the form " " with - // the space and namespace part absent if the type does not - // have a namespace or 0 if xsi:type is not present. - // - virtual void - _start_any_element (const ro_string& ns, - const ro_string& name, - const ro_string* type); - - virtual void - _end_any_element (const ro_string& ns, - const ro_string& name); - - virtual void - _any_attribute (const ro_string& ns, - const ro_string& name, - const ro_string& value); - - virtual void - _any_characters (const ro_string&); - - - // - // - virtual bool - _start_element_impl (const ro_string&, - const ro_string&, - const ro_string*); - - virtual bool - _end_element_impl (const ro_string&, - const ro_string&); - - virtual bool - _attribute_impl (const ro_string&, - const ro_string&, - const ro_string&); - - virtual bool - _characters_impl (const ro_string&); - - - // - // - virtual void - _start_element (const ro_string& ns, - const ro_string& name, - const ro_string* type); - - virtual void - _end_element (const ro_string& ns, - const ro_string& name); - - virtual void - _attribute (const ro_string& ns, - const ro_string& name, - const ro_string& value); - - virtual void - _characters (const ro_string& s); - }; - - - // - // - template - struct simple_content: empty_content - { - // - // - virtual void - _attribute (const ro_string& ns, - const ro_string& name, - const ro_string& value); - - virtual void - _characters (const ro_string&); - }; - - - // - // - template - struct complex_content: empty_content - { - // - // - virtual void - _start_element (const ro_string& ns, - const ro_string& name, - const ro_string* type); - - virtual void - _end_element (const ro_string& ns, - const ro_string& name); - - virtual void - _attribute (const ro_string& ns, - const ro_string& name, - const ro_string& value); - - virtual void - _characters (const ro_string&); - - - // - // - virtual void - _pre_impl (); - - virtual void - _post_impl (); - - protected: - struct state - { - state () - : any_ (false), depth_ (0), parser_ (0) - { - } - - bool any_; - std::size_t depth_; - parser_base* parser_; - }; - - // Optimized state stack for non-recursive case (one element). - // - struct state_stack - { - state_stack () - : size_ (0) - { - } - - void - push (const state& s) - { - if (size_ > 0) - rest_.push (top_); - - top_ = s; - ++size_; - } - - void - pop () - { - if (size_ > 1) - { - top_ = rest_.top (); - rest_.pop (); - } - - --size_; - } - - const state& - top () const - { - return top_; - } - - state& - top () - { - return top_; - } - - state& - under_top () - { - return rest_.top (); - } - - private: - state top_; - std::stack rest_; - std::size_t size_; - }; - - state_stack context_; - }; - - - // Base for xsd:list. - // - template - struct list_base: simple_content - { - virtual void - _xsd_parse_item (const ro_string&) = 0; - - virtual void - _pre_impl (); - - virtual void - _characters (const ro_string&); - - virtual void - _post_impl (); - - protected: - std::basic_string buf_; - }; - } - } - } -} - -#include - -#endif // XSD_CXX_PARSER_NON_VALIDATING_PARSER_HXX diff --git a/libxsd/xsd/cxx/parser/non-validating/parser.txx b/libxsd/xsd/cxx/parser/non-validating/parser.txx deleted file mode 100644 index 79b6568..0000000 --- a/libxsd/xsd/cxx/parser/non-validating/parser.txx +++ /dev/null @@ -1,463 +0,0 @@ -// file : xsd/cxx/parser/non-validating/parser.txx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#include - -#include - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace non_validating - { - - // empty_content - // - - template - void empty_content:: - _start_any_element (const ro_string&, - const ro_string&, - const ro_string*) - { - } - - template - void empty_content:: - _end_any_element (const ro_string&, - const ro_string&) - { - } - - template - void empty_content:: - _any_attribute (const ro_string&, - const ro_string&, - const ro_string&) - { - } - - template - void empty_content:: - _any_characters (const ro_string&) - { - } - - // - // - template - bool empty_content:: - _start_element_impl (const ro_string&, - const ro_string&, - const ro_string*) - { - return false; - } - - template - bool empty_content:: - _end_element_impl (const ro_string&, - const ro_string&) - { - return false; - } - - template - bool empty_content:: - _attribute_impl (const ro_string&, - const ro_string&, - const ro_string&) - { - return false; - } - - template - bool empty_content:: - _characters_impl (const ro_string&) - { - return false; - } - - template - void empty_content:: - _start_element (const ro_string& ns, - const ro_string& name, - const ro_string* type) - { - if (!_start_element_impl (ns, name, type)) - _start_any_element (ns, name, type); - } - - template - void empty_content:: - _end_element (const ro_string& ns, - const ro_string& name) - { - if (!_end_element_impl (ns, name)) - _end_any_element (ns, name); - } - - template - void empty_content:: - _attribute (const ro_string& ns, - const ro_string& name, - const ro_string& value) - { - // Weed out special attributes: xsi:type, xsi:nil, - // xsi:schemaLocation and noNamespaceSchemaLocation. - // See section 3.2.7 in Structures for details. - // - if (ns == xml::bits::xsi_namespace () && - (name == xml::bits::type () || - name == xml::bits::nil_lit () || - name == xml::bits::schema_location () || - name == xml::bits::no_namespace_schema_location ())) - return; - - // Also some parsers (notably Xerces-C++) supplies us with - // namespace-prefix mapping attributes. - // - if (ns == xml::bits::xmlns_namespace ()) - return; - - if (!_attribute_impl (ns, name, value)) - _any_attribute (ns, name, value); - } - - template - void empty_content:: - _characters (const ro_string& s) - { - if (!_characters_impl (s)) - _any_characters (s); - } - - - // simple_content - // - - template - void simple_content:: - _attribute (const ro_string& ns, - const ro_string& name, - const ro_string& value) - { - // Weed out special attributes: xsi:type, xsi:nil, - // xsi:schemaLocation and xsi:noNamespaceSchemaLocation. - // See section 3.2.7 in Structures for details. - // - if (ns == xml::bits::xsi_namespace () && - (name == xml::bits::type () || - name == xml::bits::nil_lit () || - name == xml::bits::schema_location () || - name == xml::bits::no_namespace_schema_location ())) - return; - - // Also some parsers (notably Xerces-C++) supplies us with - // namespace-prefix mapping attributes. - // - if (ns == xml::bits::xmlns_namespace ()) - return; - - if (!this->_attribute_impl (ns, name, value)) - this->_any_attribute (ns, name, value); - } - - template - void simple_content:: - _characters (const ro_string& str) - { - this->_characters_impl (str); - } - - - // complex_content - // - - template - void complex_content:: - _start_element (const ro_string& ns, - const ro_string& name, - const ro_string* type) - { - state& s (context_.top ()); - - if (s.depth_++ > 0) - { - if (s.any_) - this->_start_any_element (ns, name, type); - else if (s.parser_) - s.parser_->_start_element (ns, name, type); - } - else - { - if (!this->_start_element_impl (ns, name, type)) - { - this->_start_any_element (ns, name, type); - s.any_ = true; - } - else if (s.parser_ != 0) - s.parser_->_pre_impl (); - } - } - - template - void complex_content:: - _end_element (const ro_string& ns, - const ro_string& name) - { - // To understand what's going on here it is helpful to think of - // a "total depth" as being the sum of individual depths over - // all elements. - // - - if (context_.top ().depth_ == 0) - { - state& s (context_.under_top ()); // One before last. - - if (--s.depth_ > 0) - { - // Indirect recursion. - // - if (s.parser_) - s.parser_->_end_element (ns, name); - } - else - { - // Direct recursion. - // - assert (this == s.parser_); - - this->_post_impl (); - - if (!this->_end_element_impl (ns, name)) - assert (false); - } - } - else - { - state& s (context_.top ()); - - if (--s.depth_ > 0) - { - if (s.any_) - this->_end_any_element (ns, name); - else if (s.parser_) - s.parser_->_end_element (ns, name); - } - else - { - if (s.parser_ != 0 && !s.any_) - s.parser_->_post_impl (); - - if (!this->_end_element_impl (ns, name)) - { - s.any_ = false; - this->_end_any_element (ns, name); - } - } - } - } - - template - void complex_content:: - _attribute (const ro_string& ns, - const ro_string& name, - const ro_string& value) - { - // Weed out special attributes: xsi:type, xsi:nil, - // xsi:schemaLocation and xsi:noNamespaceSchemaLocation. - // See section 3.2.7 in Structures for details. - // - if (ns == xml::bits::xsi_namespace () && - (name == xml::bits::type () || - name == xml::bits::nil_lit () || - name == xml::bits::schema_location () || - name == xml::bits::no_namespace_schema_location ())) - return; - - // Also some parsers (notably Xerces-C++) supplies us with - // namespace-prefix mapping attributes. - // - if (ns == xml::bits::xmlns_namespace ()) - return; - - state& s (context_.top ()); - - if (s.depth_ > 0) - { - if (s.any_) - this->_any_attribute (ns, name, value); - else if (s.parser_) - s.parser_->_attribute (ns, name, value); - } - else - { - if (!this->_attribute_impl (ns, name, value)) - this->_any_attribute (ns, name, value); - } - } - - template - void complex_content:: - _characters (const ro_string& str) - { - state& s (context_.top ()); - - if (s.depth_ > 0) - { - if (s.any_) - this->_any_characters (str); - else if (s.parser_) - s.parser_->_characters (str); - } - else - { - if (!this->_characters_impl (str)) - this->_any_characters (str); - } - } - - template - void complex_content:: - _pre_impl () - { - context_.push (state ()); - this->_pre (); - } - - template - void complex_content:: - _post_impl () - { - this->_post (); - context_.pop (); - } - - // list_base - // - namespace bits - { - // Find first non-space character. - // - template - typename ro_string::size_type - find_ns (const C* s, - typename ro_string::size_type size, - typename ro_string::size_type pos) - { - while (pos < size && - (s[pos] == C (0x20) || s[pos] == C (0x0A) || - s[pos] == C (0x0D) || s[pos] == C (0x09))) - ++pos; - - return pos < size ? pos : ro_string::npos; - } - - // Find first space character. - // - template - typename ro_string::size_type - find_s (const C* s, - typename ro_string::size_type size, - typename ro_string::size_type pos) - { - while (pos < size && - s[pos] != C (0x20) && s[pos] != C (0x0A) && - s[pos] != C (0x0D) && s[pos] != C (0x09)) - ++pos; - - return pos < size ? pos : ro_string::npos; - } - } - - // Relevant XML Schema Part 2: Datatypes sections: 4.2.1.2, 4.3.6. - // - - template - void list_base:: - _pre_impl () - { - simple_content::_pre_impl (); - buf_.clear (); - } - - template - void list_base:: - _characters (const ro_string& s) - { - typedef typename ro_string::size_type size_type; - - const C* data (s.data ()); - size_type size (s.size ()); - - // Handle the previous chunk if we start with a ws. - // - if (!buf_.empty () && - (data[0] == C (0x20) || data[0] == C (0x0A) || - data[0] == C (0x0D) || data[0] == C (0x09))) - { - ro_string tmp (buf_); // Private copy ctor. - _xsd_parse_item (tmp); - buf_.clear (); - } - - // Traverse the data while logically collapsing spaces. - // - for (size_type i (bits::find_ns (data, size, 0)); - i != ro_string::npos;) - { - size_type j (bits::find_s (data, size, i)); - - if (j != ro_string::npos) - { - if (buf_.empty ()) - { - ro_string tmp (data + i, j - i); // Private copy ctor. - _xsd_parse_item (tmp); - } - else - { - // Assemble the first item in str from buf_ and s. - // - std::basic_string str; - str.swap (buf_); - str.append (data + i, j - i); - ro_string tmp (str); // Private copy ctor. - _xsd_parse_item (tmp); - } - - i = bits::find_ns (data, size, j); - } - else - { - // Last fragment, append it to the buf_. - // - buf_.append (data + i, size - i); - break; - } - } - } - - template - void list_base:: - _post_impl () - { - // Handle the last item. - // - if (!buf_.empty ()) - { - ro_string tmp (buf_); // Private copy ctor. - _xsd_parse_item (tmp); - } - - simple_content::_post_impl (); - } - } - } - } -} diff --git a/libxsd/xsd/cxx/parser/non-validating/xml-schema-pimpl.hxx b/libxsd/xsd/cxx/parser/non-validating/xml-schema-pimpl.hxx deleted file mode 100644 index fc1f838..0000000 --- a/libxsd/xsd/cxx/parser/non-validating/xml-schema-pimpl.hxx +++ /dev/null @@ -1,792 +0,0 @@ -// file : xsd/cxx/parser/non-validating/xml-schema-pimpl.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_PARSER_NON_VALIDATING_XML_SCHEMA_PIMPL_HXX -#define XSD_CXX_PARSER_NON_VALIDATING_XML_SCHEMA_PIMPL_HXX - -#include - -#include // XSD_AUTO_PTR - -#include - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace non_validating - { - // any_type - // - template - struct any_type_pimpl: virtual any_type_pskel - { - virtual void - post_any_type (); - }; - - // any_simple_type - // - template - struct any_simple_type_pimpl: virtual any_simple_type_pskel - { - virtual void - post_any_simple_type (); - }; - - // boolean - // - template - struct boolean_pimpl: virtual boolean_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual bool - post_boolean (); - - protected: - std::basic_string str_; - }; - - - // 8-bit - // - template - struct byte_pimpl: virtual byte_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual signed char - post_byte (); - - protected: - std::basic_string str_; - }; - - - template - struct unsigned_byte_pimpl: virtual unsigned_byte_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual unsigned char - post_unsigned_byte (); - - protected: - std::basic_string str_; - }; - - - // 16-bit - // - template - struct short_pimpl: virtual short_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual short - post_short (); - - protected: - std::basic_string str_; - }; - - - template - struct unsigned_short_pimpl: virtual unsigned_short_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual unsigned short - post_unsigned_short (); - - protected: - std::basic_string str_; - }; - - - // 32-bit - // - template - struct int_pimpl: virtual int_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual int - post_int (); - - protected: - std::basic_string str_; - }; - - - template - struct unsigned_int_pimpl: virtual unsigned_int_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual unsigned int - post_unsigned_int (); - - protected: - std::basic_string str_; - }; - - - // 64-bit - // - template - struct long_pimpl: virtual long_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual long long - post_long (); - - protected: - std::basic_string str_; - }; - - - template - struct unsigned_long_pimpl: virtual unsigned_long_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual unsigned long long - post_unsigned_long (); - - protected: - std::basic_string str_; - }; - - - // Arbitrary-length integers. - // - template - struct integer_pimpl: virtual integer_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual long long - post_integer (); - - protected: - std::basic_string str_; - }; - - template - struct negative_integer_pimpl: virtual negative_integer_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual long long - post_negative_integer (); - - protected: - std::basic_string str_; - }; - - template - struct non_positive_integer_pimpl: virtual non_positive_integer_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual long long - post_non_positive_integer (); - - protected: - std::basic_string str_; - }; - - template - struct positive_integer_pimpl: virtual positive_integer_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual unsigned long long - post_positive_integer (); - - protected: - std::basic_string str_; - }; - - template - struct non_negative_integer_pimpl: virtual non_negative_integer_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual unsigned long long - post_non_negative_integer (); - - protected: - std::basic_string str_; - }; - - - // Floats. - // - template - struct float_pimpl: virtual float_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual float - post_float (); - - protected: - std::basic_string str_; - }; - - - template - struct double_pimpl: virtual double_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual double - post_double (); - - protected: - std::basic_string str_; - }; - - - template - struct decimal_pimpl: virtual decimal_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual double - post_decimal (); - - protected: - std::basic_string str_; - }; - - - // Strings. - // - template - struct string_pimpl: virtual string_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual std::basic_string - post_string (); - - protected: - std::basic_string str_; - }; - - template - struct normalized_string_pimpl: virtual normalized_string_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual std::basic_string - post_normalized_string (); - - protected: - std::basic_string str_; - }; - - template - struct token_pimpl: virtual token_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual std::basic_string - post_token (); - - protected: - std::basic_string str_; - }; - - template - struct name_pimpl: virtual name_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual std::basic_string - post_name (); - - protected: - std::basic_string str_; - }; - - template - struct nmtoken_pimpl: virtual nmtoken_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual std::basic_string - post_nmtoken (); - - protected: - std::basic_string str_; - }; - - template - struct nmtokens_pimpl: virtual nmtokens_pskel - { - virtual void - _pre (); - - virtual void - _xsd_parse_item (const ro_string&); - - virtual string_sequence - post_nmtokens (); - - protected: - string_sequence seq_; - nmtoken_pimpl parser_; - }; - - template - struct ncname_pimpl: virtual ncname_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual std::basic_string - post_ncname (); - - protected: - std::basic_string str_; - }; - - template - struct id_pimpl: virtual id_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual std::basic_string - post_id (); - - protected: - std::basic_string str_; - }; - - template - struct idref_pimpl: virtual idref_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual std::basic_string - post_idref (); - - protected: - std::basic_string str_; - }; - - template - struct idrefs_pimpl: virtual idrefs_pskel - { - virtual void - _pre (); - - virtual void - _xsd_parse_item (const ro_string&); - - virtual string_sequence - post_idrefs (); - - protected: - string_sequence seq_; - idref_pimpl parser_; - }; - - // language - // - template - struct language_pimpl: virtual language_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual std::basic_string - post_language (); - - protected: - std::basic_string str_; - }; - - // anyURI - // - template - struct uri_pimpl: virtual uri_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual std::basic_string - post_uri (); - - protected: - std::basic_string str_; - }; - - // QName - // - template - struct qname_pimpl: virtual qname_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual qname - post_qname (); - - protected: - std::basic_string str_; - }; - - // base64Binary - // - template - struct base64_binary_pimpl: virtual base64_binary_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual XSD_AUTO_PTR - post_base64_binary (); - - protected: - std::basic_string str_; - }; - - // hexBinary - // - template - struct hex_binary_pimpl: virtual hex_binary_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual XSD_AUTO_PTR - post_hex_binary (); - - protected: - std::basic_string str_; - }; - - // gday - // - template - struct gday_pimpl: virtual gday_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual gday - post_gday (); - - protected: - std::basic_string str_; - }; - - // gmonth - // - template - struct gmonth_pimpl: virtual gmonth_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual gmonth - post_gmonth (); - - protected: - std::basic_string str_; - }; - - // gyear - // - template - struct gyear_pimpl: virtual gyear_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual gyear - post_gyear (); - - protected: - std::basic_string str_; - }; - - // gmonth_day - // - template - struct gmonth_day_pimpl: virtual gmonth_day_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual gmonth_day - post_gmonth_day (); - - protected: - std::basic_string str_; - }; - - // gyear_month - // - template - struct gyear_month_pimpl: virtual gyear_month_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual gyear_month - post_gyear_month (); - - protected: - std::basic_string str_; - }; - - // date - // - template - struct date_pimpl: virtual date_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual date - post_date (); - - protected: - std::basic_string str_; - }; - - // time - // - template - struct time_pimpl: virtual time_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual time - post_time (); - - protected: - std::basic_string str_; - }; - - // date_time - // - template - struct date_time_pimpl: virtual date_time_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual date_time - post_date_time (); - - protected: - std::basic_string str_; - }; - - // duration - // - template - struct duration_pimpl: virtual duration_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual duration - post_duration (); - - protected: - std::basic_string str_; - }; - - // - // - namespace bits - { - // float literals: INF -INF NaN - // - template - const C* - positive_inf (); - - template - const C* - negative_inf (); - - template - const C* - nan (); - - // boolean literals - // - template - const C* - true_ (); - - template - const C* - one (); - } - } - } - } -} - -#include - -#endif // XSD_CXX_PARSER_NON_VALIDATING_XML_SCHEMA_PIMPL_HXX - -#include diff --git a/libxsd/xsd/cxx/parser/non-validating/xml-schema-pimpl.ixx b/libxsd/xsd/cxx/parser/non-validating/xml-schema-pimpl.ixx deleted file mode 100644 index 3555693..0000000 --- a/libxsd/xsd/cxx/parser/non-validating/xml-schema-pimpl.ixx +++ /dev/null @@ -1,128 +0,0 @@ -// file : xsd/cxx/parser/non-validating/xml-schema-pimpl.ixx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#if defined(XSD_CXX_PARSER_USE_CHAR) || !defined(XSD_CXX_PARSER_USE_WCHAR) - -#ifndef XSD_CXX_PARSER_NON_VALIDATING_XML_SCHEMA_PIMPL_IXX_CHAR -#define XSD_CXX_PARSER_NON_VALIDATING_XML_SCHEMA_PIMPL_IXX_CHAR - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace non_validating - { - namespace bits - { - // - // - template<> - inline const char* - positive_inf () - { - return "INF"; - } - - template<> - inline const char* - negative_inf () - { - return "-INF"; - } - - template<> - inline const char* - nan () - { - return "NaN"; - } - - // - // - template<> - inline const char* - true_ () - { - return "true"; - } - - template<> - inline const char* - one () - { - return "1"; - } - } - } - } - } -} - -#endif // XSD_CXX_PARSER_NON_VALIDATING_XML_SCHEMA_PIMPL_IXX_CHAR -#endif // XSD_CXX_PARSER_USE_CHAR - - -#if defined(XSD_CXX_PARSER_USE_WCHAR) || !defined(XSD_CXX_PARSER_USE_CHAR) - -#ifndef XSD_CXX_PARSER_NON_VALIDATING_XML_SCHEMA_PIMPL_IXX_WCHAR -#define XSD_CXX_PARSER_NON_VALIDATING_XML_SCHEMA_PIMPL_IXX_WCHAR - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace non_validating - { - namespace bits - { - // - // - template<> - inline const wchar_t* - positive_inf () - { - return L"INF"; - } - - template<> - inline const wchar_t* - negative_inf () - { - return L"-INF"; - } - - template<> - inline const wchar_t* - nan () - { - return L"NaN"; - } - - // - // - template<> - inline const wchar_t* - true_ () - { - return L"true"; - } - - template<> - inline const wchar_t* - one () - { - return L"1"; - } - } - } - } - } -} - -#endif // XSD_CXX_PARSER_NON_VALIDATING_XML_SCHEMA_PIMPL_IXX_WCHAR -#endif // XSD_CXX_PARSER_USE_WCHAR diff --git a/libxsd/xsd/cxx/parser/non-validating/xml-schema-pimpl.txx b/libxsd/xsd/cxx/parser/non-validating/xml-schema-pimpl.txx deleted file mode 100644 index 28280f5..0000000 --- a/libxsd/xsd/cxx/parser/non-validating/xml-schema-pimpl.txx +++ /dev/null @@ -1,2067 +0,0 @@ -// file : xsd/cxx/parser/non-validating/xml-schema-pimpl.txx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#include -#include - -#include - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace non_validating - { - // Note that most of the types implemented here cannot have - // whitespaces in the value. As result we don't need to waste - // time collapsing whitespaces. All we need to do is trim the - // string representation which can be done without copying. - // - - // any_type - // - - template - void any_type_pimpl:: - post_any_type () - { - } - - // any_simple_type - // - - template - void any_simple_type_pimpl:: - post_any_simple_type () - { - } - - // boolean - // - template - void boolean_pimpl:: - _pre () - { - str_.clear (); - } - - template - void boolean_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - bool boolean_pimpl:: - post_boolean () - { - std::basic_string tmp; - tmp.swap (str_); - - ro_string str (tmp); - trim (str); - - return str == bits::true_ () || str == bits::one (); - } - - // byte - // - - template - void byte_pimpl:: - _pre () - { - str_.clear (); - } - - template - void byte_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - signed char byte_pimpl:: - post_byte () - { - std::basic_string tmp; - tmp.swap (str_); - - ro_string str (tmp); - trim (str); - - short t; - zc_istream is (str); - is >> t; - - return static_cast (t); - } - - // unsigned_byte - // - - template - void unsigned_byte_pimpl:: - _pre () - { - str_.clear (); - } - - template - void unsigned_byte_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - unsigned char unsigned_byte_pimpl:: - post_unsigned_byte () - { - std::basic_string tmp; - tmp.swap (str_); - - ro_string str (tmp); - trim (str); - - unsigned short t; - zc_istream is (str); - is >> t; - - return static_cast (t); - } - - // short - // - - template - void short_pimpl:: - _pre () - { - str_.clear (); - } - - template - void short_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - short short_pimpl:: - post_short () - { - std::basic_string tmp; - tmp.swap (str_); - - ro_string str (tmp); - trim (str); - - short t; - zc_istream is (str); - is >> t; - - return t; - } - - // unsigned_short - // - - template - void unsigned_short_pimpl:: - _pre () - { - str_.clear (); - } - - template - void unsigned_short_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - unsigned short unsigned_short_pimpl:: - post_unsigned_short () - { - std::basic_string tmp; - tmp.swap (str_); - - ro_string str (tmp); - trim (str); - - unsigned short t; - zc_istream is (str); - is >> t; - - return t; - } - - // int - // - - template - void int_pimpl:: - _pre () - { - str_.clear (); - } - - template - void int_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - int int_pimpl:: - post_int () - { - std::basic_string tmp; - tmp.swap (str_); - - ro_string str (tmp); - trim (str); - - int t; - zc_istream is (str); - is >> t; - - return t; - } - - // unsigned_int - // - - template - void unsigned_int_pimpl:: - _pre () - { - str_.clear (); - } - - template - void unsigned_int_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - unsigned int unsigned_int_pimpl:: - post_unsigned_int () - { - std::basic_string tmp; - tmp.swap (str_); - - ro_string str (tmp); - trim (str); - - unsigned int t; - zc_istream is (str); - is >> t; - - return t; - } - - // long - // - template - void long_pimpl:: - _pre () - { - str_.clear (); - } - - template - void long_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - long long long_pimpl:: - post_long () - { - std::basic_string tmp; - tmp.swap (str_); - - ro_string str (tmp); - trim (str); - - long long t; - zc_istream is (str); - is >> t; - - return t; - } - - // unsigned_long - // - template - void unsigned_long_pimpl:: - _pre () - { - str_.clear (); - } - - template - void unsigned_long_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - unsigned long long unsigned_long_pimpl:: - post_unsigned_long () - { - std::basic_string tmp; - tmp.swap (str_); - - ro_string str (tmp); - trim (str); - - unsigned long long t; - zc_istream is (str); - is >> t; - - return t; - } - - // integer - // - template - void integer_pimpl:: - _pre () - { - str_.clear (); - } - - template - void integer_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - long long integer_pimpl:: - post_integer () - { - std::basic_string tmp; - tmp.swap (str_); - - ro_string str (tmp); - trim (str); - - long long t; - zc_istream is (str); - is >> t; - - return t; - } - - // negative_integer - // - template - void negative_integer_pimpl:: - _pre () - { - str_.clear (); - } - - template - void negative_integer_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - long long negative_integer_pimpl:: - post_negative_integer () - { - std::basic_string tmp; - tmp.swap (str_); - - ro_string str (tmp); - trim (str); - - long long t; - zc_istream is (str); - is >> t; - - return t; - } - - // non_positive_integer - // - template - void non_positive_integer_pimpl:: - _pre () - { - str_.clear (); - } - - template - void non_positive_integer_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - long long non_positive_integer_pimpl:: - post_non_positive_integer () - { - std::basic_string tmp; - tmp.swap (str_); - - ro_string str (tmp); - trim (str); - - long long t; - zc_istream is (str); - is >> t; - - return t; - } - - // positive_integer - // - template - void positive_integer_pimpl:: - _pre () - { - str_.clear (); - } - - template - void positive_integer_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - unsigned long long positive_integer_pimpl:: - post_positive_integer () - { - std::basic_string tmp; - tmp.swap (str_); - - ro_string str (tmp); - trim (str); - - unsigned long long t; - zc_istream is (str); - is >> t; - - return t; - } - - // non_negative_integer - // - template - void non_negative_integer_pimpl:: - _pre () - { - str_.clear (); - } - - template - void non_negative_integer_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - unsigned long long non_negative_integer_pimpl:: - post_non_negative_integer () - { - std::basic_string tmp; - tmp.swap (str_); - - ro_string str (tmp); - trim (str); - - unsigned long long t; - zc_istream is (str); - is >> t; - - return t; - } - - // float - // - template - void float_pimpl:: - _pre () - { - str_.clear (); - } - - template - void float_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - float float_pimpl:: - post_float () - { - std::basic_string tmp; - tmp.swap (str_); - - ro_string str (tmp); - trim (str); - - if (str == bits::positive_inf ()) - return std::numeric_limits::infinity (); - - if (str == bits::negative_inf ()) - return -std::numeric_limits::infinity (); - - if (str == bits::nan ()) - return std::numeric_limits::quiet_NaN (); - - float t; - zc_istream is (str); - is.imbue (std::locale::classic ()); - is >> t; - - return t; - } - - // double - // - template - void double_pimpl:: - _pre () - { - str_.clear (); - } - - template - void double_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - double double_pimpl:: - post_double () - { - std::basic_string tmp; - tmp.swap (str_); - - ro_string str (tmp); - trim (str); - - if (str == bits::positive_inf ()) - return std::numeric_limits::infinity (); - - if (str == bits::negative_inf ()) - return -std::numeric_limits::infinity (); - - if (str == bits::nan ()) - return std::numeric_limits::quiet_NaN (); - - double t; - zc_istream is (str); - is.imbue (std::locale::classic ()); - is >> t; - - return t; - } - - // decimal - // - template - void decimal_pimpl:: - _pre () - { - str_.clear (); - } - - template - void decimal_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - double decimal_pimpl:: - post_decimal () - { - std::basic_string tmp; - tmp.swap (str_); - - ro_string str (tmp); - trim (str); - - double t; - zc_istream is (str); - is.imbue (std::locale::classic ()); - is >> t; - - return t; - } - - - // string - // - template - void string_pimpl:: - _pre () - { - str_.clear (); - } - - template - void string_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - std::basic_string string_pimpl:: - post_string () - { - std::basic_string r; - r.swap (str_); - return r; - } - - // normalized_string - // - template - void normalized_string_pimpl:: - _pre () - { - str_.clear (); - } - - template - void normalized_string_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - std::basic_string normalized_string_pimpl:: - post_normalized_string () - { - typedef typename std::basic_string::size_type size_type; - - size_type size (str_.size ()); - - for (size_type i (0); i < size; ++i) - { - C& c = str_[i]; - - if (c == C (0x0A) || c == C (0x0D) || c == C (0x09)) - c = C (0x20); - } - - std::basic_string r; - r.swap (str_); - return r; - } - - // token - // - template - void token_pimpl:: - _pre () - { - str_.clear (); - } - - template - void token_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - std::basic_string token_pimpl:: - post_token () - { - typedef typename std::basic_string::size_type size_type; - - size_type size (str_.size ()); - size_type j (0); - - bool subs (false); - - for (size_type i (0); i < size; ++i) - { - C c = str_[i]; - - if (c == C (0x20) || c == C (0x0A) || - c == C (0x0D) || c == C (0x09)) - { - subs = true; - } - else - { - if (subs) - { - subs = false; - str_[j++] = C (0x20); - } - - str_[j++] = c; - } - } - - str_.resize (j); - - std::basic_string r; - r.swap (str_); - return r; - } - - // name - // - template - void name_pimpl:: - _pre () - { - str_.clear (); - } - - template - void name_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - std::basic_string name_pimpl:: - post_name () - { - ro_string tmp (str_); - str_.resize (trim_right (tmp)); - - std::basic_string r; - r.swap (str_); - return r; - } - - // nmtoken - // - template - void nmtoken_pimpl:: - _pre () - { - str_.clear (); - } - - template - void nmtoken_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - std::basic_string nmtoken_pimpl:: - post_nmtoken () - { - ro_string tmp (str_); - str_.resize (trim_right (tmp)); - - std::basic_string r; - r.swap (str_); - return r; - } - - // nmtokens - // - template - void nmtokens_pimpl:: - _pre () - { - nmtokens_pskel::_pre (); - seq_.clear (); - } - - template - string_sequence nmtokens_pimpl:: - post_nmtokens () - { - string_sequence r; - r.swap (seq_); - return r; - } - - template - void nmtokens_pimpl:: - _xsd_parse_item (const ro_string& s) - { - parser_.pre (); - parser_._pre (); - parser_._characters (s); - parser_._post (); - seq_.push_back (parser_.post_nmtoken ()); - } - - // ncname - // - template - void ncname_pimpl:: - _pre () - { - str_.clear (); - } - - template - void ncname_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - std::basic_string ncname_pimpl:: - post_ncname () - { - ro_string tmp (str_); - str_.resize (trim_right (tmp)); - - std::basic_string r; - r.swap (str_); - return r; - } - - // id - // - template - void id_pimpl:: - _pre () - { - str_.clear (); - } - - template - void id_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - std::basic_string id_pimpl:: - post_id () - { - ro_string tmp (str_); - str_.resize (trim_right (tmp)); - - std::basic_string r; - r.swap (str_); - return r; - } - - // idref - // - template - void idref_pimpl:: - _pre () - { - str_.clear (); - } - - template - void idref_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - std::basic_string idref_pimpl:: - post_idref () - { - ro_string tmp (str_); - str_.resize (trim_right (tmp)); - - std::basic_string r; - r.swap (str_); - return r; - } - - // idrefs - // - template - void idrefs_pimpl:: - _pre () - { - idrefs_pskel::_pre (); - seq_.clear (); - } - - template - string_sequence idrefs_pimpl:: - post_idrefs () - { - string_sequence r; - r.swap (seq_); - return r; - } - - template - void idrefs_pimpl:: - _xsd_parse_item (const ro_string& s) - { - parser_.pre (); - parser_._pre (); - parser_._characters (s); - parser_._post (); - seq_.push_back (parser_.post_idref ()); - } - - // language - // - template - void language_pimpl:: - _pre () - { - str_.clear (); - } - - template - void language_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - std::basic_string language_pimpl:: - post_language () - { - ro_string tmp (str_); - str_.resize (trim_right (tmp)); - - std::basic_string r; - r.swap (str_); - return r; - } - - // uri - // - template - void uri_pimpl:: - _pre () - { - str_.clear (); - } - - template - void uri_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - std::basic_string uri_pimpl:: - post_uri () - { - ro_string tmp (str_); - str_.resize (trim_right (tmp)); - - std::basic_string r; - r.swap (str_); - return r; - } - - // qname - // - template - void qname_pimpl:: - _pre () - { - str_.clear (); - } - - template - void qname_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - qname qname_pimpl:: - post_qname () - { - typedef typename ro_string::size_type size_type; - - ro_string tmp (str_); - size_type size (trim_right (tmp)); - size_type pos (tmp.find (C (':'))); - - if (pos != ro_string::npos) - { - std::basic_string prefix (tmp.data (), pos++); - std::basic_string name (tmp.data () + pos, size - pos); - return qname (prefix, name); - } - else - { - str_.resize (size); - return qname (str_); - } - } - - // base64_binary - // - template - void base64_binary_pimpl:: - _pre () - { - str_.clear (); - } - - template - void base64_binary_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - namespace bits - { - template - inline unsigned char - base64_decode (C c) - { - unsigned char r (0xFF); - - if (c >= C('A') && c <= C ('Z')) - r = static_cast (c - C ('A')); - else if (c >= C('a') && c <= C ('z')) - r = static_cast (c - C ('a') + 26); - else if (c >= C('0') && c <= C ('9')) - r = static_cast (c - C ('0') + 52); - else if (c == C ('+')) - r = 62; - else if (c == C ('/')) - r = 63; - - return r; - } - } - - template - XSD_AUTO_PTR base64_binary_pimpl:: - post_base64_binary () - { - typedef typename std::basic_string::size_type size_type; - - size_type size (str_.size ()); - const C* src (str_.c_str ()); - - // Remove all whitespaces. - // - { - size_type j (0); - - bool subs (false); - - for (size_type i (0); i < size; ++i) - { - C c = str_[i]; - - if (c == C (0x20) || c == C (0x0A) || - c == C (0x0D) || c == C (0x09)) - { - subs = true; - } - else - { - if (subs) - subs = false; - - str_[j++] = c; - } - } - - size = j; - str_.resize (size); - } - - // Our length should be a multiple of four. - // - size_type quad_count (size / 4); - size_type capacity (quad_count * 3 + 1); - - XSD_AUTO_PTR buf (new buffer (capacity, capacity)); - char* dst (buf->data ()); - - size_type si (0), di (0); // Source and destination indexes. - - // Process all quads except the last one. - // - unsigned char b1, b2, b3, b4; - - for (size_type q (0); q < quad_count - 1; ++q) - { - b1 = bits::base64_decode (src[si++]); - b2 = bits::base64_decode (src[si++]); - b3 = bits::base64_decode (src[si++]); - b4 = bits::base64_decode (src[si++]); - - dst[di++] = (b1 << 2) | (b2 >> 4); - dst[di++] = (b2 << 4) | (b3 >> 2); - dst[di++] = (b3 << 6) | b4; - } - - // Process the last quad. The first two octets are always there. - // - b1 = bits::base64_decode (src[si++]); - b2 = bits::base64_decode (src[si++]); - - C e3 (src[si++]); - C e4 (src[si++]); - - if (e4 == C ('=')) - { - if (e3 == C ('=')) - { - // Two pads. Last 4 bits in b2 should be zero. - // - dst[di++] = (b1 << 2) | (b2 >> 4); - } - else - { - // One pad. Last 2 bits in b3 should be zero. - // - b3 = bits::base64_decode (e3); - - dst[di++] = (b1 << 2) | (b2 >> 4); - dst[di++] = (b2 << 4) | (b3 >> 2); - } - } - else - { - // No pads. - // - b3 = bits::base64_decode (e3); - b4 = bits::base64_decode (e4); - - dst[di++] = (b1 << 2) | (b2 >> 4); - dst[di++] = (b2 << 4) | (b3 >> 2); - dst[di++] = (b3 << 6) | b4; - } - - // Set the real size. - // - buf->size (di); - - return buf; - } - - // hex_binary - // - template - void hex_binary_pimpl:: - _pre () - { - str_.clear (); - } - - template - void hex_binary_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - namespace bits - { - template - inline unsigned char - hex_decode (C c) - { - unsigned char r (0xFF); - - if (c >= C('0') && c <= C ('9')) - r = static_cast (c - C ('0')); - else if (c >= C ('A') && c <= C ('F')) - r = static_cast (10 + (c - C ('A'))); - else if (c >= C ('a') && c <= C ('f')) - r = static_cast (10 + (c - C ('a'))); - - return r; - } - } - - template - XSD_AUTO_PTR hex_binary_pimpl:: - post_hex_binary () - { - typedef typename ro_string::size_type size_type; - - ro_string tmp (str_); - size_type size (trim_right (tmp)); - - buffer::size_t n (size / 2); - XSD_AUTO_PTR buf (new buffer (n)); - - const C* src (tmp.data ()); - char* dst (buf->data ()); - - for (buffer::size_t i (0); i < n; ++i) - { - unsigned char h (bits::hex_decode (src[2 * i])); - unsigned char l (bits::hex_decode (src[2 * i + 1])); - dst[i] = (h << 4) | l; - } - - return buf; - } - - // time_zone - // - namespace bits - { - // Datatypes 3.2.7.3. - // - template - void - parse_tz (const C* s, - typename std::basic_string::size_type n, - short& h, short& m) - { - // time_zone := Z|(+|-)HH:MM - // - if (n == 0) - { - return; - } - else if (s[0] == 'Z') - { - h = 0; - m = 0; - } - else if (n == 6) - { - // Parse hours. - // - h = 10 * (s[1] - '0') + (s[2] - '0'); - - // Parse minutes. - // - m = 10 * (s[4] - '0') + (s[5] - '0'); - - if (s[0] == '-') - { - h = -h; - m = -m; - } - } - } - } - - // gday - // - template - void gday_pimpl:: - _pre () - { - str_.clear (); - } - - template - void gday_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - gday gday_pimpl:: - post_gday () - { - typedef typename ro_string::size_type size_type; - - ro_string tmp (str_); - size_type size (trim_right (tmp)); - const C* s (tmp.data ()); - - unsigned short day (0); - bool z (false); - short zh (0), zm (0); - - // gday := ---DD[Z|(+|-)HH:MM] - // - if (size >= 5) - { - day = 10 * (s[3] - '0') + (s[4] - '0'); - - if (size > 5) - { - bits::parse_tz (s + 5, size - 5, zh, zm); - z = true; - } - } - - return z ? gday (day, zh, zm) : gday (day); - } - - // gmonth - // - template - void gmonth_pimpl:: - _pre () - { - str_.clear (); - } - - template - void gmonth_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - gmonth gmonth_pimpl:: - post_gmonth () - { - typedef typename ro_string::size_type size_type; - - ro_string tmp (str_); - size_type size (trim_right (tmp)); - const C* s (tmp.data ()); - - unsigned short month (0); - bool z (false); - short zh (0), zm (0); - - // gmonth := --MM[Z|(+|-)HH:MM] - // - if (size >= 4) - { - month = 10 * (s[2] - '0') + (s[3] - '0'); - - if (size > 4) - { - bits::parse_tz (s + 4, size - 4, zh, zm); - z = true; - } - } - - return z ? gmonth (month, zh, zm) : gmonth (month); - } - - // gyear - // - template - void gyear_pimpl:: - _pre () - { - str_.clear (); - } - - template - void gyear_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - gyear gyear_pimpl:: - post_gyear () - { - typedef typename ro_string::size_type size_type; - - ro_string tmp (str_); - size_type size (trim_right (tmp)); - const C* s (tmp.data ()); - - int year (0); - bool z (false); - short zh (0), zm (0); - - // gyear := [-]CCYY[N]*[Z|(+|-)HH:MM] - // - - if (size >= 4) - { - // Find the end of the year token. - // - size_type pos (4); - for (; pos < size; ++pos) - { - C c (s[pos]); - - if (c == C ('Z') || c == C ('+') || c == C ('-')) - break; - } - - ro_string year_fragment (s, pos); - zc_istream is (year_fragment); - is >> year; - - if (pos < size) - { - bits::parse_tz (s + pos, size - pos, zh, zm); - z = true; - } - } - - return z ? gyear (year, zh, zm) : gyear (year); - } - - // gmonth_day - // - template - void gmonth_day_pimpl:: - _pre () - { - str_.clear (); - } - - template - void gmonth_day_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - gmonth_day gmonth_day_pimpl:: - post_gmonth_day () - { - typedef typename ro_string::size_type size_type; - - ro_string tmp (str_); - size_type size (trim_right (tmp)); - const C* s (tmp.data ()); - - unsigned short month (0), day (0); - bool z (false); - short zh (0), zm (0); - - // gmonth_day := --MM-DD[Z|(+|-)HH:MM] - // - if (size >= 7) - { - month = 10 * (s[2] - '0') + (s[3] - '0'); - day = 10 * (s[5] - '0') + (s[6] - '0'); - - if (size > 7) - { - bits::parse_tz (s + 7, size - 7, zh, zm); - z = true; - } - } - - return z - ? gmonth_day (month, day, zh, zm) - : gmonth_day (month, day); - } - - // gyear_month - // - template - void gyear_month_pimpl:: - _pre () - { - str_.clear (); - } - - template - void gyear_month_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - gyear_month gyear_month_pimpl:: - post_gyear_month () - { - typedef typename ro_string::size_type size_type; - - ro_string tmp (str_); - size_type size (trim_right (tmp)); - const C* s (tmp.data ()); - - int year (0); - unsigned short month (0); - bool z (false); - short zh (0), zm (0); - - // gyear_month := [-]CCYY[N]*-MM[Z|(+|-)HH:MM] - // - - if (size >= 7) - { - // Find the end of the year token. - // - size_type pos (tmp.find (C ('-'), 4)); - - if (pos != ro_string::npos && (size - pos - 1) >= 2) - { - ro_string year_fragment (s, pos); - zc_istream yis (year_fragment); - yis >> year; - - month = 10 * (s[pos + 1] - '0') + (s[pos + 2] - '0'); - - pos += 3; - - if (pos < size) - { - bits::parse_tz (s + pos, size - pos, zh, zm); - z = true; - } - } - } - - return z - ? gyear_month (year, month, zh, zm) - : gyear_month (year, month); - } - - // date - // - template - void date_pimpl:: - _pre () - { - str_.clear (); - } - - template - void date_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - date date_pimpl:: - post_date () - { - typedef typename ro_string::size_type size_type; - - ro_string tmp (str_); - size_type size (trim_right (tmp)); - const C* s (tmp.data ()); - - int year (0); - unsigned short month (0), day (0); - bool z (false); - short zh (0), zm (0); - - // date := [-]CCYY[N]*-MM-DD[Z|(+|-)HH:MM] - // - - if (size >= 10) - { - // Find the end of the year token. - // - size_type pos (tmp.find (C ('-'), 4)); - - if (pos != ro_string::npos && (size - pos - 1) >= 5) - { - ro_string year_fragment (s, pos); - zc_istream yis (year_fragment); - yis >> year; - - month = 10 * (s[pos + 1] - '0') + (s[pos + 2] - '0'); - day = 10 * (s[pos + 4] - '0') + (s[pos + 5] - '0'); - - pos += 6; - - if (pos < size) - { - bits::parse_tz (s + pos, size - pos, zh, zm); - z = true; - } - } - } - - return z - ? date (year, month, day, zh, zm) - : date (year, month, day); - } - - // time - // - template - void time_pimpl:: - _pre () - { - str_.clear (); - } - - template - void time_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - time time_pimpl:: - post_time () - { - typedef typename ro_string::size_type size_type; - - ro_string tmp (str_); - size_type size (trim_right (tmp)); - const C* s (tmp.data ()); - - unsigned short hours (0), minutes (0); - double seconds (0.0); - bool z (false); - short zh (0), zm (0); - - // time := HH:MM:SS[.S+][Z|(+|-)HH:MM] - // - - if (size >= 8) - { - hours = 10 * (s[0] - '0') + (s[1] - '0'); - minutes = 10 * (s[3] - '0') + (s[4] - '0'); - - // Find the end of the seconds fragment. - // - size_type pos (8); - for (; pos < size; ++pos) - { - C c (s[pos]); - - if (c == C ('Z') || c == C ('+') || c == C ('-')) - break; - } - - ro_string seconds_fragment (s + 6, pos - 6); - zc_istream sis (seconds_fragment); - sis >> seconds; - - if (pos < size) - { - bits::parse_tz (s + pos, size - pos, zh, zm); - z = true; - } - } - - return z - ? time (hours, minutes, seconds, zh, zm) - : time (hours, minutes, seconds); - } - - - // date_time - // - template - void date_time_pimpl:: - _pre () - { - str_.clear (); - } - - template - void date_time_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - date_time date_time_pimpl:: - post_date_time () - { - typedef typename ro_string::size_type size_type; - - ro_string tmp (str_); - size_type size (trim_right (tmp)); - const C* s (tmp.data ()); - - int year (0); - unsigned short month (0), day (0), hours (0), minutes (0); - double seconds (0.0); - bool z (false); - short zh (0), zm (0); - - // date_time := [-]CCYY[N]*-MM-DDTHH:MM:SS[.S+][Z|(+|-)HH:MM] - // - - if (size >= 19) - { - // Find the end of the year token. - // - size_type pos (tmp.find (C ('-'), 4)); - - if (pos != ro_string::npos && (size - pos - 1) >= 14) - { - ro_string year_fragment (s, pos); - zc_istream yis (year_fragment); - yis >> year; - - month = 10 * (s[pos + 1] - '0') + (s[pos + 2] - '0'); - day = 10 * (s[pos + 4] - '0') + (s[pos + 5] - '0'); - - pos += 7; // Point to the first H. - - hours = 10 * (s[pos] - '0') + (s[pos + 1] - '0'); - minutes = 10 * (s[pos + 3] - '0') + (s[pos + 4] - '0'); - - // Find the end of the seconds fragment. - // - pos += 6; // Point to the first S. - - size_type sec_end (pos + 2); - for (; sec_end < size; ++sec_end) - { - C c (s[sec_end]); - - if (c == C ('Z') || c == C ('+') || c == C ('-')) - break; - } - - ro_string seconds_fragment (s + pos, sec_end - pos); - zc_istream sis (seconds_fragment); - sis >> seconds; - - if (sec_end < size) - { - bits::parse_tz (s + sec_end, size - sec_end, zh, zm); - z = true; - } - } - } - - return z - ? date_time (year, month, day, hours, minutes, seconds, zh, zm) - : date_time (year, month, day, hours, minutes, seconds); - } - - // duration - // - template - void duration_pimpl:: - _pre () - { - str_.clear (); - } - - template - void duration_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - namespace bits - { - template - inline typename ro_string::size_type - duration_delim (const C* s, - typename ro_string::size_type pos, - typename ro_string::size_type size) - { - const C* p (s + pos); - for (; p < (s + size); ++p) - { - if (*p == C ('Y') || *p == C ('D') || *p == C ('M') || - *p == C ('H') || *p == C ('M') || *p == C ('S') || - *p == C ('T')) - break; - } - - return p - s; - } - } - - template - duration duration_pimpl:: - post_duration () - { - typedef typename ro_string::size_type size_type; - - ro_string tmp (str_); - size_type size (trim_right (tmp)); - - bool negative (false); - unsigned int years (0), months (0), days (0), hours (0), minutes (0); - double seconds (0.0); - - // duration := [-]P[nY][nM][nD][TnHnMn[.n+]S] - // - const C* s (tmp.data ()); - - if (size >= 3) - { - size_type pos (0); - - if (s[0] == C ('-')) - { - negative = true; - pos++; - } - - pos++; // Skip 'P'. - - size_type del (bits::duration_delim (s, pos, size)); - - if (del != size && s[del] == C ('Y')) - { - ro_string fragment (s + pos, del - pos); - zc_istream is (fragment); - is >> years; - - pos = del + 1; - del = bits::duration_delim (s, pos, size); - } - - if (del != size && s[del] == C ('M')) - { - ro_string fragment (s + pos, del - pos); - zc_istream is (fragment); - is >> months; - - pos = del + 1; - del = bits::duration_delim (s, pos, size); - } - - if (del != size && s[del] == C ('D')) - { - ro_string fragment (s + pos, del - pos); - zc_istream is (fragment); - is >> days; - - pos = del + 1; - del = bits::duration_delim (s, pos, size); - } - - if (del != size && s[del] == C ('T')) - { - pos = del + 1; - del = bits::duration_delim (s, pos, size); - - if (del != size && s[del] == C ('H')) - { - ro_string fragment (s + pos, del - pos); - zc_istream is (fragment); - is >> hours; - - pos = del + 1; - del = bits::duration_delim (s, pos, size); - } - - if (del != size && s[del] == C ('M')) - { - ro_string fragment (s + pos, del - pos); - zc_istream is (fragment); - is >> minutes; - - pos = del + 1; - del = bits::duration_delim (s, pos, size); - } - - if (del != size && s[del] == C ('S')) - { - ro_string fragment (s + pos, del - pos); - zc_istream is (fragment); - is >> seconds; - } - } - } - - return duration ( - negative, years, months, days, hours, minutes, seconds); - } - } - } - } -} diff --git a/libxsd/xsd/cxx/parser/non-validating/xml-schema-pskel.hxx b/libxsd/xsd/cxx/parser/non-validating/xml-schema-pskel.hxx deleted file mode 100644 index 334be01..0000000 --- a/libxsd/xsd/cxx/parser/non-validating/xml-schema-pskel.hxx +++ /dev/null @@ -1,648 +0,0 @@ -// file : xsd/cxx/parser/non-validating/xml-schema-pskel.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_PARSER_NON_VALIDATING_XML_SCHEMA_PSKEL_HXX -#define XSD_CXX_PARSER_NON_VALIDATING_XML_SCHEMA_PSKEL_HXX - -#include -#include // std::auto_ptr/unique_ptr - -#include // XSD_AUTO_PTR - -#include -#include - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace non_validating - { - // anyType and anySimpleType. All events are routed to the - // _any_* callbacks. - // - template - struct any_type_pskel: complex_content - { - virtual bool - _start_element_impl (const ro_string&, - const ro_string&, - const ro_string*); - - virtual bool - _end_element_impl (const ro_string&, - const ro_string&); - - virtual bool - _attribute_impl (const ro_string&, - const ro_string&, - const ro_string&); - - virtual bool - _characters_impl (const ro_string&); - - virtual void - post_any_type () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct any_simple_type_pskel: simple_content - { - virtual bool - _characters_impl (const ro_string&); - - virtual void - post_any_simple_type () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - - // Boolean. - // - template - struct boolean_pskel: simple_content - { - virtual bool - post_boolean () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - - // 8-bit - // - template - struct byte_pskel: simple_content - { - virtual signed char - post_byte () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct unsigned_byte_pskel: simple_content - { - virtual unsigned char - post_unsigned_byte () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - - // 16-bit - // - template - struct short_pskel: simple_content - { - virtual short - post_short () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct unsigned_short_pskel: simple_content - { - virtual unsigned short - post_unsigned_short () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - - // 32-bit - // - template - struct int_pskel: simple_content - { - virtual int - post_int () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct unsigned_int_pskel: simple_content - { - virtual unsigned int - post_unsigned_int () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - - // 64-bit - // - template - struct long_pskel: simple_content - { - virtual long long - post_long () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct unsigned_long_pskel: simple_content - { - virtual unsigned long long - post_unsigned_long () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - - // Arbitrary-length integers. - // - template - struct integer_pskel: simple_content - { - virtual long long - post_integer () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct negative_integer_pskel: simple_content - { - virtual long long - post_negative_integer () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct non_positive_integer_pskel: simple_content - { - virtual long long - post_non_positive_integer () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct positive_integer_pskel: simple_content - { - virtual unsigned long long - post_positive_integer () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct non_negative_integer_pskel: simple_content - { - virtual unsigned long long - post_non_negative_integer () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - - // Floats. - // - template - struct float_pskel: simple_content - { - virtual float - post_float () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct double_pskel: simple_content - { - virtual double - post_double () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct decimal_pskel: simple_content - { - virtual double - post_decimal () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - - // Strings. - // - template - struct string_pskel: simple_content - { - virtual std::basic_string - post_string () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct normalized_string_pskel: simple_content - { - virtual std::basic_string - post_normalized_string () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct token_pskel: simple_content - { - virtual std::basic_string - post_token () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct name_pskel: simple_content - { - virtual std::basic_string - post_name () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct nmtoken_pskel: simple_content - { - virtual std::basic_string - post_nmtoken () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct nmtokens_pskel: list_base - { - virtual string_sequence - post_nmtokens () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct ncname_pskel: simple_content - { - virtual std::basic_string - post_ncname () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct id_pskel: simple_content - { - virtual std::basic_string - post_id () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct idref_pskel: simple_content - { - virtual std::basic_string - post_idref () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct idrefs_pskel: list_base - { - virtual string_sequence - post_idrefs () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - // Language. - // - template - struct language_pskel: simple_content - { - virtual std::basic_string - post_language () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - // URI. - // - template - struct uri_pskel: simple_content - { - virtual std::basic_string - post_uri () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - // QName. - // - template - struct qname_pskel: simple_content - { - virtual qname - post_qname () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - // Base64 and hex binaries. - // - template - struct base64_binary_pskel: simple_content - { - virtual XSD_AUTO_PTR - post_base64_binary () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct hex_binary_pskel: simple_content - { - virtual XSD_AUTO_PTR - post_hex_binary () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - // Time and date types. - // - template - struct gday_pskel: simple_content - { - virtual gday - post_gday () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct gmonth_pskel: simple_content - { - virtual gmonth - post_gmonth () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct gyear_pskel: simple_content - { - virtual gyear - post_gyear () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct gmonth_day_pskel: simple_content - { - virtual gmonth_day - post_gmonth_day () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct gyear_month_pskel: simple_content - { - virtual gyear_month - post_gyear_month () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct date_pskel: simple_content - { - virtual date - post_date () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct time_pskel: simple_content - { - virtual time - post_time () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct date_time_pskel: simple_content - { - virtual date_time - post_date_time () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct duration_pskel: simple_content - { - virtual duration - post_duration () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - } - } - } -} - -#include - -#endif // XSD_CXX_PARSER_NON_VALIDATING_XML_SCHEMA_PSKEL_HXX - -#include diff --git a/libxsd/xsd/cxx/parser/non-validating/xml-schema-pskel.ixx b/libxsd/xsd/cxx/parser/non-validating/xml-schema-pskel.ixx deleted file mode 100644 index 44cc6e4..0000000 --- a/libxsd/xsd/cxx/parser/non-validating/xml-schema-pskel.ixx +++ /dev/null @@ -1,1248 +0,0 @@ -// file : xsd/cxx/parser/non-validating/xml-schema-pskel.ixx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#if defined(XSD_CXX_PARSER_USE_CHAR) || !defined(XSD_CXX_PARSER_USE_WCHAR) - -#ifndef XSD_CXX_PARSER_NON_VALIDATING_XML_SCHEMA_PSKEL_IXX_CHAR -#define XSD_CXX_PARSER_NON_VALIDATING_XML_SCHEMA_PSKEL_IXX_CHAR - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace non_validating - { - template<> - inline const char* any_type_pskel:: - _static_type () - { - return "anyType http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* any_type_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* any_simple_type_pskel:: - _static_type () - { - return "anySimpleType http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* any_simple_type_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* boolean_pskel:: - _static_type () - { - return "boolean http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* boolean_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* byte_pskel:: - _static_type () - { - return "byte http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* byte_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* unsigned_byte_pskel:: - _static_type () - { - return "unsignedByte http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* unsigned_byte_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* short_pskel:: - _static_type () - { - return "short http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* short_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* unsigned_short_pskel:: - _static_type () - { - return "unsignedShort http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* unsigned_short_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* int_pskel:: - _static_type () - { - return "int http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* int_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* unsigned_int_pskel:: - _static_type () - { - return "unsignedInt http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* unsigned_int_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* long_pskel:: - _static_type () - { - return "long http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* long_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* unsigned_long_pskel:: - _static_type () - { - return "unsignedLong http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* unsigned_long_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* integer_pskel:: - _static_type () - { - return "integer http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* integer_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* negative_integer_pskel:: - _static_type () - { - return "negativeInteger http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* negative_integer_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* non_positive_integer_pskel:: - _static_type () - { - return "nonPositiveInteger http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* non_positive_integer_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* positive_integer_pskel:: - _static_type () - { - return "positiveInteger http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* positive_integer_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* non_negative_integer_pskel:: - _static_type () - { - return "nonNegativeInteger http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* non_negative_integer_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* float_pskel:: - _static_type () - { - return "float http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* float_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* double_pskel:: - _static_type () - { - return "double http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* double_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* decimal_pskel:: - _static_type () - { - return "decimal http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* decimal_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* string_pskel:: - _static_type () - { - return "string http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* string_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* normalized_string_pskel:: - _static_type () - { - return "normalizedString http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* normalized_string_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* token_pskel:: - _static_type () - { - return "token http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* token_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* name_pskel:: - _static_type () - { - return "Name http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* name_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* nmtoken_pskel:: - _static_type () - { - return "NMTOKEN http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* nmtoken_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* nmtokens_pskel:: - _static_type () - { - return "NMTOKENS http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* nmtokens_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* ncname_pskel:: - _static_type () - { - return "NCName http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* ncname_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* id_pskel:: - _static_type () - { - return "ID http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* id_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* idref_pskel:: - _static_type () - { - return "IDREF http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* idref_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* idrefs_pskel:: - _static_type () - { - return "IDREFS http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* idrefs_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* language_pskel:: - _static_type () - { - return "language http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* language_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* uri_pskel:: - _static_type () - { - return "anyURI http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* uri_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* qname_pskel:: - _static_type () - { - return "QName http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* qname_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* base64_binary_pskel:: - _static_type () - { - return "base64Binary http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* base64_binary_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* hex_binary_pskel:: - _static_type () - { - return "hexBinary http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* hex_binary_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* gday_pskel:: - _static_type () - { - return "gDay http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* gday_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* gmonth_pskel:: - _static_type () - { - return "gMonth http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* gmonth_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* gyear_pskel:: - _static_type () - { - return "gYear http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* gyear_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* gmonth_day_pskel:: - _static_type () - { - return "gMonthDay http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* gmonth_day_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* gyear_month_pskel:: - _static_type () - { - return "gYearMonth http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* gyear_month_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* date_pskel:: - _static_type () - { - return "date http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* date_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* time_pskel:: - _static_type () - { - return "time http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* time_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* date_time_pskel:: - _static_type () - { - return "dateTime http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* date_time_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* duration_pskel:: - _static_type () - { - return "duration http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* duration_pskel:: - _dynamic_type () const - { - return _static_type (); - } - } - } - } -} - -#endif // XSD_CXX_PARSER_NON_VALIDATING_XML_SCHEMA_PSKEL_IXX_CHAR -#endif // XSD_CXX_PARSER_USE_CHAR - - -#if defined(XSD_CXX_PARSER_USE_WCHAR) || !defined(XSD_CXX_PARSER_USE_CHAR) - -#ifndef XSD_CXX_PARSER_NON_VALIDATING_XML_SCHEMA_PSKEL_IXX_WCHAR -#define XSD_CXX_PARSER_NON_VALIDATING_XML_SCHEMA_PSKEL_IXX_WCHAR - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace non_validating - { - template<> - inline const wchar_t* any_type_pskel:: - _static_type () - { - return L"anyType http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* any_type_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* any_simple_type_pskel:: - _static_type () - { - return L"anySimpleType http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* any_simple_type_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* boolean_pskel:: - _static_type () - { - return L"boolean http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* boolean_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* byte_pskel:: - _static_type () - { - return L"byte http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* byte_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* unsigned_byte_pskel:: - _static_type () - { - return L"unsignedByte http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* unsigned_byte_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* short_pskel:: - _static_type () - { - return L"short http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* short_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* unsigned_short_pskel:: - _static_type () - { - return L"unsignedShort http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* unsigned_short_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* int_pskel:: - _static_type () - { - return L"int http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* int_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* unsigned_int_pskel:: - _static_type () - { - return L"unsignedInt http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* unsigned_int_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* long_pskel:: - _static_type () - { - return L"long http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* long_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* unsigned_long_pskel:: - _static_type () - { - return L"unsignedLong http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* unsigned_long_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* integer_pskel:: - _static_type () - { - return L"integer http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* integer_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* negative_integer_pskel:: - _static_type () - { - return L"negativeInteger http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* negative_integer_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* non_positive_integer_pskel:: - _static_type () - { - return L"nonPositiveInteger http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* non_positive_integer_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* positive_integer_pskel:: - _static_type () - { - return L"positiveInteger http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* positive_integer_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* non_negative_integer_pskel:: - _static_type () - { - return L"nonNegativeInteger http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* non_negative_integer_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* float_pskel:: - _static_type () - { - return L"float http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* float_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* double_pskel:: - _static_type () - { - return L"double http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* double_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* decimal_pskel:: - _static_type () - { - return L"decimal http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* decimal_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* string_pskel:: - _static_type () - { - return L"string http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* string_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* normalized_string_pskel:: - _static_type () - { - return L"normalizedString http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* normalized_string_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* token_pskel:: - _static_type () - { - return L"token http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* token_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* name_pskel:: - _static_type () - { - return L"Name http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* name_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* nmtoken_pskel:: - _static_type () - { - return L"NMTOKEN http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* nmtoken_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* nmtokens_pskel:: - _static_type () - { - return L"NMTOKENS http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* nmtokens_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* ncname_pskel:: - _static_type () - { - return L"NCName http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* ncname_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* id_pskel:: - _static_type () - { - return L"ID http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* id_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* idref_pskel:: - _static_type () - { - return L"IDREF http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* idref_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* idrefs_pskel:: - _static_type () - { - return L"IDREFS http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* idrefs_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* language_pskel:: - _static_type () - { - return L"language http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* language_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* uri_pskel:: - _static_type () - { - return L"anyURI http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* uri_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* qname_pskel:: - _static_type () - { - return L"QName http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* qname_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* base64_binary_pskel:: - _static_type () - { - return L"base64Binary http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* base64_binary_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* hex_binary_pskel:: - _static_type () - { - return L"hexBinary http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* hex_binary_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* gday_pskel:: - _static_type () - { - return L"gDay http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* gday_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* gmonth_pskel:: - _static_type () - { - return L"gMonth http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* gmonth_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* gyear_pskel:: - _static_type () - { - return L"gYear http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* gyear_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* gmonth_day_pskel:: - _static_type () - { - return L"gMonthDay http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* gmonth_day_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* gyear_month_pskel:: - _static_type () - { - return L"gYearMonth http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* gyear_month_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* date_pskel:: - _static_type () - { - return L"date http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* date_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* time_pskel:: - _static_type () - { - return L"time http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* time_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* date_time_pskel:: - _static_type () - { - return L"dateTime http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* date_time_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* duration_pskel:: - _static_type () - { - return L"duration http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* duration_pskel:: - _dynamic_type () const - { - return _static_type (); - } - } - } - } -} - -#endif // XSD_CXX_PARSER_NON_VALIDATING_XML_SCHEMA_PSKEL_IXX_WCHAR -#endif // XSD_CXX_PARSER_USE_WCHAR diff --git a/libxsd/xsd/cxx/parser/non-validating/xml-schema-pskel.txx b/libxsd/xsd/cxx/parser/non-validating/xml-schema-pskel.txx deleted file mode 100644 index e2fd1b3..0000000 --- a/libxsd/xsd/cxx/parser/non-validating/xml-schema-pskel.txx +++ /dev/null @@ -1,68 +0,0 @@ -// file : xsd/cxx/parser/non-validating/xml-schema-pskel.txx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace non_validating - { - // any_type - // - - template - bool any_type_pskel:: - _start_element_impl (const ro_string& ns, - const ro_string& name, - const ro_string* type) - { - this->_start_any_element (ns, name, type); - this->complex_content::context_.top ().any_ = true; - return true; - } - - template - bool any_type_pskel:: - _end_element_impl (const ro_string& ns, const ro_string& name) - { - this->complex_content::context_.top ().any_ = false; - this->_end_any_element (ns, name); - return true; - } - - - template - bool any_type_pskel:: - _attribute_impl (const ro_string& ns, - const ro_string& name, - const ro_string& value) - { - this->_any_attribute (ns, name, value); - return true; - } - - template - bool any_type_pskel:: - _characters_impl (const ro_string& s) - { - this->_any_characters (s); - return true; - } - - // any_simple_type - // - - template - bool any_simple_type_pskel:: - _characters_impl (const ro_string& s) - { - this->_any_characters (s); - return true; - } - } - } - } -} diff --git a/libxsd/xsd/cxx/parser/schema-exceptions.hxx b/libxsd/xsd/cxx/parser/schema-exceptions.hxx deleted file mode 100644 index 8fd2def..0000000 --- a/libxsd/xsd/cxx/parser/schema-exceptions.hxx +++ /dev/null @@ -1,186 +0,0 @@ -// file : xsd/cxx/parser/schema-exceptions.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_PARSER_SCHEMA_EXCEPTIONS_HXX -#define XSD_CXX_PARSER_SCHEMA_EXCEPTIONS_HXX - -#include - -namespace xsd -{ - namespace cxx - { - namespace parser - { - template - struct schema_exception - { - public: - virtual - ~schema_exception () - { - } - - unsigned long - line () const - { - return line_; - } - - void - line (unsigned long l) - { - line_ = l; - } - - unsigned long - column () const - { - return column_; - } - - void - column (unsigned long c) - { - column_ = c; - } - - const std::basic_string& - id () const - { - return id_; - } - - void - id (const std::basic_string& id) - { - id_ = id; - } - - virtual std::basic_string - message () const = 0; - - protected: - unsigned long line_; - unsigned long column_; - std::basic_string id_; - }; - - // - // - template - struct expected_element: schema_exception - { - virtual - ~expected_element (); - - expected_element (const std::basic_string& expected_namespace, - const std::basic_string& expected_name); - - expected_element (const std::basic_string& expected_namespace, - const std::basic_string& expected_name, - const std::basic_string& encountered_namespace, - const std::basic_string& encountered_name); - - const std::basic_string& - expected_namespace () const - { - return expected_namespace_; - } - - const std::basic_string& - expected_name () const - { - return expected_name_; - } - - // Encountered element namespace and name are empty if none - // encountered. - // - const std::basic_string& - encountered_namespace () const - { - return encountered_namespace_; - } - - const std::basic_string& - encountered_name () const - { - return encountered_name_; - } - - virtual std::basic_string - message () const; - - private: - std::basic_string expected_namespace_; - std::basic_string expected_name_; - - std::basic_string encountered_namespace_; - std::basic_string encountered_name_; - }; - - - // - // - template - struct unexpected_element: schema_exception - { - virtual - ~unexpected_element (); - - unexpected_element (const std::basic_string& encountered_namespace, - const std::basic_string& encountered_name); - - const std::basic_string& - encountered_namespace () const - { - return encountered_namespace_; - } - - const std::basic_string& - encountered_name () const - { - return encountered_name_; - } - - virtual std::basic_string - message () const; - - private: - std::basic_string encountered_namespace_; - std::basic_string encountered_name_; - }; - - // - // - template - struct dynamic_type: schema_exception - { - virtual - ~dynamic_type () throw (); - - dynamic_type (const std::basic_string& type); - - const std::basic_string& - type () const - { - return type_; - } - - virtual std::basic_string - message () const; - - private: - std::basic_string type_; - }; - } - } -} - -#include - -#endif // XSD_CXX_PARSER_SCHEMA_EXCEPTIONS_HXX - -#include diff --git a/libxsd/xsd/cxx/parser/schema-exceptions.ixx b/libxsd/xsd/cxx/parser/schema-exceptions.ixx deleted file mode 100644 index 71be381..0000000 --- a/libxsd/xsd/cxx/parser/schema-exceptions.ixx +++ /dev/null @@ -1,144 +0,0 @@ -// file : xsd/cxx/parser/schema-exceptions.ixx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#if defined(XSD_CXX_PARSER_USE_CHAR) || !defined(XSD_CXX_PARSER_USE_WCHAR) - -#ifndef XSD_CXX_PARSER_SCHEMA_EXCEPTIONS_IXX_CHAR -#define XSD_CXX_PARSER_SCHEMA_EXCEPTIONS_IXX_CHAR - -namespace xsd -{ - namespace cxx - { - namespace parser - { - // expected_element - // - template<> - inline - std::basic_string expected_element:: - message () const - { - std::basic_string r ("expected element '"); - r += expected_namespace_; - r += expected_namespace_.empty () ? "" : "#"; - r += expected_name_; - r += "'"; - - if (!encountered_name_.empty ()) - { - r += " instead of '"; - r += encountered_namespace_; - r += encountered_namespace_.empty () ? "" : "#"; - r += encountered_name_; - r += "'"; - } - - return r; - } - - // unexpected_element - // - template<> - inline - std::basic_string unexpected_element:: - message () const - { - std::basic_string r ("unexpected element '"); - r += encountered_namespace_; - r += encountered_namespace_.empty () ? "" : "#"; - r += encountered_name_; - r += "'"; - return r; - } - - // dynamic_type - // - template<> - inline - std::basic_string dynamic_type:: - message () const - { - std::basic_string r ("invalid xsi:type '"); - r += type_; - r += "'"; - return r; - } - } - } -} - -#endif // XSD_CXX_PARSER_SCHEMA_EXCEPTIONS_IXX_CHAR -#endif // XSD_CXX_PARSER_USE_CHAR - - -#if defined(XSD_CXX_PARSER_USE_WCHAR) || !defined(XSD_CXX_PARSER_USE_CHAR) - -#ifndef XSD_CXX_PARSER_SCHEMA_EXCEPTIONS_IXX_WCHAR -#define XSD_CXX_PARSER_SCHEMA_EXCEPTIONS_IXX_WCHAR - -namespace xsd -{ - namespace cxx - { - namespace parser - { - // expected_element - // - template<> - inline - std::basic_string expected_element:: - message () const - { - std::basic_string r (L"expected element '"); - r += expected_namespace_; - r += expected_namespace_.empty () ? L"" : L"#"; - r += expected_name_; - r += L"'"; - - if (!encountered_name_.empty ()) - { - r += L" instead of '"; - r += encountered_namespace_; - r += encountered_namespace_.empty () ? L"" : L"#"; - r += encountered_name_; - r += L"'"; - } - - return r; - } - - // unexpected_element - // - template<> - inline - std::basic_string unexpected_element:: - message () const - { - std::basic_string r (L"unexpected element '"); - r += encountered_namespace_; - r += encountered_namespace_.empty () ? L"" : L"#"; - r += encountered_name_; - r += L"'"; - return r; - } - - // dynamic_type - // - template<> - inline - std::basic_string dynamic_type:: - message () const - { - std::basic_string r (L"invalid xsi:type '"); - r += type_; - r += L"'"; - return r; - } - } - } -} - -#endif // XSD_CXX_PARSER_SCHEMA_EXCEPTIONS_IXX_WCHAR -#endif // XSD_CXX_PARSER_USE_WCHAR diff --git a/libxsd/xsd/cxx/parser/schema-exceptions.txx b/libxsd/xsd/cxx/parser/schema-exceptions.txx deleted file mode 100644 index 77c569a..0000000 --- a/libxsd/xsd/cxx/parser/schema-exceptions.txx +++ /dev/null @@ -1,74 +0,0 @@ -// file : xsd/cxx/parser/schema-exceptions.txx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -namespace xsd -{ - namespace cxx - { - namespace parser - { - // expected_element - // - template - expected_element:: - ~expected_element () - { - } - - template - expected_element:: - expected_element (const std::basic_string& expected_namespace, - const std::basic_string& expected_name) - : expected_namespace_ (expected_namespace), - expected_name_ (expected_name) - { - } - - template - expected_element:: - expected_element (const std::basic_string& expected_namespace, - const std::basic_string& expected_name, - const std::basic_string& encountered_namespace, - const std::basic_string& encountered_name) - : expected_namespace_ (expected_namespace), - expected_name_ (expected_name), - encountered_namespace_ (encountered_namespace), - encountered_name_ (encountered_name) - { - } - - // unexpected_element - // - template - unexpected_element:: - ~unexpected_element () - { - } - - template - unexpected_element:: - unexpected_element (const std::basic_string& encountered_namespace, - const std::basic_string& encountered_name) - : encountered_namespace_ (encountered_namespace), - encountered_name_ (encountered_name) - { - } - - // dynamic_type - // - template - dynamic_type:: - ~dynamic_type () throw () - { - } - - template - dynamic_type:: - dynamic_type (const std::basic_string& type) - : type_ (type) - { - } - } - } -} diff --git a/libxsd/xsd/cxx/parser/substitution-map.hxx b/libxsd/xsd/cxx/parser/substitution-map.hxx deleted file mode 100644 index d191e28..0000000 --- a/libxsd/xsd/cxx/parser/substitution-map.hxx +++ /dev/null @@ -1,240 +0,0 @@ -// file : xsd/cxx/parser/substitution-map.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_PARSER_SUBSTITUTION_MAP_HXX -#define XSD_CXX_PARSER_SUBSTITUTION_MAP_HXX - -#include -#include // std::size_t - -#include - -namespace xsd -{ - namespace cxx - { - namespace parser - { - template - struct substitution_map_key - { - substitution_map_key (const C* ns, const C* name) - : ns_ (ns), name_ (name) - { - } - - substitution_map_key (const ro_string& ns, - const ro_string& name) - : ns_ (ns.data (), ns.size ()), - name_ (name.data (), name.size ()) - { - } - - substitution_map_key (const substitution_map_key& x) - : ns_ (x.ns_.data (), x.ns_.size ()), - name_ (x.name_.data (), x.name_.size ()) - { - } - - private: - substitution_map_key& - operator= (const substitution_map_key&); - - public: - const ro_string& - ns () const - { - return ns_; - } - - const ro_string& - name () const - { - return name_; - } - - private: - const ro_string ns_; - const ro_string name_; - }; - - template - inline bool - operator< (const substitution_map_key& x, - const substitution_map_key& y) - { - int r (x.name ().compare (y.name ())); - return r < 0 || (r == 0 && x.ns () < y.ns ()); - } - - template - struct substitution_map_value - { - substitution_map_value (const C* ns, const C* name, const C* type) - : ns_ (ns), name_ (name), type_ (type) - { - } - - substitution_map_value (const substitution_map_value& x) - : ns_ (x.ns_.data (), x.ns_.size ()), - name_ (x.name_.data (), x.name_.size ()), - type_ (x.type_.data (), x.type_.size ()) - { - } - - substitution_map_value& - operator= (const substitution_map_value& x) - { - if (this != &x) - { - ns_.assign (x.ns_.data (), x.ns_.size ()); - name_.assign (x.name_.data (), x.name_.size ()); - type_.assign (x.type_.data (), x.type_.size ()); - } - - return *this; - } - - public: - const ro_string& - ns () const - { - return ns_; - } - - const ro_string& - name () const - { - return name_; - } - - const ro_string& - type () const - { - return type_; - } - - private: - ro_string ns_; - ro_string name_; - ro_string type_; - }; - - template - struct substitution_map - { - void - insert (const C* member_ns, - const C* member_name, - const C* root_ns, - const C* root_name, - const C* member_type) - { - key k (member_ns, member_name); - value v (root_ns, root_name, member_type); - map_.insert (std::pair (k, v)); - } - - void - erase (const C* member_ns, const C* member_name) - { - map_.erase (key (member_ns, member_name)); - } - - // Check and get the type set if found. - // - bool - check (const ro_string& ns, - const ro_string& name, - const C* root_ns, - const C* root_name, - const ro_string*& type) const - { - - return map_.empty () - ? false - : check_ (ns, name, root_ns, root_name, &type); - } - - // Check but don't care about the type. - // - bool - check (const ro_string& ns, - const ro_string& name, - const C* root_ns, - const C* root_name) const - { - - return map_.empty () - ? false - : check_ (ns, name, root_ns, root_name, 0); - } - - private: - bool - check_ (const ro_string& ns, - const ro_string& name, - const C* root_ns, - const C* root_name, - const ro_string** type) const; - - private: - typedef substitution_map_key key; - typedef substitution_map_value value; - typedef std::map map; - - map map_; - }; - - - // Translation unit initializer. - // - template - struct substitution_map_init - { - static substitution_map* map; - static std::size_t count; - - substitution_map_init (); - ~substitution_map_init (); - }; - - template - substitution_map* substitution_map_init::map = 0; - - template - std::size_t substitution_map_init::count = 0; - - template - inline substitution_map& - substitution_map_instance () - { - return *substitution_map_init::map; - } - - - // Map entry initializer. - // - template - struct substitution_map_entry - { - substitution_map_entry (const C* member_ns, - const C* member_name, - const C* root_ns, - const C* root_name, - const C* member_type); - - ~substitution_map_entry (); - - private: - const C* member_ns_; - const C* member_name_; - }; - } - } -} - -#include - -#endif // XSD_CXX_PARSER_SUBSTITUTION_MAP_HXX diff --git a/libxsd/xsd/cxx/parser/substitution-map.txx b/libxsd/xsd/cxx/parser/substitution-map.txx deleted file mode 100644 index 45216cd..0000000 --- a/libxsd/xsd/cxx/parser/substitution-map.txx +++ /dev/null @@ -1,83 +0,0 @@ -// file : xsd/cxx/parser/substitution-map.txx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -namespace xsd -{ - namespace cxx - { - namespace parser - { - template - bool substitution_map:: - check_ (const ro_string& ns, - const ro_string& name, - const C* root_ns, - const C* root_name, - const ro_string** type) const - { - key k (ns, name); - typename map::const_iterator i (map_.find (k)); - - if (i == map_.end ()) - return false; - - const value& v (i->second); - - bool r (false); - - if (v.name () == root_name && v.ns () == root_ns) - r = true; - else - r = check_ (v.ns (), v.name (), root_ns, root_name, 0); - - if (r && type != 0 && *type == 0) - *type = &v.type (); - - return r; - } - - // substitution_map_init - // - template - substitution_map_init:: - substitution_map_init () - { - if (count == 0) - map = new substitution_map; - - ++count; - } - - template - substitution_map_init:: - ~substitution_map_init () - { - if (--count == 0) - delete map; - } - - // substitution_map_entry - // - template - substitution_map_entry:: - substitution_map_entry (const C* member_ns, - const C* member_name, - const C* root_ns, - const C* root_name, - const C* member_type) - : member_ns_ (member_ns), member_name_ (member_name) - { - substitution_map_instance ().insert ( - member_ns, member_name, root_ns, root_name, member_type); - } - - template - substitution_map_entry:: - ~substitution_map_entry () - { - substitution_map_instance ().erase (member_ns_, member_name_); - } - } - } -} diff --git a/libxsd/xsd/cxx/parser/validating/exceptions.hxx b/libxsd/xsd/cxx/parser/validating/exceptions.hxx deleted file mode 100644 index 07086e3..0000000 --- a/libxsd/xsd/cxx/parser/validating/exceptions.hxx +++ /dev/null @@ -1,152 +0,0 @@ -// file : xsd/cxx/parser/validating/exceptions.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_PARSER_VALIDATING_EXCEPTIONS_HXX -#define XSD_CXX_PARSER_VALIDATING_EXCEPTIONS_HXX - -#include - -#include -#include - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace validating - { - // - // - template - struct expected_attribute: schema_exception - { - virtual - ~expected_attribute (); - - expected_attribute (const std::basic_string& expected_namespace, - const std::basic_string& expected_name); - - const std::basic_string& - expected_namespace () const - { - return expected_namespace_; - } - - const std::basic_string& - expected_name () const - { - return expected_name_; - } - - virtual std::basic_string - message () const; - - private: - std::basic_string expected_namespace_; - std::basic_string expected_name_; - }; - - // - // - template - struct unexpected_attribute: schema_exception - { - virtual - ~unexpected_attribute (); - - unexpected_attribute ( - const std::basic_string& encountered_namespace, - const std::basic_string& encountered_name); - - - const std::basic_string& - encountered_namespace () const - { - return encountered_namespace_; - } - - const std::basic_string& - encountered_name () const - { - return encountered_name_; - } - - virtual std::basic_string - message () const; - - private: - std::basic_string encountered_namespace_; - std::basic_string encountered_name_; - }; - - - // - // - template - struct unexpected_characters: schema_exception - { - virtual - ~unexpected_characters (); - - unexpected_characters (const std::basic_string& s); - - const std::basic_string& - characters () const - { - return characters_; - } - - virtual std::basic_string - message () const; - - private: - std::basic_string characters_; - }; - - // - // - template - struct invalid_value: schema_exception - { - virtual - ~invalid_value (); - - invalid_value (const C* type, const std::basic_string& value); - - invalid_value (const C* type, const ro_string& value); - - invalid_value (const std::basic_string& type, - const std::basic_string& value); - - const std::basic_string& - type () const - { - return type_; - } - - const std::basic_string& - value () const - { - return value_; - } - - virtual std::basic_string - message () const; - - private: - std::basic_string type_; - std::basic_string value_; - }; - } - } - } -} - -#include - -#endif // XSD_CXX_PARSER_VALIDATING_EXCEPTIONS_HXX - -#include diff --git a/libxsd/xsd/cxx/parser/validating/exceptions.ixx b/libxsd/xsd/cxx/parser/validating/exceptions.ixx deleted file mode 100644 index 72bfe8d..0000000 --- a/libxsd/xsd/cxx/parser/validating/exceptions.ixx +++ /dev/null @@ -1,162 +0,0 @@ -// file : xsd/cxx/parser/validating/exceptions.ixx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#if defined(XSD_CXX_PARSER_USE_CHAR) || !defined(XSD_CXX_PARSER_USE_WCHAR) - -#ifndef XSD_CXX_PARSER_VALIDATING_EXCEPTIONS_IXX_CHAR -#define XSD_CXX_PARSER_VALIDATING_EXCEPTIONS_IXX_CHAR - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace validating - { - // expected_attribute - // - template<> - inline - std::basic_string expected_attribute:: - message () const - { - std::basic_string r ("expected attribute '"); - r += expected_namespace_; - r += expected_namespace_.empty () ? "" : "#"; - r += expected_name_; - r += "'"; - return r; - } - - // unexpected_attribute - // - template<> - inline - std::basic_string unexpected_attribute:: - message () const - { - std::basic_string r ("unexpected attribute '"); - r += encountered_namespace_; - r += encountered_namespace_.empty () ? "" : "#"; - r += encountered_name_; - r += "'"; - return r; - } - - // unexpected_characters - // - template<> - inline - std::basic_string unexpected_characters:: - message () const - { - std::basic_string r ("unexpected characters '"); - r += characters_; - r += "'"; - return r; - } - - // invalid_value - // - template<> - inline - std::basic_string invalid_value:: - message () const - { - std::basic_string r ("'"); - r += value_; - r += "' is not a valid value representation "; - r += "for type '"; - r += type_; - r += "'"; - return r; - } - } - } - } -} - -#endif // XSD_CXX_PARSER_VALIDATING_EXCEPTIONS_IXX_CHAR -#endif // XSD_CXX_PARSER_USE_CHAR - - -#if defined(XSD_CXX_PARSER_USE_WCHAR) || !defined(XSD_CXX_PARSER_USE_CHAR) - -#ifndef XSD_CXX_PARSER_VALIDATING_EXCEPTIONS_IXX_WCHAR -#define XSD_CXX_PARSER_VALIDATING_EXCEPTIONS_IXX_WCHAR - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace validating - { - // expected_attribute - // - template<> - inline - std::basic_string expected_attribute:: - message () const - { - std::basic_string r (L"expected attribute '"); - r += expected_namespace_; - r += expected_namespace_.empty () ? L"" : L"#"; - r += expected_name_; - r += L"'"; - return r; - } - - // unexpected_attribute - // - template<> - inline - std::basic_string unexpected_attribute:: - message () const - { - std::basic_string r (L"unexpected attribute '"); - r += encountered_namespace_; - r += encountered_namespace_.empty () ? L"" : L"#"; - r += encountered_name_; - r += L"'"; - return r; - } - - // unexpected_characters - // - template<> - inline - std::basic_string unexpected_characters:: - message () const - { - std::basic_string r (L"unexpected characters '"); - r += characters_; - r += L"'"; - return r; - } - - // invalid_value - // - template<> - inline - std::basic_string invalid_value:: - message () const - { - std::basic_string r (L"'"); - r += value_; - r += L"' is not a valid value representation "; - r += L"for type '"; - r += type_; - r += L"'"; - return r; - } - } - } - } -} - -#endif // XSD_CXX_PARSER_VALIDATING_EXCEPTIONS_IXX_WCHAR -#endif // XSD_CXX_PARSER_USE_WCHAR diff --git a/libxsd/xsd/cxx/parser/validating/exceptions.txx b/libxsd/xsd/cxx/parser/validating/exceptions.txx deleted file mode 100644 index c2b8928..0000000 --- a/libxsd/xsd/cxx/parser/validating/exceptions.txx +++ /dev/null @@ -1,96 +0,0 @@ -// file : xsd/cxx/parser/validating/exceptions.txx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace validating - { - // expected_attribute - // - template - expected_attribute:: - ~expected_attribute () - { - } - - template - expected_attribute:: - expected_attribute (const std::basic_string& expected_namespace, - const std::basic_string& expected_name) - : expected_namespace_ (expected_namespace), - expected_name_ (expected_name) - { - } - - // unexpected_attribute - // - template - unexpected_attribute:: - ~unexpected_attribute () - { - } - - template - unexpected_attribute:: - unexpected_attribute (const std::basic_string& encountered_namespace, - const std::basic_string& encountered_name) - : encountered_namespace_ (encountered_namespace), - encountered_name_ (encountered_name) - { - } - - // unexpected_characters - // - template - unexpected_characters:: - ~unexpected_characters () - { - } - - template - unexpected_characters:: - unexpected_characters (const std::basic_string& s) - : characters_ (s) - { - } - - // invalid_value - // - template - invalid_value:: - ~invalid_value () - { - } - - template - invalid_value:: - invalid_value (const C* type, - const std::basic_string& value) - : type_ (type), value_ (value) - { - } - - template - invalid_value:: - invalid_value (const C* type, - const ro_string& value) - : type_ (type), value_ (value) - { - } - - template - invalid_value:: - invalid_value (const std::basic_string& type, - const std::basic_string& value) - : type_ (type), value_ (value) - { - } - } - } - } -} diff --git a/libxsd/xsd/cxx/parser/validating/inheritance-map.hxx b/libxsd/xsd/cxx/parser/validating/inheritance-map.hxx deleted file mode 100644 index b8ae938..0000000 --- a/libxsd/xsd/cxx/parser/validating/inheritance-map.hxx +++ /dev/null @@ -1,100 +0,0 @@ -// file : xsd/cxx/parser/validating/inheritance-map.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_PARSER_VALIDATING_INHERITANCE_MAP_HXX -#define XSD_CXX_PARSER_VALIDATING_INHERITANCE_MAP_HXX - -#include -#include // std::size_t - -#include - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace validating - { - template - struct string_comparison - { - bool - operator() (const C* x, const C* y) const - { - ro_string s (x); - return s.compare (y) < 0; - } - }; - - template - struct inheritance_map - { - void - insert (const C* derived, const C* base) - { - map_[derived] = base; - } - - void - erase (const C* derived) - { - map_.erase (derived); - } - - bool - check (const C* derived, const ro_string& base) const; - - private: - typedef std::map > map; - map map_; - }; - - - // Translation unit initializer. - // - template - struct inheritance_map_init - { - static inheritance_map* map; - static std::size_t count; - - inheritance_map_init (); - ~inheritance_map_init (); - }; - - template - inheritance_map* inheritance_map_init::map = 0; - - template - std::size_t inheritance_map_init::count = 0; - - template - inline inheritance_map& - inheritance_map_instance () - { - return *inheritance_map_init::map; - } - - - // Map entry initializer. - // - template - struct inheritance_map_entry - { - inheritance_map_entry (const C* derived, const C* base); - ~inheritance_map_entry (); - - private: - const C* derived_; - }; - } - } - } -} - -#include - -#endif // XSD_CXX_PARSER_VALIDATING_INHERITANCE_MAP_HXX diff --git a/libxsd/xsd/cxx/parser/validating/inheritance-map.txx b/libxsd/xsd/cxx/parser/validating/inheritance-map.txx deleted file mode 100644 index ba4803e..0000000 --- a/libxsd/xsd/cxx/parser/validating/inheritance-map.txx +++ /dev/null @@ -1,72 +0,0 @@ -// file : xsd/cxx/parser/validating/inheritance-map.txx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace validating - { - template - bool inheritance_map:: - check (const C* derived, const ro_string& base) const - { - if (base == derived) - return true; - - typename map::const_iterator i (map_.find (derived)); - - if (i != map_.end ()) - { - if (base == i->second) - return true; - else - return check (i->second, base); - } - - return false; - } - - // inheritance_map_init - // - template - inheritance_map_init:: - inheritance_map_init () - { - if (count == 0) - map = new inheritance_map; - - ++count; - } - - template - inheritance_map_init:: - ~inheritance_map_init () - { - if (--count == 0) - delete map; - } - - // inheritance_map_entry - // - template - inheritance_map_entry:: - inheritance_map_entry (const C* derived, const C* base) - : derived_ (derived) - { - inheritance_map_instance ().insert (derived, base); - } - - template - inheritance_map_entry:: - ~inheritance_map_entry () - { - inheritance_map_instance ().erase (derived_); - } - } - } - } -} diff --git a/libxsd/xsd/cxx/parser/validating/parser.hxx b/libxsd/xsd/cxx/parser/validating/parser.hxx deleted file mode 100644 index c305fe1..0000000 --- a/libxsd/xsd/cxx/parser/validating/parser.hxx +++ /dev/null @@ -1,470 +0,0 @@ -// file : xsd/cxx/parser/validating/parser.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_PARSER_VALIDATING_PARSER_HXX -#define XSD_CXX_PARSER_VALIDATING_PARSER_HXX - -#include -#include // std::size_t -#include // std::memcpy - -#include -#include - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace validating - { - // - // - template - struct empty_content: parser_base - { - // These functions are called when wildcard content - // is encountered. Use them to handle mixed content - // models, any/anyAttribute, and anyType/anySimpleType. - // By default these functions do nothing. - // - - // The type argument is a type name and namespace from the - // xsi:type attribute in the form " " with - // the space and namespace part absent if the type does not - // have a namespace or 0 if xsi:type is not present. - // - virtual void - _start_any_element (const ro_string& ns, - const ro_string& name, - const ro_string* type); - - virtual void - _end_any_element (const ro_string& ns, - const ro_string& name); - - virtual void - _any_attribute (const ro_string& ns, - const ro_string& name, - const ro_string& value); - - virtual void - _any_characters (const ro_string&); - - - // - // - virtual bool - _start_element_impl (const ro_string&, - const ro_string&, - const ro_string*); - - virtual bool - _end_element_impl (const ro_string&, - const ro_string&); - - virtual bool - _attribute_impl (const ro_string&, - const ro_string&, - const ro_string&); - - virtual bool - _characters_impl (const ro_string&); - - - // - // - virtual void - _start_element (const ro_string&, - const ro_string&, - const ro_string*); - - virtual void - _end_element (const ro_string&, - const ro_string&); - - virtual void - _attribute (const ro_string&, - const ro_string&, - const ro_string&); - - virtual void - _characters (const ro_string&); - - - // - // - virtual void - _expected_element (const C* expected_ns, - const C* expected_name); - - virtual void - _expected_element (const C* expected_ns, - const C* expected_name, - const ro_string& encountered_ns, - const ro_string& encountered_name); - - virtual void - _unexpected_element (const ro_string& ns, - const ro_string& name); - - virtual void - _expected_attribute (const C* expected_ns, - const C* expected_name); - - virtual void - _unexpected_attribute (const ro_string& ns, - const ro_string& name, - const ro_string& value); - - virtual void - _unexpected_characters (const ro_string&); - }; - - - // - // - template - struct simple_content: empty_content - { - // - // - virtual void - _attribute (const ro_string& ns, - const ro_string& name, - const ro_string& value); - - virtual void - _characters (const ro_string&); - - // - // - virtual bool - _attribute_impl (const ro_string&, - const ro_string&, - const ro_string&); - - // - // - virtual void - _pre_impl (); - - virtual void - _post_impl (); - - - // Implementation callbacks. - // - virtual void - _pre_a_validate (); - - virtual void - _post_a_validate (); - - - // Attribute validation: during phase one we are searching for - // matching attributes (Structures, section 3.4.4, clause 2.1). - // During phase two we are searching for attribute wildcards - // (section 3.4.4, clause 2.2). Both phases run across - // inheritance hierarchy from derived to base for extension - // only. Both functions return true if the match was found and - // validation has been performed. - // - virtual bool - _attribute_impl_phase_one (const ro_string& ns, - const ro_string& name, - const ro_string& value); - - virtual bool - _attribute_impl_phase_two (const ro_string& ns, - const ro_string& name, - const ro_string& value); - }; - - - // - // - template - struct complex_content: empty_content - { - // - // - virtual void - _start_element (const ro_string& ns, - const ro_string& name, - const ro_string* type); - - virtual void - _end_element (const ro_string& ns, - const ro_string& name); - - virtual void - _attribute (const ro_string& ns, - const ro_string& name, - const ro_string& value); - - virtual void - _characters (const ro_string&); - - // - // - virtual bool - _attribute_impl (const ro_string&, - const ro_string&, - const ro_string&); - - // - // - virtual void - _pre_impl (); - - virtual void - _post_impl (); - - - // Implementation callbacks. - // - virtual void - _pre_e_validate (); - - virtual void - _post_e_validate (); - - virtual void - _pre_a_validate (); - - virtual void - _post_a_validate (); - - - // Attribute validation: during phase one we are searching for - // matching attributes (Structures, section 3.4.4, clause 2.1). - // During phase two we are searching for attribute wildcards - // (section 3.4.4, clause 2.2). Both phases run across - // inheritance hierarchy from derived to base for extension - // only. Both functions return true if the match was found and - // validation has been performed. - // - virtual bool - _attribute_impl_phase_one (const ro_string& ns, - const ro_string& name, - const ro_string& value); - - virtual bool - _attribute_impl_phase_two (const ro_string& ns, - const ro_string& name, - const ro_string& value); - protected: - struct state - { - state () - : any_ (false), depth_ (0), parser_ (0) - { - } - - bool any_; - std::size_t depth_; - parser_base* parser_; - }; - - // Optimized state stack for non-recursive case (one element). - // - struct state_stack - { - state_stack () - : size_ (0) - { - } - - void - push (const state& s) - { - if (size_ > 0) - rest_.push (top_); - - top_ = s; - ++size_; - } - - void - pop () - { - if (size_ > 1) - { - top_ = rest_.top (); - rest_.pop (); - } - - --size_; - } - - const state& - top () const - { - return top_; - } - - state& - top () - { - return top_; - } - - state& - under_top () - { - return rest_.top (); - } - - private: - state top_; - std::stack rest_; - std::size_t size_; - }; - - state_stack context_; - }; - - // Base for xsd:list. - // - template - struct list_base: simple_content - { - virtual void - _xsd_parse_item (const ro_string&) = 0; - - virtual void - _pre_impl (); - - virtual void - _characters (const ro_string&); - - virtual void - _post_impl (); - - protected: - std::basic_string buf_; - }; - } - - // POD stack with pre-allocated first element. You may - // need to pad your elements to get the proper alignment. - // - struct pod_stack - { - ~pod_stack () - { - delete[] data_; - } - - pod_stack (std::size_t element_size, void* first_element) - : el_size_ (element_size), first_ (first_element), - data_ (0), size_ (0), capacity_ (0) - { - } - - public: - void - pop () - { - --size_; - } - - void - push () - { - if (size_ > capacity_) - grow (); - - ++size_; - } - - void* - top () - { - return size_ == 1 ? first_ : data_ + (size_ - 1) * el_size_; - } - - void* - under_top () - { - return size_ == 2 ? first_ : data_ + (size_ - 2) * el_size_; - } - - std::size_t - element_size () const - { - return el_size_; - } - - private: - void - grow () - { - std::size_t c (capacity_ ? capacity_ * 2 : 8); - char* d (new char[c * el_size_]); - - if (size_ > 1) - std::memcpy (d, data_, (size_ - 1) * el_size_); - - delete[] data_; - - data_ = d; - capacity_ = c; - } - - private: - std::size_t el_size_; - void* first_; - char* data_; - std::size_t size_; - std::size_t capacity_; - }; - - namespace validating - { - // Validation state stack for the 'all' particle. - // - struct all_stack - { - all_stack (std::size_t n, unsigned char* first) - : stack_ (n, first) - { - } - - void - push () - { - stack_.push (); - - unsigned char* p (static_cast (stack_.top ())); - - for (std::size_t i (0); i < stack_.element_size (); ++i) - p[i] = 0; - } - - void - pop () - { - stack_.pop (); - } - - unsigned char* - top () - { - return static_cast (stack_.top ()); - } - - private: - pod_stack stack_; - }; - } - } - } -} - -#include - -#endif // XSD_CXX_PARSER_VALIDATING_PARSER_HXX diff --git a/libxsd/xsd/cxx/parser/validating/parser.txx b/libxsd/xsd/cxx/parser/validating/parser.txx deleted file mode 100644 index 9a5800a..0000000 --- a/libxsd/xsd/cxx/parser/validating/parser.txx +++ /dev/null @@ -1,666 +0,0 @@ -// file : xsd/cxx/parser/validating/parser.txx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#include - -#include -#include - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace validating - { - - // empty_content - // - - - template - void empty_content:: - _start_any_element (const ro_string&, - const ro_string&, - const ro_string*) - { - } - - template - void empty_content:: - _end_any_element (const ro_string&, - const ro_string&) - { - } - - template - void empty_content:: - _any_attribute (const ro_string&, - const ro_string&, - const ro_string&) - { - } - - template - void empty_content:: - _any_characters (const ro_string&) - { - } - - // - // - template - bool empty_content:: - _start_element_impl (const ro_string&, - const ro_string&, - const ro_string*) - { - return false; - } - - template - bool empty_content:: - _end_element_impl (const ro_string&, - const ro_string&) - { - return false; - } - - template - bool empty_content:: - _attribute_impl (const ro_string&, - const ro_string&, - const ro_string&) - { - return false; - } - - template - bool empty_content:: - _characters_impl (const ro_string&) - { - return false; - } - - // - // - template - void empty_content:: - _start_element (const ro_string& ns, - const ro_string& name, - const ro_string* type) - { - if (!this->_start_element_impl (ns, name, type)) - this->_unexpected_element (ns, name); - } - - template - void empty_content:: - _end_element (const ro_string& ns, - const ro_string& name) - { - if (!this->_end_element_impl (ns, name)) - this->_unexpected_element (ns, name); - } - - template - void empty_content:: - _attribute (const ro_string& ns, - const ro_string& name, - const ro_string& value) - { - // Weed out special attributes: xsi:type, xsi:nil, - // xsi:schemaLocation and noNamespaceSchemaLocation. - // See section 3.2.7 in Structures for details. - // - if (ns == xml::bits::xsi_namespace () && - (name == xml::bits::type () || - name == xml::bits::nil_lit () || - name == xml::bits::schema_location () || - name == xml::bits::no_namespace_schema_location ())) - return; - - // Also some parsers (notably Xerces-C++) supplies us with - // namespace-prefix mapping attributes. - // - if (ns == xml::bits::xmlns_namespace ()) - return; - - if (!this->_attribute_impl (ns, name, value)) - this->_unexpected_attribute (ns, name, value); - } - - template - void empty_content:: - _characters (const ro_string& s) - { - if (!this->_characters_impl (s)) - this->_unexpected_characters (s); - } - - // - // - template - void empty_content:: - _expected_element (const C* ex_ns, const C* ex_name) - { - throw expected_element (ex_ns, ex_name); - } - - template - void empty_content:: - _expected_element (const C* ex_ns, - const C* ex_name, - const ro_string& en_ns, - const ro_string& en_name) - { - throw expected_element (ex_ns, ex_name, en_ns, en_name); - } - - template - void empty_content:: - _unexpected_element (const ro_string& ns, - const ro_string& name) - { - throw unexpected_element (ns, name); - } - - template - void empty_content:: - _expected_attribute (const C* ex_ns, const C* ex_name) - { - throw expected_attribute (ex_ns, ex_name); - } - - template - void empty_content:: - _unexpected_attribute (const ro_string& ns, - const ro_string& name, - const ro_string&) - { - throw unexpected_attribute (ns, name); - } - - template - void empty_content:: - _unexpected_characters (const ro_string& s) - { - throw unexpected_characters (s); - } - - - // simple_content - // - - template - void simple_content:: - _attribute (const ro_string& ns, - const ro_string& name, - const ro_string& value) - { - // Weed out special attributes: xsi:type, xsi:nil, - // xsi:schemaLocation and xsi:noNamespaceSchemaLocation. - // See section 3.2.7 in Structures for details. - // - if (ns == xml::bits::xsi_namespace () && - (name == xml::bits::type () || - name == xml::bits::nil_lit () || - name == xml::bits::schema_location () || - name == xml::bits::no_namespace_schema_location ())) - return; - - // Also some parsers (notably Xerces-C++) supplies us with - // namespace-prefix mapping attributes. - // - if (ns == xml::bits::xmlns_namespace ()) - return; - - if (!this->_attribute_impl (ns, name, value)) - this->_unexpected_attribute (ns, name, value); - } - - template - void simple_content:: - _characters (const ro_string& str) - { - if (!this->_characters_impl (str)) - { - // Mixed content is implemented in the generated code - // by overriding _characters_impl and forwarding to - // _any_characters. - // - - // Scan the string for any non-whitespace characters - // (Structures, section 3.4.4, clause 1.3). - // - for (typename ro_string::size_type i (0), e (str.size ()); - i < e; ++i) - { - C c (str[i]); - - if (c != C (0x20) && // space - c != C (0x0D) && // carriage return - c != C (0x09) && // tab - c != C (0x0A)) - this->_unexpected_characters (str); - } - } - } - - template - void simple_content:: - _pre_impl () - { - this->_pre (); - _pre_a_validate (); - } - - template - void simple_content:: - _post_impl () - { - _post_a_validate (); - this->_post (); - } - - template - void simple_content:: - _pre_a_validate () - { - } - - template - void simple_content:: - _post_a_validate () - { - } - - template - bool simple_content:: - _attribute_impl (const ro_string& ns, - const ro_string& name, - const ro_string& value) - { - return _attribute_impl_phase_one (ns, name, value) || - _attribute_impl_phase_two (ns, name, value); - } - - template - bool simple_content:: - _attribute_impl_phase_one (const ro_string&, - const ro_string&, - const ro_string&) - { - return false; - } - - template - bool simple_content:: - _attribute_impl_phase_two (const ro_string&, - const ro_string&, - const ro_string&) - { - return false; - } - - - // complex_content - // - - - template - void complex_content:: - _start_element (const ro_string& ns, - const ro_string& name, - const ro_string* type) - { - state& s (context_.top ()); - - if (s.depth_++ > 0) - { - if (s.any_) - this->_start_any_element (ns, name, type); - else if (s.parser_) - s.parser_->_start_element (ns, name, type); - } - else - { - if (!this->_start_element_impl (ns, name, type)) - this->_unexpected_element (ns, name); - else if (s.parser_ != 0) - s.parser_->_pre_impl (); - } - } - - template - void complex_content:: - _end_element (const ro_string& ns, - const ro_string& name) - { - // To understand what's going on here it is helpful to think of - // a "total depth" as being the sum of individual depths over - // all elements. - // - - if (context_.top ().depth_ == 0) - { - state& s (context_.under_top ()); // One before last. - - if (--s.depth_ > 0) - { - // Indirect recursion. - // - if (s.parser_) - s.parser_->_end_element (ns, name); - } - else - { - // Direct recursion. - // - assert (this == s.parser_); - - this->_post_impl (); - - if (!this->_end_element_impl (ns, name)) - assert (false); - } - } - else - { - state& s (context_.top ()); - - if (--s.depth_ > 0) - { - if (s.any_) - this->_end_any_element (ns, name); - else if (s.parser_) - s.parser_->_end_element (ns, name); - } - else - { - if (s.parser_ != 0 && !s.any_) - s.parser_->_post_impl (); - - if (!this->_end_element_impl (ns, name)) - this->_unexpected_element (ns, name); - } - } - } - - template - void complex_content:: - _attribute (const ro_string& ns, - const ro_string& name, - const ro_string& value) - { - // Weed out special attributes: xsi:type, xsi:nil, - // xsi:schemaLocation and xsi:noNamespaceSchemaLocation. - // See section 3.2.7 in Structures for details. - // - if (ns == xml::bits::xsi_namespace () && - (name == xml::bits::type () || - name == xml::bits::nil_lit () || - name == xml::bits::schema_location () || - name == xml::bits::no_namespace_schema_location ())) - return; - - // Also some parsers (notably Xerces-C++) supplies us with - // namespace-prefix mapping attributes. - // - if (ns == xml::bits::xmlns_namespace ()) - return; - - const state& s (context_.top ()); - - if (s.depth_ > 0) - { - if (s.any_) - this->_any_attribute (ns, name, value); - else if (s.parser_) - s.parser_->_attribute (ns, name, value); - } - else - { - if (!this->_attribute_impl (ns, name, value)) - this->_unexpected_attribute (ns, name, value); - } - } - - template - void complex_content:: - _characters (const ro_string& str) - { - const state& s (context_.top ()); - - if (s.depth_ > 0) - { - if (s.any_) - this->_any_characters (str); - else if (s.parser_) - s.parser_->_characters (str); - } - else - { - if (!this->_characters_impl (str)) - { - // Mixed content is implemented in the generated code - // by overriding _characters_impl and forwarding to - // _any_characters. - // - - // Scan the string for any non-whitespace characters - // (Structures, section 3.4.4, clause 1.3). - // - for (typename ro_string::size_type i (0), e (str.size ()); - i < e; ++i) - { - C c (str[i]); - - if (c != C (0x20) && // space - c != C (0x0D) && // carriage return - c != C (0x09) && // tab - c != C (0x0A)) - this->_unexpected_characters (str); - } - } - } - } - - template - void complex_content:: - _pre_impl () - { - context_.push (state ()); - this->_pre (); - _pre_a_validate (); - _pre_e_validate (); - } - - template - void complex_content:: - _post_impl () - { - _post_e_validate (); - _post_a_validate (); - this->_post (); - context_.pop (); - } - - template - void complex_content:: - _pre_e_validate () - { - } - - template - void complex_content:: - _post_e_validate () - { - } - - template - void complex_content:: - _pre_a_validate () - { - } - - template - void complex_content:: - _post_a_validate () - { - } - - template - bool complex_content:: - _attribute_impl (const ro_string& ns, - const ro_string& name, - const ro_string& value) - { - return _attribute_impl_phase_one (ns, name, value) || - _attribute_impl_phase_two (ns, name, value); - } - - template - bool complex_content:: - _attribute_impl_phase_one (const ro_string&, - const ro_string&, - const ro_string&) - { - return false; - } - - template - bool complex_content:: - _attribute_impl_phase_two (const ro_string&, - const ro_string&, - const ro_string&) - { - return false; - } - - - // list_base - // - namespace bits - { - // Find first non-space character. - // - template - typename ro_string::size_type - find_ns (const C* s, - typename ro_string::size_type size, - typename ro_string::size_type pos) - { - while (pos < size && - (s[pos] == C (0x20) || s[pos] == C (0x0A) || - s[pos] == C (0x0D) || s[pos] == C (0x09))) - ++pos; - - return pos < size ? pos : ro_string::npos; - } - - // Find first space character. - // - template - typename ro_string::size_type - find_s (const C* s, - typename ro_string::size_type size, - typename ro_string::size_type pos) - { - while (pos < size && - s[pos] != C (0x20) && s[pos] != C (0x0A) && - s[pos] != C (0x0D) && s[pos] != C (0x09)) - ++pos; - - return pos < size ? pos : ro_string::npos; - } - } - - // Relevant XML Schema Part 2: Datatypes sections: 4.2.1.2, 4.3.6. - // - - template - void list_base:: - _pre_impl () - { - simple_content::_pre_impl (); - buf_.clear (); - } - - template - void list_base:: - _characters (const ro_string& s) - { - typedef typename ro_string::size_type size_type; - - const C* data (s.data ()); - size_type size (s.size ()); - - // Handle the previous chunk if we start with a ws. - // - if (!buf_.empty () && - (data[0] == C (0x20) || data[0] == C (0x0A) || - data[0] == C (0x0D) || data[0] == C (0x09))) - { - ro_string tmp (buf_); // Private copy ctor. - _xsd_parse_item (tmp); - buf_.clear (); - } - - // Traverse the data while logically collapsing spaces. - // - for (size_type i (bits::find_ns (data, size, 0)); - i != ro_string::npos;) - { - size_type j (bits::find_s (data, size, i)); - - if (j != ro_string::npos) - { - if (buf_.empty ()) - { - ro_string tmp (data + i, j - i); // Private copy ctor. - _xsd_parse_item (tmp); - } - else - { - // Assemble the first item in str from buf_ and s. - // - std::basic_string str; - str.swap (buf_); - str.append (data + i, j - i); - ro_string tmp (str); // Private copy ctor. - _xsd_parse_item (tmp); - } - - i = bits::find_ns (data, size, j); - } - else - { - // Last fragment, append it to the buf_. - // - buf_.append (data + i, size - i); - break; - } - } - } - - template - void list_base:: - _post_impl () - { - // Handle the last item. - // - if (!buf_.empty ()) - { - ro_string tmp (buf_); // Private copy ctor. - _xsd_parse_item (tmp); - } - - simple_content::_post_impl (); - } - } - } - } -} diff --git a/libxsd/xsd/cxx/parser/validating/xml-schema-pimpl.hxx b/libxsd/xsd/cxx/parser/validating/xml-schema-pimpl.hxx deleted file mode 100644 index ae64d2b..0000000 --- a/libxsd/xsd/cxx/parser/validating/xml-schema-pimpl.hxx +++ /dev/null @@ -1,1122 +0,0 @@ -// file : xsd/cxx/parser/validating/xml-schema-pimpl.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_PARSER_VALIDATING_XML_SCHEMA_PIMPL_HXX -#define XSD_CXX_PARSER_VALIDATING_XML_SCHEMA_PIMPL_HXX - -#include - -#include // XSD_AUTO_PTR - -#include - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace validating - { - // any_type - // - template - struct any_type_pimpl: virtual any_type_pskel - { - virtual void - post_any_type (); - }; - - // any_simple_type - // - template - struct any_simple_type_pimpl: virtual any_simple_type_pskel - { - virtual void - post_any_simple_type (); - }; - - // boolean - // - template - struct boolean_pimpl: virtual boolean_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual bool - post_boolean (); - - protected: - std::basic_string str_; - bool value_; - }; - - - // 8-bit - // - template - struct byte_pimpl: virtual byte_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual signed char - post_byte (); - - protected: - std::basic_string str_; - signed char value_; - }; - - - template - struct unsigned_byte_pimpl: virtual unsigned_byte_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual unsigned char - post_unsigned_byte (); - - protected: - std::basic_string str_; - unsigned char value_; - }; - - - // 16-bit - // - template - struct short_pimpl: virtual short_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual short - post_short (); - - protected: - std::basic_string str_; - short value_; - }; - - - template - struct unsigned_short_pimpl: virtual unsigned_short_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual unsigned short - post_unsigned_short (); - - protected: - std::basic_string str_; - unsigned short value_; - }; - - - // 32-bit - // - template - struct int_pimpl: virtual int_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual int - post_int (); - - protected: - std::basic_string str_; - int value_; - }; - - - template - struct unsigned_int_pimpl: virtual unsigned_int_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual unsigned int - post_unsigned_int (); - - protected: - std::basic_string str_; - unsigned int value_; - }; - - - // 64-bit - // - template - struct long_pimpl: virtual long_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual long long - post_long (); - - protected: - std::basic_string str_; - long long value_; - }; - - - template - struct unsigned_long_pimpl: virtual unsigned_long_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual unsigned long long - post_unsigned_long (); - - protected: - std::basic_string str_; - unsigned long long value_; - }; - - - // Arbitrary-length integers. - // - template - struct integer_pimpl: virtual integer_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual long long - post_integer (); - - protected: - std::basic_string str_; - long long value_; - }; - - template - struct negative_integer_pimpl: virtual negative_integer_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual long long - post_negative_integer (); - - protected: - std::basic_string str_; - long long value_; - }; - - template - struct non_positive_integer_pimpl: virtual non_positive_integer_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual long long - post_non_positive_integer (); - - protected: - std::basic_string str_; - long long value_; - }; - - template - struct positive_integer_pimpl: virtual positive_integer_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual unsigned long long - post_positive_integer (); - - protected: - std::basic_string str_; - unsigned long long value_; - }; - - template - struct non_negative_integer_pimpl: virtual non_negative_integer_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual unsigned long long - post_non_negative_integer (); - - protected: - std::basic_string str_; - unsigned long long value_; - }; - - - // Floats. - // - template - struct float_pimpl: virtual float_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual float - post_float (); - - protected: - std::basic_string str_; - float value_; - }; - - - template - struct double_pimpl: virtual double_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual double - post_double (); - - protected: - std::basic_string str_; - double value_; - }; - - - template - struct decimal_pimpl: virtual decimal_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual double - post_decimal (); - - protected: - std::basic_string str_; - double value_; - }; - - - // Strings. - // - template - struct string_pimpl: virtual string_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual std::basic_string - post_string (); - - protected: - std::basic_string str_; - }; - - template - struct normalized_string_pimpl: virtual normalized_string_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual std::basic_string - post_normalized_string (); - - protected: - std::basic_string str_; - }; - - template - struct token_pimpl: virtual token_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual std::basic_string - post_token (); - - protected: - std::basic_string str_; - }; - - template - struct name_pimpl: virtual name_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual std::basic_string - post_name (); - - protected: - std::basic_string str_; - }; - - template - struct nmtoken_pimpl: virtual nmtoken_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual std::basic_string - post_nmtoken (); - - protected: - std::basic_string str_; - }; - - template - struct nmtokens_pimpl: virtual nmtokens_pskel - { - virtual void - _pre (); - - virtual void - _xsd_parse_item (const ro_string&); - - virtual void - _post (); - - virtual string_sequence - post_nmtokens (); - - protected: - string_sequence seq_; - nmtoken_pimpl parser_; - }; - - template - struct ncname_pimpl: virtual ncname_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual std::basic_string - post_ncname (); - - protected: - std::basic_string str_; - }; - - template - struct id_pimpl: virtual id_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual std::basic_string - post_id (); - - protected: - std::basic_string str_; - }; - - template - struct idref_pimpl: virtual idref_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual std::basic_string - post_idref (); - - protected: - std::basic_string str_; - }; - - template - struct idrefs_pimpl: virtual idrefs_pskel - { - virtual void - _pre (); - - virtual void - _xsd_parse_item (const ro_string&); - - virtual void - _post (); - - virtual string_sequence - post_idrefs (); - - protected: - string_sequence seq_; - idref_pimpl parser_; - }; - - // language - // - template - struct language_pimpl: virtual language_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual std::basic_string - post_language (); - - protected: - std::basic_string str_; - }; - - // anyURI - // - template - struct uri_pimpl: virtual uri_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual std::basic_string - post_uri (); - - protected: - std::basic_string str_; - }; - - // QName - // - template - struct qname_pimpl: virtual qname_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual qname - post_qname (); - - protected: - std::basic_string str_; - std::basic_string name_; - std::basic_string prefix_; - }; - - // base64Binary - // - template - struct base64_binary_pimpl: virtual base64_binary_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual XSD_AUTO_PTR - post_base64_binary (); - - protected: - std::basic_string str_; - XSD_AUTO_PTR buf_; - }; - - // hexBinary - // - template - struct hex_binary_pimpl: virtual hex_binary_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual XSD_AUTO_PTR - post_hex_binary (); - - protected: - std::basic_string str_; - XSD_AUTO_PTR buf_; - }; - - // gday - // - template - struct gday_pimpl: virtual gday_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual gday - post_gday (); - - protected: - std::basic_string str_; - unsigned short day_; - bool z_; - short zh_, zm_; - }; - - // gmonth - // - template - struct gmonth_pimpl: virtual gmonth_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual gmonth - post_gmonth (); - - protected: - std::basic_string str_; - unsigned short month_; - bool z_; - short zh_, zm_; - }; - - // gyear - // - template - struct gyear_pimpl: virtual gyear_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual gyear - post_gyear (); - - protected: - std::basic_string str_; - int year_; - bool z_; - short zh_, zm_; - }; - - // gmonth_day - // - template - struct gmonth_day_pimpl: virtual gmonth_day_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual gmonth_day - post_gmonth_day (); - - protected: - std::basic_string str_; - unsigned short month_; - unsigned short day_; - bool z_; - short zh_, zm_; - }; - - // gyear_month - // - template - struct gyear_month_pimpl: virtual gyear_month_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual gyear_month - post_gyear_month (); - - protected: - std::basic_string str_; - int year_; - unsigned short month_; - bool z_; - short zh_, zm_; - }; - - // date - // - template - struct date_pimpl: virtual date_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual date - post_date (); - - protected: - std::basic_string str_; - int year_; - unsigned short month_; - unsigned short day_; - bool z_; - short zh_, zm_; - }; - - // time - // - template - struct time_pimpl: virtual time_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual time - post_time (); - - protected: - std::basic_string str_; - unsigned short hours_; - unsigned short minutes_; - double seconds_; - bool z_; - short zh_, zm_; - }; - - // date_time - // - template - struct date_time_pimpl: virtual date_time_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual date_time - post_date_time (); - - protected: - std::basic_string str_; - int year_; - unsigned short month_; - unsigned short day_; - unsigned short hours_; - unsigned short minutes_; - double seconds_; - bool z_; - short zh_, zm_; - }; - - // duration - // - template - struct duration_pimpl: virtual duration_pskel - { - virtual void - _pre (); - - virtual void - _characters (const ro_string&); - - virtual void - _post (); - - virtual duration - post_duration (); - - protected: - std::basic_string str_; - bool negative_; - unsigned int years_; - unsigned int months_; - unsigned int days_; - unsigned int hours_; - unsigned int minutes_; - double seconds_; - }; - - // Literals. - // - namespace bits - { - template - const C* - boolean (); - - template - const C* - byte (); - - template - const C* - unsigned_byte (); - - template - const C* - short_ (); - - template - const C* - unsigned_short (); - - template - const C* - int_ (); - - template - const C* - unsigned_int (); - - template - const C* - long_ (); - - template - const C* - unsigned_long (); - - template - const C* - integer (); - - template - const C* - negative_integer (); - - template - const C* - non_positive_integer (); - - template - const C* - non_negative_integer (); - - template - const C* - positive_integer (); - - template - const C* - float_ (); - - template - const C* - double_ (); - - template - const C* - decimal (); - - template - const C* - name (); - - template - const C* - nmtoken (); - - template - const C* - nmtokens (); - - template - const C* - ncname (); - - template - const C* - id (); - - template - const C* - idref (); - - template - const C* - idrefs (); - - template - const C* - language (); - - template - const C* - qname (); - - template - const C* - base64_binary (); - - template - const C* - hex_binary (); - - template - const C* - gday (); - - template - const C* - gmonth (); - - template - const C* - gyear (); - - template - const C* - gmonth_day (); - - template - const C* - gyear_month (); - - template - const C* - date (); - - template - const C* - time (); - - template - const C* - date_time (); - - template - const C* - duration (); - - // float literals: INF -INF NaN - // - template - const C* - positive_inf (); - - template - const C* - negative_inf (); - - template - const C* - nan (); - - // boolean literals - // - template - const C* - true_ (); - - template - const C* - false_ (); - - template - const C* - one (); - - template - const C* - zero (); - } - } - } - } -} - -#include - -#endif // XSD_CXX_PARSER_VALIDATING_XML_SCHEMA_PIMPL_HXX - -#include diff --git a/libxsd/xsd/cxx/parser/validating/xml-schema-pimpl.ixx b/libxsd/xsd/cxx/parser/validating/xml-schema-pimpl.ixx deleted file mode 100644 index 94a9b8e..0000000 --- a/libxsd/xsd/cxx/parser/validating/xml-schema-pimpl.ixx +++ /dev/null @@ -1,675 +0,0 @@ -// file : xsd/cxx/parser/validating/xml-schema-pimpl.ixx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#if defined(XSD_CXX_PARSER_USE_CHAR) || !defined(XSD_CXX_PARSER_USE_WCHAR) - -#ifndef XSD_CXX_PARSER_VALIDATING_XML_SCHEMA_PIMPL_IXX_CHAR -#define XSD_CXX_PARSER_VALIDATING_XML_SCHEMA_PIMPL_IXX_CHAR - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace validating - { - namespace bits - { - template<> - inline const char* - boolean () - { - return "boolean"; - } - - template<> - inline const char* - byte () - { - return "byte"; - } - - template<> - inline const char* - unsigned_byte () - { - return "unsignedByte"; - } - - template<> - inline const char* - short_ () - { - return "short"; - } - - template<> - inline const char* - unsigned_short () - { - return "unsignedShort"; - } - - template<> - inline const char* - int_ () - { - return "int"; - } - - template<> - inline const char* - unsigned_int () - { - return "unsignedInt"; - } - - template<> - inline const char* - long_ () - { - return "long"; - } - - template<> - inline const char* - unsigned_long () - { - return "unsignedLong"; - } - - template<> - inline const char* - integer () - { - return "integer"; - } - - template<> - inline const char* - negative_integer () - { - return "negativeInteger"; - } - - template<> - inline const char* - non_positive_integer () - { - return "nonPositiveInteger"; - } - - template<> - inline const char* - non_negative_integer () - { - return "nonNegativeInteger"; - } - - template<> - inline const char* - positive_integer () - { - return "positiveInteger"; - } - - template<> - inline const char* - float_ () - { - return "float"; - } - - template<> - inline const char* - double_ () - { - return "double"; - } - - template<> - inline const char* - decimal () - { - return "decimal"; - } - - template<> - inline const char* - name () - { - return "Name"; - } - - template<> - inline const char* - nmtoken () - { - return "NMTOKEN"; - } - - template<> - inline const char* - nmtokens () - { - return "NMTOKENS"; - } - - template<> - inline const char* - ncname () - { - return "NCName"; - } - - template<> - inline const char* - id () - { - return "ID"; - } - - template<> - inline const char* - idref () - { - return "IDREF"; - } - - template<> - inline const char* - idrefs () - { - return "IDREFS"; - } - - template<> - inline const char* - language () - { - return "language"; - } - - template<> - inline const char* - qname () - { - return "QName"; - } - - template<> - inline const char* - base64_binary () - { - return "base64Binary"; - } - - template<> - inline const char* - hex_binary () - { - return "hexBinary"; - } - - template<> - inline const char* - gday () - { - return "gDay"; - } - - template<> - inline const char* - gmonth () - { - return "gMonth"; - } - - template<> - inline const char* - gyear () - { - return "gYear"; - } - - template<> - inline const char* - gmonth_day () - { - return "gMonthDay"; - } - - template<> - inline const char* - gyear_month () - { - return "gYearMonth"; - } - - template<> - inline const char* - date () - { - return "date"; - } - - template<> - inline const char* - time () - { - return "time"; - } - - template<> - inline const char* - date_time () - { - return "dateTime"; - } - - template<> - inline const char* - duration () - { - return "duration"; - } - - // - // - template<> - inline const char* - positive_inf () - { - return "INF"; - } - - template<> - inline const char* - negative_inf () - { - return "-INF"; - } - - template<> - inline const char* - nan () - { - return "NaN"; - } - - // - // - template<> - inline const char* - true_ () - { - return "true"; - } - - template<> - inline const char* - false_ () - { - return "false"; - } - - template<> - inline const char* - one () - { - return "1"; - } - - template<> - inline const char* - zero () - { - return "0"; - } - } - } - } - } -} - -#endif // XSD_CXX_PARSER_VALIDATING_XML_SCHEMA_PIMPL_IXX_CHAR -#endif // XSD_CXX_PARSER_USE_CHAR - - -#if defined(XSD_CXX_PARSER_USE_WCHAR) || !defined(XSD_CXX_PARSER_USE_CHAR) - -#ifndef XSD_CXX_PARSER_VALIDATING_XML_SCHEMA_PIMPL_IXX_WCHAR -#define XSD_CXX_PARSER_VALIDATING_XML_SCHEMA_PIMPL_IXX_WCHAR - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace validating - { - namespace bits - { - template<> - inline const wchar_t* - boolean () - { - return L"boolean"; - } - - template<> - inline const wchar_t* - byte () - { - return L"byte"; - } - - template<> - inline const wchar_t* - unsigned_byte () - { - return L"unsignedByte"; - } - - template<> - inline const wchar_t* - short_ () - { - return L"short"; - } - - template<> - inline const wchar_t* - unsigned_short () - { - return L"unsignedShort"; - } - - template<> - inline const wchar_t* - int_ () - { - return L"int"; - } - - template<> - inline const wchar_t* - unsigned_int () - { - return L"unsignedInt"; - } - - template<> - inline const wchar_t* - long_ () - { - return L"long"; - } - - template<> - inline const wchar_t* - unsigned_long () - { - return L"unsignedLong"; - } - - template<> - inline const wchar_t* - integer () - { - return L"integer"; - } - - template<> - inline const wchar_t* - negative_integer () - { - return L"negativeInteger"; - } - - template<> - inline const wchar_t* - non_positive_integer () - { - return L"nonPositiveInteger"; - } - - template<> - inline const wchar_t* - non_negative_integer () - { - return L"nonNegativeInteger"; - } - - template<> - inline const wchar_t* - positive_integer () - { - return L"positiveInteger"; - } - - template<> - inline const wchar_t* - float_ () - { - return L"float"; - } - - template<> - inline const wchar_t* - double_ () - { - return L"double"; - } - - template<> - inline const wchar_t* - decimal () - { - return L"decimal"; - } - - template<> - inline const wchar_t* - name () - { - return L"Name"; - } - - template<> - inline const wchar_t* - nmtoken () - { - return L"NMTOKEN"; - } - - template<> - inline const wchar_t* - nmtokens () - { - return L"NMTOKENS"; - } - - template<> - inline const wchar_t* - ncname () - { - return L"NCName"; - } - - template<> - inline const wchar_t* - id () - { - return L"ID"; - } - - template<> - inline const wchar_t* - idref () - { - return L"IDREF"; - } - - template<> - inline const wchar_t* - idrefs () - { - return L"IDREFS"; - } - - template<> - inline const wchar_t* - language () - { - return L"language"; - } - - template<> - inline const wchar_t* - qname () - { - return L"QName"; - } - - template<> - inline const wchar_t* - base64_binary () - { - return L"base64Binary"; - } - - template<> - inline const wchar_t* - hex_binary () - { - return L"hexBinary"; - } - - template<> - inline const wchar_t* - gday () - { - return L"gDay"; - } - - template<> - inline const wchar_t* - gmonth () - { - return L"gMonth"; - } - - template<> - inline const wchar_t* - gyear () - { - return L"gYear"; - } - - template<> - inline const wchar_t* - gmonth_day () - { - return L"gMonthDay"; - } - - template<> - inline const wchar_t* - gyear_month () - { - return L"gYearMonth"; - } - - template<> - inline const wchar_t* - date () - { - return L"date"; - } - - template<> - inline const wchar_t* - time () - { - return L"time"; - } - - template<> - inline const wchar_t* - date_time () - { - return L"dateTime"; - } - - template<> - inline const wchar_t* - duration () - { - return L"duration"; - } - - - // - // - template<> - inline const wchar_t* - positive_inf () - { - return L"INF"; - } - - template<> - inline const wchar_t* - negative_inf () - { - return L"-INF"; - } - - template<> - inline const wchar_t* - nan () - { - return L"NaN"; - } - - // - // - template<> - inline const wchar_t* - true_ () - { - return L"true"; - } - - template<> - inline const wchar_t* - false_ () - { - return L"false"; - } - - template<> - inline const wchar_t* - one () - { - return L"1"; - } - - template<> - inline const wchar_t* - zero () - { - return L"0"; - } - } - } - } - } -} - -#endif // XSD_CXX_PARSER_VALIDATING_XML_SCHEMA_PIMPL_IXX_WCHAR -#endif // XSD_CXX_PARSER_USE_WCHAR diff --git a/libxsd/xsd/cxx/parser/validating/xml-schema-pimpl.txx b/libxsd/xsd/cxx/parser/validating/xml-schema-pimpl.txx deleted file mode 100644 index ad587c5..0000000 --- a/libxsd/xsd/cxx/parser/validating/xml-schema-pimpl.txx +++ /dev/null @@ -1,2757 +0,0 @@ -// file : xsd/cxx/parser/validating/xml-schema-pimpl.txx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#include -#include - -#ifdef XSD_CXX11 -# include // std::move -#endif - -#include -#include - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace validating - { - // Note that most of the types implemented here cannot have - // whitespaces in the value. As result we don't need to waste - // time collapsing whitespaces. All we need to do is trim the - // string representation which can be done without copying. - // - - // Character table. - // - namespace bits - { - const unsigned char ncname_mask = 0x1; - const unsigned char name_first_mask = 0x2; - const unsigned char name_mask = 0x4; - - template - struct char_table - { - static C table[0x80]; - }; - - template - C char_table::table[0x80] = - { - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD8, 0xD0, 0x00, 0x00, 0xD0, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xD8, 0x48, 0x58, 0x48, 0x48, 0x48, 0x40, 0x58, 0x48, 0x48, 0x48, 0x48, 0x48, 0x4D, 0x4D, 0x58, - 0x4D, 0x4D, 0x4D, 0x4D, 0x4D, 0x4D, 0x4D, 0x4D, 0x4D, 0x4D, 0x4E, 0x48, 0x50, 0x48, 0x58, 0x48, - 0x48, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, - 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x48, 0x48, 0x40, 0x48, 0x4F, - 0x48, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, - 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x48, 0x48, 0x48, 0x48, 0x48 - }; - } - - // any_type - // - - template - void any_type_pimpl:: - post_any_type () - { - } - - // any_simple_type - // - - template - void any_simple_type_pimpl:: - post_any_simple_type () - { - } - - // boolean - // - - template - void boolean_pimpl:: - _pre () - { - str_.clear (); - } - - template - void boolean_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - void boolean_pimpl:: - _post () - { - ro_string str (str_); - trim (str); - - if (str == bits::true_ () || str == bits::one ()) - value_ = true; - else if (str == bits::false_ () || str == bits::zero ()) - value_ = false; - else - throw invalid_value (bits::boolean (), str); - } - - template - bool boolean_pimpl:: - post_boolean () - { - return value_; - } - - // byte - // - - template - void byte_pimpl:: - _pre () - { - str_.clear (); - } - - template - void byte_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - void byte_pimpl:: - _post () - { - ro_string str (str_); - trim (str); - - short t; - zc_istream is (str); - - if (is >> t && is.exhausted () && t >= -128 && t <= 127) - value_ = static_cast (t); - else - throw invalid_value (bits::byte (), str); - } - - template - signed char byte_pimpl:: - post_byte () - { - return value_; - } - - // unsigned_byte - // - - template - void unsigned_byte_pimpl:: - _pre () - { - str_.clear (); - } - - template - void unsigned_byte_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - void unsigned_byte_pimpl:: - _post () - { - ro_string str (str_); - trim (str); - - unsigned short t; - zc_istream is (str); - - if (is >> t && is.exhausted () && t <= 255) - value_ = static_cast (t); - else - throw invalid_value (bits::unsigned_byte (), str); - } - - template - unsigned char unsigned_byte_pimpl:: - post_unsigned_byte () - { - return value_; - } - - // short - // - - template - void short_pimpl:: - _pre () - { - str_.clear (); - } - - template - void short_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - void short_pimpl:: - _post () - { - ro_string str (str_); - trim (str); - - zc_istream is (str); - - if (!(is >> value_ && is.exhausted ())) - throw invalid_value (bits::short_ (), str); - } - - template - short short_pimpl:: - post_short () - { - return value_; - } - - - // unsigned_short - // - - template - void unsigned_short_pimpl:: - _pre () - { - str_.clear (); - } - - template - void unsigned_short_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - void unsigned_short_pimpl:: - _post () - { - ro_string str (str_); - trim (str); - - zc_istream is (str); - - if (!(is >> value_ && is.exhausted ())) - throw invalid_value (bits::unsigned_short (), str); - } - - template - unsigned short unsigned_short_pimpl:: - post_unsigned_short () - { - return value_; - } - - // int - // - - template - void int_pimpl:: - _pre () - { - str_.clear (); - } - - template - void int_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - void int_pimpl:: - _post () - { - ro_string str (str_); - trim (str); - - zc_istream is (str); - - if (!(is >> value_ && is.exhausted ())) - throw invalid_value (bits::int_ (), str); - } - - template - int int_pimpl:: - post_int () - { - return value_; - } - - - // unsigned_int - // - - template - void unsigned_int_pimpl:: - _pre () - { - str_.clear (); - } - - template - void unsigned_int_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - void unsigned_int_pimpl:: - _post () - { - ro_string str (str_); - trim (str); - - zc_istream is (str); - - if (!(is >> value_ && is.exhausted ())) - throw invalid_value (bits::unsigned_int (), str); - } - - template - unsigned int unsigned_int_pimpl:: - post_unsigned_int () - { - return value_; - } - - - // long - // - template - void long_pimpl:: - _pre () - { - str_.clear (); - } - - template - void long_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - void long_pimpl:: - _post () - { - ro_string str (str_); - trim (str); - - zc_istream is (str); - - if (!(is >> value_ && is.exhausted ())) - throw invalid_value (bits::long_ (), str); - } - - template - long long long_pimpl:: - post_long () - { - return value_; - } - - // unsigned_long - // - template - void unsigned_long_pimpl:: - _pre () - { - str_.clear (); - } - - template - void unsigned_long_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - void unsigned_long_pimpl:: - _post () - { - ro_string str (str_); - trim (str); - - zc_istream is (str); - - if (!(is >> value_ && is.exhausted ())) - throw invalid_value (bits::unsigned_long (), str); - } - - template - unsigned long long unsigned_long_pimpl:: - post_unsigned_long () - { - return value_; - } - - - // integer - // - template - void integer_pimpl:: - _pre () - { - str_.clear (); - } - - template - void integer_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - void integer_pimpl:: - _post () - { - ro_string str (str_); - trim (str); - - zc_istream is (str); - - if (!(is >> value_ && is.exhausted ())) - throw invalid_value (bits::integer (), str); - } - - template - long long integer_pimpl:: - post_integer () - { - return value_; - } - - // negative_integer - // - template - void negative_integer_pimpl:: - _pre () - { - str_.clear (); - } - - template - void negative_integer_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - void negative_integer_pimpl:: - _post () - { - ro_string str (str_); - trim (str); - - zc_istream is (str); - - if (!(is >> value_ && is.exhausted () && value_ < 0)) - throw invalid_value (bits::negative_integer (), str); - } - - template - long long negative_integer_pimpl:: - post_negative_integer () - { - return value_; - } - - - // non_positive_integer - // - template - void non_positive_integer_pimpl:: - _pre () - { - str_.clear (); - } - - template - void non_positive_integer_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - void non_positive_integer_pimpl:: - _post () - { - ro_string str (str_); - trim (str); - - zc_istream is (str); - - if (!(is >> value_ && is.exhausted () && value_ <= 0)) - throw invalid_value (bits::non_positive_integer (), str); - } - - template - long long non_positive_integer_pimpl:: - post_non_positive_integer () - { - return value_; - } - - // positive_integer - // - template - void positive_integer_pimpl:: - _pre () - { - str_.clear (); - } - - template - void positive_integer_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - void positive_integer_pimpl:: - _post () - { - ro_string str (str_); - trim (str); - - zc_istream is (str); - - if (!(is >> value_ && is.exhausted () && value_ > 0)) - throw invalid_value (bits::positive_integer (), str); - } - - template - unsigned long long positive_integer_pimpl:: - post_positive_integer () - { - return value_; - } - - - // non_negative_integer - // - template - void non_negative_integer_pimpl:: - _pre () - { - str_.clear (); - } - - template - void non_negative_integer_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - void non_negative_integer_pimpl:: - _post () - { - ro_string str (str_); - trim (str); - - zc_istream is (str); - - if (!(is >> value_ && is.exhausted ())) - throw invalid_value (bits::non_negative_integer (), str); - } - - template - unsigned long long non_negative_integer_pimpl:: - post_non_negative_integer () - { - return value_; - } - - - // float - // - template - void float_pimpl:: - _pre () - { - str_.clear (); - } - - template - void float_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - void float_pimpl:: - _post () - { - ro_string str (str_); - trim (str); - - if (str == bits::positive_inf ()) - value_ = std::numeric_limits::infinity (); - else if (str == bits::negative_inf ()) - value_ = -std::numeric_limits::infinity (); - else if (str == bits::nan ()) - value_ = std::numeric_limits::quiet_NaN (); - else - { - zc_istream is (str); - is.imbue (std::locale::classic ()); - - if (!(is >> value_ && is.exhausted ())) - throw invalid_value (bits::float_ (), str); - } - } - - template - float float_pimpl:: - post_float () - { - return value_; - } - - - // double - // - template - void double_pimpl:: - _pre () - { - str_.clear (); - } - - template - void double_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - void double_pimpl:: - _post () - { - ro_string str (str_); - trim (str); - - if (str == bits::positive_inf ()) - value_ = std::numeric_limits::infinity (); - else if (str == bits::negative_inf ()) - value_ = -std::numeric_limits::infinity (); - else if (str == bits::nan ()) - value_ = std::numeric_limits::quiet_NaN (); - else - { - zc_istream is (str); - is.imbue (std::locale::classic ()); - - if (!(is >> value_ && is.exhausted ())) - throw invalid_value (bits::double_ (), str); - } - } - - template - double double_pimpl:: - post_double () - { - return value_; - } - - // decimal - // - template - void decimal_pimpl:: - _pre () - { - str_.clear (); - } - - template - void decimal_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - void decimal_pimpl:: - _post () - { - ro_string str (str_); - trim (str); - - zc_istream is (str); - is.imbue (std::locale::classic ()); - - //@@ TODO: now we accept scientific notations and INF/NaN. - // - if (!(is >> value_ && is.exhausted ())) - throw invalid_value (bits::decimal (), str); - } - - template - double decimal_pimpl:: - post_decimal () - { - return value_; - } - - // string - // - template - void string_pimpl:: - _pre () - { - str_.clear (); - } - - template - void string_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - std::basic_string string_pimpl:: - post_string () - { - std::basic_string r; - r.swap (str_); - return r; - } - - // normalized_string - // - template - void normalized_string_pimpl:: - _pre () - { - str_.clear (); - } - - template - void normalized_string_pimpl:: - _characters (const ro_string& s) - { - str_ += s; - } - - template - std::basic_string normalized_string_pimpl:: - post_normalized_string () - { - typedef typename std::basic_string::size_type size_type; - - size_type size (str_.size ()); - - for (size_type i (0); i < size; ++i) - { - C& c = str_[i]; - - if (c == C (0x0A) || c == C (0x0D) || c == C (0x09)) - c = C (0x20); - } - - std::basic_string r; - r.swap (str_); - return r; - } - - // token - // - template - void token_pimpl:: - _pre () - { - str_.clear (); - } - - template - void token_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - std::basic_string token_pimpl:: - post_token () - { - typedef typename std::basic_string::size_type size_type; - - size_type size (str_.size ()); - size_type j (0); - - bool subs (false); - - for (size_type i (0); i < size; ++i) - { - C c = str_[i]; - - if (c == C (0x20) || c == C (0x0A) || - c == C (0x0D) || c == C (0x09)) - { - subs = true; - } - else - { - if (subs) - { - subs = false; - str_[j++] = C (0x20); - } - - str_[j++] = c; - } - } - - str_.resize (j); - - std::basic_string r; - r.swap (str_); - return r; - } - - // name - // - template - void name_pimpl:: - _pre () - { - str_.clear (); - } - - template - void name_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - void name_pimpl:: - _post () - { - typedef typename ro_string::size_type size_type; - - ro_string tmp (str_); - size_type size (trim_right (tmp)); - - // For now we are only checking the US-ASCII characters. - // - - bool ok (size != 0); - - if (ok) - { - unsigned int c (static_cast (str_[0])); - - ok = c >= 0x80 || - (bits::char_table::table[c] & - bits::name_first_mask); - - if (ok) - { - for (size_type i (1); i < size; ++i) - { - c = static_cast (str_[i]); - - if (c < 0x80 && - !(bits::char_table::table[c] & - bits::name_mask)) - { - ok = false; - break; - } - } - } - } - - if (!ok) - throw invalid_value (bits::name (), tmp); - - str_.resize (size); - } - - template - std::basic_string name_pimpl:: - post_name () - { - std::basic_string r; - r.swap (str_); - return r; - } - - // nmtoken - // - template - void nmtoken_pimpl:: - _pre () - { - str_.clear (); - } - - template - void nmtoken_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - void nmtoken_pimpl:: - _post () - { - typedef typename ro_string::size_type size_type; - - ro_string tmp (str_); - size_type size (trim_right (tmp)); - - // For now we are only checking the US-ASCII characters. - // - - bool ok (size != 0); - - if (ok) - { - for (size_type i (0); i < size; ++i) - { - unsigned int c (static_cast (str_[i])); - - if (c < 0x80 && - !(bits::char_table::table[c] & - bits::name_mask)) - { - ok = false; - break; - } - } - } - - if (!ok) - throw invalid_value (bits::nmtoken (), tmp); - - str_.resize (size); - } - - template - std::basic_string nmtoken_pimpl:: - post_nmtoken () - { - std::basic_string r; - r.swap (str_); - return r; - } - - // nmtokens - // - template - void nmtokens_pimpl:: - _pre () - { - nmtokens_pskel::_pre (); - seq_.clear (); - } - - template - void nmtokens_pimpl:: - _post () - { - nmtokens_pskel::_post (); - - // Should have at least one element. - // - if (seq_.size () < 1) - { - ro_string tmp; - throw invalid_value (bits::nmtokens (), tmp); - } - } - - template - string_sequence nmtokens_pimpl:: - post_nmtokens () - { - string_sequence r; - r.swap (seq_); - return r; - } - - template - void nmtokens_pimpl:: - _xsd_parse_item (const ro_string& s) - { - parser_.pre (); - parser_._pre (); - parser_._characters (s); - parser_._post (); - seq_.push_back (parser_.post_nmtoken ()); - } - - // ncname - // - namespace bits - { - template - bool - valid_ncname (const C* s, typename ro_string::size_type size) - { - typedef typename ro_string::size_type size_type; - - // For now we are only checking the US-ASCII characters. - // - bool ok (size != 0); - - if (ok) - { - unsigned int c (static_cast (s[0])); - - ok = c >= 0x80 || - ((bits::char_table::table[c] & - bits::name_first_mask) && c != C (':')); - - if (ok) - { - for (size_type i (1); i < size; ++i) - { - c = static_cast (s[i]); - - if (c < 0x80 && - !(bits::char_table::table[c] & - bits::ncname_mask)) - { - ok = false; - break; - } - } - } - } - - return ok; - } - } - - template - void ncname_pimpl:: - _pre () - { - str_.clear (); - } - - template - void ncname_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - void ncname_pimpl:: - _post () - { - typedef typename ro_string::size_type size_type; - - ro_string tmp (str_); - size_type size (trim_right (tmp)); - - if (!bits::valid_ncname (tmp.data (), size)) - throw invalid_value (bits::ncname (), tmp); - - str_.resize (size); - } - - template - std::basic_string ncname_pimpl:: - post_ncname () - { - std::basic_string r; - r.swap (str_); - return r; - } - - // id - // - template - void id_pimpl:: - _pre () - { - str_.clear (); - } - - template - void id_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - void id_pimpl:: - _post () - { - typedef typename ro_string::size_type size_type; - - ro_string tmp (str_); - size_type size (trim_right (tmp)); - - if (!bits::valid_ncname (tmp.data (), size)) - throw invalid_value (bits::id (), tmp); - - str_.resize (size); - } - - template - std::basic_string id_pimpl:: - post_id () - { - std::basic_string r; - r.swap (str_); - return r; - } - - // idref - // - template - void idref_pimpl:: - _pre () - { - str_.clear (); - } - - template - void idref_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - void idref_pimpl:: - _post () - { - typedef typename ro_string::size_type size_type; - - ro_string tmp (str_); - size_type size (trim_right (tmp)); - - if (!bits::valid_ncname (tmp.data (), size)) - throw invalid_value (bits::idref (), tmp); - - str_.resize (size); - } - - template - std::basic_string idref_pimpl:: - post_idref () - { - std::basic_string r; - r.swap (str_); - return r; - } - - // idrefs - // - template - void idrefs_pimpl:: - _pre () - { - idrefs_pskel::_pre (); - seq_.clear (); - } - - template - void idrefs_pimpl:: - _post () - { - idrefs_pskel::_post (); - - // Should have at least one element. - // - if (seq_.size () < 1) - { - ro_string tmp; - throw invalid_value (bits::idrefs (), tmp); - } - } - - template - string_sequence idrefs_pimpl:: - post_idrefs () - { - string_sequence r; - r.swap (seq_); - return r; - } - - template - void idrefs_pimpl:: - _xsd_parse_item (const ro_string& s) - { - parser_.pre (); - parser_._pre (); - parser_._characters (s); - parser_._post (); - seq_.push_back (parser_.post_idref ()); - } - - // language - // - template - void language_pimpl:: - _pre () - { - str_.clear (); - } - - template - void language_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - void language_pimpl:: - _post () - { - typedef typename ro_string::size_type size_type; - - ro_string tmp (str_); - size_type size (trim_right (tmp)); - - // language := ALPHA{1,8} *(-(ALPHA | DIGIT){1,8}) - // - bool ok (true); - - for (size_type tag (0), i (0); ; ++tag) - { - size_type n (0); - - for (; i < size && n < 8; ++n, ++i) - { - C c (tmp[i]); - - if (!((c >= C ('a') && c <= C ('z')) || - (c >= C ('A') && c <= C ('Z')) || - (tag != 0 && c >= C ('0') && c <= C ('9')))) - break; - } - - if (n == 0) - { - ok = false; - break; - } - - if (i == size) - break; - - if (tmp[i++] != C ('-')) - { - ok = false; - break; - } - } - - if (!ok) - throw invalid_value (bits::language (), tmp); - - str_.resize (size); - } - - template - std::basic_string language_pimpl:: - post_language () - { - std::basic_string r; - r.swap (str_); - return r; - } - - // uri - // - template - void uri_pimpl:: - _pre () - { - str_.clear (); - } - - template - void uri_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - std::basic_string uri_pimpl:: - post_uri () - { - // According to Datatypes 3.2.17 and RFC2396 pretty much anything - // can be a URI and conforming processors do not need to figure - // out and verify particular URI schemes. - // - ro_string tmp (str_); - str_.resize (trim_right (tmp)); - - std::basic_string r; - r.swap (str_); - return r; - } - - // qname - // - template - void qname_pimpl:: - _pre () - { - str_.clear (); - } - - template - void qname_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - void qname_pimpl:: - _post () - { - typedef typename ro_string::size_type size_type; - - ro_string tmp (str_); - size_type size (trim_right (tmp)); - size_type pos (tmp.find (C (':'))); - - const C* s (tmp.data ()); - - if (pos != ro_string::npos) - { - if (!bits::valid_ncname (s, pos) || - !bits::valid_ncname (s + pos + 1, size - pos - 1)) - throw invalid_value (bits::qname (), tmp); - - prefix_.assign (s, pos); - name_.assign (s + pos + 1, size - pos - 1); - } - else - { - if (!bits::valid_ncname (s, size)) - throw invalid_value (bits::qname (), tmp); - - prefix_.clear (); - str_.resize (size); - name_.swap (str_); - } - } - - template - qname qname_pimpl:: - post_qname () - { - return prefix_.empty () - ? qname (name_) - : qname (prefix_, name_); - } - - // base64_binary - // - template - void base64_binary_pimpl:: - _pre () - { - str_.clear (); - } - - template - void base64_binary_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - namespace bits - { - template - inline unsigned char - base64_decode (C c) - { - unsigned char r (0xFF); - - if (c >= C('A') && c <= C ('Z')) - r = static_cast (c - C ('A')); - else if (c >= C('a') && c <= C ('z')) - r = static_cast (c - C ('a') + 26); - else if (c >= C('0') && c <= C ('9')) - r = static_cast (c - C ('0') + 52); - else if (c == C ('+')) - r = 62; - else if (c == C ('/')) - r = 63; - - return r; - } - } - - template - void base64_binary_pimpl:: - _post () - { - typedef typename std::basic_string::size_type size_type; - - size_type size (str_.size ()); - const C* src (str_.c_str ()); - - // Remove all whitespaces. - // - { - size_type j (0); - - bool subs (false); - - for (size_type i (0); i < size; ++i) - { - C c = str_[i]; - - if (c == C (0x20) || c == C (0x0A) || - c == C (0x0D) || c == C (0x09)) - { - subs = true; - } - else - { - if (subs) - subs = false; - - str_[j++] = c; - } - } - - size = j; - str_.resize (size); - } - - // Our length should be a multiple of four. - // - if (size == 0 || size % 4 != 0) - throw invalid_value (bits::base64_binary (), str_); - - size_type quad_count (size / 4); - size_type capacity (quad_count * 3 + 1); - - buf_.reset (new buffer (capacity, capacity)); - char* dst (buf_->data ()); - - size_type si (0), di (0); // Source and destination indexes. - - // Process all quads except the last one. - // - unsigned char b1, b2, b3, b4; - - for (size_type q (0); q < quad_count - 1; ++q) - { - b1 = bits::base64_decode (src[si++]); - b2 = bits::base64_decode (src[si++]); - b3 = bits::base64_decode (src[si++]); - b4 = bits::base64_decode (src[si++]); - - if (b1 == 0xFF || b2 == 0xFF || b3 == 0xFF || b4 == 0xFF) - throw invalid_value (bits::base64_binary (), str_); - - dst[di++] = (b1 << 2) | (b2 >> 4); - dst[di++] = (b2 << 4) | (b3 >> 2); - dst[di++] = (b3 << 6) | b4; - } - - // Process the last quad. The first two octets are always there. - // - b1 = bits::base64_decode (src[si++]); - b2 = bits::base64_decode (src[si++]); - - if (b1 == 0xFF || b2 == 0xFF) - throw invalid_value (bits::base64_binary (), str_); - - C e3 (src[si++]); - C e4 (src[si++]); - - if (e4 == C ('=')) - { - if (e3 == C ('=')) - { - // Two pads. Last 4 bits in b2 should be zero. - // - if ((b2 & 0x0F) != 0) - throw invalid_value (bits::base64_binary (), str_); - - dst[di++] = (b1 << 2) | (b2 >> 4); - } - else - { - // One pad. Last 2 bits in b3 should be zero. - // - b3 = bits::base64_decode (e3); - - if (b3 == 0xFF || (b3 & 0x03) != 0) - throw invalid_value (bits::base64_binary (), str_); - - dst[di++] = (b1 << 2) | (b2 >> 4); - dst[di++] = (b2 << 4) | (b3 >> 2); - } - } - else - { - // No pads. - // - b3 = bits::base64_decode (e3); - b4 = bits::base64_decode (e4); - - if (b3 == 0xFF || b4 == 0xFF) - throw invalid_value (bits::base64_binary (), str_); - - dst[di++] = (b1 << 2) | (b2 >> 4); - dst[di++] = (b2 << 4) | (b3 >> 2); - dst[di++] = (b3 << 6) | b4; - } - - // Set the real size. - // - buf_->size (di); - } - - template - XSD_AUTO_PTR base64_binary_pimpl:: - post_base64_binary () - { -#ifdef XSD_CXX11 - return std::move (buf_); -#else - return buf_; -#endif - } - - // hex_binary - // - template - void hex_binary_pimpl:: - _pre () - { - str_.clear (); - } - - template - void hex_binary_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - namespace bits - { - template - inline unsigned char - hex_decode (C c) - { - unsigned char r (0xFF); - - if (c >= C('0') && c <= C ('9')) - r = static_cast (c - C ('0')); - else if (c >= C ('A') && c <= C ('F')) - r = static_cast (10 + (c - C ('A'))); - else if (c >= C ('a') && c <= C ('f')) - r = static_cast (10 + (c - C ('a'))); - - return r; - } - } - - template - void hex_binary_pimpl:: - _post () - { - typedef typename ro_string::size_type size_type; - - ro_string tmp (str_); - size_type size (trim_right (tmp)); - - if (size % 2 != 0) - throw invalid_value (bits::hex_binary (), tmp); - - buffer::size_t n (size / 2); - buf_.reset (new buffer (n)); - - if (n != 0) - { - const C* src (tmp.data ()); - char* dst (buf_->data ()); - buffer::size_t i (0); - - for (; i < n; ++i) - { - unsigned char h (bits::hex_decode (src[2 * i])); - unsigned char l (bits::hex_decode (src[2 * i + 1])); - - if (h == 0xFF || l == 0xFF) - break; - - dst[i] = (h << 4) | l; - } - - if (i != n) - throw invalid_value (bits::hex_binary (), tmp); - } - } - - template - XSD_AUTO_PTR hex_binary_pimpl:: - post_hex_binary () - { -#ifdef XSD_CXX11 - return std::move (buf_); -#else - return buf_; -#endif - } - - // time_zone - // - namespace bits - { - // Datatypes 3.2.7.3. Return false if time zone is invalid. - // - template - bool - parse_tz (const C* s, - typename std::basic_string::size_type n, - short& h, short& m) - { - // time_zone := Z|(+|-)HH:MM - // - if (n == 0) - { - return false; - } - else if (s[0] == 'Z') - { - if (n != 1) - return false; - - h = 0; - m = 0; - } - else - { - if (n != 6 || (s[0] != '-' && s[0] != '+') || s[3] != ':') - return false; - - // Parse hours. - // - char d1 = s[1]; - char d2 = s[2]; - - if (d1 < '0' || d1 > '9' || d2 < '0' || d2 > '9') - return false; - - h = 10 * (d1 - '0') + (d2 - '0'); - - if (h > 14) - return false; - - // Parse minutes. - // - d1 = s[4]; - d2 = s[5]; - - if (d1 < '0' || d1 > '9' || d2 < '0' || d2 > '9') - return false; - - m = 10 * (d1 - '0') + (d2 - '0'); - - if (m > 59 || (h == 14 && m != 0)) - return false; - - if (s[0] == '-') - { - h = -h; - m = -m; - } - } - - return true; - } - } - - // gday - // - template - void gday_pimpl:: - _pre () - { - str_.clear (); - } - - template - void gday_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - void gday_pimpl:: - _post () - { - typedef typename ro_string::size_type size_type; - - ro_string tmp (str_); - size_type size (trim_right (tmp)); - const C* s (tmp.data ()); - - // gday := ---DD[Z|(+|-)HH:MM] - // - if (size < 5 || - s[0] != C ('-') || s[1] != C ('-') || s[2] != C ('-')) - throw invalid_value (bits::gday (), tmp); - - C d1 (s[3]), d2 (s[4]); - - if (d1 < '0' || d1 > '9' || d2 < '0' || d2 > '9') - throw invalid_value (bits::gday (), tmp); - - day_ = 10 * (d1 - '0') + (d2 - '0'); - - if (day_ < 1 || day_ > 31) - throw invalid_value (bits::gday (), tmp); - - if (size > 5) - { - if (!bits::parse_tz (s + 5, size - 5, zh_, zm_)) - throw invalid_value (bits::gday (), tmp); - - z_ = true; - } - else - z_ = false; - } - - template - gday gday_pimpl:: - post_gday () - { - return z_ ? gday (day_, zh_, zm_) : gday (day_); - } - - // gmonth - // - template - void gmonth_pimpl:: - _pre () - { - str_.clear (); - } - - template - void gmonth_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - void gmonth_pimpl:: - _post () - { - typedef typename ro_string::size_type size_type; - - ro_string tmp (str_); - size_type size (trim_right (tmp)); - const C* s (tmp.data ()); - - // gmonth := --MM[Z|(+|-)HH:MM] - // - if (size < 4 || s[0] != C ('-') || s[1] != C ('-')) - throw invalid_value (bits::gmonth (), tmp); - - C d1 (s[2]), d2 (s[3]); - - if (d1 < '0' || d1 > '9' || d2 < '0' || d2 > '9') - throw invalid_value (bits::gmonth (), tmp); - - month_ = 10 * (d1 - '0') + (d2 - '0'); - - if (month_ < 1 || month_ > 12) - throw invalid_value (bits::gmonth (), tmp); - - if (size > 4) - { - if (!bits::parse_tz (s + 4, size - 4, zh_, zm_)) - throw invalid_value (bits::gmonth (), tmp); - - z_ = true; - } - else - z_ = false; - } - - template - gmonth gmonth_pimpl:: - post_gmonth () - { - return z_ ? gmonth (month_, zh_, zm_) : gmonth (month_); - } - - // gyear - // - template - void gyear_pimpl:: - _pre () - { - str_.clear (); - } - - template - void gyear_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - void gyear_pimpl:: - _post () - { - typedef typename ro_string::size_type size_type; - - ro_string tmp (str_); - size_type size (trim_right (tmp)); - const C* s (tmp.data ()); - - // gyear := [-]CCYY[N]*[Z|(+|-)HH:MM] - // - - if (size < 4 || (s[0] == C ('-') && size < 5)) - throw invalid_value (bits::gyear (), tmp); - - // Find the end of the year token. - // - size_type pos (s[0] == C ('-') ? 5 : 4); - for (; pos < size; ++pos) - { - C c (s[pos]); - - if (c == C ('Z') || c == C ('+') || c == C ('-')) - break; - } - - ro_string year_fragment (s, pos); - zc_istream is (year_fragment); - - if (!(is >> year_ && is.exhausted () && year_ != 0)) - throw invalid_value (bits::gyear (), tmp); - - if (pos < size) - { - if (!bits::parse_tz (s + pos, size - pos, zh_, zm_)) - throw invalid_value (bits::gyear (), tmp); - - z_ = true; - } - else - z_ = false; - } - - template - gyear gyear_pimpl:: - post_gyear () - { - return z_ ? gyear (year_, zh_, zm_) : gyear (year_); - } - - // gmonth_day - // - template - void gmonth_day_pimpl:: - _pre () - { - str_.clear (); - } - - template - void gmonth_day_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - void gmonth_day_pimpl:: - _post () - { - typedef typename ro_string::size_type size_type; - - ro_string tmp (str_); - size_type size (trim_right (tmp)); - const C* s (tmp.data ()); - - // gmonth_day := --MM-DD[Z|(+|-)HH:MM] - // - if (size < 7 || - s[0] != C ('-') || s[1] != C ('-') || s[4] != C ('-')) - throw invalid_value (bits::gmonth_day (), tmp); - - // month - // - C d1 (s[2]), d2 (s[3]); - - if (d1 < '0' || d1 > '9' || d2 < '0' || d2 > '9') - throw invalid_value (bits::gmonth_day (), tmp); - - month_ = 10 * (d1 - '0') + (d2 - '0'); - - if (month_ < 1 || month_ > 12) - throw invalid_value (bits::gmonth_day (), tmp); - - // day - // - d1 = s[5]; - d2 = s[6]; - - if (d1 < '0' || d1 > '9' || d2 < '0' || d2 > '9') - throw invalid_value (bits::gmonth_day (), tmp); - - day_ = 10 * (d1 - '0') + (d2 - '0'); - - if (day_ < 1 || day_ > 31) - throw invalid_value (bits::gmonth_day (), tmp); - - // zone - // - if (size > 7) - { - if (!bits::parse_tz (s + 7, size - 7, zh_, zm_)) - throw invalid_value (bits::gmonth_day (), tmp); - - z_ = true; - } - else - z_ = false; - } - - template - gmonth_day gmonth_day_pimpl:: - post_gmonth_day () - { - return z_ - ? gmonth_day (month_, day_, zh_, zm_) - : gmonth_day (month_, day_); - } - - // gyear_month - // - template - void gyear_month_pimpl:: - _pre () - { - str_.clear (); - } - - template - void gyear_month_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - void gyear_month_pimpl:: - _post () - { - typedef typename ro_string::size_type size_type; - - ro_string tmp (str_); - size_type size (trim_right (tmp)); - const C* s (tmp.data ()); - - // gyear_month := [-]CCYY[N]*-MM[Z|(+|-)HH:MM] - // - - if (size < 7 || (s[0] == C ('-') && size < 8)) - throw invalid_value (bits::gyear_month (), tmp); - - // Find the end of the year token. - // - size_type pos (tmp.find (C ('-'), s[0] == C ('-') ? 5 : 4)); - - if (pos == ro_string::npos || (size - pos - 1) < 2) - throw invalid_value (bits::gyear_month (), tmp); - - ro_string year_fragment (s, pos); - zc_istream yis (year_fragment); - - if (!(yis >> year_ && yis.exhausted () && year_ != 0)) - throw invalid_value (bits::gyear_month (), tmp); - - // month - // - C d1 (s[pos + 1]), d2 (s[pos + 2]); - - if (d1 < '0' || d1 > '9' || d2 < '0' || d2 > '9') - throw invalid_value (bits::gyear_month (), tmp); - - month_ = 10 * (d1 - '0') + (d2 - '0'); - - if (month_ < 1 || month_ > 12) - throw invalid_value (bits::gyear_month (), tmp); - - // zone - // - pos += 3; - - if (pos < size) - { - if (!bits::parse_tz (s + pos, size - pos, zh_, zm_)) - throw invalid_value (bits::gyear_month (), tmp); - - z_ = true; - } - else - z_ = false; - } - - template - gyear_month gyear_month_pimpl:: - post_gyear_month () - { - return z_ - ? gyear_month (year_, month_, zh_, zm_) - : gyear_month (year_, month_); - } - - // date - // - template - void date_pimpl:: - _pre () - { - str_.clear (); - } - - template - void date_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - void date_pimpl:: - _post () - { - typedef typename ro_string::size_type size_type; - - ro_string tmp (str_); - size_type size (trim_right (tmp)); - const C* s (tmp.data ()); - - // date := [-]CCYY[N]*-MM-DD[Z|(+|-)HH:MM] - // - - if (size < 10 || (s[0] == C ('-') && size < 11)) - throw invalid_value (bits::date (), tmp); - - // Find the end of the year token. - // - size_type pos (tmp.find (C ('-'), s[0] == C ('-') ? 5 : 4)); - - if (pos == ro_string::npos - || (size - pos - 1) < 5 - || s[pos + 3] != C ('-')) - throw invalid_value (bits::date (), tmp); - - ro_string year_fragment (s, pos); - zc_istream yis (year_fragment); - - if (!(yis >> year_ && yis.exhausted () && year_ != 0)) - throw invalid_value (bits::date (), tmp); - - // month - // - C d1 (s[pos + 1]), d2 (s[pos + 2]); - - if (d1 < '0' || d1 > '9' || d2 < '0' || d2 > '9') - throw invalid_value (bits::date (), tmp); - - month_ = 10 * (d1 - '0') + (d2 - '0'); - - if (month_ < 1 || month_ > 12) - throw invalid_value (bits::date (), tmp); - - // day - // - d1 = s[pos + 4]; - d2 = s[pos + 5]; - - if (d1 < '0' || d1 > '9' || d2 < '0' || d2 > '9') - throw invalid_value (bits::date (), tmp); - - day_ = 10 * (d1 - '0') + (d2 - '0'); - - if (day_ < 1 || day_ > 31) - throw invalid_value (bits::date (), tmp); - - // zone - // - pos += 6; - - if (pos < size) - { - if (!bits::parse_tz (s + pos, size - pos, zh_, zm_)) - throw invalid_value (bits::date (), tmp); - - z_ = true; - } - else - z_ = false; - } - - template - date date_pimpl:: - post_date () - { - return z_ - ? date (year_, month_, day_, zh_, zm_) - : date (year_, month_, day_); - } - - // time - // - template - void time_pimpl:: - _pre () - { - str_.clear (); - } - - template - void time_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - void time_pimpl:: - _post () - { - typedef typename ro_string::size_type size_type; - - ro_string tmp (str_); - size_type size (trim_right (tmp)); - const C* s (tmp.data ()); - - // time := HH:MM:SS[.S+][Z|(+|-)HH:MM] - // - - if (size < 8 || s[2] != C (':') || s[5] != C (':')) - throw invalid_value (bits::time (), tmp); - - // hours - // - C d1 (s[0]), d2 (s[1]); - - if (d1 < '0' || d1 > '9' || d2 < '0' || d2 > '9') - throw invalid_value (bits::time (), tmp); - - hours_ = 10 * (d1 - '0') + (d2 - '0'); - - if (hours_ > 24) - throw invalid_value (bits::time (), tmp); - - // minutes - // - d1 = s[3]; - d2 = s[4]; - - if (d1 < '0' || d1 > '9' || d2 < '0' || d2 > '9') - throw invalid_value (bits::time (), tmp); - - minutes_ = 10 * (d1 - '0') + (d2 - '0'); - - if (minutes_ > 59) - throw invalid_value (bits::time (), tmp); - - // Find the end of the seconds fragment. - // - size_type pos (8); - for (; pos < size; ++pos) - { - C c (s[pos]); - - if (c == C ('Z') || c == C ('+') || c == C ('-')) - break; - } - - // At least one digit should follow the fraction point. - // - if ((pos - 6) == 3) - throw invalid_value (bits::time (), tmp); - - ro_string seconds_fragment (s + 6, pos - 6); - zc_istream sis (seconds_fragment); - - if (!(sis >> seconds_ && sis.exhausted () && seconds_ < 60.0)) - throw invalid_value (bits::time (), tmp); - - if (hours_ == 24 && (minutes_ != 0 || seconds_ != 0.0)) - throw invalid_value (bits::time (), tmp); - - // zone - // - if (pos < size) - { - if (!bits::parse_tz (s + pos, size - pos, zh_, zm_)) - throw invalid_value (bits::time (), tmp); - - z_ = true; - } - else - z_ = false; - } - - template - time time_pimpl:: - post_time () - { - return z_ - ? time (hours_, minutes_, seconds_, zh_, zm_) - : time (hours_, minutes_, seconds_); - } - - - // date_time - // - template - void date_time_pimpl:: - _pre () - { - str_.clear (); - } - - template - void date_time_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - template - void date_time_pimpl:: - _post () - { - typedef typename ro_string::size_type size_type; - - ro_string tmp (str_); - size_type size (trim_right (tmp)); - const C* s (tmp.data ()); - - // date_time := [-]CCYY[N]*-MM-DDTHH:MM:SS[.S+][Z|(+|-)HH:MM] - // - - if (size < 19 || (s[0] == C ('-') && size < 20)) - throw invalid_value (bits::date_time (), tmp); - - // Find the end of the year token. - // - size_type pos (tmp.find (C ('-'), s[0] == C ('-') ? 5 : 4)); - - if (pos == ro_string::npos || (size - pos - 1) < 14 - || s[pos + 3] != C ('-') || s[pos + 6] != C ('T') - || s[pos + 9] != C (':') || s[pos + 12] != C (':')) - throw invalid_value (bits::date_time (), tmp); - - // year - // - ro_string year_fragment (s, pos); - zc_istream yis (year_fragment); - - if (!(yis >> year_ && yis.exhausted () && year_ != 0)) - throw invalid_value (bits::date_time (), tmp); - - // month - // - C d1 (s[pos + 1]), d2 (s[pos + 2]); - - if (d1 < '0' || d1 > '9' || d2 < '0' || d2 > '9') - throw invalid_value (bits::date_time (), tmp); - - month_ = 10 * (d1 - '0') + (d2 - '0'); - - if (month_ < 1 || month_ > 12) - throw invalid_value (bits::date_time (), tmp); - - // day - // - d1 = s[pos + 4]; - d2 = s[pos + 5]; - - if (d1 < '0' || d1 > '9' || d2 < '0' || d2 > '9') - throw invalid_value (bits::date_time (), tmp); - - day_ = 10 * (d1 - '0') + (d2 - '0'); - - if (day_ < 1 || day_ > 31) - throw invalid_value (bits::date_time (), tmp); - - pos += 7; // Point to the first H. - - // hours - // - d1 = s[pos]; - d2 = s[pos + 1]; - - if (d1 < '0' || d1 > '9' || d2 < '0' || d2 > '9') - throw invalid_value (bits::date_time (), tmp); - - hours_ = 10 * (d1 - '0') + (d2 - '0'); - - if (hours_ > 24) - throw invalid_value (bits::date_time (), tmp); - - // minutes - // - d1 = s[pos + 3]; - d2 = s[pos + 4]; - - if (d1 < '0' || d1 > '9' || d2 < '0' || d2 > '9') - throw invalid_value (bits::date_time (), tmp); - - minutes_ = 10 * (d1 - '0') + (d2 - '0'); - - if (minutes_ > 59) - throw invalid_value (bits::date_time (), tmp); - - // Find the end of the seconds fragment. - // - pos += 6; // Point to the first S. - - size_type sec_end (pos + 2); - for (; sec_end < size; ++sec_end) - { - C c (s[sec_end]); - - if (c == C ('Z') || c == C ('+') || c == C ('-')) - break; - } - - // At least one digit should should follow the fraction point. - // - if ((sec_end - pos) == 3) - throw invalid_value (bits::date_time (), tmp); - - ro_string seconds_fragment (s + pos, sec_end - pos); - zc_istream sis (seconds_fragment); - - if (!(sis >> seconds_ && sis.exhausted () && seconds_ < 60.0)) - throw invalid_value (bits::date_time (), tmp); - - if (hours_ == 24 && (minutes_ != 0 || seconds_ != 0.0)) - throw invalid_value (bits::date_time (), tmp); - - // zone - // - if (sec_end < size) - { - if (!bits::parse_tz (s + sec_end, size - sec_end, zh_, zm_)) - throw invalid_value (bits::date_time (), tmp); - - z_ = true; - } - else - z_ = false; - } - - template - date_time date_time_pimpl:: - post_date_time () - { - return z_ - ? date_time (year_, month_, day_, hours_, minutes_, seconds_, - zh_, zm_) - : date_time (year_, month_, day_, hours_, minutes_, seconds_); - } - - // duration - // - template - void duration_pimpl:: - _pre () - { - str_.clear (); - } - - template - void duration_pimpl:: - _characters (const ro_string& s) - { - if (str_.size () == 0) - { - ro_string tmp (s.data (), s.size ()); - - if (trim_left (tmp) != 0) - str_ += tmp; - } - else - str_ += s; - } - - namespace bits - { - template - inline typename ro_string::size_type - duration_delim (const C* s, - typename ro_string::size_type pos, - typename ro_string::size_type size) - { - const C* p (s + pos); - for (; p < (s + size); ++p) - { - if (*p == C ('Y') || *p == C ('D') || *p == C ('M') || - *p == C ('H') || *p == C ('M') || *p == C ('S') || - *p == C ('T')) - break; - } - - return p - s; - } - } - - template - void duration_pimpl:: - _post () - { - typedef typename ro_string::size_type size_type; - - ro_string tmp (str_); - size_type size (trim_right (tmp)); - - negative_ = false; - years_ = 0; - months_ = 0; - days_ = 0; - hours_ = 0; - minutes_ = 0; - seconds_ = 0.0; - - // duration := [-]P[nY][nM][nD][TnHnMn[.n+]S] - // - const C* s (tmp.data ()); - - if (size < 3 || (s[0] == C ('-') && size < 4)) - throw invalid_value (bits::duration (), tmp); - - size_type pos (0); - - if (s[0] == C ('-')) - { - negative_ = true; - pos++; - } - - if (s[pos++] != C ('P')) - throw invalid_value (bits::duration (), tmp); - - size_type del (bits::duration_delim (s, pos, size)); - - // Duration should contain at least one component. - // - if (del == size) - throw invalid_value (bits::duration (), tmp); - - if (s[del] == C ('Y')) - { - ro_string fragment (s + pos, del - pos); - zc_istream is (fragment); - - if (!(is >> years_ && is.exhausted ())) - throw invalid_value (bits::duration (), tmp); - - pos = del + 1; - del = bits::duration_delim (s, pos, size); - } - - if (del != size && s[del] == C ('M')) - { - ro_string fragment (s + pos, del - pos); - zc_istream is (fragment); - - if (!(is >> months_ && is.exhausted ())) - throw invalid_value (bits::duration (), tmp); - - pos = del + 1; - del = bits::duration_delim (s, pos, size); - } - - if (del != size && s[del] == C ('D')) - { - ro_string fragment (s + pos, del - pos); - zc_istream is (fragment); - - if (!(is >> days_ && is.exhausted ())) - throw invalid_value (bits::duration (), tmp); - - pos = del + 1; - del = bits::duration_delim (s, pos, size); - } - - if (del != size && s[del] == C ('T')) - { - pos = del + 1; - del = bits::duration_delim (s, pos, size); - - // At least one time component should be present. - // - if (del == size) - throw invalid_value (bits::duration (), tmp); - - if (s[del] == C ('H')) - { - ro_string fragment (s + pos, del - pos); - zc_istream is (fragment); - - if (!(is >> hours_ && is.exhausted ())) - throw invalid_value (bits::duration (), tmp); - - pos = del + 1; - del = bits::duration_delim (s, pos, size); - } - - if (del != size && s[del] == C ('M')) - { - ro_string fragment (s + pos, del - pos); - zc_istream is (fragment); - - if (!(is >> minutes_ && is.exhausted ())) - throw invalid_value (bits::duration (), tmp); - - pos = del + 1; - del = bits::duration_delim (s, pos, size); - } - - if (del != size && s[del] == C ('S')) - { - ro_string fragment (s + pos, del - pos); - zc_istream is (fragment); - - if (!(is >> seconds_ && is.exhausted () && seconds_ >= 0.0)) - throw invalid_value (bits::duration (), tmp); - - pos = del + 1; - } - } - - // Something did not match or appeared in the wrong order. - // - if (pos != size) - throw invalid_value (bits::duration (), tmp); - } - - template - duration duration_pimpl:: - post_duration () - { - return duration ( - negative_, years_, months_, days_, hours_, minutes_, seconds_); - } - } - } - } -} diff --git a/libxsd/xsd/cxx/parser/validating/xml-schema-pskel.hxx b/libxsd/xsd/cxx/parser/validating/xml-schema-pskel.hxx deleted file mode 100644 index ffc7de3..0000000 --- a/libxsd/xsd/cxx/parser/validating/xml-schema-pskel.hxx +++ /dev/null @@ -1,648 +0,0 @@ -// file : xsd/cxx/parser/validating/xml-schema-pskel.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_PARSER_VALIDATING_XML_SCHEMA_PSKEL_HXX -#define XSD_CXX_PARSER_VALIDATING_XML_SCHEMA_PSKEL_HXX - -#include -#include // std::auto_ptr/unique_ptr - -#include // XSD_AUTO_PTR - -#include -#include - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace validating - { - // anyType and anySimpleType. All events are routed to the - // _any_* callbacks. - // - template - struct any_type_pskel: complex_content - { - virtual bool - _start_element_impl (const ro_string&, - const ro_string&, - const ro_string*); - - virtual bool - _end_element_impl (const ro_string&, - const ro_string&); - - virtual bool - _attribute_impl_phase_two (const ro_string&, - const ro_string&, - const ro_string&); - - virtual bool - _characters_impl (const ro_string&); - - virtual void - post_any_type () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct any_simple_type_pskel: simple_content - { - virtual bool - _characters_impl (const ro_string&); - - virtual void - post_any_simple_type () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - - // Boolean. - // - template - struct boolean_pskel: simple_content - { - virtual bool - post_boolean () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - - // 8-bit - // - template - struct byte_pskel: simple_content - { - virtual signed char - post_byte () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct unsigned_byte_pskel: simple_content - { - virtual unsigned char - post_unsigned_byte () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - - // 16-bit - // - template - struct short_pskel: simple_content - { - virtual short - post_short () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct unsigned_short_pskel: simple_content - { - virtual unsigned short - post_unsigned_short () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - - // 32-bit - // - template - struct int_pskel: simple_content - { - virtual int - post_int () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct unsigned_int_pskel: simple_content - { - virtual unsigned int - post_unsigned_int () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - - // 64-bit - // - template - struct long_pskel: simple_content - { - virtual long long - post_long () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct unsigned_long_pskel: simple_content - { - virtual unsigned long long - post_unsigned_long () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - - // Arbitrary-length integers. - // - template - struct integer_pskel: simple_content - { - virtual long long - post_integer () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct negative_integer_pskel: simple_content - { - virtual long long - post_negative_integer () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct non_positive_integer_pskel: simple_content - { - virtual long long - post_non_positive_integer () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct positive_integer_pskel: simple_content - { - virtual unsigned long long - post_positive_integer () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct non_negative_integer_pskel: simple_content - { - virtual unsigned long long - post_non_negative_integer () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - - // Floats. - // - template - struct float_pskel: simple_content - { - virtual float - post_float () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct double_pskel: simple_content - { - virtual double - post_double () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct decimal_pskel: simple_content - { - virtual double - post_decimal () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - - // Strings. - // - template - struct string_pskel: simple_content - { - virtual std::basic_string - post_string () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct normalized_string_pskel: simple_content - { - virtual std::basic_string - post_normalized_string () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct token_pskel: simple_content - { - virtual std::basic_string - post_token () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct name_pskel: simple_content - { - virtual std::basic_string - post_name () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct nmtoken_pskel: simple_content - { - virtual std::basic_string - post_nmtoken () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct nmtokens_pskel: list_base - { - virtual string_sequence - post_nmtokens () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct ncname_pskel: simple_content - { - virtual std::basic_string - post_ncname () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct id_pskel: simple_content - { - virtual std::basic_string - post_id () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct idref_pskel: simple_content - { - virtual std::basic_string - post_idref () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct idrefs_pskel: list_base - { - virtual string_sequence - post_idrefs () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - // Language. - // - template - struct language_pskel: simple_content - { - virtual std::basic_string - post_language () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - // URI. - // - template - struct uri_pskel: simple_content - { - virtual std::basic_string - post_uri () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - // QName. - // - template - struct qname_pskel: simple_content - { - virtual qname - post_qname () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - // Base64 and hex binaries. - // - template - struct base64_binary_pskel: simple_content - { - virtual XSD_AUTO_PTR - post_base64_binary () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct hex_binary_pskel: simple_content - { - virtual XSD_AUTO_PTR - post_hex_binary () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - // Time and date types. - // - template - struct gday_pskel: simple_content - { - virtual gday - post_gday () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct gmonth_pskel: simple_content - { - virtual gmonth - post_gmonth () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct gyear_pskel: simple_content - { - virtual gyear - post_gyear () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct gmonth_day_pskel: simple_content - { - virtual gmonth_day - post_gmonth_day () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct gyear_month_pskel: simple_content - { - virtual gyear_month - post_gyear_month () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct date_pskel: simple_content - { - virtual date - post_date () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct time_pskel: simple_content - { - virtual time - post_time () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct date_time_pskel: simple_content - { - virtual date_time - post_date_time () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - - template - struct duration_pskel: simple_content - { - virtual duration - post_duration () = 0; - - static const C* - _static_type (); - - virtual const C* - _dynamic_type () const; - }; - } - } - } -} - -#include - -#endif // XSD_CXX_PARSER_VALIDATING_XML_SCHEMA_PSKEL_HXX - -#include diff --git a/libxsd/xsd/cxx/parser/validating/xml-schema-pskel.ixx b/libxsd/xsd/cxx/parser/validating/xml-schema-pskel.ixx deleted file mode 100644 index b6da227..0000000 --- a/libxsd/xsd/cxx/parser/validating/xml-schema-pskel.ixx +++ /dev/null @@ -1,1248 +0,0 @@ -// file : xsd/cxx/parser/validating/xml-schema-pskel.ixx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#if defined(XSD_CXX_PARSER_USE_CHAR) || !defined(XSD_CXX_PARSER_USE_WCHAR) - -#ifndef XSD_CXX_PARSER_VALIDATING_XML_SCHEMA_PSKEL_IXX_CHAR -#define XSD_CXX_PARSER_VALIDATING_XML_SCHEMA_PSKEL_IXX_CHAR - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace validating - { - template<> - inline const char* any_type_pskel:: - _static_type () - { - return "anyType http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* any_type_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* any_simple_type_pskel:: - _static_type () - { - return "anySimpleType http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* any_simple_type_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* boolean_pskel:: - _static_type () - { - return "boolean http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* boolean_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* byte_pskel:: - _static_type () - { - return "byte http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* byte_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* unsigned_byte_pskel:: - _static_type () - { - return "unsignedByte http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* unsigned_byte_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* short_pskel:: - _static_type () - { - return "short http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* short_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* unsigned_short_pskel:: - _static_type () - { - return "unsignedShort http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* unsigned_short_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* int_pskel:: - _static_type () - { - return "int http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* int_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* unsigned_int_pskel:: - _static_type () - { - return "unsignedInt http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* unsigned_int_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* long_pskel:: - _static_type () - { - return "long http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* long_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* unsigned_long_pskel:: - _static_type () - { - return "unsignedLong http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* unsigned_long_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* integer_pskel:: - _static_type () - { - return "integer http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* integer_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* negative_integer_pskel:: - _static_type () - { - return "negativeInteger http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* negative_integer_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* non_positive_integer_pskel:: - _static_type () - { - return "nonPositiveInteger http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* non_positive_integer_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* positive_integer_pskel:: - _static_type () - { - return "positiveInteger http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* positive_integer_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* non_negative_integer_pskel:: - _static_type () - { - return "nonNegativeInteger http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* non_negative_integer_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* float_pskel:: - _static_type () - { - return "float http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* float_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* double_pskel:: - _static_type () - { - return "double http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* double_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* decimal_pskel:: - _static_type () - { - return "decimal http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* decimal_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* string_pskel:: - _static_type () - { - return "string http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* string_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* normalized_string_pskel:: - _static_type () - { - return "normalizedString http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* normalized_string_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* token_pskel:: - _static_type () - { - return "token http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* token_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* name_pskel:: - _static_type () - { - return "Name http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* name_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* nmtoken_pskel:: - _static_type () - { - return "NMTOKEN http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* nmtoken_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* nmtokens_pskel:: - _static_type () - { - return "NMTOKENS http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* nmtokens_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* ncname_pskel:: - _static_type () - { - return "NCName http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* ncname_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* id_pskel:: - _static_type () - { - return "ID http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* id_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* idref_pskel:: - _static_type () - { - return "IDREF http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* idref_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* idrefs_pskel:: - _static_type () - { - return "IDREFS http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* idrefs_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* language_pskel:: - _static_type () - { - return "language http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* language_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* uri_pskel:: - _static_type () - { - return "anyURI http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* uri_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* qname_pskel:: - _static_type () - { - return "QName http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* qname_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* base64_binary_pskel:: - _static_type () - { - return "base64Binary http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* base64_binary_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* hex_binary_pskel:: - _static_type () - { - return "hexBinary http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* hex_binary_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* gday_pskel:: - _static_type () - { - return "gDay http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* gday_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* gmonth_pskel:: - _static_type () - { - return "gMonth http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* gmonth_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* gyear_pskel:: - _static_type () - { - return "gYear http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* gyear_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* gmonth_day_pskel:: - _static_type () - { - return "gMonthDay http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* gmonth_day_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* gyear_month_pskel:: - _static_type () - { - return "gYearMonth http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* gyear_month_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* date_pskel:: - _static_type () - { - return "date http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* date_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* time_pskel:: - _static_type () - { - return "time http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* time_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* date_time_pskel:: - _static_type () - { - return "dateTime http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* date_time_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const char* duration_pskel:: - _static_type () - { - return "duration http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const char* duration_pskel:: - _dynamic_type () const - { - return _static_type (); - } - } - } - } -} - -#endif // XSD_CXX_PARSER_VALIDATING_XML_SCHEMA_PSKEL_IXX_CHAR -#endif // XSD_CXX_PARSER_USE_CHAR - - -#if defined(XSD_CXX_PARSER_USE_WCHAR) || !defined(XSD_CXX_PARSER_USE_CHAR) - -#ifndef XSD_CXX_PARSER_VALIDATING_XML_SCHEMA_PSKEL_IXX_WCHAR -#define XSD_CXX_PARSER_VALIDATING_XML_SCHEMA_PSKEL_IXX_WCHAR - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace validating - { - template<> - inline const wchar_t* any_type_pskel:: - _static_type () - { - return L"anyType http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* any_type_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* any_simple_type_pskel:: - _static_type () - { - return L"anySimpleType http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* any_simple_type_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* boolean_pskel:: - _static_type () - { - return L"boolean http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* boolean_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* byte_pskel:: - _static_type () - { - return L"byte http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* byte_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* unsigned_byte_pskel:: - _static_type () - { - return L"unsignedByte http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* unsigned_byte_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* short_pskel:: - _static_type () - { - return L"short http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* short_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* unsigned_short_pskel:: - _static_type () - { - return L"unsignedShort http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* unsigned_short_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* int_pskel:: - _static_type () - { - return L"int http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* int_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* unsigned_int_pskel:: - _static_type () - { - return L"unsignedInt http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* unsigned_int_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* long_pskel:: - _static_type () - { - return L"long http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* long_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* unsigned_long_pskel:: - _static_type () - { - return L"unsignedLong http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* unsigned_long_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* integer_pskel:: - _static_type () - { - return L"integer http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* integer_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* negative_integer_pskel:: - _static_type () - { - return L"negativeInteger http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* negative_integer_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* non_positive_integer_pskel:: - _static_type () - { - return L"nonPositiveInteger http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* non_positive_integer_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* positive_integer_pskel:: - _static_type () - { - return L"positiveInteger http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* positive_integer_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* non_negative_integer_pskel:: - _static_type () - { - return L"nonNegativeInteger http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* non_negative_integer_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* float_pskel:: - _static_type () - { - return L"float http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* float_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* double_pskel:: - _static_type () - { - return L"double http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* double_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* decimal_pskel:: - _static_type () - { - return L"decimal http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* decimal_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* string_pskel:: - _static_type () - { - return L"string http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* string_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* normalized_string_pskel:: - _static_type () - { - return L"normalizedString http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* normalized_string_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* token_pskel:: - _static_type () - { - return L"token http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* token_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* name_pskel:: - _static_type () - { - return L"Name http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* name_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* nmtoken_pskel:: - _static_type () - { - return L"NMTOKEN http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* nmtoken_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* nmtokens_pskel:: - _static_type () - { - return L"NMTOKENS http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* nmtokens_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* ncname_pskel:: - _static_type () - { - return L"NCName http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* ncname_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* id_pskel:: - _static_type () - { - return L"ID http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* id_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* idref_pskel:: - _static_type () - { - return L"IDREF http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* idref_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* idrefs_pskel:: - _static_type () - { - return L"IDREFS http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* idrefs_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* language_pskel:: - _static_type () - { - return L"language http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* language_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* uri_pskel:: - _static_type () - { - return L"anyURI http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* uri_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* qname_pskel:: - _static_type () - { - return L"QName http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* qname_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* base64_binary_pskel:: - _static_type () - { - return L"base64Binary http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* base64_binary_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* hex_binary_pskel:: - _static_type () - { - return L"hexBinary http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* hex_binary_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* gday_pskel:: - _static_type () - { - return L"gDay http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* gday_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* gmonth_pskel:: - _static_type () - { - return L"gMonth http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* gmonth_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* gyear_pskel:: - _static_type () - { - return L"gYear http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* gyear_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* gmonth_day_pskel:: - _static_type () - { - return L"gMonthDay http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* gmonth_day_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* gyear_month_pskel:: - _static_type () - { - return L"gYearMonth http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* gyear_month_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* date_pskel:: - _static_type () - { - return L"date http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* date_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* time_pskel:: - _static_type () - { - return L"time http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* time_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* date_time_pskel:: - _static_type () - { - return L"dateTime http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* date_time_pskel:: - _dynamic_type () const - { - return _static_type (); - } - - template<> - inline const wchar_t* duration_pskel:: - _static_type () - { - return L"duration http://www.w3.org/2001/XMLSchema"; - } - - template<> - inline const wchar_t* duration_pskel:: - _dynamic_type () const - { - return _static_type (); - } - } - } - } -} - -#endif // XSD_CXX_PARSER_VALIDATING_XML_SCHEMA_PSKEL_IXX_WCHAR -#endif // XSD_CXX_PARSER_USE_WCHAR diff --git a/libxsd/xsd/cxx/parser/validating/xml-schema-pskel.txx b/libxsd/xsd/cxx/parser/validating/xml-schema-pskel.txx deleted file mode 100644 index 49d53c5..0000000 --- a/libxsd/xsd/cxx/parser/validating/xml-schema-pskel.txx +++ /dev/null @@ -1,68 +0,0 @@ -// file : xsd/cxx/parser/validating/xml-schema-pskel.txx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace validating - { - // any_type - // - - template - bool any_type_pskel:: - _start_element_impl (const ro_string& ns, - const ro_string& name, - const ro_string* type) - { - this->_start_any_element (ns, name, type); - this->complex_content::context_.top ().any_ = true; - return true; - } - - template - bool any_type_pskel:: - _end_element_impl (const ro_string& ns, const ro_string& name) - { - this->complex_content::context_.top ().any_ = false; - this->_end_any_element (ns, name); - return true; - } - - - template - bool any_type_pskel:: - _attribute_impl_phase_two (const ro_string& ns, - const ro_string& name, - const ro_string& value) - { - this->_any_attribute (ns, name, value); - return true; - } - - template - bool any_type_pskel:: - _characters_impl (const ro_string& s) - { - this->_any_characters (s); - return true; - } - - // any_simple_type - // - - template - bool any_simple_type_pskel:: - _characters_impl (const ro_string& s) - { - this->_any_characters (s); - return true; - } - } - } - } -} diff --git a/libxsd/xsd/cxx/parser/xerces/elements.hxx b/libxsd/xsd/cxx/parser/xerces/elements.hxx deleted file mode 100644 index da493f9..0000000 --- a/libxsd/xsd/cxx/parser/xerces/elements.hxx +++ /dev/null @@ -1,464 +0,0 @@ -// file : xsd/cxx/parser/xerces/elements.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_PARSER_XERCES_ELEMENTS_HXX -#define XSD_CXX_PARSER_XERCES_ELEMENTS_HXX - -#include // std::auto_ptr/unique_ptr -#include -#include -#include - -#include -#include -#include -#include - -#include - -#include // XSD_AUTO_PTR - -#include -#include - -#include -#include -#include - -#if _XERCES_VERSION < 30000 -# error Xerces-C++ 2-series is not supported -#endif - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace xerces - { - // - // - struct flags - { - // Use the following flags to modify the default behavior - // of the parsing functions. - // - - // Do not try to validate instance documents. - // - static const unsigned long dont_validate = 0x00000001; - - // Do not initialize the Xerces-C++ runtime. - // - static const unsigned long dont_initialize = 0x00000002; - - // Disable handling of subsequent imports for the same namespace - // in Xerces-C++ 3.1.0 and later. - // - static const unsigned long no_multiple_imports = 0x00000004; - - public: - flags (unsigned long x = 0) - : x_ (x) - { - } - - operator unsigned long () const - { - return x_; - } - - private: - unsigned long x_; - }; - - - // Parsing properties. Refer to xsd/cxx/xml/elements.hxx for - // XML-related properties. - // - template - class properties: public xml::properties - { - }; - - // - // - template - struct document: cxx::parser::document // VC likes it qualified - { - public: - document (parser_base& root, - const C* root_element_name, - bool polymorphic = false); - - document (parser_base& root, - const std::basic_string& root_element_name, - bool polymorphic = false); - - document (parser_base& root, - const C* root_element_namespace, - const C* root_element_name, - bool polymorphic = false); - - document (parser_base& root, - const std::basic_string& root_element_namespace, - const std::basic_string& root_element_name, - bool polymorphic = false); - - protected: - explicit - document (bool polymorphic = false); - - public: - // Parse URI or a local file. We have to overload it for const C* - // bacause xercesc::InputSource has an implicit constructor that - // takes const char*. - // - void - parse (const std::basic_string& uri, - flags = 0, - const properties& = properties ()); - - void - parse (const C* uri, - flags = 0, - const properties& = properties ()); - - - // Parse URI or a local file with a user-provided error_handler - // object. - // - void - parse (const std::basic_string& uri, - xml::error_handler&, - flags = 0, - const properties& = properties ()); - - void - parse (const C* uri, - xml::error_handler&, - flags = 0, - const properties& = properties ()); - - - // Parse URI or a local file with a user-provided ErrorHandler - // object. Note that you must initialize the Xerces-C++ runtime - // before calling these functions. - // - void - parse (const std::basic_string& uri, - xercesc::ErrorHandler&, - flags = 0, - const properties& = properties ()); - - void - parse (const C* uri, - xercesc::ErrorHandler&, - flags = 0, - const properties& = properties ()); - - - // Parse URI or a local file using a user-provided SAX2XMLReader - // object. Note that you must initialize the Xerces-C++ runtime - // before calling these functions. - // - void - parse (const std::basic_string& uri, - xercesc::SAX2XMLReader&, - flags = 0, - const properties& = properties ()); - - void - parse (const C* uri, - xercesc::SAX2XMLReader&, - flags = 0, - const properties& = properties ()); - - - public: - // System id is a "system" identifier of the resources (e.g., - // URI or a full file path). Public id is a "public" identifier - // of the resource (e.g., an application-specific name or a - // relative file path). System id is used to resolve relative - // paths. In diagnostics messages system id is used if public - // id is not available. Otherwise public id is used. - // - - // Parse std::istream. - // - void - parse (std::istream&, - flags = 0, - const properties& = properties ()); - - - // Parse std::istream with a user-provided error_handler object. - // - void - parse (std::istream&, - xml::error_handler&, - flags = 0, - const properties& = properties ()); - - - // Parse std::istream with a user-provided ErrorHandler object. - // Note that you must initialize the Xerces-C++ runtime before - // calling this function. - // - void - parse (std::istream&, - xercesc::ErrorHandler&, - flags = 0, - const properties& = properties ()); - - - // Parse std::istream using a user-provided SAX2XMLReader object. - // Note that you must initialize the Xerces-C++ runtime before - // calling this function. - // - void - parse (std::istream&, - xercesc::SAX2XMLReader&, - flags = 0, - const properties& = properties ()); - - - public: - // Parse std::istream with a system id. - // - void - parse (std::istream&, - const std::basic_string& system_id, - flags = 0, - const properties& = properties ()); - - - // Parse std::istream with a system id and a user-provided - // error_handler object. - // - void - parse (std::istream&, - const std::basic_string& system_id, - xml::error_handler&, - flags = 0, - const properties& = properties ()); - - - // Parse std::istream with a system id and a user-provided - // ErrorHandler object. Note that you must initialize the - // Xerces-C++ runtime before calling this function. - // - void - parse (std::istream&, - const std::basic_string& system_id, - xercesc::ErrorHandler&, - flags = 0, - const properties& = properties ()); - - - // Parse std::istream with a system id using a user-provided - // SAX2XMLReader object. Note that you must initialize the - // Xerces-C++ runtime before calling this function. - // - void - parse (std::istream&, - const std::basic_string& system_id, - xercesc::SAX2XMLReader&, - flags = 0, - const properties& = properties ()); - - - - public: - // Parse std::istream with system and public ids. - // - void - parse (std::istream&, - const std::basic_string& system_id, - const std::basic_string& public_id, - flags = 0, - const properties& = properties ()); - - - // Parse std::istream with system and public ids and a user-provided - // error_handler object. - // - void - parse (std::istream&, - const std::basic_string& system_id, - const std::basic_string& public_id, - xml::error_handler&, - flags = 0, - const properties& = properties ()); - - - // Parse std::istream with system and public ids and a user-provided - // ErrorHandler object. Note that you must initialize the Xerces-C++ - // runtime before calling this function. - // - void - parse (std::istream&, - const std::basic_string& system_id, - const std::basic_string& public_id, - xercesc::ErrorHandler&, - flags = 0, - const properties& = properties ()); - - - // Parse std::istream with system and public ids using a user- - // provided SAX2XMLReader object. Note that you must initialize - // the Xerces-C++ runtime before calling this function. - // - void - parse (std::istream&, - const std::basic_string& system_id, - const std::basic_string& public_id, - xercesc::SAX2XMLReader&, - flags = 0, - const properties& = properties ()); - - - public: - // Parse InputSource. Note that you must initialize the Xerces-C++ - // runtime before calling this function. - // - void - parse (const xercesc::InputSource&, - flags = 0, - const properties& = properties ()); - - - // Parse InputSource with a user-provided error_handler object. - // Note that you must initialize the Xerces-C++ runtime before - // calling this function. - // - void - parse (const xercesc::InputSource&, - xml::error_handler&, - flags = 0, - const properties& = properties ()); - - - // Parse InputSource with a user-provided ErrorHandler object. - // Note that you must initialize the Xerces-C++ runtime before - // calling this function. - // - void - parse (const xercesc::InputSource&, - xercesc::ErrorHandler&, - flags = 0, - const properties& = properties ()); - - - // Parse InputSource using a user-provided SAX2XMLReader object. - // Note that you must initialize the Xerces-C++ runtime before - // calling this function. - // - void - parse (const xercesc::InputSource&, - xercesc::SAX2XMLReader&, - flags = 0, - const properties& = properties ()); - - private: - void - parse (const std::basic_string& uri, - xercesc::ErrorHandler&, - xercesc::SAX2XMLReader&, - flags, - const properties&); - - void - parse (const xercesc::InputSource&, - xercesc::ErrorHandler&, - xercesc::SAX2XMLReader&, - flags, - const properties&); - - private: - XSD_AUTO_PTR - create_sax_ (flags, const properties&); - - private: - bool polymorphic_; - }; - - // - // - template - struct event_router: xercesc::DefaultHandler - { - event_router (cxx::parser::document&, bool polymorphic); - - // I know, some of those consts are stupid. But that's what - // Xerces folks put into their interfaces and VC thinks there - // are different signatures if one strips this fluff off. - // - virtual void - setDocumentLocator (const xercesc::Locator* const); - - virtual void - startElement (const XMLCh* const uri, - const XMLCh* const lname, - const XMLCh* const qname, - const xercesc::Attributes& attributes); - - virtual void - endElement (const XMLCh* const uri, - const XMLCh* const lname, - const XMLCh* const qname); - - virtual void - characters (const XMLCh* const s, const XMLSize_t length); - - virtual void - startPrefixMapping (const XMLCh* const prefix, - const XMLCh* const uri); - - virtual void - endPrefixMapping (const XMLCh* const prefix); - - private: - void - set_location (schema_exception&); - - private: - const xercesc::Locator* loc_; - cxx::parser::document& consumer_; - bool polymorphic_; - - // Last element name cache. - // - bool last_valid_; - std::basic_string last_ns_; - std::basic_string last_name_; - - // Namespace-prefix mapping. Only maintained in the polymorphic - // case. - // - struct ns_decl - { - ns_decl (const std::basic_string& p, - const std::basic_string& n) - : prefix (p), ns (n) - { - } - - std::basic_string prefix; - std::basic_string ns; - }; - - typedef std::vector ns_decls; - - ns_decls ns_decls_; - }; - } - } - } -} - -#include - -#endif // XSD_CXX_PARSER_XERCES_ELEMENTS_HXX diff --git a/libxsd/xsd/cxx/parser/xerces/elements.txx b/libxsd/xsd/cxx/parser/xerces/elements.txx deleted file mode 100644 index f41b074..0000000 --- a/libxsd/xsd/cxx/parser/xerces/elements.txx +++ /dev/null @@ -1,948 +0,0 @@ -// file : xsd/cxx/parser/xerces/elements.txx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#include -#include // std::size_t -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include // xml::bits::{xml_prefix, etc} - -#include -#include - -namespace xsd -{ - namespace cxx - { - namespace parser - { - namespace xerces - { - - // document - // - - template - document:: - document (parser_base& parser, - const C* name, - bool polymorphic) - : cxx::parser::document (parser, std::basic_string (), name), - polymorphic_ (polymorphic) - { - } - - template - document:: - document (parser_base& parser, - const std::basic_string& name, - bool polymorphic) - : cxx::parser::document (parser, std::basic_string (), name), - polymorphic_ (polymorphic) - { - } - - template - document:: - document (parser_base& parser, - const C* ns, - const C* name, - bool polymorphic) - : cxx::parser::document (parser, ns, name), - polymorphic_ (polymorphic) - { - } - - template - document:: - document (parser_base& parser, - const std::basic_string& ns, - const std::basic_string& name, - bool polymorphic) - : cxx::parser::document (parser, ns, name), - polymorphic_ (polymorphic) - { - } - - template - document:: - document (bool polymorphic) - : polymorphic_ (polymorphic) - { - } - - // parse (uri) - // - template - void document:: - parse (const std::basic_string& uri, - flags f, - const properties& p) - { - xml::auto_initializer init ((f & flags::dont_initialize) == 0); - - error_handler eh; - xml::sax::bits::error_handler_proxy eh_proxy (eh); - XSD_AUTO_PTR sax (create_sax_ (f, p)); - - parse (uri, eh_proxy, *sax, f, p); - - eh.throw_if_failed (); - } - - template - void document:: - parse (const C* uri, - flags f, - const properties& p) - { - parse (std::basic_string (uri), f, p); - } - - // error_handler - // - - template - void document:: - parse (const std::basic_string& uri, - xml::error_handler& eh, - flags f, - const properties& p) - { - xml::auto_initializer init ((f & flags::dont_initialize) == 0); - - xml::sax::bits::error_handler_proxy eh_proxy (eh); - XSD_AUTO_PTR sax (create_sax_ (f, p)); - - parse (uri, eh_proxy, *sax, f, p); - - if (eh_proxy.failed ()) - throw parsing (); - } - - template - void document:: - parse (const C* uri, - xml::error_handler& eh, - flags f, - const properties& p) - { - parse (std::basic_string (uri), eh, f, p); - } - - // ErrorHandler - // - - template - void document:: - parse (const std::basic_string& uri, - xercesc::ErrorHandler& eh, - flags f, - const properties& p) - { - xml::sax::bits::error_handler_proxy eh_proxy (eh); - XSD_AUTO_PTR sax (create_sax_ (f, p)); - - parse (uri, eh_proxy, *sax, f, p); - - if (eh_proxy.failed ()) - throw parsing (); - } - - template - void document:: - parse (const C* uri, - xercesc::ErrorHandler& eh, - flags f, - const properties& p) - { - parse (std::basic_string (uri), eh, f, p); - } - - // SAX2XMLReader - // - - template - void document:: - parse (const std::basic_string& uri, - xercesc::SAX2XMLReader& sax, - flags f, - const properties& p) - { - // If there is no error handler, then fall back on the default - // implementation. - // - xercesc::ErrorHandler* eh (sax.getErrorHandler ()); - - if (eh) - { - xml::sax::bits::error_handler_proxy eh_proxy (*eh); - - parse (uri, eh_proxy, sax, f, p); - - if (eh_proxy.failed ()) - throw parsing (); - } - else - { - error_handler fallback_eh; - xml::sax::bits::error_handler_proxy eh_proxy (fallback_eh); - - parse (uri, eh_proxy, sax, f, p); - - fallback_eh.throw_if_failed (); - } - } - - template - void document:: - parse (const C* uri, - xercesc::SAX2XMLReader& sax, - flags f, - const properties& p) - { - parse (std::basic_string (uri), sax, f, p); - } - - // parse (istream) - // - - template - void document:: - parse (std::istream& is, - flags f, - const properties& p) - { - xml::auto_initializer init ((f & flags::dont_initialize) == 0); - - xml::sax::std_input_source isrc (is); - - parse (isrc, f, p); - } - - template - void document:: - parse (std::istream& is, - xml::error_handler& eh, - flags f, - const properties& p) - { - xml::auto_initializer init ((f & flags::dont_initialize) == 0); - xml::sax::std_input_source isrc (is); - parse (isrc, eh, f, p); - } - - template - void document:: - parse (std::istream& is, - xercesc::ErrorHandler& eh, - flags f, - const properties& p) - { - xml::sax::std_input_source isrc (is); - parse (isrc, eh, f, p); - } - - template - void document:: - parse (std::istream& is, - xercesc::SAX2XMLReader& sax, - flags f, - const properties& p) - { - xml::sax::std_input_source isrc (is); - parse (isrc, sax, f, p); - } - - - // parse (istream, system_id) - // - - - template - void document:: - parse (std::istream& is, - const std::basic_string& system_id, - flags f, - const properties& p) - { - xml::auto_initializer init ((f & flags::dont_initialize) == 0); - xml::sax::std_input_source isrc (is, system_id); - parse (isrc, f, p); - } - - template - void document:: - parse (std::istream& is, - const std::basic_string& system_id, - xml::error_handler& eh, - flags f, - const properties& p) - { - xml::auto_initializer init ((f & flags::dont_initialize) == 0); - xml::sax::std_input_source isrc (is, system_id); - parse (isrc, eh, f, p); - } - - template - void document:: - parse (std::istream& is, - const std::basic_string& system_id, - xercesc::ErrorHandler& eh, - flags f, - const properties& p) - { - xml::sax::std_input_source isrc (is, system_id); - parse (isrc, eh, f, p); - } - - template - void document:: - parse (std::istream& is, - const std::basic_string& system_id, - xercesc::SAX2XMLReader& sax, - flags f, - const properties& p) - { - xml::sax::std_input_source isrc (is, system_id); - parse (isrc, sax, f, p); - } - - - // parse (istream, system_id, public_id) - // - - template - void document:: - parse (std::istream& is, - const std::basic_string& system_id, - const std::basic_string& public_id, - flags f, - const properties& p) - { - xml::auto_initializer init ((f & flags::dont_initialize) == 0); - xml::sax::std_input_source isrc (is, system_id, public_id); - parse (isrc, f, p); - } - - template - void document:: - parse (std::istream& is, - const std::basic_string& system_id, - const std::basic_string& public_id, - xml::error_handler& eh, - flags f, - const properties& p) - { - xml::auto_initializer init ((f & flags::dont_initialize) == 0); - xml::sax::std_input_source isrc (is, system_id, public_id); - parse (isrc, eh, f, p); - } - - template - void document:: - parse (std::istream& is, - const std::basic_string& system_id, - const std::basic_string& public_id, - xercesc::ErrorHandler& eh, - flags f, - const properties& p) - { - xml::sax::std_input_source isrc (is, system_id, public_id); - parse (isrc, eh, f, p); - } - - template - void document:: - parse (std::istream& is, - const std::basic_string& system_id, - const std::basic_string& public_id, - xercesc::SAX2XMLReader& sax, - flags f, - const properties& p) - { - xml::sax::std_input_source isrc (is, system_id, public_id); - parse (isrc, sax, f, p); - } - - - // parse (InputSource) - // - - - template - void document:: - parse (const xercesc::InputSource& is, - flags f, - const properties& p) - { - error_handler eh; - xml::sax::bits::error_handler_proxy eh_proxy (eh); - XSD_AUTO_PTR sax (create_sax_ (f, p)); - - parse (is, eh_proxy, *sax, f, p); - - eh.throw_if_failed (); - } - - template - void document:: - parse (const xercesc::InputSource& is, - xml::error_handler& eh, - flags f, - const properties& p) - { - xml::sax::bits::error_handler_proxy eh_proxy (eh); - XSD_AUTO_PTR sax (create_sax_ (f, p)); - - parse (is, eh_proxy, *sax, f, p); - - if (eh_proxy.failed ()) - throw parsing (); - } - - template - void document:: - parse (const xercesc::InputSource& is, - xercesc::ErrorHandler& eh, - flags f, - const properties& p) - { - xml::sax::bits::error_handler_proxy eh_proxy (eh); - XSD_AUTO_PTR sax (create_sax_ (f, p)); - - parse (is, eh_proxy, *sax, f, p); - - if (eh_proxy.failed ()) - throw parsing (); - } - - - template - void document:: - parse (const xercesc::InputSource& is, - xercesc::SAX2XMLReader& sax, - flags f, - const properties& p) - { - // If there is no error handler, then fall back on the default - // implementation. - // - xercesc::ErrorHandler* eh (sax.getErrorHandler ()); - - if (eh) - { - xml::sax::bits::error_handler_proxy eh_proxy (*eh); - - parse (is, eh_proxy, sax, f, p); - - if (eh_proxy.failed ()) - throw parsing (); - } - else - { - error_handler fallback_eh; - xml::sax::bits::error_handler_proxy eh_proxy (fallback_eh); - - parse (is, eh_proxy, sax, f, p); - - fallback_eh.throw_if_failed (); - } - } - - namespace Bits - { - struct ErrorHandlingController - { - ErrorHandlingController (xercesc::SAX2XMLReader& sax, - xercesc::ErrorHandler& eh) - : sax_ (sax), eh_ (sax_.getErrorHandler ()) - { - sax_.setErrorHandler (&eh); - } - - ~ErrorHandlingController () - { - sax_.setErrorHandler (eh_); - } - - private: - xercesc::SAX2XMLReader& sax_; - xercesc::ErrorHandler* eh_; - }; - - struct ContentHandlingController - { - ContentHandlingController (xercesc::SAX2XMLReader& sax, - xercesc::ContentHandler& ch) - : sax_ (sax), ch_ (sax_.getContentHandler ()) - { - sax_.setContentHandler (&ch); - } - - ~ContentHandlingController () - { - sax_.setContentHandler (ch_); - } - - private: - xercesc::SAX2XMLReader& sax_; - xercesc::ContentHandler* ch_; - }; - }; - - template - void document:: - parse (const std::basic_string& uri, - xercesc::ErrorHandler& eh, - xercesc::SAX2XMLReader& sax, - flags, - const properties&) - { - event_router router (*this, polymorphic_); - - Bits::ErrorHandlingController ehc (sax, eh); - Bits::ContentHandlingController chc (sax, router); - - try - { - sax.parse (xml::string (uri).c_str ()); - } - catch (const schema_exception& e) - { - xml::string id (e.id ()); - - xercesc::SAXParseException se ( - xml::string (e.message ()).c_str (), - id.c_str (), - id.c_str (), - static_cast (e.line ()), - static_cast (e.column ())); - - eh.fatalError (se); - } - } - - template - void document:: - parse (const xercesc::InputSource& is, - xercesc::ErrorHandler& eh, - xercesc::SAX2XMLReader& sax, - flags, - const properties&) - { - event_router router (*this, polymorphic_); - - Bits::ErrorHandlingController controller (sax, eh); - Bits::ContentHandlingController chc (sax, router); - - try - { - sax.parse (is); - } - catch (const schema_exception& e) - { - xml::string id (e.id ()); - - xercesc::SAXParseException se ( - xml::string (e.message ()).c_str (), - id.c_str (), - id.c_str (), - static_cast (e.line ()), - static_cast (e.column ())); - - eh.fatalError (se); - } - } - - - template - XSD_AUTO_PTR document:: - create_sax_ (flags f, const properties& p) - { - using namespace xercesc; - - XSD_AUTO_PTR sax ( - XMLReaderFactory::createXMLReader ()); - - sax->setFeature (XMLUni::fgSAX2CoreNameSpaces, true); - sax->setFeature (XMLUni::fgSAX2CoreNameSpacePrefixes, true); - sax->setFeature (XMLUni::fgXercesValidationErrorAsFatal, true); - - if (f & flags::dont_validate) - { - sax->setFeature (XMLUni::fgSAX2CoreValidation, false); - sax->setFeature (XMLUni::fgXercesSchema, false); - sax->setFeature (XMLUni::fgXercesSchemaFullChecking, false); - } - else - { - sax->setFeature (XMLUni::fgSAX2CoreValidation, true); - sax->setFeature (XMLUni::fgXercesSchema, true); - - // Xerces-C++ 3.1.0 is the first version with working multi import - // support. - // -#if _XERCES_VERSION >= 30100 - if (!(f & flags::no_multiple_imports)) - sax->setFeature (XMLUni::fgXercesHandleMultipleImports, true); -#endif - // This feature checks the schema grammar for additional - // errors. We most likely do not need it when validating - // instances (assuming the schema is valid). - // - sax->setFeature (XMLUni::fgXercesSchemaFullChecking, false); - } - - // Transfer properies if any. - // - - if (!p.schema_location ().empty ()) - { - xml::string sl (p.schema_location ()); - const void* v (sl.c_str ()); - - sax->setProperty ( - XMLUni::fgXercesSchemaExternalSchemaLocation, - const_cast (v)); - } - - if (!p.no_namespace_schema_location ().empty ()) - { - xml::string sl (p.no_namespace_schema_location ()); - const void* v (sl.c_str ()); - - sax->setProperty ( - XMLUni::fgXercesSchemaExternalNoNameSpaceSchemaLocation, - const_cast (v)); - } - - return sax; - } - - // event_router - // - template - event_router:: - event_router (cxx::parser::document& consumer, bool polymorphic) - : loc_ (0), consumer_ (consumer), polymorphic_ (polymorphic) - { - } - - template - void event_router:: - setDocumentLocator (const xercesc::Locator* const loc) - { - loc_ = loc; - } - - template - void event_router:: - startElement(const XMLCh* const uri, - const XMLCh* const lname, - const XMLCh* const /*qname*/, - const xercesc::Attributes& attributes) - { - using xercesc::XMLUni; - using xercesc::XMLString; - - typedef std::basic_string string; - - { - last_valid_ = true; - last_ns_ = xml::transcode (uri); - last_name_ = xml::transcode (lname); - - // Without this explicit construction IBM XL C++ complains - // about ro_string's copy ctor being private even though the - // temporary has been eliminated. Note that we cannot - // eliminate ns, name and value since ro_string does not make - // a copy. - // - ro_string ro_ns (last_ns_); - ro_string ro_name (last_name_); - - if (!polymorphic_) - { - try - { - consumer_.start_element (ro_ns, ro_name, 0); - } - catch (schema_exception& e) - { - set_location (e); - throw; - } - } - else - { - // Search for the xsi:type attribute. - // - int i (attributes.getIndex ( - xercesc::SchemaSymbols::fgURI_XSI, - xercesc::SchemaSymbols::fgXSI_TYPE)); - - if (i == -1) - { - try - { - consumer_.start_element (ro_ns, ro_name, 0); - } - catch (schema_exception& e) - { - set_location (e); - throw; - } - } - else - { - try - { - // @@ Probably need proper QName validation. - // - // Get the qualified type name and try to resolve it. - // - string qn (xml::transcode (attributes.getValue (i))); - - ro_string tp, tn; - typename string::size_type pos (qn.find (C (':'))); - - if (pos != string::npos) - { - tp.assign (qn.c_str (), pos); - tn.assign (qn.c_str () + pos + 1); - - if (tp.empty ()) - throw dynamic_type (qn); - } - else - tn.assign (qn); - - if (tn.empty ()) - throw dynamic_type (qn); - - // Search our namespace declaration stack. Sun CC 5.7 - // blows if we use const_reverse_iterator. - // - ro_string tns; - for (typename ns_decls::reverse_iterator - it (ns_decls_.rbegin ()), e (ns_decls_.rend ()); - it != e; ++it) - { - if (it->prefix == tp) - { - tns.assign (it->ns); - break; - } - } - - if (!tp.empty () && tns.empty ()) - { - // The 'xml' prefix requires special handling. - // - if (tp == xml::bits::xml_prefix ()) - tns.assign (xml::bits::xml_namespace ()); - else - throw dynamic_type (qn); - } - - // Construct the compound type id. - // - string id (tn.data (), tn.size ()); - - if (!tns.empty ()) - { - id += C (' '); - id.append (tns.data (), tns.size ()); - } - - ro_string ro_id (id); - consumer_.start_element (ro_ns, ro_name, &ro_id); - } - catch (schema_exception& e) - { - set_location (e); - throw; - } - } - } - } - - for (XMLSize_t i (0), end (attributes.getLength()); i < end; ++i) - { - const XMLCh* xns (attributes.getURI (i)); - - // When SAX2 reports the xmlns attribute, it does not include - // the proper attribute namespace. So we have to detect and - // rectify this case. - // - if (XMLString::equals (attributes.getQName (i), - XMLUni::fgXMLNSString)) - xns = XMLUni::fgXMLNSURIName; - - string ns (xml::transcode (xns)); - string name (xml::transcode (attributes.getLocalName (i))); - string value (xml::transcode (attributes.getValue (i))); - - // Without this explicit construction IBM XL C++ complains - // about ro_string's copy ctor being private even though the - // temporary has been eliminated. Note that we cannot - // eliminate ns, name and value since ro_string does not make - // a copy. - // - ro_string ro_ns (ns); - ro_string ro_name (name); - ro_string ro_value (value); - - try - { - consumer_.attribute (ro_ns, ro_name, ro_value); - } - catch (schema_exception& e) - { - set_location (e); - throw; - } - } - } - - template - void event_router:: - endElement(const XMLCh* const uri, - const XMLCh* const lname, - const XMLCh* const /*qname*/) - { - typedef std::basic_string string; - - try - { - // Without this explicit construction IBM XL C++ complains - // about ro_string's copy ctor being private even though the - // temporary has been eliminated. Note that we cannot - // eliminate ns, name and value since ro_string does not make - // a copy. - // - if (last_valid_) - { - last_valid_ = false; - ro_string ro_ns (last_ns_); - ro_string ro_name (last_name_); - - consumer_.end_element (ro_ns, ro_name); - } - else - { - string ns (xml::transcode (uri)); - string name (xml::transcode (lname)); - - ro_string ro_ns (ns); - ro_string ro_name (name); - - consumer_.end_element (ro_ns, ro_name); - } - } - catch (schema_exception& e) - { - set_location (e); - throw; - } - } - - template - void event_router:: - characters (const XMLCh* const s, const XMLSize_t n) - { - typedef std::basic_string string; - - if (n != 0) - { - string str (xml::transcode (s, n)); - - // Without this explicit construction IBM XL C++ complains - // about ro_string's copy ctor being private even though the - // temporary has been eliminated. Note that we cannot - // eliminate str since ro_string does not make a copy. - // - ro_string ro_str (str); - - try - { - consumer_.characters (ro_str); - } - catch (schema_exception& e) - { - set_location (e); - throw; - } - } - } - - template - void event_router:: - startPrefixMapping (const XMLCh* const prefix, - const XMLCh* const uri) - { - if (polymorphic_) - { - typedef std::basic_string string; - - string p (xml::transcode (prefix)); - string ns (xml::transcode (uri)); - - ns_decls_.push_back (ns_decl (p, ns)); - } - } - - template - void event_router:: - endPrefixMapping (const XMLCh* const prefix) - { - if (polymorphic_) - { - typedef std::basic_string string; - - string p (xml::transcode (prefix)); - - // Here we assume the prefixes are removed in the reverse - // order of them being added. This appears to how every - // sensible implementation works. - // - assert (ns_decls_.back ().prefix == p); - - ns_decls_.pop_back (); - } - } - - template - void event_router:: - set_location (schema_exception& e) - { - if (loc_ != 0) - { - const XMLCh* id (loc_->getPublicId ()); - - if (id == 0) - id = loc_->getSystemId (); - - if (id != 0) - e.id (xml::transcode (id)); - - e.line (static_cast (loc_->getLineNumber ())); - e.column (static_cast (loc_->getColumnNumber ())); - } - } - } - } - } -} diff --git a/libxsd/xsd/cxx/parser/xml-schema.hxx b/libxsd/xsd/cxx/parser/xml-schema.hxx deleted file mode 100644 index cc3dd5f..0000000 --- a/libxsd/xsd/cxx/parser/xml-schema.hxx +++ /dev/null @@ -1,571 +0,0 @@ -// file : xsd/cxx/parser/xml-schema.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_PARSER_XML_SCHEMA_HXX -#define XSD_CXX_PARSER_XML_SCHEMA_HXX - -#include -#include -#include // std::size_t - -namespace xsd -{ - namespace cxx - { - namespace parser - { - // String sequence. Used for the NMTOKENS and IDREFS types. - // - template - class string_sequence: public std::vector > - { - public: - typedef std::basic_string value_type; - typedef std::vector base; - typedef typename base::size_type size_type; - - string_sequence (); - - explicit - string_sequence (size_type n, const value_type& x = value_type ()); - - template - string_sequence (const I& begin, const I& end); - }; - - template - bool - operator== (const string_sequence&, const string_sequence&); - - template - bool - operator!= (const string_sequence&, const string_sequence&); - - - // QName - // - template - class qname - { - public: - explicit - qname (const std::basic_string& name); - - qname (const std::basic_string& prefix, - const std::basic_string& name); - - void - swap (qname&); - - const std::basic_string& - prefix () const; - - std::basic_string& - prefix (); - - void - prefix (const std::basic_string&); - - const std::basic_string& - name () const; - - std::basic_string& - name (); - - void - name (const std::basic_string&); - - private: - std::basic_string prefix_; - std::basic_string name_; - }; - - template - bool - operator== (const qname&, const qname&); - - template - bool - operator!= (const qname&, const qname&); - - - // Binary buffer. Used for the base64Binary and hexBinary types. - // - class buffer - { - public: - typedef std::size_t size_t; - - class bounds {}; // Out of bounds exception. - - public: - ~buffer (); - - explicit - buffer (size_t size = 0); - buffer (size_t size, size_t capacity); - buffer (const void* data, size_t size); - buffer (const void* data, size_t size, size_t capacity); - - // If the assume_ownership argument is true, the buffer will - // assume the ownership of the data and will release the memory - // by calling operator delete (). - // - buffer (void* data, - size_t size, - size_t capacity, - bool assume_ownership); - - buffer (const buffer&); - - public: - buffer& - operator= (const buffer&); - - public: - size_t - capacity () const; - - // Returns true if the underlying buffer has moved. - // - bool - capacity (size_t); - - public: - size_t - size () const; - - // Returns true if the underlying buffer has moved. - // - bool - size (size_t); - - public: - const char* - data () const; - - char* - data (); - - const char* - begin () const; - - char* - begin (); - - const char* - end () const; - - char* - end (); - - public: - void - swap (buffer&); - - private: - bool - capacity (size_t capacity, bool copy); - - private: - char* data_; - size_t size_; - size_t capacity_; - }; - - bool - operator== (const buffer&, const buffer&); - - bool - operator!= (const buffer&, const buffer&); - - - // Time and date types. - // - - class time_zone - { - public: - time_zone (); - time_zone (short hours, short minutes); - - // Returns true if time zone is specified. - // - bool - zone_present () const; - - // Resets the time zone to the 'not specified' state. - // - void - zone_reset (); - - short - zone_hours () const; - - void - zone_hours (short); - - short - zone_minutes () const; - - void - zone_minutes (short); - - private: - bool present_; - short hours_; - short minutes_; - }; - - bool - operator== (const time_zone&, const time_zone&); - - bool - operator!= (const time_zone&, const time_zone&); - - - class gday: public time_zone - { - public: - explicit - gday (unsigned short day); - gday (unsigned short day, short zone_hours, short zone_minutes); - - unsigned short - day () const; - - void - day (unsigned short); - - private: - unsigned short day_; - }; - - bool - operator== (const gday&, const gday&); - - bool - operator!= (const gday&, const gday&); - - - class gmonth: public time_zone - { - public: - explicit - gmonth (unsigned short month); - gmonth (unsigned short month, short zone_hours, short zone_minutes); - - unsigned short - month () const; - - void - month (unsigned short); - - private: - unsigned short month_; - }; - - bool - operator== (const gmonth&, const gmonth&); - - bool - operator!= (const gmonth&, const gmonth&); - - - class gyear: public time_zone - { - public: - explicit - gyear (int year); - gyear (int year, short zone_hours, short zone_minutes); - - int - year () const; - - void - year (int); - - private: - int year_; - }; - - bool - operator== (const gyear&, const gyear&); - - bool - operator!= (const gyear&, const gyear&); - - - class gmonth_day: public time_zone - { - public: - gmonth_day (unsigned short month, unsigned short day); - gmonth_day (unsigned short month, unsigned short day, - short zone_hours, short zone_minutes); - - unsigned short - month () const; - - void - month (unsigned short); - - unsigned short - day () const; - - void - day (unsigned short); - - private: - unsigned short month_; - unsigned short day_; - }; - - bool - operator== (const gmonth_day&, const gmonth_day&); - - bool - operator!= (const gmonth_day&, const gmonth_day&); - - - class gyear_month: public time_zone - { - public: - gyear_month (int year, unsigned short month); - gyear_month (int year, unsigned short month, - short zone_hours, short zone_minutes); - - int - year () const; - - void - year (int); - - unsigned short - month () const; - - void - month (unsigned short); - - private: - int year_; - unsigned short month_; - }; - - bool - operator== (const gyear_month&, const gyear_month&); - - bool - operator!= (const gyear_month&, const gyear_month&); - - - class date: public time_zone - { - public: - date (int year, unsigned short month, unsigned short day); - date (int year, unsigned short month, unsigned short day, - short zone_hours, short zone_minutes); - - int - year () const; - - void - year (int); - - unsigned short - month () const; - - void - month (unsigned short); - - unsigned short - day () const; - - void - day (unsigned short); - - private: - int year_; - unsigned short month_; - unsigned short day_; - }; - - bool - operator== (const date&, const date&); - - bool - operator!= (const date&, const date&); - - - class time: public time_zone - { - public: - time (unsigned short hours, unsigned short minutes, double seconds); - time (unsigned short hours, unsigned short minutes, double seconds, - short zone_hours, short zone_minutes); - - unsigned short - hours () const; - - void - hours (unsigned short); - - unsigned short - minutes () const; - - void - minutes (unsigned short); - - double - seconds () const; - - void - seconds (double); - - private: - unsigned short hours_; - unsigned short minutes_; - double seconds_; - }; - - bool - operator== (const time&, const time&); - - bool - operator!= (const time&, const time&); - - - class date_time: public time_zone - { - public: - date_time (int year, unsigned short month, unsigned short day, - unsigned short hours, unsigned short minutes, double seconds); - - date_time (int year, unsigned short month, unsigned short day, - unsigned short hours, unsigned short minutes, double seconds, - short zone_hours, short zone_minutes); - - int - year () const; - - void - year (int); - - unsigned short - month () const; - - void - month (unsigned short); - - unsigned short - day () const; - - void - day (unsigned short); - - unsigned short - hours () const; - - void - hours (unsigned short); - - unsigned short - minutes () const; - - void - minutes (unsigned short); - - double - seconds () const; - - void - seconds (double); - - private: - int year_; - unsigned short month_; - unsigned short day_; - unsigned short hours_; - unsigned short minutes_; - double seconds_; - }; - - bool - operator== (const date_time&, const date_time&); - - bool - operator!= (const date_time&, const date_time&); - - - class duration - { - public: - duration (bool negative, - unsigned int years, unsigned int months, unsigned int days, - unsigned int hours, unsigned int minutes, double seconds); - - bool - negative () const; - - void - negative (bool); - - unsigned int - years () const; - - void - years (unsigned int); - - unsigned int - months () const; - - void - months (unsigned int); - - unsigned int - days () const; - - void - days (unsigned int); - - unsigned int - hours () const; - - void - hours (unsigned int); - - unsigned int - minutes () const; - - void - minutes (unsigned int); - - double - seconds () const; - - void - seconds (double); - - private: - bool negative_; - unsigned int years_; - unsigned int months_; - unsigned int days_; - unsigned int hours_; - unsigned int minutes_; - double seconds_; - }; - - bool - operator== (const duration&, const duration&); - - bool - operator!= (const duration&, const duration&); - } - } -} - -#include -#include - -#endif // XSD_CXX_PARSER_XML_SCHEMA_HXX diff --git a/libxsd/xsd/cxx/parser/xml-schema.ixx b/libxsd/xsd/cxx/parser/xml-schema.ixx deleted file mode 100644 index 06ead34..0000000 --- a/libxsd/xsd/cxx/parser/xml-schema.ixx +++ /dev/null @@ -1,1021 +0,0 @@ -// file : xsd/cxx/parser/xml-schema.ixx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#include // operator new/delete -#include // std::memcpy, std::memcmp - -namespace xsd -{ - namespace cxx - { - namespace parser - { - // string_sequence - // - template - string_sequence:: - string_sequence () - { - } - - template - string_sequence:: - string_sequence (size_type n, const value_type& x) - : base (n, x) - { - } - - template - template - string_sequence:: - string_sequence (const I& begin, const I& end) - : base (begin, end) - { - } - - template - inline bool - operator!= (const string_sequence& a, const string_sequence& b) - { - return !(a == b); - } - - // qname - // - template - inline qname:: - qname (const std::basic_string& name) - : name_ (name) - { - } - - template - inline qname:: - qname (const std::basic_string& prefix, - const std::basic_string& name) - : prefix_ (prefix), name_ (name) - { - } - - template - void qname:: - swap (qname& x) - { - prefix_.swap (x.prefix_); - name_.swap (x.name_); - } - - template - inline const std::basic_string& qname:: - prefix () const - { - return prefix_; - } - - template - inline std::basic_string& qname:: - prefix () - { - return prefix_; - } - - template - inline void qname:: - prefix (const std::basic_string& prefix) - { - prefix_ = prefix; - } - - template - inline const std::basic_string& qname:: - name () const - { - return name_; - } - - template - inline std::basic_string& qname:: - name () - { - return name_; - } - - template - inline void qname:: - name (const std::basic_string& name) - { - name_ = name; - } - - template - inline bool - operator== (const qname& a, const qname& b) - { - return a.prefix () == b.prefix () && a.name () == b.name (); - } - - template - inline bool - operator!= (const qname& a, const qname& b) - { - return !(a == b); - } - - // buffer - // - inline buffer:: - ~buffer () - { - if (data_) - operator delete (data_); - } - - inline buffer:: - buffer (size_t size) - : data_ (0), size_ (0), capacity_ (0) - { - capacity (size); - size_ = size; - } - - inline buffer:: - buffer (size_t size, size_t cap) - : data_ (0), size_ (0), capacity_ (0) - { - if (size > cap) - throw bounds (); - - capacity (cap); - size_ = size; - } - - inline buffer:: - buffer (const void* data, size_t size) - : data_ (0), size_ (0), capacity_ (0) - { - capacity (size); - size_ = size; - - if (size_) - std::memcpy (data_, data, size_); - } - - inline buffer:: - buffer (const void* data, size_t size, size_t cap) - : data_ (0), size_ (0), capacity_ (0) - { - if (size > cap) - throw bounds (); - - capacity (cap); - size_ = size; - - if (size_) - std::memcpy (data_, data, size_); - } - - inline buffer:: - buffer (void* data, size_t size, size_t cap, bool own) - : data_ (0), size_ (0), capacity_ (0) - { - if (size > cap) - throw bounds (); - - if (own) - { - data_ = reinterpret_cast (data); - size_ = size; - capacity_ = cap; - } - else - { - capacity (cap); - size_ = size; - - if (size_) - std::memcpy (data_, data, size_); - } - } - - inline buffer:: - buffer (const buffer& other) - : data_ (0), size_ (0), capacity_ (0) - { - capacity (other.capacity_); - size_ = other.size_; - - if (size_) - std::memcpy (data_, other.data_, size_); - } - - inline buffer& buffer:: - operator= (const buffer& other) - { - if (this != &other) - { - capacity (other.capacity_, false); - size_ = other.size_; - - if (size_) - std::memcpy (data_, other.data_, size_); - } - - return *this; - } - - inline size_t buffer:: - capacity () const - { - return capacity_; - } - - inline bool buffer:: - capacity (size_t cap) - { - return capacity (cap, true); - } - - inline size_t buffer:: - size () const - { - return size_; - } - - inline bool buffer:: - size (size_t size) - { - bool r (false); - - if (size > capacity_) - r = capacity (size); - - size_ = size; - - return r; - } - - inline const char* buffer:: - data () const - { - return data_; - } - - inline char* buffer:: - data () - { - return data_; - } - - inline const char* buffer:: - begin () const - { - return data_; - } - - inline char* buffer:: - begin () - { - return data_; - } - - inline const char* buffer:: - end () const - { - return data_ + size_; - } - - inline char* buffer:: - end () - { - return data_ + size_; - } - - inline void buffer:: - swap (buffer& other) - { - char* tmp_data (data_); - size_t tmp_size (size_); - size_t tmp_capacity (capacity_); - - data_ = other.data_; - size_ = other.size_; - capacity_ = other.capacity_; - - other.data_ = tmp_data; - other.size_ = tmp_size; - other.capacity_ = tmp_capacity; - } - - inline bool buffer:: - capacity (size_t capacity, bool copy) - { - if (size_ > capacity) - throw bounds (); - - if (capacity <= capacity_) - { - return false; // Do nothing if shrinking is requested. - } - else - { - char* data (reinterpret_cast (operator new (capacity))); - - if (copy && size_ > 0) - std::memcpy (data, data_, size_); - - if (data_) - operator delete (data_); - - data_ = data; - capacity_ = capacity; - - return true; - } - } - - inline bool - operator== (const buffer& a, const buffer& b) - { - return a.size () == b.size () && - std::memcmp (a.data (), b.data (), a.size ()) == 0; - } - - inline bool - operator!= (const buffer& a, const buffer& b) - { - return !(a == b); - } - - // time_zone - // - inline time_zone:: - time_zone () - : present_ (false) - { - } - - inline time_zone:: - time_zone (short h, short m) - : present_ (true), hours_ (h), minutes_ (m) - { - } - - inline bool time_zone:: - zone_present () const - { - return present_; - } - - inline void time_zone:: - zone_reset () - { - present_ = false; - } - - inline short time_zone:: - zone_hours () const - { - return hours_; - } - - inline void time_zone:: - zone_hours (short h) - { - hours_ = h; - present_ = true; - } - - inline short time_zone:: - zone_minutes () const - { - return minutes_; - } - - inline void time_zone:: - zone_minutes (short m) - { - minutes_ = m; - present_ = true; - } - - inline bool - operator== (const time_zone& x, const time_zone& y) - { - return x.zone_present () - ? y.zone_present () && - x.zone_hours () == y.zone_hours () && - x.zone_minutes () == y.zone_minutes () - : !y.zone_present (); - } - - inline bool - operator!= (const time_zone& x, const time_zone& y) - { - return !(x == y); - } - - // gday - // - inline gday:: - gday (unsigned short day) - : day_ (day) - { - } - - inline gday:: - gday (unsigned short day, short zh, short zm) - : time_zone (zh, zm), day_ (day) - { - } - - inline unsigned short gday:: - day () const - { - return day_; - } - - inline void gday:: - day (unsigned short day) - { - day_ = day; - } - - inline bool - operator== (const gday& a, const gday& b) - { - const time_zone& az = a; - const time_zone& bz = b; - - return a.day () == b.day () && az == bz; - } - - inline bool - operator!= (const gday& a, const gday& b) - { - return !(a == b); - } - - // gmonth - // - inline gmonth:: - gmonth (unsigned short month) - : month_ (month) - { - } - - inline gmonth:: - gmonth (unsigned short month, short zh, short zm) - : time_zone (zh, zm), month_ (month) - { - } - - inline unsigned short gmonth:: - month () const - { - return month_; - } - - inline void gmonth:: - month (unsigned short month) - { - month_ = month; - } - - inline bool - operator== (const gmonth& a, const gmonth& b) - { - const time_zone& az = a; - const time_zone& bz = b; - - return a.month () == b.month () && az == bz; - } - - inline bool - operator!= (const gmonth& a, const gmonth& b) - { - return !(a == b); - } - - // gyear - // - inline gyear:: - gyear (int year) - : year_ (year) - { - } - - inline gyear:: - gyear (int year, short zh, short zm) - : time_zone (zh, zm), year_ (year) - { - } - - inline int gyear:: - year () const - { - return year_; - } - - inline void gyear:: - year (int year) - { - year_ = year; - } - - inline bool - operator== (const gyear& a, const gyear& b) - { - const time_zone& az = a; - const time_zone& bz = b; - - return a.year () == b.year () && az == bz; - } - - inline bool - operator!= (const gyear& a, const gyear& b) - { - return !(a == b); - } - - // gmonth_day - // - inline gmonth_day:: - gmonth_day (unsigned short month, unsigned short day) - : month_ (month), day_ (day) - { - } - - inline gmonth_day:: - gmonth_day (unsigned short month, - unsigned short day, - short zh, short zm) - : time_zone (zh, zm), month_ (month), day_ (day) - { - } - - inline unsigned short gmonth_day:: - month () const - { - return month_; - } - - inline void gmonth_day:: - month (unsigned short month) - { - month_ = month; - } - - inline unsigned short gmonth_day:: - day () const - { - return day_; - } - - inline void gmonth_day:: - day (unsigned short day) - { - day_ = day; - } - - inline bool - operator== (const gmonth_day& a, const gmonth_day& b) - { - const time_zone& az = a; - const time_zone& bz = b; - - return a.month () == b.month () && - a.day () == b.day () && - az == bz; - } - - inline bool - operator!= (const gmonth_day& a, const gmonth_day& b) - { - return !(a == b); - } - - // gyear_month - // - inline gyear_month:: - gyear_month (int year, unsigned short month) - : year_ (year), month_ (month) - { - } - - inline gyear_month:: - gyear_month (int year, unsigned short month, - short zh, short zm) - : time_zone (zh, zm), year_ (year), month_ (month) - { - } - - inline int gyear_month:: - year () const - { - return year_; - } - - inline void gyear_month:: - year (int year) - { - year_ = year; - } - - inline unsigned short gyear_month:: - month () const - { - return month_; - } - - inline void gyear_month:: - month (unsigned short month) - { - month_ = month; - } - - inline bool - operator== (const gyear_month& a, const gyear_month& b) - { - const time_zone& az = a; - const time_zone& bz = b; - - return a.year () == b.year () && - a.month () == b.month () && - az == bz; - } - - inline bool - operator!= (const gyear_month& a, const gyear_month& b) - { - return !(a == b); - } - - // date - // - inline date:: - date (int year, unsigned short month, unsigned short day) - : year_ (year), month_ (month), day_ (day) - { - } - - inline date:: - date (int year, unsigned short month, unsigned short day, - short zh, short zm) - : time_zone (zh, zm), year_ (year), month_ (month), day_ (day) - { - } - - inline int date:: - year () const - { - return year_; - } - - inline void date:: - year (int year) - { - year_ = year; - } - - inline unsigned short date:: - month () const - { - return month_; - } - - inline void date:: - month (unsigned short month) - { - month_ = month; - } - - inline unsigned short date:: - day () const - { - return day_; - } - - inline void date:: - day (unsigned short day) - { - day_ = day; - } - - inline bool - operator== (const date& a, const date& b) - { - const time_zone& az = a; - const time_zone& bz = b; - - return a.year () == b.year () && - a.month () == b.month () && - a.day () == b.day () && - az == bz; - } - - inline bool - operator!= (const date& a, const date& b) - { - return !(a == b); - } - - // time - // - inline time:: - time (unsigned short hours, unsigned short minutes, double seconds) - : hours_ (hours), minutes_ (minutes), seconds_ (seconds) - { - } - - inline time:: - time (unsigned short hours, unsigned short minutes, double seconds, - short zh, short zm) - : time_zone (zh, zm), - hours_ (hours), minutes_ (minutes), seconds_ (seconds) - { - } - - inline unsigned short time:: - hours () const - { - return hours_; - } - - inline void time:: - hours (unsigned short hours) - { - hours_ = hours; - } - - inline unsigned short time:: - minutes () const - { - return minutes_; - } - - inline void time:: - minutes (unsigned short minutes) - { - minutes_ = minutes; - } - - inline double time:: - seconds () const - { - return seconds_; - } - - inline void time:: - seconds (double seconds) - { - seconds_ = seconds; - } - - inline bool - operator== (const time& a, const time& b) - { - const time_zone& az = a; - const time_zone& bz = b; - - return a.hours () == b.hours () && - a.minutes () == b.minutes () && - a.seconds () == b.seconds () && - az == bz; - } - - inline bool - operator!= (const time& a, const time& b) - { - return !(a == b); - } - - // date_time - // - inline date_time:: - date_time (int year, unsigned short month, unsigned short day, - unsigned short hours, unsigned short minutes, double seconds) - : year_ (year), month_ (month), day_ (day), - hours_ (hours), minutes_ (minutes), seconds_ (seconds) - { - } - - inline date_time:: - date_time (int year, unsigned short month, unsigned short day, - unsigned short hours, unsigned short minutes, double seconds, - short zh, short zm) - : time_zone (zh, zm), - year_ (year), month_ (month), day_ (day), - hours_ (hours), minutes_ (minutes), seconds_ (seconds) - { - } - - inline int date_time:: - year () const - { - return year_; - } - - inline void date_time:: - year (int year) - { - year_ = year; - } - - inline unsigned short date_time:: - month () const - { - return month_; - } - - inline void date_time:: - month (unsigned short month) - { - month_ = month; - } - - inline unsigned short date_time:: - day () const - { - return day_; - } - - inline void date_time:: - day (unsigned short day) - { - day_ = day; - } - - inline unsigned short date_time:: - hours () const - { - return hours_; - } - - inline void date_time:: - hours (unsigned short hours) - { - hours_ = hours; - } - - inline unsigned short date_time:: - minutes () const - { - return minutes_; - } - - inline void date_time:: - minutes (unsigned short minutes) - { - minutes_ = minutes; - } - - inline double date_time:: - seconds () const - { - return seconds_; - } - - inline void date_time:: - seconds (double seconds) - { - seconds_ = seconds; - } - - inline bool - operator== (const date_time& a, const date_time& b) - { - const time_zone& az = a; - const time_zone& bz = b; - - return a.year () == b.year () && - a.month () == b.month () && - a.day () == b.day () && - a.hours () == b.hours () && - a.minutes () == b.minutes () && - a.seconds () == b.seconds () && - az == bz; - } - - inline bool - operator!= (const date_time& a, const date_time& b) - { - return !(a == b); - } - - // duration - // - inline duration:: - duration (bool negative, - unsigned int years, unsigned int months, unsigned int days, - unsigned int hours, unsigned int minutes, double seconds) - : negative_ (negative), - years_ (years), months_ (months), days_ (days), - hours_ (hours), minutes_ (minutes), seconds_ (seconds) - { - } - - inline bool duration:: - negative () const - { - return negative_; - } - - inline void duration:: - negative (bool negative) - { - negative_ = negative; - } - - inline unsigned int duration:: - years () const - { - return years_; - } - - inline void duration:: - years (unsigned int years) - { - years_ = years; - } - - inline unsigned int duration:: - months () const - { - return months_; - } - - inline void duration:: - months (unsigned int months) - { - months_ = months; - } - - inline unsigned int duration:: - days () const - { - return days_; - } - - inline void duration:: - days (unsigned int days) - { - days_ = days; - } - - inline unsigned int duration:: - hours () const - { - return hours_; - } - - inline void duration:: - hours (unsigned int hours) - { - hours_ = hours; - } - - inline unsigned int duration:: - minutes () const - { - return minutes_; - } - - inline void duration:: - minutes (unsigned int minutes) - { - minutes_ = minutes; - } - - inline double duration:: - seconds () const - { - return seconds_; - } - - inline void duration:: - seconds (double seconds) - { - seconds_ = seconds; - } - - inline bool - operator== (const duration& a, const duration& b) - { - return a.negative () == b.negative () && - a.years () == b.years () && - a.months () == b.months () && - a.days () == b.days () && - a.hours () == b.hours () && - a.minutes () == b.minutes () && - a.seconds () == b.seconds (); - } - - inline bool - operator!= (const duration& a, const duration& b) - { - return !(a == b); - } - } - } -} diff --git a/libxsd/xsd/cxx/parser/xml-schema.txx b/libxsd/xsd/cxx/parser/xml-schema.txx deleted file mode 100644 index 90e558d..0000000 --- a/libxsd/xsd/cxx/parser/xml-schema.txx +++ /dev/null @@ -1,33 +0,0 @@ -// file : xsd/cxx/parser/xml-schema.txx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -namespace xsd -{ - namespace cxx - { - namespace parser - { - // string_sequence - // - template - bool - operator== (const string_sequence& a, const string_sequence& b) - { - if (a.size () != b.size ()) - return false; - - for (typename string_sequence::const_iterator - ai (a.begin ()), bi (b.begin ()), ae (a.end ()); - ai != ae; ++ai, ++bi) - { - if (*ai != *bi) - return false; - } - - return true; - } - } - } -} - diff --git a/libxsd/xsd/cxx/post.hxx b/libxsd/xsd/cxx/post.hxx deleted file mode 100644 index 7a9c63e..0000000 --- a/libxsd/xsd/cxx/post.hxx +++ /dev/null @@ -1,9 +0,0 @@ -// file : xsd/cxx/post.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifdef _MSC_VER -# if (_MSC_VER >= 1400) -# include -# endif -#endif diff --git a/libxsd/xsd/cxx/pre.hxx b/libxsd/xsd/cxx/pre.hxx deleted file mode 100644 index f0633c9..0000000 --- a/libxsd/xsd/cxx/pre.hxx +++ /dev/null @@ -1,11 +0,0 @@ -// file : xsd/cxx/pre.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifdef _MSC_VER -# if (_MSC_VER >= 1400) -# include -# else -# error Microsoft Visual C++ 7.1 and earlier are not supported -# endif -#endif diff --git a/libxsd/xsd/cxx/ro-string.hxx b/libxsd/xsd/cxx/ro-string.hxx deleted file mode 100644 index 2140e44..0000000 --- a/libxsd/xsd/cxx/ro-string.hxx +++ /dev/null @@ -1,429 +0,0 @@ -// file : xsd/cxx/ro-string.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_RO_STRING_HXX -#define XSD_CXX_RO_STRING_HXX - -#include -#include // std::size_t -#include - -namespace xsd -{ - namespace cxx - { - // Read-only string class template. - // - template - class ro_string - { - public: - typedef std::char_traits traits_type; - typedef std::size_t size_type; - - static const size_type npos = ~(size_type (0)); - - public: - ro_string () - : data_ (0), size_ (0) - { - } - - ro_string (const C* s) - : data_ (s), size_ (traits_type::length (s)) - { - } - - ro_string (const C* s, size_type size) - : data_ (s), size_ (size) - { - } - - ro_string (const std::basic_string& s) - : data_ (s.data ()), size_ (s.size ()) - { - } - - operator std::basic_string () const - { - return std::basic_string (data (), size ()); - } - - private: - ro_string (const ro_string&); - - ro_string& - operator= (const ro_string&); - - public: - // The returned string is not necessarily terminated with '\0'. - // If size() returns 0, the returned pointer may be 0. - // - const C* - data () const - { - return data_; - } - - size_type - size () const - { - return size_; - } - - size_type - length () const - { - return size (); - } - - public: - bool - empty () const - { - return size () == 0; - } - - const C& - operator[] (size_type pos) const - { - return data ()[pos]; - } - - public: - void - assign (const C* s) - { - data_ = s; - size_ = traits_type::length (s); - } - - void - assign (const C* s, size_type size) - { - data_ = s; - size_ = size; - } - - void - assign (const std::basic_string& s) - { - data_ = s.c_str (); - size_ = s.size (); - } - - public: - int - compare (const ro_string& str) const - { - return compare (str.data (), str.size ()); - } - - int - compare (const std::basic_string& str) const - { - return compare (str.c_str (), str.size ()); - } - - int - compare (const C* str) const - { - return compare (str, traits_type::length (str)); - } - - int - compare (const C* str, size_type n) const - { - size_type s1 (size ()); - size_type s (s1 < n ? s1 : n); - - int r (s != 0 ? traits_type::compare (data (), str, s) : 0); - - if (!r && s1 != n) - r = s1 < n ? -1 : 1; - - return r; - } - - public: - size_type - find (C c, size_type pos = 0) const; - - private: - const C* data_; - size_type size_; - }; - - // operator== - // - template - inline bool - operator== (const ro_string& a, const ro_string& b) - { - return a.compare (b) == 0; - } - - template - inline bool - operator== (const ro_string& a, const std::basic_string& b) - { - return a.compare (b) == 0; - } - - template - inline bool - operator== (const std::basic_string& a, const ro_string& b) - { - return b.compare (a) == 0; - } - - template - inline bool - operator== (const ro_string& a, const C* b) - { - return a.compare (b) == 0; - } - - template - inline bool - operator== (const C* a, const ro_string& b) - { - return b.compare (a) == 0; - } - - // operator!= - // - template - inline bool - operator!= (const ro_string& a, const ro_string& b) - { - return a.compare (b) != 0; - } - - template - inline bool - operator!= (const ro_string& a, const std::basic_string& b) - { - return a.compare (b) != 0; - } - - template - inline bool - operator!= (const std::basic_string& a, const ro_string& b) - { - return b.compare (a) != 0; - } - - template - inline bool - operator!= (const ro_string& a, const C* b) - { - return a.compare (b) != 0; - } - - template - inline bool - operator!= (const C* a, const ro_string& b) - { - return b.compare (a) != 0; - } - - // operator< - // - template - inline bool - operator< (const ro_string& l, const ro_string& r) - { - return l.compare (r) < 0; - } - - template - inline bool - operator< (const ro_string& l, const std::basic_string& r) - { - return l.compare (r) < 0; - } - - template - inline bool - operator< (const std::basic_string& l, const ro_string& r) - { - return r.compare (l) > 0; - } - - template - inline bool - operator< (const ro_string& l, const C* r) - { - return l.compare (r) < 0; - } - - template - inline bool - operator< (const C* l, const ro_string& r) - { - return r.compare (l) > 0; - } - - - // operator> - // - template - inline bool - operator> (const ro_string& l, const ro_string& r) - { - return l.compare (r) > 0; - } - - template - inline bool - operator> (const ro_string& l, const std::basic_string& r) - { - return l.compare (r) > 0; - } - - template - inline bool - operator> (const std::basic_string& l, const ro_string& r) - { - return r.compare (l) < 0; - } - - template - inline bool - operator> (const ro_string& l, const C* r) - { - return l.compare (r) > 0; - } - - template - inline bool - operator> (const C* l, const ro_string& r) - { - return r.compare (l) < 0; - } - - // operator<= - // - template - inline bool - operator<= (const ro_string& l, const ro_string& r) - { - return l.compare (r) <= 0; - } - - template - inline bool - operator<= (const ro_string& l, const std::basic_string& r) - { - return l.compare (r) <= 0; - } - - template - inline bool - operator<= (const std::basic_string& l, const ro_string& r) - { - return r.compare (l) >= 0; - } - - template - inline bool - operator<= (const ro_string& l, const C* r) - { - return l.compare (r) <= 0; - } - - template - inline bool - operator<= (const C* l, const ro_string& r) - { - return r.compare (l) >= 0; - } - - - // operator>= - // - template - inline bool - operator>= (const ro_string& l, const ro_string& r) - { - return l.compare (r) >= 0; - } - - template - inline bool - operator>= (const ro_string& l, const std::basic_string& r) - { - return l.compare (r) >= 0; - } - - template - inline bool - operator>= (const std::basic_string& l, const ro_string& r) - { - return r.compare (l) <= 0; - } - - template - inline bool - operator>= (const ro_string& l, const C* r) - { - return l.compare (r) >= 0; - } - - template - inline bool - operator>= (const C* l, const ro_string& r) - { - return r.compare (l) <= 0; - } - - // operator<< - // - template - std::basic_ostream& - operator<< (std::basic_ostream& os, const ro_string& str) - { - if (str.size () != 0) - os.write (str.data (), static_cast (str.size ())); - - return os; - } - - // operator+= - // - template - std::basic_string& - operator+= (std::basic_string& l, const ro_string& r) - { - l.append (r.data (), r.size ()); - return l; - } - - // Trim leading and trailing XML whitespaces. Return the new - // string size. - // - template - typename ro_string::size_type - trim_left (ro_string&); - - template - typename ro_string::size_type - trim_right (ro_string&); - - template - typename ro_string::size_type - trim (ro_string&); - - // Trim leading and trailing XML whitespaces. - // - template - std::basic_string - trim (const std::basic_string&); - } -} - -#include - -#endif // XSD_CXX_RO_STRING_HXX diff --git a/libxsd/xsd/cxx/ro-string.txx b/libxsd/xsd/cxx/ro-string.txx deleted file mode 100644 index 56d5bbd..0000000 --- a/libxsd/xsd/cxx/ro-string.txx +++ /dev/null @@ -1,132 +0,0 @@ -// file : xsd/cxx/ro-string.txx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -namespace xsd -{ - namespace cxx - { - template - typename ro_string::size_type ro_string:: - find (C c, size_type pos) const - { - size_type r (npos); - - if (pos < size_) - { - if (const C* p = traits_type::find(data_ + pos, size_ - pos, c)) - r = p - data_; - } - - return r; - } - - template - typename ro_string::size_type - trim_left (ro_string& s) - { - typename ro_string::size_type size (s.size ()); - - if (size != 0) - { - const C* f (s.data ()); - const C* l (f + size); - const C* of (f); - - while (f < l && - (*f == C (0x20) || *f == C (0x0A) || - *f == C (0x0D) || *f == C (0x09))) - ++f; - - if (f != of) - { - size = f <= l ? l - f : 0; - s.assign ((f <= l ? f : 0), size); - } - } - - return size; - } - - template - typename ro_string::size_type - trim_right (ro_string& s) - { - typename ro_string::size_type size (s.size ()); - - if (size != 0) - { - const C* f (s.data ()); - const C* l (f + size - 1); - const C* ol (l); - - while (l > f && - (*l == C (0x20) || *l == C (0x0A) || - *l == C (0x0D) || *l == C (0x09))) - --l; - - if (l != ol) - { - size = f <= l ? l - f + 1 : 0; - s.assign ((f <= l ? f : 0), size); - } - } - - return size; - } - - template - typename ro_string::size_type - trim (ro_string& s) - { - typename ro_string::size_type size (s.size ()); - - if (size != 0) - { - const C* f (s.data ()); - const C* l (f + size); - - const C* of (f); - - while (f < l && - (*f == C (0x20) || *f == C (0x0A) || - *f == C (0x0D) || *f == C (0x09))) - ++f; - - --l; - - const C* ol (l); - - while (l > f && - (*l == C (0x20) || *l == C (0x0A) || - *l == C (0x0D) || *l == C (0x09))) - --l; - - if (f != of || l != ol) - { - size = f <= l ? l - f + 1 : 0; - s.assign ((f <= l ? f : 0), size); - } - } - - return size; - } - - template - std::basic_string - trim (const std::basic_string& s) - { - ro_string tmp (s); - typename ro_string::size_type size (tmp.size ()); - trim (tmp); - - // If we didn't change the string then return the original to help - // avoid copying for smart (ref counted) string implementations. - // - if (size == tmp.size ()) - return s; - else - return tmp; - } - } -} diff --git a/libxsd/xsd/cxx/tree/ace-cdr-stream-common.hxx b/libxsd/xsd/cxx/tree/ace-cdr-stream-common.hxx deleted file mode 100644 index 7a9fbff..0000000 --- a/libxsd/xsd/cxx/tree/ace-cdr-stream-common.hxx +++ /dev/null @@ -1,25 +0,0 @@ -// file : xsd/cxx/tree/ace-cdr-stream-common.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_TREE_ACE_CDR_STREAM_COMMON_HXX -#define XSD_CXX_TREE_ACE_CDR_STREAM_COMMON_HXX - -#include - -namespace xsd -{ - namespace cxx - { - namespace tree - { - // Base exception for ACE CDR insertion/extraction exceptions. - // - struct ace_cdr_stream_operation: xsd::cxx::exception - { - }; - } - } -} - -#endif // XSD_CXX_TREE_ACE_CDR_STREAM_COMMON_HXX diff --git a/libxsd/xsd/cxx/tree/ace-cdr-stream-extraction.hxx b/libxsd/xsd/cxx/tree/ace-cdr-stream-extraction.hxx deleted file mode 100644 index b843ffa..0000000 --- a/libxsd/xsd/cxx/tree/ace-cdr-stream-extraction.hxx +++ /dev/null @@ -1,347 +0,0 @@ -// file : xsd/cxx/tree/ace-cdr-stream-extraction.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_TREE_ACE_CDR_STREAM_EXTRACTION_HXX -#define XSD_CXX_TREE_ACE_CDR_STREAM_EXTRACTION_HXX - -#include // std::size_t -#include - -#include // ACE::strdelete -#include - -#include // XSD_CXX11 - -#ifdef XSD_CXX11 -# include // std::unique_ptr -#else -# include -#endif - -#include -#include -#include - -namespace xsd -{ - namespace cxx - { - namespace tree - { - struct ace_cdr_stream_extraction: ace_cdr_stream_operation - { - virtual const char* - what () const throw () - { - return "ACE CDR stream extraction operation failed"; - } - }; - - - // as_size - // - -#ifdef XSD_CXX_TREE_USE_64_BIT_SIZE - template - inline istream& - operator>> (istream& s, - istream::as_size& x) - { - ACE_CDR::ULongLong r; - - if (!s.impl ().read_ulonglong (r) || - r > ~(T (0))) - throw ace_cdr_stream_extraction (); - - x.x_ = static_cast (r); - - return s; - } -#else - template - inline istream& - operator>> (istream& s, - istream::as_size& x) - { - ACE_CDR::ULong r; - - if (!s.impl ().read_ulong (r)) - throw ace_cdr_stream_extraction (); - - x.x_ = static_cast (r); - - return s; - } -#endif - - - // 8-bit - // - template - inline istream& - operator>> (istream& s, - istream::as_int8& x) - { - ACE_CDR::Octet r; - - if (!s.impl ().read_octet (r)) - throw ace_cdr_stream_extraction (); - - x.x_ = static_cast (r); - - return s; - } - - template - inline istream& - operator>> (istream& s, - istream::as_uint8& x) - { - ACE_CDR::Octet r; - - if (!s.impl ().read_octet (r)) - throw ace_cdr_stream_extraction (); - - x.x_ = static_cast (r); - - return s; - } - - - // 16-bit - // - template - inline istream& - operator>> (istream& s, - istream::as_int16& x) - { - ACE_CDR::Short r; - - if (!s.impl ().read_short (r)) - throw ace_cdr_stream_extraction (); - - x.x_ = static_cast (r); - - return s; - } - - template - inline istream& - operator>> (istream& s, - istream::as_uint16& x) - { - ACE_CDR::UShort r; - - if (!s.impl ().read_ushort (r)) - throw ace_cdr_stream_extraction (); - - x.x_ = static_cast (r); - - return s; - } - - - // 32-bit - // - template - inline istream& - operator>> (istream& s, - istream::as_int32& x) - { - ACE_CDR::Long r; - - if (!s.impl ().read_long (r)) - throw ace_cdr_stream_extraction (); - - x.x_ = static_cast (r); - - return s; - } - - template - inline istream& - operator>> (istream& s, - istream::as_uint32& x) - { - ACE_CDR::ULong r; - - if (!s.impl ().read_ulong (r)) - throw ace_cdr_stream_extraction (); - - x.x_ = static_cast (r); - - return s; - } - - - // 64-bit - // - template - inline istream& - operator>> (istream& s, - istream::as_int64& x) - { - ACE_CDR::LongLong r; - - if (!s.impl ().read_longlong (r)) - throw ace_cdr_stream_extraction (); - - x.x_ = static_cast (r); - - return s; - } - - template - inline istream& - operator>> (istream& s, - istream::as_uint64& x) - { - ACE_CDR::ULongLong r; - - if (!s.impl ().read_ulonglong (r)) - throw ace_cdr_stream_extraction (); - - x.x_ = static_cast (r); - - return s; - } - - - // Boolean - // - template - inline istream& - operator>> (istream& s, - istream::as_bool& x) - { - ACE_CDR::Boolean r; - - if (!s.impl ().read_boolean (r)) - throw ace_cdr_stream_extraction (); - - x.x_ = static_cast (r); - - return s; - } - - - // Floating-point - // - template - inline istream& - operator>> (istream& s, - istream::as_float32& x) - { - ACE_CDR::Float r; - - if (!s.impl ().read_float (r)) - throw ace_cdr_stream_extraction (); - - x.x_ = static_cast (r); - - return s; - } - - template - inline istream& - operator>> (istream& s, - istream::as_float64& x) - { - ACE_CDR::Double r; - - if (!s.impl ().read_double (r)) - throw ace_cdr_stream_extraction (); - - x.x_ = static_cast (r); - - return s; - } - - // Extraction of std::basic_string. - // - - namespace bits - { - template - struct ace_str_deleter - { - void - operator() (C* s) const - { - ACE::strdelete (s); - } - }; - } - - inline istream& - operator>> (istream& s, std::basic_string& x) - { - typedef bits::ace_str_deleter deleter; - - deleter d; - char* r; - - if (!s.impl ().read_string (r)) - throw ace_cdr_stream_extraction (); - -#ifdef XSD_CXX11 - std::unique_ptr ar ( -#else - auto_array ar ( -#endif - r, d); - - x = r; - return s; - } - -#ifdef ACE_HAS_WCHAR - inline istream& - operator>> (istream& s, std::basic_string& x) - { - typedef bits::ace_str_deleter deleter; - - deleter d; - wchar_t* r; - - if (!s.impl ().read_wstring (r)) - throw ace_cdr_stream_extraction (); - -#ifdef XSD_CXX11 - std::unique_ptr ar ( -#else - auto_array ar ( -#endif - r, d); - - x = r; - return s; - } -#endif - - - // Extraction of a binary buffer. - // - template - istream& - operator>> (istream& s, buffer& x) - { - ACE_CDR::ULong size; - - if (!s.impl ().read_ulong (size)) - throw ace_cdr_stream_extraction (); - - x.size (size); - - if (!s.impl ().read_octet_array ( - reinterpret_cast (x.data ()), size)) - throw ace_cdr_stream_extraction (); - - return s; - } - } - } -} - -#endif // XSD_CXX_TREE_ACE_CDR_STREAM_EXTRACTION_HXX diff --git a/libxsd/xsd/cxx/tree/ace-cdr-stream-insertion.hxx b/libxsd/xsd/cxx/tree/ace-cdr-stream-insertion.hxx deleted file mode 100644 index 3fa92ad..0000000 --- a/libxsd/xsd/cxx/tree/ace-cdr-stream-insertion.hxx +++ /dev/null @@ -1,248 +0,0 @@ -// file : xsd/cxx/tree/ace-cdr-stream-insertion.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_TREE_ACE_CDR_STREAM_INSERTION_HXX -#define XSD_CXX_TREE_ACE_CDR_STREAM_INSERTION_HXX - -#include // std::size_t -#include - -#include - -#include -#include -#include - -namespace xsd -{ - namespace cxx - { - namespace tree - { - struct ace_cdr_stream_insertion: ace_cdr_stream_operation - { - virtual const char* - what () const throw () - { - return "ACE CDR stream insertion operation failed"; - } - }; - - - // as_size - // - -#ifdef XSD_CXX_TREE_USE_64_BIT_SIZE - template - inline ostream& - operator<< (ostream& s, - ostream::as_size x) - { - if (!s.impl ().write_ulonglong ( - static_cast (x.x_))) - throw ace_cdr_stream_insertion (); - return s; - } -#else - template - inline ostream& - operator<< (ostream& s, - ostream::as_size x) - { - if (x.x_ > ~(ACE_CDR::ULong (0)) || - !s.impl ().write_ulong (static_cast (x.x_))) - throw ace_cdr_stream_insertion (); - - return s; - } -#endif - - - // 8-bit - // - template - inline ostream& - operator<< (ostream& s, - ostream::as_int8 x) - { - ACE_CDR::Octet r (static_cast (x.x_)); - - if (!s.impl ().write_octet (r)) - throw ace_cdr_stream_insertion (); - - return s; - } - - template - inline ostream& - operator<< (ostream& s, - ostream::as_uint8 x) - { - ACE_CDR::Octet r (static_cast (x.x_)); - - if (!s.impl ().write_octet (r)) - throw ace_cdr_stream_insertion (); - - return s; - } - - - // 16-bit - // - template - inline ostream& - operator<< (ostream& s, - ostream::as_int16 x) - { - if (!s.impl ().write_short (static_cast (x.x_))) - throw ace_cdr_stream_insertion (); - return s; - } - - template - inline ostream& - operator<< (ostream& s, - ostream::as_uint16 x) - { - if (!s.impl ().write_ushort (static_cast (x.x_))) - throw ace_cdr_stream_insertion (); - return s; - } - - - // 32-bit - // - template - inline ostream& - operator<< (ostream& s, - ostream::as_int32 x) - { - if (!s.impl ().write_long (static_cast (x.x_))) - throw ace_cdr_stream_insertion (); - return s; - } - - template - inline ostream& - operator<< (ostream& s, - ostream::as_uint32 x) - { - if (!s.impl ().write_ulong (static_cast (x.x_))) - throw ace_cdr_stream_insertion (); - return s; - } - - - // 64-bit - // - template - inline ostream& - operator<< (ostream& s, - ostream::as_int64 x) - { - if (!s.impl ().write_longlong (static_cast (x.x_))) - throw ace_cdr_stream_insertion (); - return s; - } - - template - inline ostream& - operator<< (ostream& s, - ostream::as_uint64 x) - { - if (!s.impl ().write_ulonglong ( - static_cast (x.x_))) - throw ace_cdr_stream_insertion (); - return s; - } - - - // Boolean - // - template - inline ostream& - operator<< (ostream& s, - ostream::as_bool x) - { - if (!s.impl ().write_boolean (static_cast (x.x_))) - throw ace_cdr_stream_insertion (); - return s; - } - - - // Floating-point - // - template - inline ostream& - operator<< (ostream& s, - ostream::as_float32 x) - { - if (!s.impl ().write_float (static_cast (x.x_))) - throw ace_cdr_stream_insertion (); - return s; - } - - template - inline ostream& - operator<< (ostream& s, - ostream::as_float64 x) - { - if (!s.impl ().write_double (static_cast (x.x_))) - throw ace_cdr_stream_insertion (); - return s; - } - - // Insertion of std::basic_string. - // - - inline ostream& - operator<< (ostream& s, const std::basic_string& x) - { - // ACE CDR strings are hard-wired with a 32 bit length. - // - if (x.length () > ~(ACE_CDR::ULong (0)) || - !s.impl ().write_string ( - static_cast (x.length ()), x.c_str ())) - throw ace_cdr_stream_insertion (); - return s; - } - -#ifdef ACE_HAS_WCHAR - inline ostream& - operator<< (ostream& s, - const std::basic_string& x) - { - // ACE CDR strings are hard-wired with a 32 bit length. - // - if (x.length () > ~(ACE_CDR::ULong (0)) || - !s.impl ().write_wstring ( - static_cast (x.length ()), x.c_str ())) - throw ace_cdr_stream_insertion (); - return s; - } -#endif - - // Insertion of a binary buffer. - // - template - ostream& - operator<< (ostream& s, const buffer& x) - { - std::size_t size (x.size ()); - - // It is not possible to write an array with a 64-bit size. - // - if (size > ~(ACE_CDR::ULong (0)) || - !s.impl ().write_ulong (static_cast (size)) || - !s.impl ().write_octet_array ( - reinterpret_cast (x.data ()), size)) - throw ace_cdr_stream_insertion (); - - return s; - } - } - } -} - -#endif // XSD_CXX_TREE_ACE_CDR_STREAM_INSERTION_HXX diff --git a/libxsd/xsd/cxx/tree/bits/literals.hxx b/libxsd/xsd/cxx/tree/bits/literals.hxx deleted file mode 100644 index a690e76..0000000 --- a/libxsd/xsd/cxx/tree/bits/literals.hxx +++ /dev/null @@ -1,260 +0,0 @@ -// file : xsd/cxx/tree/bits/literals.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_TREE_BITS_LITERALS_HXX -#define XSD_CXX_TREE_BITS_LITERALS_HXX - -namespace xsd -{ - namespace cxx - { - namespace tree - { - namespace bits - { - // Boolean literals - // - template - const C* - true_ (); - - template - const C* - one (); - - // Float literals: INF -INF NaN. - // - template - const C* - positive_inf (); - - template - const C* - negative_inf (); - - template - const C* - nan (); - - // Optional "not present" literal. - // - template - const C* - not_present (); - - // XML Schema namespace - // - template - const C* - xml_schema (); - - // Built-in XML Schema type names. - // - template - const C* - any_type (); - - template - const C* - any_simple_type (); - - template - const C* - string (); - - template - const C* - normalized_string (); - - template - const C* - token (); - - template - const C* - name (); - - template - const C* - nmtoken (); - - template - const C* - nmtokens (); - - template - const C* - ncname (); - - template - const C* - language (); - - template - const C* - id (); - - template - const C* - idref (); - - template - const C* - idrefs (); - - template - const C* - any_uri (); - - template - const C* - qname (); - - template - const C* - base64_binary (); - - template - const C* - hex_binary (); - - template - const C* - date (); - - template - const C* - date_time (); - - template - const C* - duration (); - - template - const C* - gday (); - - template - const C* - gmonth (); - - template - const C* - gmonth_day (); - - template - const C* - gyear (); - - template - const C* - gyear_month (); - - template - const C* - time (); - - template - const C* - entity (); - - template - const C* - entities (); - - // gday ("---") and gmonth ("--") prefixes. - // - template - const C* - gday_prefix (); - - template - const C* - gmonth_prefix (); - - // Exception and diagnostics string literals. - // - template - const C* - ex_error_error (); // " error: " - - template - const C* - ex_error_warning (); // " warning: " - - template - const C* - ex_parsing_msg (); // "instance document parsing failed" - - template - const C* - ex_eel_expected (); // "expected element '" - - template - const C* - ex_uel_expected (); // "expected element '" - - template - const C* - ex_uel_instead (); // "' instead of '" - - template - const C* - ex_uel_unexpected (); // "unexpected element '" - - template - const C* - ex_eat_expected (); // "expected attribute '" - - template - const C* - ex_uen_unexpected (); // "unexpected enumerator '" - - template - const C* - ex_etc_msg (); // "expected text content" - - template - const C* - ex_nti_no_type_info (); // "no type information available for type '" - - template - const C* - ex_nei_no_element_info (); // "no parsing or serialization information - // available for element '" - template - const C* - ex_nd_type (); // "type '" - - template - const C* - ex_nd_not_derived (); // "' is not derived from '" - - template - const C* - ex_di_id (); // "ID '" - - template - const C* - ex_di_already_exist (); // "' already exist" - - template - const C* - ex_serialization_msg (); // "serialization failed" - - template - const C* - ex_npm_no_mapping (); // "no mapping provided for namespace prefix '" - - template - const C* - ex_bounds_msg (); // "buffer boundary rules have been violated" - } - } - } -} - -#endif // XSD_CXX_TREE_BITS_LITERALS_HXX - -#include diff --git a/libxsd/xsd/cxx/tree/bits/literals.ixx b/libxsd/xsd/cxx/tree/bits/literals.ixx deleted file mode 100644 index 9a27d99..0000000 --- a/libxsd/xsd/cxx/tree/bits/literals.ixx +++ /dev/null @@ -1,875 +0,0 @@ -// file : xsd/cxx/tree/bits/literals.ixx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_TREE_BITS_LITERALS_IXX -#define XSD_CXX_TREE_BITS_LITERALS_IXX - -// The char versions of the following literals are required even -// if we are using wchar_t as the character type. -// -namespace xsd -{ - namespace cxx - { - namespace tree - { - namespace bits - { - // - // - template<> - inline const char* - positive_inf () - { - return "INF"; - } - - template<> - inline const char* - negative_inf () - { - return "-INF"; - } - - template<> - inline const char* - nan () - { - return "NaN"; - } - } - } - } -} - -#endif // XSD_CXX_TREE_BITS_LITERALS_IXX - - -#if defined(XSD_CXX_TREE_USE_CHAR) || !defined(XSD_CXX_TREE_USE_WCHAR) - -#ifndef XSD_CXX_TREE_BITS_LITERALS_IXX_CHAR -#define XSD_CXX_TREE_BITS_LITERALS_IXX_CHAR - -namespace xsd -{ - namespace cxx - { - namespace tree - { - namespace bits - { - // - // - template<> - inline const char* - true_ () - { - return "true"; - } - - template<> - inline const char* - one () - { - return "1"; - } - - // - // - template<> - inline const char* - not_present () - { - return ""; - } - - // - // - template <> - inline const char* - xml_schema () - { - return "http://www.w3.org/2001/XMLSchema"; - } - - // - // - template <> - inline const char* - any_type () - { - return "anyType"; - } - - template <> - inline const char* - any_simple_type () - { - return "anySimpleType"; - } - - template <> - inline const char* - string () - { - return "string"; - } - - template <> - inline const char* - normalized_string () - { - return "normalizedString"; - } - - template <> - inline const char* - token () - { - return "token"; - } - - template <> - inline const char* - name () - { - return "Name"; - } - - template <> - inline const char* - nmtoken () - { - return "NMTOKEN"; - } - - template <> - inline const char* - nmtokens () - { - return "NMTOKENS"; - } - - template <> - inline const char* - ncname () - { - return "NCName"; - } - - template <> - inline const char* - language () - { - return "language"; - } - - - template <> - inline const char* - id () - { - return "ID"; - } - - template <> - inline const char* - idref () - { - return "IDREF"; - } - - template <> - inline const char* - idrefs () - { - return "IDREFS"; - } - - template <> - inline const char* - any_uri () - { - return "anyURI"; - } - - template <> - inline const char* - qname () - { - return "QName"; - } - - template <> - inline const char* - base64_binary () - { - return "base64Binary"; - } - - template <> - inline const char* - hex_binary () - { - return "hexBinary"; - } - - template <> - inline const char* - date () - { - return "date"; - } - - template <> - inline const char* - date_time () - { - return "dateTime"; - } - - template <> - inline const char* - duration () - { - return "duration"; - } - - template <> - inline const char* - gday () - { - return "gDay"; - } - - template <> - inline const char* - gmonth () - { - return "gMonth"; - } - - template <> - inline const char* - gmonth_day () - { - return "gMonthDay"; - } - - template <> - inline const char* - gyear () - { - return "gYear"; - } - - template <> - inline const char* - gyear_month () - { - return "gYearMonth"; - } - - template <> - inline const char* - time () - { - return "time"; - } - - template <> - inline const char* - entity () - { - return "ENTITY"; - } - - template <> - inline const char* - entities () - { - return "ENTITIES"; - } - - template <> - inline const char* - gday_prefix () - { - return "---"; - } - - template <> - inline const char* - gmonth_prefix () - { - return "--"; - } - - // - // - template <> - inline const char* - ex_error_error () - { - return " error: "; - } - - template <> - inline const char* - ex_error_warning () - { - return " warning: "; - } - - template <> - inline const char* - ex_parsing_msg () - { - return "instance document parsing failed"; - } - - template <> - inline const char* - ex_eel_expected () - { - return "expected element '"; - } - - template <> - inline const char* - ex_uel_expected () - { - return "expected element '"; - } - - template <> - inline const char* - ex_uel_instead () - { - return "' instead of '"; - } - - template <> - inline const char* - ex_uel_unexpected () - { - return "unexpected element '"; - } - - template <> - inline const char* - ex_eat_expected () - { - return "expected attribute '"; - } - - template <> - inline const char* - ex_uen_unexpected () - { - return "unexpected enumerator '"; - } - - template <> - inline const char* - ex_etc_msg () - { - return "expected text content"; - } - - template <> - inline const char* - ex_nti_no_type_info () - { - return "no type information available for type '"; - } - - template <> - inline const char* - ex_nei_no_element_info () - { - return "no parsing or serialization information available for " - "element '"; - } - template <> - inline const char* - ex_nd_type () - { - return "type '"; - } - - template <> - inline const char* - ex_nd_not_derived () - { - return "' is not derived from '"; - } - - template <> - inline const char* - ex_di_id () - { - return "ID '"; - } - - template <> - inline const char* - ex_di_already_exist () - { - return "' already exist"; - } - - template <> - inline const char* - ex_serialization_msg () - { - return "serialization failed"; - } - - template <> - inline const char* - ex_npm_no_mapping () - { - return "no mapping provided for namespace prefix '"; - } - - template <> - inline const char* - ex_bounds_msg () - { - return "buffer boundary rules have been violated"; - } - } - } - } -} - -#endif // XSD_CXX_TREE_BITS_LITERALS_IXX_CHAR -#endif // XSD_CXX_TREE_USE_CHAR - - -#if defined(XSD_CXX_TREE_USE_WCHAR) || !defined(XSD_CXX_TREE_USE_CHAR) - -#ifndef XSD_CXX_TREE_BITS_LITERALS_IXX_WCHAR -#define XSD_CXX_TREE_BITS_LITERALS_IXX_WCHAR - -namespace xsd -{ - namespace cxx - { - namespace tree - { - namespace bits - { - // - // - template<> - inline const wchar_t* - true_ () - { - return L"true"; - } - - template<> - inline const wchar_t* - one () - { - return L"1"; - } - - // - // - template<> - inline const wchar_t* - positive_inf () - { - return L"INF"; - } - - template<> - inline const wchar_t* - negative_inf () - { - return L"-INF"; - } - - template<> - inline const wchar_t* - nan () - { - return L"NaN"; - } - - // - // - template<> - inline const wchar_t* - not_present () - { - return L""; - } - - // - // - template <> - inline const wchar_t* - xml_schema () - { - return L"http://www.w3.org/2001/XMLSchema"; - } - - // - // - template <> - inline const wchar_t* - any_type () - { - return L"anyType"; - } - - template <> - inline const wchar_t* - any_simple_type () - { - return L"anySimpleType"; - } - - template <> - inline const wchar_t* - string () - { - return L"string"; - } - - template <> - inline const wchar_t* - normalized_string () - { - return L"normalizedString"; - } - - template <> - inline const wchar_t* - token () - { - return L"token"; - } - - template <> - inline const wchar_t* - name () - { - return L"Name"; - } - - template <> - inline const wchar_t* - nmtoken () - { - return L"NMTOKEN"; - } - - template <> - inline const wchar_t* - nmtokens () - { - return L"NMTOKENS"; - } - - template <> - inline const wchar_t* - ncname () - { - return L"NCName"; - } - - template <> - inline const wchar_t* - language () - { - return L"language"; - } - - - template <> - inline const wchar_t* - id () - { - return L"ID"; - } - - template <> - inline const wchar_t* - idref () - { - return L"IDREF"; - } - - template <> - inline const wchar_t* - idrefs () - { - return L"IDREFS"; - } - - template <> - inline const wchar_t* - any_uri () - { - return L"anyURI"; - } - - template <> - inline const wchar_t* - qname () - { - return L"QName"; - } - - template <> - inline const wchar_t* - base64_binary () - { - return L"base64Binary"; - } - - template <> - inline const wchar_t* - hex_binary () - { - return L"hexBinary"; - } - - template <> - inline const wchar_t* - date () - { - return L"date"; - } - - template <> - inline const wchar_t* - date_time () - { - return L"dateTime"; - } - - template <> - inline const wchar_t* - duration () - { - return L"duration"; - } - - template <> - inline const wchar_t* - gday () - { - return L"gDay"; - } - - template <> - inline const wchar_t* - gmonth () - { - return L"gMonth"; - } - - template <> - inline const wchar_t* - gmonth_day () - { - return L"gMonthDay"; - } - - template <> - inline const wchar_t* - gyear () - { - return L"gYear"; - } - - template <> - inline const wchar_t* - gyear_month () - { - return L"gYearMonth"; - } - - template <> - inline const wchar_t* - time () - { - return L"time"; - } - - template <> - inline const wchar_t* - entity () - { - return L"ENTITY"; - } - - template <> - inline const wchar_t* - entities () - { - return L"ENTITIES"; - } - - template <> - inline const wchar_t* - gday_prefix () - { - return L"---"; - } - - template <> - inline const wchar_t* - gmonth_prefix () - { - return L"--"; - } - - // - // - template <> - inline const wchar_t* - ex_error_error () - { - return L" error: "; - } - - template <> - inline const wchar_t* - ex_error_warning () - { - return L" warning: "; - } - - template <> - inline const wchar_t* - ex_parsing_msg () - { - return L"instance document parsing failed"; - } - - template <> - inline const wchar_t* - ex_eel_expected () - { - return L"expected element '"; - } - - template <> - inline const wchar_t* - ex_uel_expected () - { - return L"expected element '"; - } - - template <> - inline const wchar_t* - ex_uel_instead () - { - return L"' instead of '"; - } - - template <> - inline const wchar_t* - ex_uel_unexpected () - { - return L"unexpected element '"; - } - - template <> - inline const wchar_t* - ex_eat_expected () - { - return L"expected attribute '"; - } - - template <> - inline const wchar_t* - ex_uen_unexpected () - { - return L"unexpected enumerator '"; - } - - template <> - inline const wchar_t* - ex_etc_msg () - { - return L"expected text content"; - } - - template <> - inline const wchar_t* - ex_nti_no_type_info () - { - return L"no type information available for type '"; - } - - template <> - inline const wchar_t* - ex_nei_no_element_info () - { - return L"no parsing or serialization information available for " - L"element '"; - } - template <> - inline const wchar_t* - ex_nd_type () - { - return L"type '"; - } - - template <> - inline const wchar_t* - ex_nd_not_derived () - { - return L"' is not derived from '"; - } - - template <> - inline const wchar_t* - ex_di_id () - { - return L"ID '"; - } - - template <> - inline const wchar_t* - ex_di_already_exist () - { - return L"' already exist"; - } - - template <> - inline const wchar_t* - ex_serialization_msg () - { - return L"serialization failed"; - } - - template <> - inline const wchar_t* - ex_npm_no_mapping () - { - return L"no mapping provided for namespace prefix '"; - } - - template <> - inline const wchar_t* - ex_bounds_msg () - { - return L"buffer boundary rules have been violated"; - } - } - } - } -} - -#endif // XSD_CXX_TREE_BITS_LITERALS_IXX_WCHAR -#endif // XSD_CXX_TREE_USE_WCHAR diff --git a/libxsd/xsd/cxx/tree/buffer.hxx b/libxsd/xsd/cxx/tree/buffer.hxx deleted file mode 100644 index 9ce568c..0000000 --- a/libxsd/xsd/cxx/tree/buffer.hxx +++ /dev/null @@ -1,336 +0,0 @@ -// file : xsd/cxx/tree/buffer.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -/** - * @file - * - * @brief Contains a simple binary buffer abstraction that is used to - * implement the base64Binary and hexBinary XML Schema built-in types. - * - * This is an internal header and is included by the generated code. You - * normally should not include it directly. - * - */ - -#ifndef XSD_CXX_TREE_BUFFER_HXX -#define XSD_CXX_TREE_BUFFER_HXX - -#include // operator new/delete -#include // std::size_t -#include // std::memcpy, std::memcmp - -#include - -namespace xsd -{ - namespace cxx - { - /** - * @brief C++/Tree mapping runtime namespace. - * - * This is an internal namespace and normally should not be referenced - * directly. Instead you should use the aliases for types in this - * namespaces that are created in the generated code. - * - */ - namespace tree - { - //@cond - - class buffer_base - { - protected: - virtual - ~buffer_base () - { - if (free_ && data_) - operator delete (data_); - } - - buffer_base () - : data_ (0), size_ (0), capacity_ (0), free_ (true) - { - } - - protected: - char* data_; - size_t size_; - size_t capacity_; - bool free_; - }; - - //@endcond - - /** - * @brief Simple binary %buffer abstraction - * - * The %buffer class manages a continuous binary %buffer. The base - * concepts are data (actual memory region), size (the portion of - * the %buffer that contains useful information), and capacity (the - * actual size of the underlying memory region). The bounds - * %exception is thrown from the constructors and modifier functions - * if the (size <= capacity) constraint is violated. - * - * Note that the template parameter is only used to instantiate - * %exception types. The underlying %buffer type is always @c char. - * - * @nosubgrouping - */ - template - class buffer: protected buffer_base - { - public: - /** - * @brief Size type - */ - typedef std::size_t size_t; - - public: - /** - * @name Constructors - */ - //@{ - - /** - * @brief Allocate a %buffer of the specified size. - * - * The resulting %buffer has the same size and capacity. - * - * @param size A %buffer size in bytes. - */ - explicit - buffer (size_t size = 0); - - /** - * @brief Allocate a %buffer of the specified size and capacity. - * - * @param size A %buffer size in bytes. - * @param capacity A %buffer capacity in bytes. - * @throw bounds If @a size exceeds @a capacity - */ - buffer (size_t size, size_t capacity); - - /** - * @brief Allocate a %buffer of the specified size and copy - * the data. - * - * The resulting %buffer has the same size and capacity with - * @a size bytes copied from @a data. - * - * @param data A %buffer to copy the data from. - * @param size A %buffer size in bytes. - */ - buffer (const void* data, size_t size); - - /** - * @brief Allocate a %buffer of the specified size and capacity - * and copy the data. - * - * @a size bytes are copied from @a data to the resulting - * %buffer. - * - * @param data A %buffer to copy the data from. - * @param size A %buffer size in bytes. - * @param capacity A %buffer capacity in bytes. - * @throw bounds If @a size exceeds @a capacity - */ - buffer (const void* data, size_t size, size_t capacity); - - /** - * @brief Reuse an existing %buffer. - * - * If the @a assume_ownership argument is true, the %buffer will - * assume ownership of @a data and will release the memory - * by calling @c operator @c delete(). - * - * @param data A %buffer to reuse. - * @param size A %buffer size in bytes. - * @param capacity A %buffer capacity in bytes. - * @param assume_ownership A boolean value indication whether to - * assume ownership. - * @throw bounds If @a size exceeds @a capacity - */ - buffer (void* data, - size_t size, - size_t capacity, - bool assume_ownership); - - /** - * @brief Copy constructor. - * - * The copy constructor performs a deep copy of the underlying - * memory %buffer. - * - * @param x An instance to make a copy of. - */ - buffer (const buffer& x); - - //@} - - public: - /** - * @brief Copy assignment operator. - * - * The copy assignment operator changes the buffer's capacity - * to @c x.capacity() and copies @c x.size() bytes from @a x. - * - * @param x An instance to assign. - * @return A reference to the instance. - */ - buffer& - operator= (const buffer& x); - - public: - /** - * @brief Get buffer's capacity. - * - * @return A number of bytes that the %buffer can hold without - * reallocation. - */ - size_t - capacity () const - { - return capacity_; - } - - /** - * @brief Set buffer's capacity. - * - * @param c The new capacity in bytes. - * @return True if the underlying %buffer has moved, false otherwise. - */ - bool - capacity (size_t c) - { - return this->capacity (c, true); - } - - public: - /** - * @brief Get buffer's size. - * - * @return A number of bytes that the %buffer holds. - */ - size_t - size () const {return size_;} - - /** - * @brief Set buffer's size. - * - * @param s The new size in bytes. - * @return True if the underlying %buffer has moved, false otherwise. - */ - bool - size (size_t s) - { - bool r (false); - - if (s > capacity_) - r = capacity (s); - - size_ = s; - - return r; - } - - public: - /** - * @brief Get the underlying memory region. - * - * @return A constant pointer to the underlying memory region. - */ - const char* - data () const {return data_;} - - /** - * @brief Get the underlying memory region. - * - * @return A pointer to the underlying memory region. - */ - char* - data () {return data_;} - - /** - * @brief Get the beginning of the underlying memory region. - * - * @return A constant pointer to the first byte of the underlying - * memory region. - */ - const char* - begin () const {return data_;} - - /** - * @brief Get the beginning of the underlying memory region. - * - * @return A pointer to the first byte of the underlying memory - * region. - */ - char* - begin () {return data_;} - - /** - * @brief Get the end of the underlying memory region. - * - * @return A constant pointer to the one past last byte of the - * underlying memory region (that is @c %begin() @c + @c %size() ). - */ - const char* - end () const {return data_ + size_;} - - /** - * @brief Get the end of the underlying memory region. - * - * @return A pointer to the one past last byte of the underlying - * memory region (that is @c %begin() @c + @c %size() ). - */ - char* - end () {return data_ + size_;} - - public: - /** - * @brief Swap data with another %buffer. - * - * @param x A %buffer to swap with. - */ - void - swap (buffer& x); - - private: - bool - capacity (size_t capacity, bool copy); - }; - - /** - * @brief %buffer comparison operator. - * - * @return True if the buffers have the same sizes and the same - * data. - */ - template - inline bool - operator== (const buffer& a, const buffer& b) - { - return a.size () == b.size () && - std::memcmp (a.data (), b.data (), a.size ()) == 0; - } - - /** - * @brief %buffer comparison operator. - * - * @return True if the buffers have different sizes or different - * data. - */ - template - inline bool - operator!= (const buffer& a, const buffer& b) - { - return !(a == b); - } - } - } -} - -#include - -#endif // XSD_CXX_TREE_BUFFER_HXX diff --git a/libxsd/xsd/cxx/tree/buffer.txx b/libxsd/xsd/cxx/tree/buffer.txx deleted file mode 100644 index c358e98..0000000 --- a/libxsd/xsd/cxx/tree/buffer.txx +++ /dev/null @@ -1,146 +0,0 @@ -// file : xsd/cxx/tree/buffer.txx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -namespace xsd -{ - namespace cxx - { - namespace tree - { - template - buffer:: - buffer (size_t size) - { - capacity (size); - size_ = size; - } - - template - buffer:: - buffer (size_t size, size_t capacity) - { - if (size > capacity) - throw bounds (); - - this->capacity (capacity); - size_ = size; - } - - template - buffer:: - buffer (const void* data, size_t size) - { - capacity (size); - size_ = size; - - if (size_) - std::memcpy (data_, data, size_); - } - - template - buffer:: - buffer (const void* data, size_t size, size_t capacity) - { - if (size > capacity) - throw bounds (); - - this->capacity (capacity); - size_ = size; - - if (size_) - std::memcpy (data_, data, size_); - } - - template - buffer:: - buffer (void* data, size_t size, size_t capacity, bool own) - { - if (size > capacity) - throw bounds (); - - data_ = reinterpret_cast (data); - size_ = size; - capacity_ = capacity; - free_ = own; - } - - template - buffer:: - buffer (const buffer& other) - : buffer_base () - { - capacity (other.capacity_); - size_ = other.size_; - - if (size_) - std::memcpy (data_, other.data_, size_); - } - - template - buffer& buffer:: - operator= (const buffer& other) - { - if (this != &other) - { - capacity (other.capacity_, false); - size_ = other.size_; - - if (size_) - std::memcpy (data_, other.data_, size_); - } - - return *this; - } - - template - void buffer:: - swap (buffer& other) - { - char* tmp_data (data_); - size_t tmp_size (size_); - size_t tmp_capacity (capacity_); - bool tmp_free (free_); - - data_ = other.data_; - size_ = other.size_; - capacity_ = other.capacity_; - free_ = other.free_; - - other.data_ = tmp_data; - other.size_ = tmp_size; - other.capacity_ = tmp_capacity; - other.free_ = tmp_free; - } - - template - bool buffer:: - capacity (size_t capacity, bool copy) - { - if (size_ > capacity) - throw bounds (); - - if (capacity <= capacity_) - { - return false; // Do nothing if shrinking is requested. - } - else - { - char* data (reinterpret_cast (operator new (capacity))); - - if (copy && size_ > 0) - std::memcpy (data, data_, size_); - - if (free_ && data_) - operator delete (data_); - - data_ = data; - capacity_ = capacity; - free_ = true; - - return true; - } - } - } - } -} diff --git a/libxsd/xsd/cxx/tree/comparison-map.hxx b/libxsd/xsd/cxx/tree/comparison-map.hxx deleted file mode 100644 index a316b21..0000000 --- a/libxsd/xsd/cxx/tree/comparison-map.hxx +++ /dev/null @@ -1,112 +0,0 @@ -// file : xsd/cxx/tree/comparison-map.hxx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_TREE_COMPARISON_MAP_HXX -#define XSD_CXX_TREE_COMPARISON_MAP_HXX - -#include -#include // std::size_t -#include - -#include - -namespace xsd -{ - namespace cxx - { - namespace tree - { - template - struct comparison_map - { - typedef std::type_info type_id; - typedef bool (*comparator) (const type&, const type&); - - comparison_map (); - - void - register_type (const type_id&, comparator, bool replace = true); - - void - unregister_type (const type_id&); - - bool - compare (const type&, const type&); - - public: - comparator - find (const type_id&) const; - - private: - struct type_id_comparator - { - bool - operator() (const type_id* x, const type_id* y) const - { - // XL C++ on AIX has buggy type_info::before() in that - // it returns true for two different type_info objects - // that happened to be for the same type. - // -#if defined(__xlC__) && defined(_AIX) - return *x != *y && x->before (*y); -#else - return x->before (*y); -#endif - } - }; - - typedef - std::map - type_map; - - type_map type_map_; - }; - - // - // - template - struct comparison_plate - { - static comparison_map* map; - static std::size_t count; - - comparison_plate (); - ~comparison_plate (); - }; - - template - comparison_map* comparison_plate::map = 0; - - template - std::size_t comparison_plate::count = 0; - - - // - // - template - inline comparison_map& - comparison_map_instance () - { - return *comparison_plate::map; - } - - // - // - template - bool - comparator_impl (const type&, const type&); - - template - struct comparison_initializer - { - comparison_initializer (); - ~comparison_initializer (); - }; - } - } -} - -#include - -#endif // XSD_CXX_TREE_COMPARISON_MAP_HXX diff --git a/libxsd/xsd/cxx/tree/comparison-map.txx b/libxsd/xsd/cxx/tree/comparison-map.txx deleted file mode 100644 index af23d64..0000000 --- a/libxsd/xsd/cxx/tree/comparison-map.txx +++ /dev/null @@ -1,299 +0,0 @@ -// file : xsd/cxx/tree/comparison-map.txx -// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#include - -namespace xsd -{ - namespace cxx - { - namespace tree - { - // comparison_map - // - template - comparison_map:: - comparison_map () - { - // anyType and anySimpleType. - // - - register_type ( - typeid (type), - &comparator_impl, - false); - - typedef simple_type simple_type; - - register_type ( - typeid (simple_type), - &comparator_impl, - false); - - // Strings - // - typedef string string; - register_type ( - typeid (string), - &comparator_impl, - false); - - typedef normalized_string normalized_string; - register_type ( - typeid (normalized_string), - &comparator_impl, - false); - - typedef token token; - register_type ( - typeid (token), - &comparator_impl, - false); - - typedef name name; - register_type ( - typeid (name), - &comparator_impl, - false); - - typedef nmtoken nmtoken; - register_type ( - typeid (nmtoken), - &comparator_impl, - false); - - typedef nmtokens nmtokens; - register_type ( - typeid (nmtokens), - &comparator_impl, - false); - - typedef ncname ncname; - register_type ( - typeid (ncname), - &comparator_impl, - false); - - typedef language language; - register_type ( - typeid (language), - &comparator_impl, - false); - - - // ID/IDREF. - // - typedef id id; - register_type ( - typeid (id), - &comparator_impl, - false); - - typedef idref idref; - register_type ( - typeid (idref), - &comparator_impl, - false); - - typedef idrefs idrefs; - register_type ( - typeid (idrefs), - &comparator_impl, - false); - - - // URI. - // - typedef uri uri; - register_type ( - typeid (uri), - &comparator_impl, - false); - - - // Qualified name. - // - typedef qname qname; - register_type ( - typeid (qname), - &comparator_impl, - false); - - - // Binary. - // - typedef base64_binary base64_binary; - register_type ( - typeid (base64_binary), - &comparator_impl, - false); - - typedef hex_binary hex_binary; - register_type ( - typeid (hex_binary), - &comparator_impl, - false); - - - // Date/time. - // - typedef gday gday; - register_type ( - typeid (gday), - &comparator_impl, - false); - - typedef gmonth gmonth; - register_type ( - typeid (gmonth), - &comparator_impl, - false); - - typedef gyear gyear; - register_type ( - typeid (gyear), - &comparator_impl, - false); - - typedef gmonth_day gmonth_day; - register_type ( - typeid (gmonth_day), - &comparator_impl, - false); - - typedef gyear_month gyear_month; - register_type ( - typeid (gyear_month), - &comparator_impl, - false); - - typedef date date; - register_type ( - typeid (date), - &comparator_impl, - false); - - typedef time time; - register_type ( - typeid (time), - &comparator_impl