It models a property definition. More...
#include <Property.h>
Public Member Functions | |
| virtual Property * | clone () const =0 |
| It returns a clone of the object. | |
| const std::string & | getDatasetName () const |
| It returns the name of the propery's dataset. | |
| unsigned int | getId () const |
| It returns the property identifier. | |
| const std::string & | getName () const |
| It returns the property name. | |
| Property * | getParent () const |
| It returns the parent of this property, or NULL, if it doesn't have one. | |
| int | getType () const |
| It returns the property data type. | |
| virtual bool | has (Property *p) const =0 |
| It checks if the Property "p" is associated to this property or any other parent. | |
| Property & | operator= (const Property &rhs) |
| Assignment operator. | |
| Property (const Property &rhs) | |
| Copy constructor. | |
| Property (const std::string &name, int datatype, unsigned int id=0, Property *parent=0, const std::string &dsName="") | |
| It initializes a new Property. | |
| void | setDatasetName (const std::string &dsName) |
| It sets the property name. | |
| void | setId (unsigned int id) |
| It sets the property identifier. | |
| void | setName (const std::string &name) |
| It sets the property name. | |
| void | setParent (Property *p) |
| It associate this property to the informed parent. | |
| virtual | ~Property () |
| Virtual destructor. | |
Protected Attributes | |
| std::string | m_datasetName |
| The property's dataset name. | |
| unsigned int | m_id |
| An identification number that can be used internally. | |
| std::string | m_name |
| The property name. | |
| Property * | m_parent |
| The parent property type: it must be a CompositeProperty. | |
| int | m_type |
| The property data type. | |
It models a property definition.
The class Property defines information about the values of a given property. This includes:
Definition at line 59 of file Property.h.
| te::dt::Property::Property | ( | const std::string & | name, |
| int | datatype, | ||
| unsigned int | id = 0, | ||
| Property * | parent = 0, | ||
| const std::string & | dsName = "" ) |
It initializes a new Property.
| name | The Property name. |
| datatype | The property data type. |
| id | The property identifier. |
| parent | A reference to the parent Property of the new object. |
References Property().
Referenced by te::dt::CompositeProperty::add(), te::da::DataSetType::clone(), te::dt::CompositeProperty::clone(), clone(), te::dt::SimpleProperty::clone(), te::dt::CompositeProperty::CompositeProperty(), te::dt::CompositeProperty::CompositeProperty(), te::dt::CompositeProperty::findFirstPropertyOfType(), getParent(), te::dt::CompositeProperty::getProperty(), te::dt::CompositeProperty::getProperty(), te::dt::CompositeProperty::getPropertyById(), te::dt::CompositeProperty::getPropertyPosition(), te::dt::CompositeProperty::has(), has(), te::dt::SimpleProperty::has(), te::dt::CompositeProperty::insert(), operator=(), Property(), Property(), te::da::DataSetType::remove(), te::dt::CompositeProperty::remove(), te::da::DataSetType::removeForeignKeys(), te::da::DataSetType::removeIndexes(), te::da::DataSetType::removeUniqueKeys(), te::da::DataSetType::replace(), setParent(), and te::dt::SimpleProperty::SimpleProperty().
| te::dt::Property::Property | ( | const Property & | rhs | ) |
Copy constructor.
| rhs | The right-hand-side copy used to copy from. |
References Property().
|
inlinevirtual |
Virtual destructor.
Definition at line 89 of file Property.h.
|
pure virtual |
It returns a clone of the object.
The new Property may not have associations to other elements. For example, a DataSetType associated to a DataSourceCatalog when cloned will not have the clone associate to the same DataSourceCatalog.
Implemented in te::da::DataSetType, te::dt::ArrayProperty, te::dt::BitProperty, te::dt::ByteArrayProperty, te::dt::CompositeProperty, te::dt::DateTimeProperty, te::dt::NumericProperty, te::dt::SimpleProperty, te::dt::StringProperty, te::gm::GeometryProperty, and te::rst::RasterProperty.
References Property().
Referenced by te::da::ForeignKey::add(), te::da::Index::add(), te::da::PrimaryKey::add(), te::da::UniqueKey::add(), te::da::ForeignKey::addRefProperty(), and te::dt::new_clone().
|
inline |
It returns the name of the propery's dataset.
Definition at line 144 of file Property.h.
References m_datasetName.
|
inline |
It returns the property identifier.
Definition at line 109 of file Property.h.
References m_id.
|
inline |
It returns the property name.
Definition at line 127 of file Property.h.
References m_name.
|
inline |
It returns the parent of this property, or NULL, if it doesn't have one.
Definition at line 168 of file Property.h.
References m_parent, and Property().
|
inline |
It returns the property data type.
Definition at line 161 of file Property.h.
References m_type.
Referenced by te::dt::CompositeProperty::findFirstPropertyOfType().
|
pure virtual |
It checks if the Property "p" is associated to this property or any other parent.
This method can be used to ask if a given Property belongs to a more complex type (like: CompositeProperty or DataSetType).
| p | The Property we are checking. |
Implemented in te::dt::CompositeProperty, and te::dt::SimpleProperty.
References Property().
Assignment operator.
| rhs | The right-hand-side copy used to copy from. |
References Property().
|
inline |
It sets the property name.
| name | The new property name. |
Definition at line 154 of file Property.h.
References m_datasetName.
|
inline |
It sets the property identifier.
| id | A number used to identify the property. |
Definition at line 118 of file Property.h.
References m_id.
|
inline |
It sets the property name.
| name | The new property name. |
Definition at line 137 of file Property.h.
References m_name.
|
inline |
It associate this property to the informed parent.
| p | Teh parent property. |
Definition at line 177 of file Property.h.
References m_parent, and Property().
|
protected |
The property's dataset name.
Definition at line 208 of file Property.h.
Referenced by getDatasetName(), and setDatasetName().
|
protected |
An identification number that can be used internally.
Definition at line 205 of file Property.h.
|
protected |
The property name.
Definition at line 207 of file Property.h.
|
protected |
The parent property type: it must be a CompositeProperty.
Definition at line 204 of file Property.h.
Referenced by getParent(), and setParent().
|
protected |