Go to the documentation of this file.
26 #ifndef __TERRALIB_DATATYPE_INTERNAL_COMPOSITEPROPERTY_H
27 #define __TERRALIB_DATATYPE_INTERNAL_COMPOSITEPROPERTY_H
36 #include <boost/ptr_container/ptr_vector.hpp>
66 const std::string& name,
128 void add(
const std::vector<Property*>& ps);
130 void add(
const boost::ptr_vector<te::dt::Property>& ps);
160 std::size_t
size()
const {
return m_properties.size(); }
167 const std::vector<Property*>&
getProperties()
const {
return m_properties; }
226 bool hasPropertyOfType(
const int t)
const;
231 Property* findFirstPropertyOfType(
const int t)
const;
241 void copy(
const std::vector<Property*>& ps);
276 const std::string& name,
296 for(std::size_t i = 0; i !=
size; ++i)
307 #endif // __TERRALIB_DATATYPE_INTERNAL_COMPOSITEPROPERTY_H
const std::vector< Property * > & getProperties() const
It returns the list of properties describing the CompositeProperty.
std::string m_cname
The composite type name.
Property * getProperty(std::size_t i) const
It returns the i-th property.
void add(Property *p)
It adds a new property to the CompositeProperty.
const std::string & getCompositeName() const
It returns the name of the composite type.
Property * findFirstPropertyOfType(const int t) const
returns the first property of the given data type. Caller doesn't take ownership of the returned poin...
virtual void clear()
It clears the CompositeProperty definition.
CompositeProperty(const std::string &cname, const std::string &name, unsigned int id=0, Property *parent=0)
It creates a new CompositeProperty.
void insert(std::size_t position, Property *p)
It inserts a new property to the CompositeProperty.
std::size_t getPropertyPosition(const Property *p) const
It returns the property position .
std::vector< Property * > m_properties
The list of property types that make the CompositeProperty.
virtual Property * clone() const
It returns a clone of the object.
bool hasPropertyOfType(const int t) const
Tells if there is a property of the given data type.
void add(const std::vector< Property * > &ps)
It adds a list of property types to the CompositeProperty.
CompositeProperty(const CompositeProperty &rhs)
Copy constructor.
virtual void remove(Property *p)
It removes the property from the composite.
It models a property definition.
std::vector< Property * > & getProperties()
It returns the list of properties describing the CompositeProperty.
void add(const boost::ptr_vector< te::dt::Property > &ps)
std::size_t getPropertyPosition(const std::string &name) const
It returns the property position based on its name.
int getType() const
It returns the property data type.
void copy(const std::vector< Property * > &ps)
It copies the properties from the vector.
virtual ~CompositeProperty()
Virtual destructor.
CompositeProperty & operator=(const CompositeProperty &rhs)
Assignment operator.
It models a property definition.
Property * getProperty(const std::string &name) const
It returns the property with the given name or NULL if none is found.
#define TEDATATYPEEXPORT
You can use this macro in order to export/import classes and functions from this module.
CompositeProperty(const std::string &cname, const std::string &name, int t, unsigned int id, Property *parent)
It creates a new Property.
std::size_t size() const
It returns the number of properties of the CompositeProperty.
A base class for a compound property (non-atomic properties).
void setCompositeName(const std::string &cname)
It sets the composite type name.
bool has(Property *p) const
It checks if the Property "p" is associated to this property or any other parent.
Property * getPropertyById(unsigned int id) const
It searches for a property with the given ID.