TdkGeographicObject Class Reference
[The Core Module]

Defines the TdkGeographicObject. More...

#include <TdkGeographicObject.h>

Inheritance diagram for TdkGeographicObject:

TdkObject TdkEditableObject TdkEventHandler TdkPersistenceObject List of all members.

Public Member Functions

 TdkGeographicObject (const TdkObjectGID &objectGID)
 TdkGeographicObject (const TdkObjectGID &objectGID, TeSTInstance &ins)
 TdkGeographicObject (TdkGeographicObject &object)
virtual ~TdkGeographicObject ()
virtual TdkObjectcopy ()
 Creates a copy of the object.
virtual void operator= (TdkObject &object)
virtual bool operator== (TdkObject &object)
 Returns true if the given object is equal to the object.
bool getSavedInDB ()
void setSavedInDB (bool savedInDB)
void setAllAttrsInCache (bool allAttrsInCache)
void invalidateGeomId ()
void propagateObjectId ()
std::vector< std::string > & getAttrsInCache ()
virtual TeSTElement & getObject ()
 Returns the TeSTElement property.
virtual bool needToLoad (TdkLoadParams &params)
 Verify if loads the object from the database is necessary.
void updateGeometries (TeDatabase *dbCaller, bool updateDB)
void removeGeometries (TeDatabase *dbCaller, bool updateDB)
virtual bool hasValueInCache (std::string attr_name)
virtual bool hasIntegerValue (std::string attr_name)
 Returns true if there are a value (integer) for the given attribute.
virtual bool hasRealValue (std::string attr_name)
 Returns true if there are a value (real) for the given attribute.
virtual bool hasStringValue (std::string attr_name)
 Returns true if there are a value (string) for the given attribute.
virtual std::string getAttributeValue (std::string attr_name)
virtual void setAttributeValue (std::string attr_name, std::string value)
 Set the attribute value from a string.
virtual std::string getStringAttr (std::string attr_name)
virtual void setStringAttr (std::string attr_name, std::string value)
 Sets the value for the given attribute. The attribute type must be string.
virtual int getIntegerAttr (std::string attr_name)
virtual void setIntegerAttr (std::string attr_name, int value)
 Gets the value for the given attribute. The attribute type must be integer.
virtual double getRealAttr (std::string attr_name)
virtual void setRealAttr (std::string attr_name, double value)
 Gets the value for the given attribute. The attribute type must be real.
virtual void setGID (const TdkObjectGID &objectGID)
virtual TdkObjectGIDgetGID ()
virtual TdkObjectTypeDefgetType ()
 Returns the object type.
virtual TeProjection * getProjection ()
virtual void setBoundingBox (TeBox &bBox)
virtual TeBox & getBoundingBox ()
virtual bool hasStyle (int themeId)
 Returns true when the object style is different of the theme.
virtual TeLegendEntry & getStyle (int themeId)
virtual void insertStyle (TeLegendEntry &style)
virtual TdkLegendEntryMapgetStyles ()
virtual TeMultiGeometry & getGeometries ()
virtual TePointSet & getPointsGeometry ()
 Returns the points geometry of the last instance.
virtual TeLineSet & getLinesGeometry ()
 Returns the lines geometry of the last instance.
virtual TePolygonSet & getPolygonsGeometry ()
 Returns the polygons geometry of the last instance.
virtual TeTextSet & getTextsGeometry ()
 Returns the texts geometry of the last instance.
virtual TeCellSet & getCellsGeometry ()
 Returns the cells geometry of the last instance.
virtual void removeGeometry (TeGeomRep rep, int geomId)
virtual void removeCellGeometry (int geomId)
virtual void removePointGeometry (int geomId)
virtual void removeLineGeometry (int geomId)
virtual void removePolygonGeometry (int geomId)
virtual void removeTextGeometry (int geomId)
virtual void setGeometries (const TePointSet &points)
virtual void setGeometries (const TeLineSet &lines)
virtual void setGeometries (const TePolygonSet &polygons)
virtual void setGeometries (const TeTextSet &texts)
virtual void setGeometries (const TeCellSet &cells)
virtual void setGeometries (const TeMultiGeometry &geometries)
void addProperties (TePropertyVector &properties, int insIndx=-1)
void addGeometries (TeCellSet &inCells, int insIndx=-1)
 Adds the geometry to the ith instance. If there are no instance, add the instance.
