![]() |
Rosetta
2020.50
|
The XMLSchemaDefinition class's purpose is to collect all of the elements that go into an XML Schema, to filter out the elements that are repeated (e.g. a restriction such as the "int_cslist" given in the description for XMLSchemaRestriction above may be reported twice to the XMLSchemaDefinition by several attributes that rely upon it), to detect non-identical duplicates that have the same name, and to write out the elements that it has been handed into a single string. The XMLSchemaDefinition is intended to be passed between static functions / non-class-member functions as a container for the XML Schema representations that these functions define. Such functions will always take an XMLSchemaDefinition reference as one of their input parameters. It is perfectly legitimate / recommended for one XML-schema-defining function that relies on a complexType or restriction that it does not itself define to pass its input XMLSchemaDefinition to the function that does define that complexType or restriction. More...
#include <XMLSchemaGeneration.hh>
Public Member Functions | |
XMLSchemaDefinition () | |
~XMLSchemaDefinition () override | |
void | add_top_level_element (XMLSchemaTopLevelElement const &element) |
bool | has_top_level_element (std::string const &element_name) const |
std::string | full_definition () const |
Returns the full XML schema definition, in XML format. More... | |
std::string | human_readable_summary (std::string const &component_name="", std::string const &component_type="") const |
Returns a human-readable summary of the XML schema definition. More... | |
![]() | |
VirtualBase ()=default | |
Default constructor. More... | |
virtual | ~VirtualBase ()=default |
The virtual destructor is one of the main reasons for the VirtualBase class. More... | |
VirtualBase (VirtualBase const &)=default | |
VirtualBase (VirtualBase &&)=default | |
VirtualBase & | operator= (VirtualBase const &)=default |
VirtualBase & | operator= (VirtualBase &&)=default |
Private Member Functions | |
void | validate_new_top_level_element (std::string const &element_name, std::string const &definition) |
Private Attributes | |
std::list< std::string > | elements_in_order_ |
std::map< std::string, std::string > | top_level_elements_ |
The XMLSchemaDefinition class's purpose is to collect all of the elements that go into an XML Schema, to filter out the elements that are repeated (e.g. a restriction such as the "int_cslist" given in the description for XMLSchemaRestriction above may be reported twice to the XMLSchemaDefinition by several attributes that rely upon it), to detect non-identical duplicates that have the same name, and to write out the elements that it has been handed into a single string. The XMLSchemaDefinition is intended to be passed between static functions / non-class-member functions as a container for the XML Schema representations that these functions define. Such functions will always take an XMLSchemaDefinition reference as one of their input parameters. It is perfectly legitimate / recommended for one XML-schema-defining function that relies on a complexType or restriction that it does not itself define to pass its input XMLSchemaDefinition to the function that does define that complexType or restriction.
|
default |
|
overridedefault |
void utility::tag::XMLSchemaDefinition::add_top_level_element | ( | XMLSchemaTopLevelElement const & | element | ) |
References CREATE_EXCEPTION, utility::tag::XMLSchemaTopLevelElement::element_name(), elements_in_order_, test.T008_Serialization::oss, utility::tag::XMLSchemaTopLevelElement::prepare_for_output(), top_level_elements_, validate_new_top_level_element(), and utility::tag::XMLSchemaTopLevelElement::write_definition().
Referenced by utility::tag::activate_common_simple_type(), utility::tag::add_schema_restrictions_for_strings(), basic::database::attributes_for_parse_database_connection(), utility::tag::define_xml_schema_group(), and utility::tag::XMLSchemaComplexTypeGeneratorImpl::write_complex_type_to_schema().
std::string utility::tag::XMLSchemaDefinition::full_definition | ( | ) | const |
Returns the full XML schema definition, in XML format.
References elements_in_order_, test.T008_Serialization::oss, and top_level_elements_.
Referenced by human_readable_summary().
bool utility::tag::XMLSchemaDefinition::has_top_level_element | ( | std::string const & | element_name | ) | const |
References top_level_elements_.
Referenced by utility::tag::define_xml_schema_group().
std::string utility::tag::XMLSchemaDefinition::human_readable_summary | ( | std::string const & | component_name = "" , |
std::string const & | component_type = "" |
||
) | const |
Returns a human-readable summary of the XML schema definition.
SLOW! Must generate the summary for every invocation.
References full_definition(), and utility::xsd_util::generate_human_readable_summary().
|
private |
References utility::tag::Tag::create(), and CREATE_EXCEPTION.
Referenced by add_top_level_element().
|
private |
Referenced by add_top_level_element(), and full_definition().
|
private |
Referenced by add_top_level_element(), full_definition(), and has_top_level_element().