Classes | Public Member Functions | Private Attributes | Static Private Attributes

WocClass Class Reference

stores a communication class including serialization and deserialization information More...

#include <procclass.h>

List of all members.

Classes

struct  s_map
 mappings: "table-name" => List of ("column-name","property-name") More...
struct  s_prop
 property info More...

Public Member Functions

 WocClass (const QDomElement &)
 parses XML to create itself
bool isValid () const
 returns whether parsing was successful and this instance represents a valid communication class
QString name () const
 returns the class name
QString baseClass (QString lang, QString prefix) const
 returns the name of the class it is derived from - default: WObject
bool hasProperty (QString) const
 returns true of it has a property with this name
QStringList propertyNames () const
 returns a list of all property names
QString propertyType (QString) const
 returns the type string of the property, including "List:" if applicable
QString propertyPlainType (QString) const
 returns the plain type string of the property without "List:"
bool propertyIsIdentity (QString) const
 returns whether this property identifies the object instance
bool propertyIsAbstract (QString) const
 returns whether this property is abstract
bool propertyIsAttribute (QString) const
 returns whether this property is serialized as XML attribute
bool propertyIsElement (QString) const
 returns whether this property is serialized as XML element
bool propertyIsSimpleElement (QString) const
 returns whether this property is serialized as XML element, but not a class
bool propertyIsEnum (QString) const
 returns whether this property has an enum type
bool propertyIsObject (QString) const
 returns whether the property is an object
bool propertyIsList (QString) const
 returns whether the property is a list of values (false for scalars)
bool propertyIsInt (QString p) const
 returns whether the property type is integer
bool propertyIsBool (QString p) const
 returns whether the property type is boolean
bool propertyIsString (QString p) const
 returns whether the property type is string
bool propertyIsBlob (QString p) const
 returns whether the property type is blob
bool isAbstract (QString) const
 returns whether the class is abstract in the requested language (needs to be customized); it is automatically abstract if any property is abstract
QStringList abstractLangs () const
 returns the languages in which the class is conditionally abstract
QStringList enumTypes () const
 returns the names of all enum types of this class
bool hasEnumType (QString t) const
 returns true if the given enum type exists in this class
QList< WocEnumenumValues (QString t) const
 returns a list of enum values as name-value pairs
bool hasMapping (QString m) const
 returns true if the given mapping exists
QStringList mappingTables () const
 returns the names of all tables for which a mapping exists
QStringList mappingProperties (QString) const
 returns the (correctly ordered) properties for a mapping
QMap< QString, QString > mapping (QString m) const
 returns the specific mapping; map key=property, map value=column
QString mapMethod (QString table, QString property, QString lang) const
 returns the method for a specific mapping or an empty string if it does not exist in the specified language
QStringList docStrings () const
 returns documentation for this class
QString propDoc (QString p) const
 returns documentation for a property
QString enumDoc (QString e) const
 returns base documentation for enums

Private Attributes

bool m_valid
 valid: parsing the WOLF succeeded
bool m_abstract
 abstract: the class is declared abstract (isAbstract may return true even if this is false)
QStringList m_cabstract
 cabstract: conditional abstract - just for one or two languages; abstract overrides cabstract!
QString m_name
 class name without prefix