void addGeometries (TePointSet &inPoints, int insIndx=-1)
void addGeometries (TeLineSet &inLines, int insIndx=-1)
void addGeometries (TePolygonSet &inPolys, int insIndx=-1)
void addGeometries (TeTextSet &inTexts, int insIndx=-1)
void addGeometries (TeMultiGeometry &geo, int insIndx=-1)
virtual void setProperties (TePropertyVector &properties)
virtual TePropertyVector & getProperties ()
virtual void addInstance (TeSTInstance &ins)
 Adds the given instance to the TeSTElement property.
virtual void import (TdkObject &object)
virtual void translate (double dx, double dy)
virtual void scale (double sx, double sy, int fixedPoint)
virtual void rotate (double angle, TeCoord2D &fixedCoord)
virtual void transform (TdkMathMatrix &matrix)
virtual void addPoint (int vertex1, TeCoord2D point)
virtual void editPoint (int index, double dx, double dy)
virtual void removePoint (int index)
virtual bool isTranslatable ()
virtual bool isScalable ()
virtual bool isRotatable ()
virtual TeCoord2D fixedCoord (int fixedPoint)
virtual int boxPoint (TeCoord2D &coord)
virtual int vertexPoint (TeCoord2D &coord)
virtual void segmentVertexes (TeCoord2D &coord, int &vertex1, int &vertex2)
virtual void point2Line (TeCoord2D &coord, int vertex1, int vertex2)
virtual void scaleFactor (TeBox &box, double &sx, double &sy, int boxPoint)
virtual void rotateAngle (TeBox &box, double &angle, int fixedPoint)
virtual TdkMouseCursor mouseCursor (TeCoord2D &coord)
virtual int getLayerID ()
virtual void setLayerID (int layerId)
virtual std::string getTypeName ()

Protected Member Functions

virtual void loadFromShapeFile (TeDatabase *dbCaller, TdkLoadParams &params)
virtual void loadChildren (TeDatabase *dbCaller, TdkLoadParams &params)
virtual bool insert (TeDatabase *dbCaller, TdkPersistenceParams &params)
 Inserts the object in the database.
virtual bool load (TeDatabase *dbCaller, TdkLoadParams &params)
 Loads the object from the database.
virtual bool update (TeDatabase *dbCaller, TdkPersistenceParams &params)
 Updates the object in the database.
virtual void remove (TeDatabase *dbCaller, TdkPersistenceParams &params)
 Removes the object from the database.
virtual void updateObjectBox (const TeCoord2D &pt)
virtual void updateObjectBox (const TeBox &other)
void init ()
void initProperties ()
 If the instance properties vector is empty fills it with the tdkObjectTyep info.
void addAttrInCache (std::string &attr_name)
bool getAllAttrsInCache ()
bool getGeometryInCache ()
virtual bool pick (TeCoord2D &coord, TeGeomRep &type, int &geomId)
virtual bool pick (TeCoord2D &c1, TeCoord2D &c2, TeGeomRep &type, int &geomId)
virtual void handleVSEvent (TdkEvent &event)
virtual void handleVSEvent (TdkSelectObjectsEvent &event)
virtual void handleVSEvent (TdkSelectObjectsGIDVectorEvent &event)
virtual void handleVSEvent (TdkPickEvent &event)
virtual void handleVSEvent (TdkEditObjectPointFeedbackEvent &event)
virtual void handleVSEvent (TdkThemeObjectsIdentificationEvent &event)
virtual TeSTInstance & getInstance (bool createInstance=false)
 Returns the last instance of the TeSTElement property.
