An atomic property like an integer or double. More...
#include <SimpleProperty.h>
Public Member Functions | |
| virtual Property * | clone () const |
| It returns a clone of the object. | |
| const std::string & | getDatasetName () const |
| It returns the name of the propery's dataset. | |
| std::string * | getDefaultValue () const |
| It returns the default value associated to the property, or NULL if none is associated. | |
| 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. | |
| bool | has (Property *p) const |
| It checks if the Property "p" is associated to this property or any other parent. | |
| bool | isAutoNumber () const |
| It returns true if the attribute is an autonumber, otherwise it returns false. | |
| bool | isRequired () const |
| It returns true if the attribute is required, otherwise it returns false. | |
| SimpleProperty & | operator= (const SimpleProperty &rhs) |
| Assignment operator. | |
| void | setAutoNumber (bool a) |
| It tells if the property is an autonumber or not. | |
| void | setDatasetName (const std::string &dsName) |
| It sets the property name. | |
| void | setDefaultValue (std::string *d) |
| It sets the default value associated to the property, or NULL if none is associated. | |
| 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. | |
| void | setRequired (bool r) |
| It tells if the property is required or not. | |
| SimpleProperty (const SimpleProperty &rhs) | |
| Copy constructor. | |
| SimpleProperty (const std::string &name, int datatype, bool isRequired=false, std::string *defaultValue=0, unsigned int id=0, Property *parent=0) | |
| It constructs a new simple property. | |
| virtual | ~SimpleProperty () |
| Destructor. | |
Protected Attributes | |
| std::string | m_datasetName |
| The property's dataset name. | |
| std::string * | m_defaultValue |
| Default value. | |
| unsigned int | m_id |
| An identification number that can be used internally. | |
| bool | m_isAutoNumber |
| A flag that indicates if this is an autonumber or serial type. | |
| bool | m_isRequired |
| This flag indicates if the attribute is required or not. | |
| 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. | |
An atomic property like an integer or double.
Definition at line 47 of file SimpleProperty.h.
| te::dt::SimpleProperty::SimpleProperty | ( | const std::string & | name, |
| int | datatype, | ||
| bool | isRequired = false, | ||
| std::string * | defaultValue = 0, | ||
| unsigned int | id = 0, | ||
| Property * | parent = 0 ) |
It constructs a new simple property.
| name | The simple property name. |
| datatype | The property data type. |
| isRequired | Tells if the the property is required (mandatory) or not. |
| defaultValue | The default value to be used or NULL if none is informed. |
| id | The property identifier. |
| parent | A reference to the parent Property of the new object if it has one. |
References isRequired(), and te::dt::Property::Property().
Referenced by operator=(), and SimpleProperty().
| te::dt::SimpleProperty::SimpleProperty | ( | const SimpleProperty & | rhs | ) |
Copy constructor.
| rhs | The right-hand-side copy used to copy from. |
References SimpleProperty().
|
virtual |
Destructor.
|
virtual |
It returns a clone of the object.
For a simple type, this method will not preserve the parent Property pointer.
Implements te::dt::Property.
Reimplemented in te::dt::ArrayProperty, te::dt::BitProperty, te::dt::ByteArrayProperty, te::dt::DateTimeProperty, te::dt::NumericProperty, te::dt::StringProperty, te::gm::GeometryProperty, and te::rst::RasterProperty.
References te::dt::Property::Property().
|
inlineinherited |
It returns the name of the propery's dataset.
Definition at line 144 of file Property.h.
References m_datasetName.
|
inline |
It returns the default value associated to the property, or NULL if none is associated.
Definition at line 127 of file SimpleProperty.h.
References m_defaultValue.
|
inlineinherited |
It returns the property identifier.
Definition at line 109 of file Property.h.
References m_id.
|
inlineinherited |
It returns the property name.
Definition at line 127 of file Property.h.
References m_name.
|
inlineinherited |
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().
|
inlineinherited |
It returns the property data type.
Definition at line 161 of file Property.h.
References m_type.
Referenced by te::dt::CompositeProperty::findFirstPropertyOfType().
|
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. |
Implements te::dt::Property.
References te::dt::Property::Property().
|
inline |
It returns true if the attribute is an autonumber, otherwise it returns false.
Definition at line 111 of file SimpleProperty.h.
References m_isAutoNumber.
|
inline |
It returns true if the attribute is required, otherwise it returns false.
Definition at line 97 of file SimpleProperty.h.
References m_isRequired.
Referenced by te::dt::ArrayProperty::ArrayProperty(), te::dt::BitProperty::BitProperty(), te::dt::ByteArrayProperty::ByteArrayProperty(), te::dt::DateTimeProperty::DateTimeProperty(), te::dt::DateTimeProperty::DateTimeProperty(), te::dt::DateTimeProperty::DateTimeProperty(), te::dt::DateTimeProperty::DateTimeProperty(), te::gm::GeometryProperty::GeometryProperty(), te::gm::GeometryProperty::GeometryProperty(), te::dt::NumericProperty::NumericProperty(), te::rst::RasterProperty::RasterProperty(), te::rst::RasterProperty::RasterProperty(), SimpleProperty(), and te::dt::StringProperty::StringProperty().
| SimpleProperty & te::dt::SimpleProperty::operator= | ( | const SimpleProperty & | rhs | ) |
Assignment operator.
| rhs | The right-hand-side copy used to copy from. |
References SimpleProperty().
|
inline |
It tells if the property is an autonumber or not.
| a | If true the property is marked as an autonumber (serial), otherwise it is not. |
Definition at line 118 of file SimpleProperty.h.
References m_isAutoNumber.
Referenced by te::pgis::Convert2TerraLib().
|
inlineinherited |
It sets the property name.
| name | The new property name. |
Definition at line 154 of file Property.h.
References m_datasetName.
| void te::dt::SimpleProperty::setDefaultValue | ( | std::string * | d | ) |
It sets the default value associated to the property, or NULL if none is associated.
| d | The default value associated to the property, or NULL if none is associated. |
|
inlineinherited |
It sets the property identifier.
| id | A number used to identify the property. |
Definition at line 118 of file Property.h.
References m_id.
|
inlineinherited |
It sets the property name.
| name | The new property name. |
Definition at line 137 of file Property.h.
References m_name.
|
inlineinherited |
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().
|
inline |
It tells if the property is required or not.
| r | If true the property is marked as required, otherwise it is not required. |
Definition at line 104 of file SimpleProperty.h.
References m_isRequired.
|
protectedinherited |
The property's dataset name.
Definition at line 208 of file Property.h.
Referenced by getDatasetName(), and setDatasetName().
|
protected |
|
protectedinherited |
An identification number that can be used internally.
Definition at line 205 of file Property.h.
|
protected |
A flag that indicates if this is an autonumber or serial type.
Definition at line 163 of file SimpleProperty.h.
Referenced by isAutoNumber(), and setAutoNumber().
|
protected |
This flag indicates if the attribute is required or not.
Definition at line 162 of file SimpleProperty.h.
Referenced by isRequired(), and setRequired().
|
protectedinherited |
The property name.
Definition at line 207 of file Property.h.
|
protectedinherited |
The parent property type: it must be a CompositeProperty.
Definition at line 204 of file Property.h.
Referenced by getParent(), and setParent().
|
protectedinherited |