![]() |
Rosetta
2020.11
|
Public Types | |
enum | SetOfSubelementsBehavior { ss_repeatable, ss_optional, ss_required, ss_pick_one_opt, ss_pick_one_req } |
using | DerivedNameFunction = std::function< std::string(const std::string &)> |
using | NameFunction = std::function< std::string()> |
using | ElementSummaries = std::list< XMLSchemaSimpleSubelementList::ElementSummary > |
typedef std::list< std::pair < XMLSchemaSimpleSubelementList, SetOfSubelementsBehavior > > | SubelementSets |
![]() | |
typedef platform::Size | Size |
typedef platform::Size | size_type |
Public Member Functions | |
XMLSchemaComplexTypeGeneratorImpl () | |
~XMLSchemaComplexTypeGeneratorImpl () override | |
void | element_name (std::string const &) |
void | description (std::string const &) |
void | complex_type_naming_func (DerivedNameFunction const &naming_function) |
void | add_attribute (XMLSchemaAttribute const &attribute) |
void | add_attributes (AttributeList const &attributes) |
void | set_subelements_repeatable (XMLSchemaSimpleSubelementList const &subelements, int min_occurs, int max_occurs) |
set subelements as repeatable (and optional); setting the sub-elements replaces any sub-elements that were previously set. These repeatable subelements are allowed to appear in any order from the point of view of the XML Schema, which is not to say that the order in which they appear cannot matter to the code reading these subelements. The group_name string must be unique to Rosetta's XSD; it is needed in order to define an xs:group and then refer to that group within this xs:complexType. More... | |
void | set_subelements_pick_one_required (XMLSchemaSimpleSubelementList const &subelements) |
void | set_subelements_pick_one_optional (XMLSchemaSimpleSubelementList const &subelements) |
void | set_subelements_single_appearance_required (XMLSchemaSimpleSubelementList const &subelements) |
set subelements as single-appearance (and required); setting the sub-elements replaces any sub-elements that were previously set. These single-appearance subelements are allowed to appear in any order from the point of view of the XML Schema, which is not to say that the order in which they appear cannot matter to the code reading these subelements. More... | |
void | set_subelements_single_appearance_optional (XMLSchemaSimpleSubelementList const &subelements) |
set subelements as single-appearance (and optional); setting the sub-elements replaces any sub-elements that were previously set. These single-appearance subelements are allowed to appear in any order from the point of view of the XML Schema, which is not to say that the order in which they appear cannot matter to the code reading these subelements. More... | |
void | set_subelements_single_appearance_required_and_ordered (XMLSchemaSimpleSubelementList const &subelements) |
void | add_ordered_subelement_set_as_repeatable (XMLSchemaSimpleSubelementList const &subelements) |
Add a subelement list to a growing set of ordered subelements, where elements in this set are labeled as being repeatable. This function corresponds to case 8 in the list of behaviors above. More... | |
void | add_ordered_subelement_set_as_optional (XMLSchemaSimpleSubelementList const &subelements) |
Add a subelement list to a growing set of ordered subelements, where elements in this set are labeled as being optional. There should be only a single element in the input subelement list. This function corresponds to case 8 in the list of behaviors above. More... | |
void | add_ordered_subelement_set_as_required (XMLSchemaSimpleSubelementList const &subelements) |
Add a subelement list to a growing set of ordered subelements, where elements in this set are labeled as being requried. There should be only a single element in the input subelement list. This function corresponds to case 8 in the list of behaviors above. More... | |
void | add_ordered_subelement_set_as_pick_one_optional (XMLSchemaSimpleSubelementList const &subelements) |
Add a subelement list to a growing set of ordered subelements, where elements in this set are labeled as "pick one or none". There should be more than one element in the input subelement list. This function corresponds to case 8 in the list of behaviors above. More... | |
void | add_ordered_subelement_set_as_pick_one_required (XMLSchemaSimpleSubelementList const &subelements) |
Add a subelement list to a growing set of ordered subelements, where elements in this set are labeled as "pick exactly one". There should be more than one element in the input subelement list. This function corresponds to case 8 in the list of behaviors above. More... | |
CTGenSubelementBehavior | subelement_behavior () const |
void | write_complex_type_to_schema (XMLSchemaDefinition &xsd) |
![]() | |
ReferenceCount () | |
Default constructor. More... | |
virtual | ~ReferenceCount () |
Private Attributes | |
CTGenSubelementBehavior | subelement_behavior_ { se_none } |
std::string | element_name_ |
std::string | description_ |
DerivedNameFunction | complex_type_naming_function_ |
XMLSchemaSimpleSubelementList | subelements_ |
SubelementSets | subelement_sets_ |
AttributeList | attributes_ |
int | repeatable_min_occurs_ = 0 |
int | repeatable_max_occurs_ { xsminmax_unbounded } |
using utility::tag::XMLSchemaComplexTypeGeneratorImpl::DerivedNameFunction = std::function<std::string (const std::string &)> |
using utility::tag::XMLSchemaComplexTypeGeneratorImpl::ElementSummaries = std::list<XMLSchemaSimpleSubelementList::ElementSummary> |
using utility::tag::XMLSchemaComplexTypeGeneratorImpl::NameFunction = std::function<std::string ()> |
typedef std::list< std::pair< XMLSchemaSimpleSubelementList, SetOfSubelementsBehavior > > utility::tag::XMLSchemaComplexTypeGeneratorImpl::SubelementSets |
utility::tag::XMLSchemaComplexTypeGeneratorImpl::XMLSchemaComplexTypeGeneratorImpl | ( | ) |
|
overridedefault |
void utility::tag::XMLSchemaComplexTypeGeneratorImpl::add_attribute | ( | XMLSchemaAttribute const & | attribute | ) |
void utility::tag::XMLSchemaComplexTypeGeneratorImpl::add_attributes | ( | AttributeList const & | attributes | ) |
References attributes_.
Referenced by utility::tag::XMLSchemaComplexTypeGenerator::add_attributes(), and create_subelement().
void utility::tag::XMLSchemaComplexTypeGeneratorImpl::add_ordered_subelement_set_as_optional | ( | XMLSchemaSimpleSubelementList const & | subelements | ) |
Add a subelement list to a growing set of ordered subelements, where elements in this set are labeled as being optional. There should be only a single element in the input subelement list. This function corresponds to case 8 in the list of behaviors above.
References CREATE_EXCEPTION, utility::tag::XMLSchemaSimpleSubelementList::element_list(), utility::tag::se_ordered_sets, ss_optional, subelement_behavior_, and subelement_sets_.
Referenced by utility::tag::XMLSchemaComplexTypeGenerator::add_ordered_subelement_set_as_optional().
void utility::tag::XMLSchemaComplexTypeGeneratorImpl::add_ordered_subelement_set_as_pick_one_optional | ( | XMLSchemaSimpleSubelementList const & | subelements | ) |
Add a subelement list to a growing set of ordered subelements, where elements in this set are labeled as "pick one or none". There should be more than one element in the input subelement list. This function corresponds to case 8 in the list of behaviors above.
References utility::tag::se_ordered_sets, ss_pick_one_opt, subelement_behavior_, and subelement_sets_.
Referenced by utility::tag::XMLSchemaComplexTypeGenerator::add_ordered_subelement_set_as_pick_one_or_none().
void utility::tag::XMLSchemaComplexTypeGeneratorImpl::add_ordered_subelement_set_as_pick_one_required | ( | XMLSchemaSimpleSubelementList const & | subelements | ) |
Add a subelement list to a growing set of ordered subelements, where elements in this set are labeled as "pick exactly one". There should be more than one element in the input subelement list. This function corresponds to case 8 in the list of behaviors above.
References utility::tag::se_ordered_sets, ss_pick_one_req, subelement_behavior_, and subelement_sets_.
Referenced by utility::tag::XMLSchemaComplexTypeGenerator::add_ordered_subelement_set_as_pick_one().
void utility::tag::XMLSchemaComplexTypeGeneratorImpl::add_ordered_subelement_set_as_repeatable | ( | XMLSchemaSimpleSubelementList const & | subelements | ) |
Add a subelement list to a growing set of ordered subelements, where elements in this set are labeled as being repeatable. This function corresponds to case 8 in the list of behaviors above.
References utility::tag::se_ordered_sets, ss_repeatable, subelement_behavior_, and subelement_sets_.
Referenced by utility::tag::XMLSchemaComplexTypeGenerator::add_ordered_subelement_set_as_repeatable().
void utility::tag::XMLSchemaComplexTypeGeneratorImpl::add_ordered_subelement_set_as_required | ( | XMLSchemaSimpleSubelementList const & | subelements | ) |
Add a subelement list to a growing set of ordered subelements, where elements in this set are labeled as being requried. There should be only a single element in the input subelement list. This function corresponds to case 8 in the list of behaviors above.
References CREATE_EXCEPTION, utility::tag::XMLSchemaSimpleSubelementList::element_list(), utility::tag::se_ordered_sets, ss_required, subelement_behavior_, and subelement_sets_.
Referenced by utility::tag::XMLSchemaComplexTypeGenerator::add_ordered_subelement_set_as_required().
void utility::tag::XMLSchemaComplexTypeGeneratorImpl::complex_type_naming_func | ( | DerivedNameFunction const & | naming_function | ) |
References complex_type_naming_function_.
Referenced by utility::tag::XMLSchemaComplexTypeGenerator::complex_type_naming_func().
|
private |
References add_attributes(), utility::tag::XMLSchemaSimpleSubelementList::ElementSummary::attributes, utility::tag::XMLSchemaComplexTypeGenerator::complex_type_naming_func(), utility::tag::XMLSchemaSimpleSubelementList::ElementSummary::ct_group, utility::tag::XMLSchemaSimpleSubelementList::ElementSummary::ct_name, utility::tag::XMLSchemaSimpleSubelementList::ElementSummary::ct_ref, utility::tag::XMLSchemaSimpleSubelementList::ElementSummary::ct_simple, utility::tag::XMLSchemaSimpleSubelementList::ElementSummary::description, utility::tag::XMLSchemaComplexTypeGenerator::description(), utility::tag::XMLSchemaSimpleSubelementList::ElementSummary::element_name, utility::tag::XMLSchemaComplexTypeGenerator::element_name(), utility::tag::XMLSchemaSimpleSubelementList::ElementSummary::element_type, utility::tag::XMLSchemaSimpleSubelementList::ElementSummary::max_occurs, utility::tag::XMLSchemaSimpleSubelementList::ElementSummary::min_occurs, utility::tag::XMLSchemaSimpleSubelementList::ElementSummary::min_or_max_occurs_set, utility::tag::XMLSchemaSimpleSubelementList::naming_func(), utility::tag::XMLSchemaSimpleSubelementList::simple_element_naming_func_has_been_set(), subelements_, utility::tag::XMLSchemaComplexTypeGenerator::write_complex_type_to_schema(), and utility::tag::xsminmax_unspecified.
Referenced by prepare_sequence_of_subelement_sets(), prepare_subelement_choice_opt(), prepare_subelement_choice_req(), prepare_subelement_repeatable(), prepare_subelement_single_instance_optional(), prepare_subelement_single_instance_required(), and prepare_subelement_single_instance_required_ordered().
void utility::tag::XMLSchemaComplexTypeGeneratorImpl::description | ( | std::string const & | description | ) |
References CREATE_EXCEPTION, description_, element_name_, and utility::tag::string_contains_gt_lt_or_ampersand().
Referenced by utility::tag::XMLSchemaComplexTypeGenerator::description().
void utility::tag::XMLSchemaComplexTypeGeneratorImpl::element_name | ( | std::string const & | element_name | ) |
References element_name_.
Referenced by utility::tag::XMLSchemaComplexTypeGenerator::element_name().
|
private |
|
private |
|
private |
References CREATE_EXCEPTION, create_subelement(), utility::tag::XMLSchemaSimpleSubelementList::ElementSummary::ct_group, debug_assert, element_name_, only_one_subelement_and_that_subelement_is_a_ct_group(), basic::options::OptionKeys::in::file::seq, utility::tag::XMLSchemaComplexType::set_model_group(), ss_optional, ss_pick_one_opt, ss_pick_one_req, ss_repeatable, ss_required, subelement_sets_, utility::tag::xsmgt_choice, utility::tag::xsmgt_sequence, and utility::tag::xsminmax_unbounded.
Referenced by write_complex_type_to_schema().
|
private |
|
private |
|
private |
References CREATE_EXCEPTION, create_subelement(), utility::tag::XMLSchemaSimpleSubelementList::element_list(), only_one_subelement_and_that_subelement_is_a_ct_group(), repeatable_max_occurs_, repeatable_min_occurs_, utility::tag::XMLSchemaComplexType::set_model_group(), subelements_, and utility::tag::xsmgt_choice.
Referenced by write_complex_type_to_schema().
|
private |
References CREATE_EXCEPTION, create_subelement(), utility::tag::XMLSchemaSimpleSubelementList::element_list(), only_one_subelement_and_that_subelement_is_a_ct_group(), utility::tag::XMLSchemaComplexType::set_model_group(), subelements_, utility::to_string(), utility::tag::xsmgt_all, utility::tag::xsmgt_choice, utility::tag::xsminmax_unbounded, and utility::tag::xsminmax_unspecified.
Referenced by write_complex_type_to_schema().
|
private |
References create_subelement(), utility::tag::XMLSchemaSimpleSubelementList::element_list(), only_one_subelement_and_that_subelement_is_a_ct_group(), utility::tag::XMLSchemaComplexType::set_model_group(), subelements_, utility::tag::xsmgt_all, and utility::tag::xsmgt_choice.
Referenced by write_complex_type_to_schema().
|
private |
void utility::tag::XMLSchemaComplexTypeGeneratorImpl::set_subelements_pick_one_optional | ( | XMLSchemaSimpleSubelementList const & | subelements | ) |
void utility::tag::XMLSchemaComplexTypeGeneratorImpl::set_subelements_pick_one_required | ( | XMLSchemaSimpleSubelementList const & | subelements | ) |
References utility::tag::se_choice_req, subelement_behavior_, subelement_sets_, and subelements_.
Referenced by utility::tag::XMLSchemaComplexTypeGenerator::set_subelements_pick_one().
void utility::tag::XMLSchemaComplexTypeGeneratorImpl::set_subelements_repeatable | ( | XMLSchemaSimpleSubelementList const & | subelements, |
int | min_occurs, | ||
int | max_occurs | ||
) |
set subelements as repeatable (and optional); setting the sub-elements replaces any sub-elements that were previously set. These repeatable subelements are allowed to appear in any order from the point of view of the XML Schema, which is not to say that the order in which they appear cannot matter to the code reading these subelements. The group_name string must be unique to Rosetta's XSD; it is needed in order to define an xs:group and then refer to that group within this xs:complexType.
References repeatable_max_occurs_, repeatable_min_occurs_, utility::tag::se_repeatable, subelement_behavior_, subelement_sets_, and subelements_.
Referenced by utility::tag::XMLSchemaComplexTypeGenerator::set_subelements_repeatable().
void utility::tag::XMLSchemaComplexTypeGeneratorImpl::set_subelements_single_appearance_optional | ( | XMLSchemaSimpleSubelementList const & | subelements | ) |
set subelements as single-appearance (and optional); setting the sub-elements replaces any sub-elements that were previously set. These single-appearance subelements are allowed to appear in any order from the point of view of the XML Schema, which is not to say that the order in which they appear cannot matter to the code reading these subelements.
References CREATE_EXCEPTION, utility::tag::XMLSchemaSimpleSubelementList::ElementSummary::ct_group, utility::tag::XMLSchemaSimpleSubelementList::element_list(), utility::tag::se_single_opt, subelement_behavior_, subelement_sets_, and subelements_.
Referenced by utility::tag::XMLSchemaComplexTypeGenerator::set_subelements_single_appearance_optional().
void utility::tag::XMLSchemaComplexTypeGeneratorImpl::set_subelements_single_appearance_required | ( | XMLSchemaSimpleSubelementList const & | subelements | ) |
set subelements as single-appearance (and required); setting the sub-elements replaces any sub-elements that were previously set. These single-appearance subelements are allowed to appear in any order from the point of view of the XML Schema, which is not to say that the order in which they appear cannot matter to the code reading these subelements.
References CREATE_EXCEPTION, utility::tag::XMLSchemaSimpleSubelementList::ElementSummary::ct_group, utility::tag::XMLSchemaSimpleSubelementList::element_list(), utility::tag::se_single_req, subelement_behavior_, subelement_sets_, and subelements_.
Referenced by utility::tag::XMLSchemaComplexTypeGenerator::set_subelements_single_appearance_required().
void utility::tag::XMLSchemaComplexTypeGeneratorImpl::set_subelements_single_appearance_required_and_ordered | ( | XMLSchemaSimpleSubelementList const & | subelements | ) |
CTGenSubelementBehavior utility::tag::XMLSchemaComplexTypeGeneratorImpl::subelement_behavior | ( | ) | const |
References subelement_behavior_.
Referenced by utility::tag::XMLSchemaComplexTypeGenerator::subelement_behavior().
void utility::tag::XMLSchemaComplexTypeGeneratorImpl::write_complex_type_to_schema | ( | XMLSchemaDefinition & | xsd | ) |
References utility::tag::XMLSchemaComplexType::add_attributes(), utility::tag::XMLSchemaDefinition::add_top_level_element(), attributes_, complex_type_naming_function_, CREATE_EXCEPTION, debug_assert, utility::tag::XMLSchemaComplexType::description(), description_, element_name_, utility::tag::XMLSchemaComplexType::name(), test.T008_Serialization::oss, prepare_sequence_of_subelement_sets(), prepare_subelement_choice_opt(), prepare_subelement_choice_req(), prepare_subelement_repeatable(), prepare_subelement_single_instance_optional(), prepare_subelement_single_instance_required(), prepare_subelement_single_instance_required_ordered(), utility::tag::se_choice_opt, utility::tag::se_choice_req, utility::tag::se_none, utility::tag::se_ordered_sets, utility::tag::se_repeatable, utility::tag::se_single_opt, utility::tag::se_single_req, utility::tag::se_single_req_ordered, and subelement_behavior_.
Referenced by utility::tag::XMLSchemaComplexTypeGenerator::write_complex_type_to_schema().
|
private |
Referenced by add_attribute(), add_attributes(), and write_complex_type_to_schema().
|
private |
Referenced by complex_type_naming_func(), and write_complex_type_to_schema().
|
private |
Referenced by description(), and write_complex_type_to_schema().
|
private |
Referenced by description(), element_name(), prepare_sequence_of_subelement_sets(), and write_complex_type_to_schema().
|
private |
Referenced by prepare_subelement_repeatable(), and set_subelements_repeatable().
|
private |
Referenced by prepare_subelement_repeatable(), and set_subelements_repeatable().
|
private |
Referenced by add_ordered_subelement_set_as_optional(), add_ordered_subelement_set_as_pick_one_optional(), add_ordered_subelement_set_as_pick_one_required(), add_ordered_subelement_set_as_repeatable(), add_ordered_subelement_set_as_required(), set_subelements_pick_one_optional(), set_subelements_pick_one_required(), set_subelements_repeatable(), set_subelements_single_appearance_optional(), set_subelements_single_appearance_required(), set_subelements_single_appearance_required_and_ordered(), subelement_behavior(), and write_complex_type_to_schema().
|
private |
Referenced by add_ordered_subelement_set_as_optional(), add_ordered_subelement_set_as_pick_one_optional(), add_ordered_subelement_set_as_pick_one_required(), add_ordered_subelement_set_as_repeatable(), add_ordered_subelement_set_as_required(), prepare_sequence_of_subelement_sets(), set_subelements_pick_one_optional(), set_subelements_pick_one_required(), set_subelements_repeatable(), set_subelements_single_appearance_optional(), set_subelements_single_appearance_required(), and set_subelements_single_appearance_required_and_ordered().
|
private |
Referenced by create_subelement(), only_one_subelement_and_that_subelement_is_a_ct_group(), prepare_subelement_choice_opt(), prepare_subelement_choice_req(), prepare_subelement_repeatable(), prepare_subelement_single_instance_optional(), prepare_subelement_single_instance_required(), prepare_subelement_single_instance_required_ordered(), set_subelements_pick_one_optional(), set_subelements_pick_one_required(), set_subelements_repeatable(), set_subelements_single_appearance_optional(), set_subelements_single_appearance_required(), and set_subelements_single_appearance_required_and_ordered().