virtual int findInstance (TeSTInstance &ins)
 Finds the instance of the TeSTElement property that has equals time interval.
virtual void setObject (TeSTElement object)
 Sets the TeSTElement property with the given object.

Protected Attributes

TdkLegendEntryMap styles_
TeSTElement object_
string objectId_
TeBox bBox_
bool savedInDB_
bool geometryInCache_
bool allAttrsInCache_
std::vector< std::string > attrsInCache_
TdkObjectGID objectGID_

Detailed Description

Defines the TdkGeographicObject.


Constructor & Destructor Documentation

TdkGeographicObject::TdkGeographicObject ( const TdkObjectGID objectGID  ) 

TdkGeographicObject::TdkGeographicObject ( const TdkObjectGID objectGID,
TeSTInstance &  ins 
)

TdkGeographicObject::TdkGeographicObject ( TdkGeographicObject object  ) 

TdkGeographicObject::~TdkGeographicObject (  )  [virtual]


Member Function Documentation

void TdkGeographicObject::loadFromShapeFile ( TeDatabase *  dbCaller,
TdkLoadParams params 
) [protected, virtual]

virtual void TdkGeographicObject::loadChildren ( TeDatabase *  dbCaller,
TdkLoadParams params 
) [inline, protected, virtual]

Implements TdkPersistenceObject.

bool TdkGeographicObject::insert ( TeDatabase *  dbCaller,
TdkPersistenceParams params 
) [protected, virtual]

Inserts the object in the database.

Implements TdkPersistenceObject.

bool TdkGeographicObject::load ( TeDatabase *  dbCaller,
TdkLoadParams params 
) [protected, virtual]

Loads the object from the database.

Implements TdkPersistenceObject.

bool TdkGeographicObject::update ( TeDatabase *  dbCaller,
TdkPersistenceParams params 
) [protected, virtual]

Updates the object in the database.

Implements TdkPersistenceObject.

void TdkGeographicObject::remove ( TeDatabase *  dbCaller,
TdkPersistenceParams params 
) [protected, virtual]

Removes the object from the database.

Implements TdkPersistenceObject.

void TdkGeographicObject::updateObjectBox ( const TeCoord2D &  pt  )  [protected, virtual]

void TdkGeographicObject::updateObjectBox ( const TeBox &  other  )  [protected, virtual]

void TdkGeographicObject::init (  )  [protected]

void TdkGeographicObject::initProperties (  )  [protected]

If the instance properties vector is empty fills it with the tdkObjectTyep info.

void TdkGeographicObject::addAttrInCache ( std::string &  attr_name  )  [protected]

bool TdkGeographicObject::getAllAttrsInCache (  )  [inline, protected]

bool TdkGeographicObject::getGeometryInCache (  )  [inline, protected]

bool TdkGeographicObject::pick ( TeCoord2D &  coord,
TeGeomRep &  type,
int &  geomId 
) [protected, virtual]

bool TdkGeographicObject::pick ( TeCoord2D &  c1,
TeCoord2D &  c2,
TeGeomRep &  type,
int &  geomId 
) [protected, virtual]

void TdkGeographicObject::handleVSEvent ( TdkEvent event  )  [protected, virtual]

Reimplemented from TdkEventHandler.

void TdkGeographicObject::handleVSEvent ( TdkSelectObjectsEvent event  )  [protected, virtual]

void TdkGeographicObject::handleVSEvent ( TdkSelectObjectsGIDVectorEvent event  )  [protected, virtual]

void TdkGeographicObject::handleVSEvent ( TdkPickEvent event  )  [protected, virtual]

void TdkGeographicObject::handleVSEvent ( TdkEditObjectPointFeedbackEvent event  )  [protected, virtual]

void TdkGeographicObject::handleVSEvent ( TdkThemeObjectsIdentificationEvent event  )  [protected, virtual]

TeSTInstance & TdkGeographicObject::getInstance ( bool  createInstance = false  )  [protected, virtual]

