Actin®  Version 5.2.0
Software for Robotics Simulation and Control
EcXmlSchema Class Reference

Class for generating schemas. More...

#include <ecXmlSchema.h>

Classes

struct  EcRegisterType
 registered type info More...
 

Public Types

enum  XML_SCHEMA_MODE {
  NEW_FILE,
  START_TAG,
  ATTRIBUTE_NAME,
  ATTRIBUTE_VALUE,
  CONTENT,
  END_TAG,
  ERROR_FOUND
}
 XML Schema Mode. More...
 

Public Member Functions

 EcXmlSchema ()
 default constructor
 
virtual ~EcXmlSchema ()
 default destructor
 
 EcXmlSchema (const EcXmlSchema &orig)
 copy constructor
 
EcXmlSchemaoperator= (const EcXmlSchema &orig)
 assignment operator
 
EcBoolean operator== (const EcXmlSchema &orig) const
 equality operator
 
virtual EcBoolean writeStartTag (const EcToken &elementName, const EcXmlSchemaElementType::XML_STARTTAG_OPTION mode=EcXmlSchemaElementType::SEQUENCE)
 new start tag More...
 
virtual EcBoolean writeStartTagUsingParentNamespace (const EcString &elementName, const EcXmlSchemaElementType::XML_STARTTAG_OPTION mode=EcXmlSchemaElementType::SEQUENCE)
 new start tag More...
 
virtual void setAttributeName (const EcToken &attributeName)
 new attribute name More...
 
virtual void setType (const std::type_info &typeInfo)
 set type More...
 
virtual void writeEndTag ()
 new end tag
 
virtual void writeEndTagRecursive ()
 new end tag for recursive element
 
virtual void openGroup ()
 open a schema group
 
virtual void closeGroup ()
 close a schema group
 
virtual EcBoolean write (EcString xmlFilename)
 write schema files More...
 
virtual EcBoolean isRegistered (const EcToken &name, const EcString &type)
 test if element registered More...
 
virtual void unRegister (const EcToken &name, const EcString &type)
 remove element from registry More...
 
virtual void setAttributeType (const EcString &attributeType)
 attribute type More...
 
virtual void setContentType (const EcString &contentType)
 Set content type. More...
 
virtual void writeComplexType (std::ostream &stream, EcString namespaceUri)
 write element complex type description More...
 
virtual void globalElement (EcToken elementName, EcString elementNamespace, EcString elementType)
 put global element More...
 
virtual EcString convertNamespaceToPrefix (EcString elementNamespace)
 convert namespace URI to namespace prefix More...
 
virtual EcString insertSimpleType (const EcString &type, const EcString &namespaceUri)
 insert new simple type More...
 
virtual EcString insertComplexType (const EcXmlSchemaComplexType &type, const EcString &name)
 insert new complex type More...
 
virtual EcString insertGroupType (const EcXmlSchemaGroupType &type, const EcString &name)
 insert new element group type More...
 
virtual void updateRegistry (const EcToken &name, const EcString &type, const EcString &complexType, const EcString &simpleType)
 update registry More...
 
virtual void getFromRegistry (const EcToken &name, const EcString &type, EcString &complexType, EcString &simpleType) const
 get from registry More...
 

Protected Attributes

XML_SCHEMA_MODE m_XmlSchemaMode
 XML writer mode.
 
EcXmlSchemaElement m_Root
 root element
 
EcXmlSchemaElementm_pCurrentElement
 current element for processing
 
std::vector< EcXmlSchemaGlobalElementTypem_vElement
 vector of global elements
 
std::map< EcString, EcStringm_SimpleTypes
 map of global simple types (basic type / expanded type pair)
 
std::map< EcString, EcXmlSchemaComplexTypem_ComplexTypes
 map of global complex types (name / complex type pair)
 
std::map< EcString, EcXmlSchemaGroupTypem_ElementGroups
 map of global element groups (name / element group pair)
 
EcSizeT m_GroupIndex
 index for distinguishing group
 
std::map< EcString, EcStringm_NamespaceMap
 namespace map (URI / prefix pair)
 
EcStringVector m_vNamespaceImportOrder
 vector containing order of namespaces (who imports who)
 
std::multimap< EcToken, EcRegisterTypem_RegisteredElements
 map of registered elements for stopping recursion (name / type pair)
 

Detailed Description

Class for generating schemas.

Examples:
ecXmlMain.cpp.

