Loading...
Searching...
No Matches
te::gm::GeometryProperty Class Reference

Geometric property. More...

#include <GeometryProperty.h>

Inheritance diagram for te::gm::GeometryProperty:
te::dt::SimpleProperty te::dt::Property

Public Member Functions

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.
 
PropertygetParent () 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.
 
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.
 
Basic Methods

Basic methods on a GeometryProperty.

 GeometryProperty (const std::string &name, bool isRequired=false, std::string *defaultValue=0, unsigned int id=0, te::dt::Property *parent=0)
 It constructs a new GeometryProperty.
 
 GeometryProperty (const std::string &name, int srid, te::gm::GeomType subtype, bool isRequired=false, std::string *defaultValue=0, unsigned int id=0, te::dt::Property *parent=0)
 It constructs a new GeometryProperty.
 
 GeometryProperty (const GeometryProperty &rhs)
 Copy constructor.
 
 ~GeometryProperty ()
 Destructor.
 
int getSRID () const
 It returns the spatial reference system identifier associated to this property.
 
void setSRID (int srid)
 It sets the spatial reference system identifier associated to this property.
 
GeomType getGeometryType () const
 It returns the geometry subtype allowed for the property.
 
void setGeometryType (GeomType t)
 It sets the geometry subtype.
 

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.
 
Propertym_parent
 The parent property type: it must be a CompositeProperty.
 
int m_type
 The property data type.
 

Implementation From Superclass Property

Methods re-implemented from the superclass Property.

int m_srid
 The SRS associated to the property.
 
GeomType m_geomType
 The geometry type.
 
te::dt::Propertyclone () const
 It returns a clone of the object.
 
GeometryPropertyoperator= (const GeometryProperty &rhs)
 Assignment operator not allowed.
 

Detailed Description

Geometric property.

See also
SimpleProperty

Definition at line 51 of file GeometryProperty.h.

Constructor & Destructor Documentation

◆ GeometryProperty() [1/3]

te::gm::GeometryProperty::GeometryProperty ( const std::string & name,
bool isRequired = false,
std::string * defaultValue = 0,
unsigned int id = 0,
te::dt::Property * parent = 0 )

It constructs a new GeometryProperty.

This constructor will set:

  • the associated SRS to 0;
  • the subtype of geometry to te::gm::UnknownGeometryProperty;
  • the coordinate dimension to 2;
  • the extent to NULL.
Parameters
nameThe geometric property name.
isRequiredTells if the the property is required (mandatory) or not.
defaultValueThe default value to be used if none is informed.
idThe property identifier.
parentA reference to the parent Property of the new object if it has one.
Postcondition
The GeometryProperty 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!

References te::dt::SimpleProperty::isRequired().

Referenced by GeometryProperty(), and operator=().

◆ GeometryProperty() [2/3]

te::gm::GeometryProperty::GeometryProperty ( const std::string & name,
int srid,
te::gm::GeomType subtype,
bool isRequired = false,
std::string * defaultValue = 0,
unsigned int id = 0,
te::dt::Property * parent = 0 )

It constructs a new GeometryProperty.

Parameters
nameThe geometric property name.
sridThe SRS of the geometries.
tThe subtype of geometries.
isRequiredIndicates if the property is required (mandatory) or not.
defaultValueThe default value to be used, if none is informed.
idThe property identifier.
parentA reference to the parent Property of the new object if it has one.
Postcondition
The GeometryProperty 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!

References te::dt::SimpleProperty::isRequired().

◆ GeometryProperty() [3/3]

te::gm::GeometryProperty::GeometryProperty ( const GeometryProperty & rhs)

Copy constructor.

Parameters
rhsThe right-hand-side copy that would be used to copy from.

References GeometryProperty().

◆ ~GeometryProperty()

te::gm::GeometryProperty::~GeometryProperty ( )

Destructor.

Member Function Documentation

◆ clone()

te::dt::Property * te::gm::GeometryProperty::clone ( ) const
virtual

It returns a clone of the object.

The new property will NOT have associations to other elements.

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.

References m_datasetName.

◆ 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.

References m_defaultValue.

◆ getGeometryType()

GeomType te::gm::GeometryProperty::getGeometryType ( ) const
inline

It returns the geometry subtype allowed for the property.

Returns
The geometry subtype.

Definition at line 139 of file GeometryProperty.h.

References m_geomType.

◆ 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.

References m_id.

◆ 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.

References m_name.

◆ 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.

References m_parent, and Property().

◆ getSRID()

int te::gm::GeometryProperty::getSRID ( ) const
inline

It returns the spatial reference system identifier associated to this property.

Returns
The SRS id associated to the property.