Returns the last instance of the TeSTElement property.

int TdkGeographicObject::findInstance ( TeSTInstance &  ins  )  [protected, virtual]

Finds the instance of the TeSTElement property that has equals time interval.

void TdkGeographicObject::setObject ( TeSTElement  object  )  [protected, virtual]

Sets the TeSTElement property with the given object.

TdkObject * TdkGeographicObject::copy (  )  [virtual]

Creates a copy of the object.

Implements TdkObject.

void TdkGeographicObject::operator= ( TdkObject object  )  [virtual]

Reimplemented from TdkObject.

bool TdkGeographicObject::operator== ( TdkObject object  )  [virtual]

Returns true if the given object is equal to the object.

Implements TdkObject.

bool TdkGeographicObject::getSavedInDB (  )  [inline]

void TdkGeographicObject::setSavedInDB ( bool  savedInDB  )  [inline]

void TdkGeographicObject::setAllAttrsInCache ( bool  allAttrsInCache  ) 

void TdkGeographicObject::invalidateGeomId (  ) 

void TdkGeographicObject::propagateObjectId (  ) 

std::vector< std::string > & TdkGeographicObject::getAttrsInCache (  ) 

TeSTElement & TdkGeographicObject::getObject (  )  [virtual]

Returns the TeSTElement property.

bool TdkGeographicObject::needToLoad ( TdkLoadParams params  )  [virtual]

Verify if loads the object from the database is necessary.

Implements TdkPersistenceObject.

void TdkGeographicObject::updateGeometries ( TeDatabase *  dbCaller,
bool  updateDB 
)

Updates (or inserts) the current object geometries and updates the themes cache

void TdkGeographicObject::removeGeometries ( TeDatabase *  dbCaller,
bool  updateDB 
)

Removes the current object geometries and updates the themes cache

virtual bool TdkGeographicObject::hasValueInCache ( std::string  attr_name  )  [virtual]

Returns true if the property was setting in the last instance.

Implements TdkObject.

virtual bool TdkGeographicObject::hasIntegerValue ( std::string  attr_name  )  [virtual]

Returns true if there are a value (integer) for the given attribute.

Implements TdkObject.

virtual bool TdkGeographicObject::hasRealValue ( std::string  attr_name  )  [virtual]

Returns true if there are a value (real) for the given attribute.

Implements TdkObject.

virtual bool TdkGeographicObject::hasStringValue ( std::string  attr_name  )  [virtual]

Returns true if there are a value (string) for the given attribute.

Implements TdkObject.

virtual std::string TdkGeographicObject::getAttributeValue ( std::string  attr_name  )  [virtual]

Returns the value of the the last instance property. If the last instance has not the property the object will be loaded from the database.

Implements TdkObject.

virtual void TdkGeographicObject::setAttributeValue ( std::string  attr_name,
std::string  value 
) [virtual]

Set the attribute value from a string.

Implements TdkObject.

virtual std::string TdkGeographicObject::getStringAttr ( std::string  attr_name  )  [virtual]

Returns the value of the last instance property. If the last instance has not the property and load is true the object will be loaded from the database.

Implements TdkObject.

virtual void TdkGeographicObject::setStringAttr ( std::string  attr_name,
std::string  value 
) [virtual]

Sets the value for the given attribute. The attribute type must be string.

Implements TdkObject.

virtual int TdkGeographicObject::getIntegerAttr ( std::string  attr_name  )  [virtual]

Returns the value of the last instance property. If the last instance has not the property and load is true the object will be loaded from the database.

Implements TdkObject.

virtual void TdkGeographicObject::setIntegerAttr ( std::string  attr_name,
int  value 
) [virtual]

Gets the value for the given attribute. The attribute type must be integer.

Implements TdkObject.

virtual double TdkGeographicObject::getRealAttr ( std::string  attr_name  )  [virtual]

Returns the value of the last instance property. If the last instance has not the property and load is true the object will be loaded from the database.

Implements TdkObject.

