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