QMap< QString, QString > m_base
 name of parent class ("wolf" => the "base" attributes' content)
QList< s_propm_props
QMap< QString, QList< s_map > > m_maps
QMap< QString, QList< WocEnum > > m_enumvals
 enum types: "type-name" => List of ("constant-name",int-constant-value)
QMap< QString, QString > m_enumdoc
 enum types: "type-name" => "documentation"
QStringList m_docstrings
 docu of class itself
QMap< QString, QString > m_propdoc
 docu of properties

Static Private Attributes

static const QStringList attrtypes = "bool"
static const QStringList elemtypes = "blob"

Detailed Description

stores a communication class including serialization and deserialization information


Constructor & Destructor Documentation

WocClass::WocClass ( const QDomElement &  cls  ) 

parses XML to create itself


Member Function Documentation

QStringList WocClass::abstractLangs (  )  const [inline]

returns the languages in which the class is conditionally abstract

QString WocClass::baseClass ( QString  lang,
QString  prefix 
) const

returns the name of the class it is derived from - default: WObject

Parameters:
lang the language for which to return the base class
prefix the class prefix in the target language
QStringList WocClass::docStrings (  )  const [inline]

returns documentation for this class

QString WocClass::enumDoc ( QString  e  )  const [inline]

returns base documentation for enums

QStringList WocClass::enumTypes (  )  const [inline]

returns the names of all enum types of this class

QList<WocEnum> WocClass::enumValues ( QString  t  )  const [inline]

returns a list of enum values as name-value pairs

bool WocClass::hasEnumType ( QString  t  )  const [inline]

returns true if the given enum type exists in this class

bool WocClass::hasMapping ( QString  m  )  const [inline]

returns true if the given mapping exists

bool WocClass::hasProperty ( QString  p  )  const

returns true of it has a property with this name

bool WocClass::isAbstract ( QString  l  )  const

returns whether the class is abstract in the requested language (needs to be customized); it is automatically abstract if any property is abstract

bool WocClass::isValid (  )  const [inline]

returns whether parsing was successful and this instance represents a valid communication class

QString WocClass::mapMethod ( QString  table,
QString  property,
QString  lang 
) const

returns the method for a specific mapping or an empty string if it does not exist in the specified language

QMap< QString, QString > WocClass::mapping ( QString  m  )  const

returns the specific mapping; map key=property, map value=column

QStringList WocClass::mappingProperties ( QString  m  )  const

returns the (correctly ordered) properties for a mapping

QStringList WocClass::mappingTables (  )  const [inline]

returns the names of all tables for which a mapping exists

QString WocClass::name (  )  const [inline]

returns the class name

QString WocClass::propDoc ( QString  p  )  const [inline]

returns documentation for a property

bool WocClass::propertyIsAbstract ( QString  p  )  const

returns whether this property is abstract

bool WocClass::propertyIsAttribute ( QString  p  )  const

returns whether this property is serialized as XML attribute

bool WocClass::propertyIsBlob ( QString  p  )  const [inline]

returns whether the property type is blob

bool WocClass::propertyIsBool ( QString  p  )  const [inline]

returns whether the property type is boolean

bool WocClass::propertyIsElement ( QString  p  )  const

returns whether this property is serialized as XML element

bool WocClass::propertyIsEnum ( QString  p  )  const

returns whether this property has an enum type

bool WocClass::propertyIsIdentity ( QString  p  )  const

returns whether this property identifies the object instance

bool WocClass::propertyIsInt ( QString  p  )  const [inline]

returns whether the property type is integer

bool WocClass::propertyIsList ( QString  p  )  const

returns whether the property is a list of values (false for scalars)

bool WocClass::propertyIsObject ( QString  p  )  const

returns whether the property is an object

bool WocClass::propertyIsSimpleElement ( QString  p  )  const

returns whether this property is serialized as XML element, but not a class

bool WocClass::propertyIsString ( QString  p  )  const [inline]

returns whether the property type is string

QStringList WocClass::propertyNames (  )  const

returns a list of all property names

QString WocClass::propertyPlainType ( QString  p  )  const

returns the plain type string of the property without "List:"

QString WocClass::propertyType ( QString  p  )  const

returns the type string of the property, including "List:" if applicable


Member Data Documentation

const QStringList WocClass::attrtypes = "bool" [static, private]
const QStringList WocClass::elemtypes = "blob" [static, private]
bool WocClass::m_abstract [private]

abstract: the class is declared abstract (isAbstract may return true even if this is false)

QMap<QString,QString> WocClass::m_base [private]

name of parent class ("wolf" => the "base" attributes' content)

QStringList WocClass::m_cabstract [private]

cabstract: conditional abstract - just for one or two languages; abstract overrides cabstract!

QStringList WocClass::m_docstrings [private]

docu of class itself

QMap<QString,QString> WocClass::m_enumdoc [private]

enum types: "type-name" => "documentation"

QMap<QString,QList<WocEnum> > WocClass::m_enumvals [private]

enum types: "type-name" => List of ("constant-name",int-constant-value)

QMap<QString,QList<s_map> > WocClass::m_maps [private]
QString WocClass::m_name [private]

class name without prefix

QMap<QString,QString> WocClass::m_propdoc [private]

docu of properties

QList<s_prop> WocClass::m_props [private]
bool WocClass::m_valid [private]

valid: parsing the WOLF succeeded


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