27 #include "../../../datatype/DateTime.h"
28 #include "../../../datatype/DateTimePeriod.h"
29 #include "../../../datatype/DateTimeInstant.h"
30 #include "../../../datatype/SimpleData.h"
31 #include "../../../datatype/AbstractData.h"
32 #include "../../../geometry/Geometry.h"
33 #include "../../../common/STLUtils.h"
48 std::vector<te::st::Object*> objs)
60 m_time.reset(static_cast<te::dt::DateTime*>(ev.
m_time->clone()));
63 for(
unsigned int i=0; i<ev.
m_objects.size(); ++i)
73 m_time.reset(static_cast<te::dt::DateTime*>(other.
m_time->clone()));
75 m_location.reset(static_cast<te::gm::Geometry*>(other.
m_location->clone()));
77 for(
unsigned int i=0; i<other.
m_objects.size(); ++i)
78 m_objects.push_back(other.
m_objects[i]->clone());
85 return new Event(*
this);
110 return m_location.get();
std::auto_ptr< te::gm::Geometry > m_location
The location where the event happened.
Event & operator=(const Event &other)
Copy assignment operator.
void setObjects(std::vector< te::st::Object * > &objs)
It sets the objects involved to the event.
void setTime(te::dt::DateTime *t)
It sets the time when the event happened.
std::auto_ptr< te::dt::DateTime > m_time
The time when the event happened.
std::string m_id
The identification of the event.
Event(const std::string &id, te::dt::DateTime *t, te::gm::Geometry *g)
Constructor.
void setId(const std::string &id)
It sets the object identification.
Event * clone() const
It returns a clone of this event.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
void getObjects(std::vector< te::st::Object * > &output) const
It returns the objects involved to the event.
This file contains a class to represent an object.
te::gm::Geometry * getLocation() const
It returns the location where the event happened.
void setLocation(te::gm::Geometry *g)
It sets the location where the event happened.
te::dt::DateTime * getTime() const
It returns the time when the event happened.
std::vector< te::st::Object * > m_objects
The objects involved to the event.
void FreeContents(boost::unordered_map< K, V * > &m)
This function can be applied to a map of pointers. It will delete each pointer in the map...
A class to represent an event.
virtual ~Event()
Virtual destructor.
std::string getId() const
It returns the object identification.