26#ifndef __TERRALIB_DATATYPE_INTERNAL_SIMPLEPROPERTY_H
27#define __TERRALIB_DATATYPE_INTERNAL_SIMPLEPROPERTY_H
68 bool isRequired =
false,
69 std::string* defaultValue = 0,
It models a property definition.
It models a property definition.
An atomic property like an integer or double.
virtual Property * clone() const
It returns a clone of the object.
std::string * getDefaultValue() const
It returns the default value associated to the property, or NULL if none is associated.
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.
void setRequired(bool r)
It tells if the property is required or not.
bool m_isRequired
This flag indicates if the attribute is required or not.
virtual ~SimpleProperty()
Destructor.
bool isRequired() const
It returns true if the attribute is required, otherwise it returns false.
SimpleProperty(const SimpleProperty &rhs)
Copy constructor.
SimpleProperty & operator=(const SimpleProperty &rhs)
Assignment operator.
void setDefaultValue(std::string *d)
It sets the default value associated to the property, or NULL if none is associated.
bool has(Property *p) const
It checks if the Property "p" is associated to this property or any other parent.
std::string * m_defaultValue
Default value.
bool m_isAutoNumber
A flag that indicates if this is an autonumber or serial type.
bool isAutoNumber() const
It returns true if the attribute is an autonumber, otherwise it returns false.
void setAutoNumber(bool a)
It tells if the property is an autonumber or not.
#define TEDATATYPEEXPORT
You can use this macro in order to export/import classes and functions from this module.