It models a property definition.
More...
#include <Property.h>
It models a property definition.
The class Property defines information about the values of a given property. This includes:
-
The data type associated to the property;
-
Any restrictions on the values of the property;
- See also
- SimpleProperty, CompositeProperty, NumericProperty, StringProperty, DateTimeProperty
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.
- Parameters
-
name | The Property name. |
datatype | The property data type. |
id | The property identifier. |
parent | A reference to the parent Property of the new object. |
- Warning
- The identifier value (id) may be used by data source implementations. So, don't rely on its value!
te::dt::Property::Property |
( |
const Property & |
rhs | ) |
|
Copy constructor.
- Parameters
-
rhs | The right-hand-side copy used to copy from. |
- Note
- Copy constructor doesn't preserve parent relationship.
virtual te::dt::Property::~Property |
( |
| ) |
|
|
inlinevirtual |
Virtual destructor.
Definition at line 89 of file Property.h.
virtual Property* te::dt::Property::clone |
( |
| ) |
const |
|
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.
- Returns
- A clone of the object.
Implemented in te::da::DataSetType, te::dt::DateTimeProperty, te::dt::CompositeProperty, te::rst::RasterProperty, te::gm::GeometryProperty, te::dt::SimpleProperty, te::dt::StringProperty, te::dt::NumericProperty, te::dt::ArrayProperty, te::dt::ByteArrayProperty, and te::dt::BitProperty.
Referenced by te::dt::new_clone().
const std::string& te::dt::Property::getDatasetName |
( |
| ) |
const |
|
inline |
It returns the name of the propery's dataset.
- Returns
- The the propery's dataset name.
Definition at line 144 of file Property.h.
unsigned int te::dt::Property::getId |
( |
| ) |
const |
|
inline |
It returns the property identifier.
- Returns
- A number used to identify the property.
- Warning
- The identifier value may be used by data source implementations. So, don't rely on its value!
Definition at line 109 of file Property.h.
const std::string& te::dt::Property::getName |
( |
| ) |
const |
|
inline |
It returns the property name.
- Returns
- The property name.
- Note
- For DataSetTypes the name can have namespace prefix or schema name prefix, it will depend on the data source implementation.
Definition at line 127 of file Property.h.
Property* te::dt::Property::getParent |
( |
| ) |
const |
|
inline |
It returns the parent of this property, or NULL, if it doesn't have one.
- Returns
- The parent of this property, or NULL, if it doesn't have one.
Definition at line 168 of file Property.h.
int te::dt::Property::getType |
( |
| ) |
const |
|
inline |
It returns the property data type.
- Returns
- The property data type.
Definition at line 161 of file Property.h.
virtual bool te::dt::Property::has |
( |
Property * |
p | ) |
const |
|
pure virtual |
Assignment operator.
- Parameters
-
rhs | The right-hand-side copy used to copy from. |
- Returns
- A reference to this object.
- Note
- Assignment operator doesn't preserve parent relationship.
void te::dt::Property::setDatasetName |
( |
const std::string & |
dsName | ) |
|
|
inline |
It sets the property name.
- Parameters
-
name | The new property name. |
- Warning
- Take care when calling this method for a DataSetType associated to a DataSourceCatalog. Prefer using the rename method on the DataSourceCatalog API instead of using this method.
Definition at line 154 of file Property.h.
void te::dt::Property::setId |
( |
unsigned int |
id | ) |
|
|
inline |
It sets the property identifier.
- Parameters
-
id | A number used to identify the property. |
- Warning
- The identifier value may be used by data source implementations. So, don't rely on its value!
Definition at line 118 of file Property.h.
void te::dt::Property::setName |
( |
const std::string & |
name | ) |
|
|
inline |
It sets the property name.
- Parameters
-
name | The new property name. |
- Warning
- Take care when calling this method for a DataSetType associated to a DataSourceCatalog. Prefer using the rename method on the DataSourceCatalog API instead of using this method.
Definition at line 137 of file Property.h.
void te::dt::Property::setParent |
( |
Property * |
p | ) |
|
|
inline |
It associate this property to the informed parent.
- Parameters
-
- Warning
- Don't use this method without knowing the internal details of its use.
Definition at line 177 of file Property.h.
std::string te::dt::Property::m_datasetName |
|
protected |
The property's dataset name.
Definition at line 208 of file Property.h.
unsigned int te::dt::Property::m_id |
|
protected |
An identification number that can be used internally.
Definition at line 205 of file Property.h.
std::string te::dt::Property::m_name |
|
protected |
int te::dt::Property::m_type |
|
protected |
The property data type.
Definition at line 206 of file Property.h.
The documentation for this class was generated from the following file:
- /home/castejon/castejon_files/develop/terralib5/git_master/src/terralib/datatype/Property.h