Rosetta  2020.11
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
utility::tag::XMLSchemaComplexTypeGeneratorImpl Class Reference
Inheritance diagram for utility::tag::XMLSchemaComplexTypeGeneratorImpl:
Inheritance graph
[legend]

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
 
- Public Types inherited from utility::pointer::ReferenceCount
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)
 
- Public Member Functions inherited from utility::pointer::ReferenceCount
 ReferenceCount ()
 Default constructor. More...
 
virtual ~ReferenceCount ()
 

Private Member Functions

bool only_one_subelement_and_that_subelement_is_a_ct_group () const
 
bool only_one_subelement_and_that_subelement_is_a_ct_group (XMLSchemaSimpleSubelementList const &subelements) const
 
void prepare_subelement_repeatable (XMLSchemaDefinition &xsd, XMLSchemaComplexType &complex_type)
 
void prepare_subelement_choice_req (XMLSchemaDefinition &xsd, XMLSchemaComplexType &complex_type)
 
void prepare_subelement_choice_opt (XMLSchemaDefinition &xsd, XMLSchemaComplexType &complex_type)
 
void prepare_subelement_single_instance_required (XMLSchemaDefinition &xsd, XMLSchemaComplexType &complex_type)
 
void prepare_subelement_single_instance_optional (XMLSchemaDefinition &xsd, XMLSchemaComplexType &complex_type)
 
void prepare_subelement_single_instance_required_ordered (XMLSchemaDefinition &xsd, XMLSchemaComplexType &complex_type)
 
void prepare_sequence_of_subelement_sets (XMLSchemaDefinition &xsd, XMLSchemaComplexType &complex_type)
 
XMLSchemaParticleOP create_subelement (XMLSchemaSimpleSubelementList::ElementSummary const &summary, XMLSchemaDefinition &xsd)
 

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 }
 

Member Typedef Documentation

using utility::tag::XMLSchemaComplexTypeGeneratorImpl::DerivedNameFunction = std::function<std::string (const std::string &)>

Member Enumeration Documentation

Enumerator
ss_repeatable 
ss_optional 
ss_required 
ss_pick_one_opt 
ss_pick_one_req 

Constructor & Destructor Documentation

utility::tag::XMLSchemaComplexTypeGeneratorImpl::XMLSchemaComplexTypeGeneratorImpl ( )
utility::tag::XMLSchemaComplexTypeGeneratorImpl::~XMLSchemaComplexTypeGeneratorImpl ( )
overridedefault

Member Function Documentation

void utility::tag::XMLSchemaComplexTypeGeneratorImpl::add_attribute ( XMLSchemaAttribute const &  attribute)
void utility::tag::XMLSchemaComplexTypeGeneratorImpl::add_attributes ( AttributeList const &  attributes)
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)
XMLSchemaParticleOP utility::tag::XMLSchemaComplexTypeGeneratorImpl::create_subelement ( XMLSchemaSimpleSubelementList::ElementSummary const &  summary,
XMLSchemaDefinition xsd 
)
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)
void utility::tag::XMLSchemaComplexTypeGeneratorImpl::element_name ( std::string const &  element_name)
bool utility::tag::XMLSchemaComplexTypeGeneratorImpl::only_one_subelement_and_that_subelement_is_a_ct_group ( ) const
private
bool utility::tag::XMLSchemaComplexTypeGeneratorImpl::only_one_subelement_and_that_subelement_is_a_ct_group ( XMLSchemaSimpleSubelementList const &  subelements) const
private
void utility::tag::XMLSchemaComplexTypeGeneratorImpl::prepare_sequence_of_subelement_sets ( XMLSchemaDefinition xsd,
XMLSchemaComplexType complex_type 
)
private
void utility::tag::XMLSchemaComplexTypeGeneratorImpl::prepare_subelement_choice_opt ( XMLSchemaDefinition xsd,
XMLSchemaComplexType complex_type 
)
private
void utility::tag::XMLSchemaComplexTypeGeneratorImpl::prepare_subelement_choice_req ( XMLSchemaDefinition xsd,
XMLSchemaComplexType complex_type 
)
private
void utility::tag::XMLSchemaComplexTypeGeneratorImpl::prepare_subelement_repeatable ( XMLSchemaDefinition xsd,
XMLSchemaComplexType complex_type 
)
private
void utility::tag::XMLSchemaComplexTypeGeneratorImpl::prepare_subelement_single_instance_optional ( XMLSchemaDefinition xsd,
XMLSchemaComplexType complex_type 
)
private
void utility::tag::XMLSchemaComplexTypeGeneratorImpl::prepare_subelement_single_instance_required ( XMLSchemaDefinition xsd,
XMLSchemaComplexType complex_type 
)
private
void utility::tag::XMLSchemaComplexTypeGeneratorImpl::prepare_subelement_single_instance_required_ordered ( XMLSchemaDefinition xsd,
XMLSchemaComplexType complex_type 
)
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)
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
void utility::tag::XMLSchemaComplexTypeGeneratorImpl::write_complex_type_to_schema ( XMLSchemaDefinition xsd)

Member Data Documentation

AttributeList utility::tag::XMLSchemaComplexTypeGeneratorImpl::attributes_
private
DerivedNameFunction utility::tag::XMLSchemaComplexTypeGeneratorImpl::complex_type_naming_function_
private
std::string utility::tag::XMLSchemaComplexTypeGeneratorImpl::description_
private
std::string utility::tag::XMLSchemaComplexTypeGeneratorImpl::element_name_
private
int utility::tag::XMLSchemaComplexTypeGeneratorImpl::repeatable_max_occurs_ { xsminmax_unbounded }
private
int utility::tag::XMLSchemaComplexTypeGeneratorImpl::repeatable_min_occurs_ = 0
private
CTGenSubelementBehavior utility::tag::XMLSchemaComplexTypeGeneratorImpl::subelement_behavior_ { se_none }
private
SubelementSets utility::tag::XMLSchemaComplexTypeGeneratorImpl::subelement_sets_
private
XMLSchemaSimpleSubelementList utility::tag::XMLSchemaComplexTypeGeneratorImpl::subelements_
private

The documentation for this class was generated from the following file: