#include <MWClassHierarchy.h>
Inheritance diagram for MWClassHierarchy:
Public Member Functions | |
~MWClassHierarchy () | |
int | setMappingType (IopcMappingType defaultMappingType, CStdString &warningsForUser, CStdString &errorForUser) |
int | generateTableNames (CStdString &warningsForUser, CStdString &errorForUser) |
int | generateColumnTypesAndNames (DatabaseSqlStatements *sqlStatements, CStdString &warningsForUser, CStdString &errorForUser) |
int | generateAttributeGroups (CStdString &warningsForUser, CStdString &errorForUser) |
Protected Types | |
typedef std::list< FullClassInfo * > | GraphComponent |
Protected Member Functions | |
void | getGraphComponentsList (std::list< GraphComponent > &componentsList) |
void | getGraphComponentsListHelper (FullClassInfo *classInfo, GraphComponent &component) |
Protected Attributes | |
CStdString | firstProcessedFile |
If the metadata come from C++ sources parsing, they doesn't contain all the data that it should - for example table names, column names, attribute groups etc. This missing information can be generated by methods of this class.
|
Type of one component of application classes inheritance graph.
|
|
Destructor - deletes FullClassInfo::otherInfo if non-NULL. (XMLMetadataWriter::saveMetadata() uses it). |
|
Sets mapping type of all classes without any persistent parent to User could change the mapping types later in XML.
|
|
Generates table names for all classes that should have its own table. No table names are given by user in this moment. Default table name is class name in upper case, if this will not be unique, _<number> is appended. User could change the names later in XML.
Reimplemented from ClassHierarchy. |
|
Generates DB column type and name for each persistent attribute. Gets classes inhitance graph components using getGraphComponentsList(), sets column names to be unique inside appropriate component. Default column name is attribute name in upper case, if this will not be unique _<number> is appended. User could change this later in XML. Generation of column types is trivial, DatabaseSqlStatements::getRecommendedColumnType() is used. If this function doesn't return any type, attribute is assumed to be of some complex data type, so we don't know which type should be used for it - therefore we set its persistent flag to false.
|
|
Initially splits the attributes into groups. All persistent capable attributes of a "number" type are references are put into DEFAULT_FETCH_GROUP, all other persistent capable attributes into FIRST_PERSISTENT_GROUP, all non-persistent capable ones into FIRST_TRANSIENT_GROUP. User could change this later in XML.
|
|
Returns list of inheritance graph components. Uses FullClassInfo::flags and functions topologicalSort() and getGraphComponentsListHelper().
|
|
Helper function used by getGraphComponentsList().
Adds all parents and children of
|
|
Name of first temporary (*.iopc) file from which metadata have been loaded. Used in XMLMetadataWriter::loadTmpFile() to catch error when two files coming from different projects are said to be merged into one XML file. |