virtual void TdkGeographicObject::setRealAttr ( std::string  attr_name,
double  value 
) [virtual]

Gets the value for the given attribute. The attribute type must be real.

Implements TdkObject.

void TdkGeographicObject::setGID ( const TdkObjectGID objectGID  )  [virtual]

Implements TdkObject.

TdkObjectGID & TdkGeographicObject::getGID (  )  [virtual]

Implements TdkObject.

TdkObjectTypeDef & TdkGeographicObject::getType (  )  [virtual]

Returns the object type.

Implements TdkObject.

TeProjection * TdkGeographicObject::getProjection (  )  [virtual]

void TdkGeographicObject::setBoundingBox ( TeBox &  bBox  )  [virtual]

TeBox & TdkGeographicObject::getBoundingBox (  )  [virtual]

bool TdkGeographicObject::hasStyle ( int  themeId  )  [virtual]

Returns true when the object style is different of the theme.

TeLegendEntry & TdkGeographicObject::getStyle ( int  themeId  )  [virtual]

void TdkGeographicObject::insertStyle ( TeLegendEntry &  style  )  [virtual]

TdkLegendEntryMap & TdkGeographicObject::getStyles (  )  [virtual]

TeMultiGeometry & TdkGeographicObject::getGeometries (  )  [virtual]

TePointSet & TdkGeographicObject::getPointsGeometry (  )  [virtual]

Returns the points geometry of the last instance.

TeLineSet & TdkGeographicObject::getLinesGeometry (  )  [virtual]

Returns the lines geometry of the last instance.

TePolygonSet & TdkGeographicObject::getPolygonsGeometry (  )  [virtual]

Returns the polygons geometry of the last instance.

TeTextSet & TdkGeographicObject::getTextsGeometry (  )  [virtual]

Returns the texts geometry of the last instance.

TeCellSet & TdkGeographicObject::getCellsGeometry (  )  [virtual]

Returns the cells geometry of the last instance.

void TdkGeographicObject::removeGeometry ( TeGeomRep  rep,
int  geomId 
) [virtual]

void TdkGeographicObject::removeCellGeometry ( int  geomId  )  [virtual]

void TdkGeographicObject::removePointGeometry ( int  geomId  )  [virtual]

void TdkGeographicObject::removeLineGeometry ( int  geomId  )  [virtual]

void TdkGeographicObject::removePolygonGeometry ( int  geomId  )  [virtual]

void TdkGeographicObject::removeTextGeometry ( int  geomId  )  [virtual]

void TdkGeographicObject::setGeometries ( const TePointSet &  points  )  [virtual]

void TdkGeographicObject::setGeometries ( const TeLineSet &  lines  )  [virtual]

void TdkGeographicObject::setGeometries ( const TePolygonSet &  polygons  )  [virtual]

void TdkGeographicObject::setGeometries ( const TeTextSet &  texts  )  [virtual]

void TdkGeographicObject::setGeometries ( const TeCellSet &  cells  )  [virtual]

void TdkGeographicObject::setGeometries ( const TeMultiGeometry &  geometries  )  [virtual]

void TdkGeographicObject::addProperties ( TePropertyVector &  properties,
int  insIndx = -1 
)

void TdkGeographicObject::addGeometries ( TeCellSet &  inCells,
int  insIndx = -1 
)

Adds the geometry to the ith instance. If there are no instance, add the instance.

void TdkGeographicObject::addGeometries ( TePointSet &  inPoints,
int  insIndx = -1 
)

void TdkGeographicObject::addGeometries ( TeLineSet &  inLines,
int  insIndx = -1 
)

void TdkGeographicObject::addGeometries ( TePolygonSet &  inPolys,
int  insIndx = -1 
)

void TdkGeographicObject::addGeometries ( TeTextSet &  inTexts,
int  insIndx = -1 
)

void TdkGeographicObject::addGeometries ( TeMultiGeometry &  geo,
int  insIndx = -1 
)

