COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
covise::coConfigSchema Class Reference

#include <coConfigSchema.h>

Collaboration diagram for covise::coConfigSchema:
Collaboration graph
[legend]

Public Member Functions

QStringList getGroupsFromSchema ()
 return a List of all Groups (is used in mainwindow to create treeModel) More...
 
coConfigSchemaInfosListgetSchemaInfosForGroup (const QString groupName)
 deliver coConfigSchemaInfosList for group if exists, else nullPointer More...
 
coConfigSchemaInfosgetSchemaInfosForElement (const QString &name)
 return a pointer to the coConfigSchemaInfos of an element More...
 

Static Public Member Functions

static coConfigSchemagetInstance (xercesc::XSModel *model=0)
 
static void loadSchema (const QString &filename=0)
 

Protected Member Functions

 coConfigSchema (xercesc::XSModel *model)
 
 ~coConfigSchema ()
 

Private Member Functions

coConfigSchemaInfoscreateSchemaInfos (xercesc::XSElementDeclaration *elementDecl, const QString parent=QString(""))
 walk the SchemaTree from a given Element, create coConfigSchemaInfos for each and fill them with name in elements Hash More...
 
void sortInGroups ()
 
void walkTree ()
 
void addAnnotationsForElement (xercesc::XSElementDeclaration *elementDecl, coConfigSchemaInfos *schemaInfos)
 get annotations for a element and fill them into the coConfigSchemaInfos More...
 
QHash< QString, QString > * createFromSchemaFileAnnotationsList (xercesc::XSAnnotationList *annoList)
 
QHash< QString, QString > * createFromSchemaFileAnnotation (xercesc::XSAnnotation *anno)
 collects content of xs:appinfo (e.g.: name = "MyName"), divides them by = and adds to a QHash More...
 
QString processSimpleTypeDefinition (xercesc::XSSimpleTypeDefinition *xsSimpleTypeDef)
 
QList
< xercesc::XSElementDeclaration * > 
processParticle (xercesc::XSParticle *xsParticle)
 
QString printCompositorTypeConnector (xercesc::XSModelGroup::COMPOSITOR_TYPE type)
 

Private Attributes

QHash< QString,
coConfigSchemaInfos * > 
elements
 
QHash< QString,
coConfigSchemaInfosList * > 
groups
 
bool walked
 

Static Private Attributes

static xercesc::XSModel * xsModel = 0
 
static coConfigSchemaconfigSchema = 0
 
static QString fileName = ""
 

Constructor & Destructor Documentation

covise::coConfigSchema::coConfigSchema ( xercesc::XSModel *  model)
inlineprotected
coConfigSchema::~coConfigSchema ( )
protected

Member Function Documentation

void coConfigSchema::addAnnotationsForElement ( xercesc::XSElementDeclaration *  elementDecl,
coConfigSchemaInfos schemaInfos 
)
private

get annotations for a element and fill them into the coConfigSchemaInfos

QHash< QString, QString > * coConfigSchema::createFromSchemaFileAnnotation ( xercesc::XSAnnotation *  anno)
private

collects content of xs:appinfo (e.g.: name = "MyName"), divides them by = and adds to a QHash

QHash< QString, QString > * coConfigSchema::createFromSchemaFileAnnotationsList ( xercesc::XSAnnotationList *  annoList)
private
coConfigSchemaInfos * coConfigSchema::createSchemaInfos ( xercesc::XSElementDeclaration *  elementDecl,
const QString  parent = QString("") 
)
private

walk the SchemaTree from a given Element, create coConfigSchemaInfos for each and fill them with name in elements Hash

process elementType

process Attributes of type

now finaly add infos for one attribute to cConfigSchemaInfo object QStr name of attribute e.g. value bool if attribute is required or optional QStr defaultValue QStr readableRule get QString pattern for RegExp QStr attributeDescrition

end process Attributes of type,

QStringList coConfigSchema::getGroupsFromSchema ( )

return a List of all Groups (is used in mainwindow to create treeModel)

static coConfigSchema* covise::coConfigSchema::getInstance ( xercesc::XSModel *  model = 0)
inlinestatic
coConfigSchemaInfos * coConfigSchema::getSchemaInfosForElement ( const QString &  name)

return a pointer to the coConfigSchemaInfos of an element

coConfigSchemaInfosList * coConfigSchema::getSchemaInfosForGroup ( const QString  groupName)

deliver coConfigSchemaInfosList for group if exists, else nullPointer

void coConfigSchema::loadSchema ( const QString &  filename = 0)
static
QString coConfigSchema::printCompositorTypeConnector ( xercesc::XSModelGroup::COMPOSITOR_TYPE  type)
private
QList< xercesc::XSElementDeclaration * > coConfigSchema::processParticle ( xercesc::XSParticle *  xsParticle)
private
QString coConfigSchema::processSimpleTypeDefinition ( xercesc::XSSimpleTypeDefinition *  xsSimpleTypeDef)
private
void coConfigSchema::sortInGroups ( )
private
void coConfigSchema::walkTree ( )
private

Member Data Documentation

covise::coConfigSchema * coConfigSchema::configSchema = 0
staticprivate
QHash<QString, coConfigSchemaInfos *> covise::coConfigSchema::elements
private
QString coConfigSchema::fileName = ""
staticprivate
QHash<QString, coConfigSchemaInfosList *> covise::coConfigSchema::groups
private
bool covise::coConfigSchema::walked
private
xercesc::XSModel * coConfigSchema::xsModel = 0
staticprivate

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