Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
utility::tag::XMLSchemaElement Class Reference

An XMLSchema element, e.g. the FixbbMover "tag" <FixbbMover name="fixbb" task_operations="ex1,ex2"> or the And element which contains a sub-element: <And><Chain id="A"></And>. An element can be defined with an unnamed complex type in-line, or it can say that its type is that of a complex type defined elsewhere. (In XML naming a tag is a single block beginning with "<" and ending with ">", so both "<And>" and "</And>" are tags. The block between the opening and closing tags is called an element. The utility::tag::Tag class represents a complete Element, and not simply the opening or closing tag of an element. This is certainly confusing. More...

#include <XMLSchemaGeneration.hh>

Inheritance diagram for utility::tag::XMLSchemaElement:
Inheritance graph
[legend]

Public Member Functions

 XMLSchemaElement ()
 
XMLSchemaElementname (std::string const &setting)
 
XMLSchemaElementset_abstract ()
 
XMLSchemaElementsubstitution_group (std::string const &setting)
 
XMLSchemaElementtype_name (XMLSchemaType setting)
 
XMLSchemaElementreference_name (std::string const &setting)
 
XMLSchemaElementelement_type_def (XMLSchemaComplexTypeOP setting)
 
std::string const & element_name () const override
 
void write_definition (int indentation, std::ostream &os) const override
 
void prepare_for_output (XMLSchemaDefinition &xsd) const override
 
- Public Member Functions inherited from utility::tag::XMLSchemaParticle
 XMLSchemaParticle ()
 
 ~XMLSchemaParticle () override
 
XMLSchemaParticlemin_occurs (int setting)
 
XMLSchemaParticlemax_occurs (int setting)
 
int min_occurs () const
 
int max_occurs () const
 
- Public Member Functions inherited from utility::VirtualBase
 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
 
VirtualBaseoperator= (VirtualBase const &)=default
 
VirtualBaseoperator= (VirtualBase &&)=default
 

Private Attributes

XMLSchemaElementCategory category_
 
std::string name_
 
XMLSchemaType type_name_
 
XMLSchemaComplexTypeOP complex_type_
 
std::string substitution_group_
 

Detailed Description

An XMLSchema element, e.g. the FixbbMover "tag" <FixbbMover name="fixbb" task_operations="ex1,ex2"> or the And element which contains a sub-element: <And><Chain id="A"></And>. An element can be defined with an unnamed complex type in-line, or it can say that its type is that of a complex type defined elsewhere. (In XML naming a tag is a single block beginning with "<" and ending with ">", so both "<And>" and "</And>" are tags. The block between the opening and closing tags is called an element. The utility::tag::Tag class represents a complete Element, and not simply the opening or closing tag of an element. This is certainly confusing.

An element may either have its type definition given inline (i.e. as a sub-tag / sub-element of the element declaration) as either a complex type or a restriction – or it may have its type definition given by reference to a (named) type defined elsewhere in the XML Schema. In Rosetta's style of XML, the type of an element is universally a complex type; if the element's type were given as either a primitive type, or a restriction, then the data would have to appear between two tags, e.g.

<FirstName> Andrew </FirstName>

and in Rosetta's XML, we ignore everything that appears outside of a tag, and store all of the data in attributes (aka options) inside of tags. The elements in Rosetta either are "empty" or they contain sub-elements: both of these are classified as complex types in XML Schema.

Elements may appear multiple times, and the number of times they must/may appear are controlled by the min_occurs and max_occurs functions. If you are setting no limit on max_occurs, use the "xsminmax_unbounded" value of the XMLSchemaMinOccursMaxOccurs enumeration.

Constructor & Destructor Documentation

utility::tag::XMLSchemaElement::XMLSchemaElement ( )

Member Function Documentation

std::string const & utility::tag::XMLSchemaElement::element_name ( ) const
overridevirtual
XMLSchemaElement & utility::tag::XMLSchemaElement::element_type_def ( XMLSchemaComplexTypeOP  setting)
XMLSchemaElement & utility::tag::XMLSchemaElement::name ( std::string const &  setting)
void utility::tag::XMLSchemaElement::prepare_for_output ( XMLSchemaDefinition xsd) const
overridevirtual
XMLSchemaElement & utility::tag::XMLSchemaElement::reference_name ( std::string const &  setting)
XMLSchemaElement & utility::tag::XMLSchemaElement::set_abstract ( )
XMLSchemaElement & utility::tag::XMLSchemaElement::substitution_group ( std::string const &  setting)

References substitution_group_.

XMLSchemaElement & utility::tag::XMLSchemaElement::type_name ( XMLSchemaType  setting)
void utility::tag::XMLSchemaElement::write_definition ( int  indentation,
std::ostream &  os 
) const
overridevirtual

Member Data Documentation

XMLSchemaElementCategory utility::tag::XMLSchemaElement::category_
private
XMLSchemaComplexTypeOP utility::tag::XMLSchemaElement::complex_type_
private
std::string utility::tag::XMLSchemaElement::name_
private
std::string utility::tag::XMLSchemaElement::substitution_group_
private
XMLSchemaType utility::tag::XMLSchemaElement::type_name_
private

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