void TdkGeographicObject::setProperties ( TePropertyVector &  properties  )  [virtual]

TePropertyVector & TdkGeographicObject::getProperties (  )  [virtual]

void TdkGeographicObject::addInstance ( TeSTInstance &  ins  )  [virtual]

Adds the given instance to the TeSTElement property.

If the TeSTElement has an equivalent instance, then adds to it the properties and the geometries of the given instance.

void TdkGeographicObject::import ( TdkObject object  )  [virtual]

Implements TdkObject.

void TdkGeographicObject::translate ( double  dx,
double  dy 
) [inline, virtual]

Implements TdkEditableObject.

void TdkGeographicObject::scale ( double  sx,
double  sy,
int  fixedPoint 
) [inline, virtual]

Implements TdkEditableObject.

void TdkGeographicObject::rotate ( double  angle,
TeCoord2D &  fixedCoord 
) [inline, virtual]

Implements TdkEditableObject.

void TdkGeographicObject::transform ( TdkMathMatrix matrix  )  [inline, virtual]

Implements TdkEditableObject.

void TdkGeographicObject::addPoint ( int  vertex1,
TeCoord2D  point 
) [virtual]

Implements TdkEditableObject.

void TdkGeographicObject::editPoint ( int  index,
double  dx,
double  dy 
) [virtual]

Implements TdkEditableObject.

void TdkGeographicObject::removePoint ( int  index  )  [virtual]

Implements TdkEditableObject.

bool TdkGeographicObject::isTranslatable (  )  [inline, virtual]

Implements TdkEditableObject.

bool TdkGeographicObject::isScalable (  )  [inline, virtual]

Implements TdkEditableObject.

bool TdkGeographicObject::isRotatable (  )  [inline, virtual]

Implements TdkEditableObject.

TeCoord2D TdkGeographicObject::fixedCoord ( int  fixedPoint  )  [inline, virtual]

Implements TdkEditableObject.

int TdkGeographicObject::boxPoint ( TeCoord2D &  coord  )  [inline, virtual]

Implements TdkEditableObject.

int TdkGeographicObject::vertexPoint ( TeCoord2D &  coord  )  [virtual]

Implements TdkEditableObject.

void TdkGeographicObject::segmentVertexes ( TeCoord2D &  coord,
int &  vertex1,
int &  vertex2 
) [virtual]

Implements TdkEditableObject.

void TdkGeographicObject::point2Line ( TeCoord2D &  coord,
int  vertex1,
int  vertex2 
) [virtual]

Implements TdkEditableObject.

void TdkGeographicObject::scaleFactor ( TeBox &  box,
double &  sx,
double &  sy,
int  boxPoint 
) [inline, virtual]

Implements TdkEditableObject.

void TdkGeographicObject::rotateAngle ( TeBox &  box,
double &  angle,
int  fixedPoint 
) [inline, virtual]

Implements TdkEditableObject.

TdkMouseCursor TdkGeographicObject::mouseCursor ( TeCoord2D &  coord  )  [virtual]

Implements TdkEditableObject.

int TdkGeographicObject::getLayerID (  )  [virtual]

void TdkGeographicObject::setLayerID ( int  layerId  )  [virtual]

std::string TdkGeographicObject::getTypeName (  )  [virtual]


Member Data Documentation

TdkLegendEntryMap TdkGeographicObject::styles_ [protected]

TeSTElement TdkGeographicObject::object_ [protected]

string TdkGeographicObject::objectId_ [protected]

TeBox TdkGeographicObject::bBox_ [protected]

bool TdkGeographicObject::savedInDB_ [protected]

bool TdkGeographicObject::geometryInCache_ [protected]

bool TdkGeographicObject::allAttrsInCache_ [protected]

std::vector<std::string> TdkGeographicObject::attrsInCache_ [protected]

TdkObjectGID TdkGeographicObject::objectGID_ [protected]


The documentation for this class was generated from the following files:
Generated on Fri Jun 15 16:54:39 2007 for TDK by  doxygen 1.5.2