Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

xmlUtil::DictField Class Reference

#include <DictField.h>

Inheritance diagram for xmlUtil::DictField::

xmlUtil::DictObject List of all members.

Public Methods

 DictField (DOM_Element elt)
 ~DictField ()
const std::string & getName () const
bool allowed (unsigned value) const
 Does the specified value satisfy the constraints, if any? More...

bool accept (DictVisitor *vis)
DictConstraintsgetConstraints () const
 DictField (const DictField &toCopy)
DictField & operator= (const DictField &)

Private Methods

 DictField (const std::string &name, const DictConstraints &constraints)
 DictField (const std::string &name)
void deepCopy (const DictField &toCopy)

Private Attributes

DictConstraintsm_constraints
std::string m_name

Constructor & Destructor Documentation

xmlUtil::DictField::DictField DOM_Element    elt
 

Definition at line 7 of file DictField.cxx.

References m_constraints, and m_name.

Referenced by DictField(), and getConstraints().

00007                                       {
00008     DOM_Element child = xml::Dom::getFirstChildElement(elt);
00009 
00010     if (child != DOM_Element())
00011       m_constraints = new DictConstraints(child);
00012     else m_constraints = 0;
00013 
00014     m_name = std::string(xml::Dom::transToChar(elt.getAttribute("name")));
00015   }

xmlUtil::DictField::~DictField   [inline]
 

Definition at line 22 of file DictField.h.

References m_constraints.

00022 { if (m_constraints) delete m_constraints;};

xmlUtil::DictField::DictField const DictField &    toCopy
 

Definition at line 22 of file DictField.cxx.

References deepCopy().

00022                                               : DictObject(toCopy) {
00023     deepCopy(toCopy);
00024   }

xmlUtil::DictField::DictField const std::string &    name,
const DictConstraints   constraints
[inline, private]
 

Definition at line 39 of file DictField.h.

References m_constraints, and m_name.

00040       :   m_name(name) 
00041     {m_constraints = new DictConstraints(constraints);}

xmlUtil::DictField::DictField const std::string &    name [inline, private]
 

Definition at line 44 of file DictField.h.

References DictField(), m_constraints, and m_name.

00044 : m_constraints(0), m_name(name) {}


Member Function Documentation

bool xmlUtil::DictField::accept DictVisitor   vis [inline, virtual]
 

Reimplemented from xmlUtil::DictObject.

Definition at line 29 of file DictField.h.

00029 {return vis->visitField(this);}

bool xmlUtil::DictField::allowed unsigned    value const
 

Does the specified value satisfy the constraints, if any?

Definition at line 17 of file DictField.cxx.

References m_constraints.

00017                                               {
00018     if (m_constraints) return m_constraints->allowed(value);
00019     else return true;
00020   }

void xmlUtil::DictField::deepCopy const DictField &    toCopy [private]
 

Definition at line 34 of file DictField.cxx.

References m_constraints, and m_name.

Referenced by DictField(), and operator=().

00034                                                   {
00035     m_name = toCopy.m_name;
00036     if (toCopy.m_constraints) {
00037       m_constraints = new DictConstraints(*(toCopy.m_constraints));
00038     }
00039     else m_constraints = 0;
00040   }

DictConstraints* xmlUtil::DictField::getConstraints   const [inline]
 

Definition at line 30 of file DictField.h.

References DictField(), and m_constraints.

00030 {return m_constraints;}

const std::string& xmlUtil::DictField::getName   const [inline]
 

Definition at line 24 of file DictField.h.

References m_name.

00024 {return m_name;}

DictField & xmlUtil::DictField::operator= const DictField &    d
 

Definition at line 26 of file DictField.cxx.

References deepCopy(), and m_constraints.

00026                                                     {
00027     if (this != &d) {
00028       if (m_constraints) delete m_constraints;
00029       deepCopy(d);
00030     }
00031     return *this;
00032   }


Member Data Documentation

DictConstraints* xmlUtil::DictField::m_constraints [private]
 

Definition at line 49 of file DictField.h.

Referenced by allowed(), deepCopy(), DictField(), getConstraints(), operator=(), and ~DictField().

std::string xmlUtil::DictField::m_name [private]
 

Definition at line 50 of file DictField.h.

Referenced by deepCopy(), DictField(), and getName().


The documentation for this class was generated from the following files:
Generated on Wed Oct 16 14:02:49 2002 by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001