The type for string types: FIXED_STRING, VAR_STRING or STRING.
More...
#include <StringProperty.h>
|
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.
|
|
StringType | getSubType () const |
| It returns the string property sub type.
|
|
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.
|
|
StringProperty & | operator= (const StringProperty &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.
|
|
void | setSize (std::size_t s) |
| It sets the maximum number of characters for a varying string, or the number of characters for a fixed length string.
|
|
void | setSubtype (StringType t) |
| It sets the string property sub type.
|
|
std::size_t | size () const |
| It returns the maximum number of characters for a varying string, or the number of characters for a fixed length string. No meaning for STRING.
|
|
| StringProperty (const std::string &name, StringType strType=STRING, std::size_t size=0, bool isRequired=false, std::string *defaultValue=0, unsigned int id=0, Property *parent=0) |
| It constructs a new string property.
|
|
| StringProperty (const StringProperty &rhs) |
| Copy constructor.
|
|
| ~StringProperty () |
| Destructor.
|
|
|
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.
|
|
std::size_t | m_size |
| Maximum number of characters for a varying string or the number of characters for a fixed length string. No meaning for STRING.
|
|
StringType | m_strSubType |
| The sub-type of this string property.
|
|
int | m_type |
| The property data type.
|
|
The type for string types: FIXED_STRING, VAR_STRING or STRING.
- See also
- SimpleProperty, Property, NumericProperty, ArrayProperty, DateTimeProperty, CompositeProperty
Definition at line 47 of file StringProperty.h.
◆ StringProperty() [1/2]
te::dt::StringProperty::StringProperty |
( |
const std::string & |
name, |
|
|
StringType |
strType = STRING , |
|
|
std::size_t |
size = 0 , |
|
|
bool |
isRequired = false , |
|
|
std::string * |
defaultValue = 0 , |
|
|
unsigned int |
id = 0 , |
|
|
Property * |
parent = 0 |
|
) |
| |
It constructs a new string property.
- Parameters
-
name | The attribute name. |
strType | The string subtype. Must be one of: FIXED_STRING, VAR_STRING, or STRING. |
size | The maximum size (or 0 for unlimited strings). |
isRequired | It indicates if the the property is required (mandatory) or not. |
defaultValue | The default value to be used, if none is informed.
|
id | The property identifier. |
parent | A reference to the parent Property of the new object if it has one.
|
- Postcondition
- The string property will take the ownership of the defaultValue.
- Warning
- The identifier value (id) may be used by data source implementations. So, don't rely on its value!
◆ StringProperty() [2/2]
Copy constructor.
- Parameters
-
rhs | The right-hand-side copy used to copy from. |
- Note
- This method is used by clone().
◆ ~StringProperty()
te::dt::StringProperty::~StringProperty |
( |
| ) |
|
|
inline |
◆ clone()
Property * te::dt::StringProperty::clone |
( |
| ) |
const |
|
virtual |
It returns a clone of the object.
The new property will NOT have associations to other properties.
- Returns
- A clone of the object.
Reimplemented from te::dt::SimpleProperty.
◆ getDatasetName()
const std::string & te::dt::Property::getDatasetName |
( |
| ) |
const |
|
inlineinherited |
It returns the name of the propery's dataset.
- Returns
- The the propery's dataset name.
Definition at line 144 of file Property.h.
◆ getDefaultValue()
std::string * te::dt::SimpleProperty::getDefaultValue |
( |
| ) |
const |
|
inlineinherited |
It returns the default value associated to the property, or NULL if none is associated.
- Returns
- The default value associated to the property, or NULL if none is associated.
- Note
- The caller of this method will not take the ownership of the given string.
Definition at line 127 of file SimpleProperty.h.
◆ getId()
unsigned int te::dt::Property::getId |
( |
| ) |
const |
|
inlineinherited |
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.
◆ getName()
const std::string & te::dt::Property::getName |
( |
| ) |
const |
|
inlineinherited |
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.
◆ getParent()
Property * te::dt::Property::getParent |
( |
| ) |
const |
|
inlineinherited |
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.
◆ getSubType()
StringType te::dt::StringProperty::getSubType |
( |
| ) |
const |
|
inline |
It returns the string property sub type.
- Returns
- The string property sub type.
Definition at line 100 of file StringProperty.h.
◆ getType()
int te::dt::Property::getType |
( |
| ) |
const |
|
inlineinherited |
◆ has()
bool te::dt::SimpleProperty::has |
( |
Property * |
p | ) |
const |
|
virtualinherited |
◆ isAutoNumber()
bool te::dt::SimpleProperty::isAutoNumber |
( |
| ) |
const |
|
inlineinherited |
It returns true if the attribute is an autonumber, otherwise it returns false.
- Returns
- True if the attribute is an autonumber, otherwise it returns false.
Definition at line 111 of file SimpleProperty.h.
◆ isRequired()
bool te::dt::SimpleProperty::isRequired |
( |
| ) |
const |
|
inlineinherited |
It returns true if the attribute is required, otherwise it returns false.
- Returns
- True if the attribute is required, otherwise it returns false.
Definition at line 97 of file SimpleProperty.h.
◆ operator=()
Assignment operator.
- Parameters
-
rhs | The right-hand-side copy used to copy from. |
- Returns
- A reference to this object.
◆ setAutoNumber()
void te::dt::SimpleProperty::setAutoNumber |
( |
bool |
a | ) |
|
|
inlineinherited |
◆ setDatasetName()
void te::dt::Property::setDatasetName |
( |
const std::string & |
dsName | ) |
|
|
inlineinherited |
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.
◆ setDefaultValue()
void te::dt::SimpleProperty::setDefaultValue |
( |
std::string * |
d | ) |
|
|
inherited |
It sets the default value associated to the property, or NULL if none is associated.
- Parameters
-
d | The default value associated to the property, or NULL if none is associated. |
- Note
- The SimpleProperty qill take the ownership of the given string.
◆ setId()
void te::dt::Property::setId |
( |
unsigned int |
id | ) |
|
|
inlineinherited |
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.
◆ setName()
void te::dt::Property::setName |
( |
const std::string & |
name | ) |
|
|
inlineinherited |
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.
◆ setParent()
void te::dt::Property::setParent |
( |
Property * |
p | ) |
|
|
inlineinherited |
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.
◆ setRequired()
void te::dt::SimpleProperty::setRequired |
( |
bool |
r | ) |
|
|
inlineinherited |
It tells if the property is required or not.
- Parameters
-
r | If true the property is marked as required, otherwise it is not required. |
Definition at line 104 of file SimpleProperty.h.
◆ setSize()
void te::dt::StringProperty::setSize |
( |
std::size_t |
s | ) |
|
|
inline |
It sets the maximum number of characters for a varying string, or the number of characters for a fixed length string.
This value has no meaning for a STRING.
- Parameters
-
Definition at line 123 of file StringProperty.h.
◆ setSubtype()
void te::dt::StringProperty::setSubtype |
( |
StringType |
t | ) |
|
|
inline |
It sets the string property sub type.
- Parameters
-
t | The string property sub type. |
Definition at line 107 of file StringProperty.h.
◆ size()
std::size_t te::dt::StringProperty::size |
( |
| ) |
const |
|
inline |
It returns the maximum number of characters for a varying string, or the number of characters for a fixed length string. No meaning for STRING.
- Returns
- The maximum number of characters for a varying string, or the number of characters for a fixed length string. No meaning for STRING.
Definition at line 114 of file StringProperty.h.
◆ m_datasetName
std::string te::dt::Property::m_datasetName |
|
protectedinherited |
The property's dataset name.
Definition at line 208 of file Property.h.
◆ m_defaultValue
std::string* te::dt::SimpleProperty::m_defaultValue |
|
protectedinherited |
◆ m_id
unsigned int te::dt::Property::m_id |
|
protectedinherited |
An identification number that can be used internally.
Definition at line 205 of file Property.h.
◆ m_isAutoNumber
bool te::dt::SimpleProperty::m_isAutoNumber |
|
protectedinherited |
A flag that indicates if this is an autonumber or serial type.
Definition at line 163 of file SimpleProperty.h.
◆ m_isRequired
bool te::dt::SimpleProperty::m_isRequired |
|
protectedinherited |
◆ m_name
std::string te::dt::Property::m_name |
|
protectedinherited |
◆ m_parent
◆ m_size
std::size_t te::dt::StringProperty::m_size |
|
protected |
Maximum number of characters for a varying string or the number of characters for a fixed length string. No meaning for STRING.
Definition at line 136 of file StringProperty.h.
◆ m_strSubType
◆ m_type
int te::dt::Property::m_type |
|
protectedinherited |
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_release/src/terralib/datatype/StringProperty.h