CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
ora::MappingTree Class Reference

#include <MappingTree.h>

Public Member Functions

const std::string & className () const
 
 MappingTree ()
 Constructor. More...
 
 MappingTree (const std::string &version)
 Constructor. More...
 
 MappingTree (const MappingTree &rhs)
 
MappingTreeoperator= (const MappingTree &rhs)
 
void override (const MappingTree &source)
 replace present data with the provided source More...
 
void printXML (std::ostream &outputStream) const
 
void setDependency (const MappingTree &parentTree)
 
MappingElementsetTopElement (const std::string &className, const std::string &tableName, bool isDependent=false)
 
void setVersion (const std::string &version)
 
std::vector< TableInfotables () const
 
const MappingElementtopElement () const
 
MappingElementtopElement ()
 
const std::string & version () const
 
 ~MappingTree ()
 Destructor. More...
 

Private Attributes

MappingElement m_element
 
std::auto_ptr< TableInfom_parentTable
 
std::string m_version
 

Detailed Description

The structure holding an object/relational mapping.

Definition at line 53 of file MappingTree.h.

Constructor & Destructor Documentation

ora::MappingTree::MappingTree ( )

Constructor.

Public methods:

Definition at line 7 of file MappingTree.cc.

ora::MappingTree::MappingTree ( const std::string &  version)
explicit

Constructor.

Definition at line 13 of file MappingTree.cc.

ora::MappingTree::MappingTree ( const MappingTree rhs)

Definition at line 19 of file MappingTree.cc.

ora::MappingTree::~MappingTree ( )

Destructor.

Definition at line 26 of file MappingTree.cc.

Member Function Documentation

const std::string & ora::MappingTree::className ( ) const
inline

Returns the main class

Definition at line 138 of file MappingTree.h.

Referenced by ora::MappingGenerator::createNewDependentMapping(), and ora::MappingGenerator::createNewMapping().

138  {
139  return m_element.variableName();
140 }
const std::string & variableName() const
MappingElement m_element
Definition: MappingTree.h:120
ora::MappingTree & ora::MappingTree::operator= ( const MappingTree rhs)

Definition at line 29 of file MappingTree.cc.

void ora::MappingTree::override ( const MappingTree source)

replace present data with the provided source

Definition at line 58 of file MappingTree.cc.

Referenced by ora::MappingGenerator::createNewDependentMapping(), and ora::MappingGenerator::createNewMapping().

void ora::MappingTree::printXML ( std::ostream &  outputStream) const

Definition at line 142 of file MappingTree.cc.

void ora::MappingTree::setDependency ( const MappingTree parentTree)

Definition at line 52 of file MappingTree.cc.

Referenced by ora::MappingGenerator::createNewDependentMapping().

ora::MappingElement & ora::MappingTree::setTopElement ( const std::string &  className,
const std::string &  tableName,
bool  isDependent = false 
)

Appends the element to the structure

Parameters
classNameThe class name of the new element
tableNameThe table name of the new element
elementTypeThe type code of the new element

Definition at line 40 of file MappingTree.cc.

Referenced by ora::MappingGenerator::createNewDependentMapping(), and ora::MappingGenerator::createNewMapping().

void ora::MappingTree::setVersion ( const std::string &  version)
inline

Definition at line 133 of file MappingTree.h.

References relval_steps::version.

133  {
134  m_version = version;
135 }
std::string m_version
Definition: MappingTree.h:115
const std::string & version() const
Definition: MappingTree.h:128
std::vector< ora::TableInfo > ora::MappingTree::tables ( ) const

Definition at line 123 of file MappingTree.cc.

const ora::MappingElement & ora::MappingTree::topElement ( ) const
inline

Returns the main mapping element

Definition at line 143 of file MappingTree.h.

Referenced by ora::MappingGenerator::createNewDependentMapping().

143  {
144  return m_element;
145 }
MappingElement m_element
Definition: MappingTree.h:120
ora::MappingElement & ora::MappingTree::topElement ( )
inline

Returns the main mapping element

Definition at line 148 of file MappingTree.h.

148  {
149  return m_element;
150 }
MappingElement m_element
Definition: MappingTree.h:120
const std::string & ora::MappingTree::version ( ) const
inline

Returns the version of the mapping

Definition at line 128 of file MappingTree.h.

References m_version.

128  {
129  return m_version;
130 }
std::string m_version
Definition: MappingTree.h:115

Member Data Documentation

MappingElement ora::MappingTree::m_element
private

The main tree

Definition at line 120 of file MappingTree.h.

std::auto_ptr<TableInfo> ora::MappingTree::m_parentTable
private

Definition at line 122 of file MappingTree.h.

std::string ora::MappingTree::m_version
private

The mapping version

Definition at line 115 of file MappingTree.h.

Referenced by version().