Definition at line 22 of file ecXmlSchema.h.

Member Enumeration Documentation

XML Schema Mode.

Enumerator
NEW_FILE 

Initial state.

START_TAG 

Start tag opened.

ATTRIBUTE_NAME 

Attribute name written.

ATTRIBUTE_VALUE 

Attribute value written.

CONTENT 

Content written.

END_TAG 

Tag closed.

ERROR_FOUND 

Error found.

Definition at line 26 of file ecXmlSchema.h.

Member Function Documentation

virtual EcString EcXmlSchema::convertNamespaceToPrefix ( EcString  elementNamespace)
virtual

convert namespace URI to namespace prefix

Parameters
elementNamespaceURI
Returns
prefix
virtual void EcXmlSchema::getFromRegistry ( const EcToken name,
const EcString type,
EcString complexType,
EcString simpleType 
) const
virtual

get from registry

Parameters
nameElement name
typeElement type
complexTypeComplex type (output)
simpleTypeSimple type (output)
virtual void EcXmlSchema::globalElement ( EcToken  elementName,
EcString  elementNamespace,
EcString  elementType 
)
virtual

put global element

Parameters
elementNameElement name
elementNamespaceElement namespace
elementTypeElement type
virtual EcString EcXmlSchema::insertComplexType ( const EcXmlSchemaComplexType type,
const EcString name 
)
virtual

insert new complex type

Parameters
typeElement type for comparison
nameInput type name
Return values
newtype name
virtual EcString EcXmlSchema::insertGroupType ( const EcXmlSchemaGroupType type,
const EcString name 
)
virtual

insert new element group type

Parameters
typeGroup type for comparison
nameDefault name if not already registered
Return values
newtype name
virtual EcString EcXmlSchema::insertSimpleType ( const EcString type,
const EcString namespaceUri 
)
virtual

insert new simple type

Parameters
typeBase type
namespaceUriNamespace URI
Return values
newsimple type
virtual EcBoolean EcXmlSchema::isRegistered ( const EcToken name,
const EcString type 
)
virtual

test if element registered

Parameters
nameElement name
typeElement type
Return values
Isregistered? True/False
virtual void EcXmlSchema::setAttributeName ( const EcToken attributeName)
virtual

new attribute name

Parameters
attributeNameAttribute name
virtual void EcXmlSchema::setAttributeType ( const EcString attributeType)
virtual

attribute type

Parameters
attributeTypeAttribute type
virtual void EcXmlSchema::setContentType ( const EcString contentType)
virtual

Set content type.

Parameters
contentTypeContent type
virtual void EcXmlSchema::setType ( const std::type_info &  typeInfo)
virtual

set type

Parameters
typeInfoInput type
virtual void EcXmlSchema::unRegister ( const EcToken name,
const EcString type 
)
virtual

remove element from registry

Parameters
nameElement name
typeElement type
virtual void EcXmlSchema::updateRegistry ( const EcToken name,
const EcString type,
const EcString complexType,
const EcString simpleType 
)
virtual

update registry

Parameters
nameElement name
typeElement type
complexTypeComplex type name
simpleTypeSimple type name
virtual EcBoolean EcXmlSchema::write ( EcString  xmlFilename)
virtual

write schema files

Parameters
xmlFilenameFilename for output
Return values
errorflag
virtual void EcXmlSchema::writeComplexType ( std::ostream &  stream,
EcString  namespaceUri 
)
virtual

write element complex type description

Parameters
streamOutput stream
namespaceUrinamespace of complex types to be written
virtual EcBoolean EcXmlSchema::writeStartTag ( const EcToken elementName,
const EcXmlSchemaElementType::XML_STARTTAG_OPTION  mode = EcXmlSchemaElementType::SEQUENCE 
)
virtual

new start tag

Parameters
elementNameElement name
modeGroup mode (choice or sequence)
Return values
recursiveelement flag
virtual EcBoolean EcXmlSchema::writeStartTagUsingParentNamespace ( const EcString elementName,
const EcXmlSchemaElementType::XML_STARTTAG_OPTION  mode = EcXmlSchemaElementType::SEQUENCE 
)
virtual

new start tag

Parameters
elementNameElement name
modeGroup mode (choice or sequence)
Return values
recursiveelement flag

The documentation for this class was generated from the following file:
Created by Energid Technologies www.energid.com
Copyright © 2016 Energid. All trademarks mentioned in this document are property of their respective owners.