Definition at line 125 of file GeometryProperty.h.

References m_srid.

◆ getType()

int te::dt::Property::getType ( ) const
inlineinherited

It returns the property data type.

Returns
The property data type.

Definition at line 161 of file Property.h.

References m_type.

Referenced by te::dt::CompositeProperty::findFirstPropertyOfType().

◆ has()

bool te::dt::SimpleProperty::has ( Property * p) const
virtualinherited

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).

Parameters
pThe Property we are checking.
Returns
True if the given Property "p" is associated to to this Property, otherwise, returns false.

Implements te::dt::Property.

References te::dt::Property::Property().

◆ 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.

References m_isAutoNumber.

◆ isRequired()

◆ operator=()

GeometryProperty & te::gm::GeometryProperty::operator= ( const GeometryProperty & rhs)
private

Assignment operator not allowed.

Parameters
rhsThe right-hand-side copy that would be used to copy from.
Returns
A reference to this object.

References GeometryProperty().

◆ setAutoNumber()

void te::dt::SimpleProperty::setAutoNumber ( bool a)
inlineinherited

It tells if the property is an autonumber or not.

Parameters
aIf 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().

◆ setDatasetName()

void te::dt::Property::setDatasetName ( const std::string & dsName)
inlineinherited

It sets the property name.

Parameters
nameThe 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.

References m_datasetName.

◆ 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
dThe default value associated to the property, or NULL if none is associated.
Note
The SimpleProperty qill take the ownership of the given string.

◆ setGeometryType()

void te::gm::GeometryProperty::setGeometryType ( GeomType t)
inline

It sets the geometry subtype.

Parameters
tThe geometry subtype.

Definition at line 146 of file GeometryProperty.h.

References m_geomType.

◆ setId()

void te::dt::Property::setId ( unsigned int id)
inlineinherited

It sets the property identifier.

Parameters
idA 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.

References m_id.

◆ setName()

void te::dt::Property::setName ( const std::string & name)
inlineinherited

It sets the property name.

Parameters
nameThe 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.

References m_name.

◆ setParent()

void te::dt::Property::setParent ( Property * p)
inlineinherited

It associate this property to the informed parent.

Parameters
pTeh parent property.
Warning
Don't use this method without knowing the internal details of its use.

Definition at line 177 of file Property.h.

References m_parent, and Property().

◆ setRequired()

void te::dt::SimpleProperty::setRequired ( bool r)
inlineinherited

It tells if the property is required or not.

Parameters
rIf true the property is marked as required, otherwise it is not required.

Definition at line 104 of file SimpleProperty.h.

References m_isRequired.

◆ setSRID()

void te::gm::GeometryProperty::setSRID ( int srid)
inline

It sets the spatial reference system identifier associated to this property.

Parameters
sridThe SRS id associated to the property.

Definition at line 132 of file GeometryProperty.h.

References m_srid.

Member Data Documentation

◆ m_datasetName

std::string te::dt::Property::m_datasetName
protectedinherited

The property's dataset name.

Definition at line 208 of file Property.h.

Referenced by getDatasetName(), and setDatasetName().

◆ m_defaultValue

std::string* te::dt::SimpleProperty::m_defaultValue
protectedinherited

Default value.

Definition at line 164 of file SimpleProperty.h.

Referenced by getDefaultValue().

◆ m_geomType

GeomType te::gm::GeometryProperty::m_geomType
protected

The geometry type.

Definition at line 180 of file GeometryProperty.h.

Referenced by getGeometryType(), and setGeometryType().

◆ 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.

Referenced by getId(), and setId().

◆ 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.

Referenced by isAutoNumber(), and setAutoNumber().

◆ m_isRequired

bool te::dt::SimpleProperty::m_isRequired
protectedinherited

This flag indicates if the attribute is required or not.

Definition at line 162 of file SimpleProperty.h.

Referenced by isRequired(), and setRequired().

◆ m_name

std::string te::dt::Property::m_name
protectedinherited

The property name.

Definition at line 207 of file Property.h.

Referenced by getName(), and setName().

◆ m_parent

Property* te::dt::Property::m_parent
protectedinherited

The parent property type: it must be a CompositeProperty.

Definition at line 204 of file Property.h.

Referenced by getParent(), and setParent().

◆ m_srid

int te::gm::GeometryProperty::m_srid
protected

The SRS associated to the property.

Definition at line 179 of file GeometryProperty.h.

Referenced by getSRID(), and setSRID().

◆ m_type

int te::dt::Property::m_type
protectedinherited

The property data type.

Definition at line 206 of file Property.h.

Referenced by getType().


The documentation for this class was generated from the following file: