te::st::Event Class Reference

A class to represent an event. More...

#include <Event.h>

Public Member Functions

Eventclone () const
 It returns a clone of this event. More...
 
std::string getId () const
 It returns the object identification. More...
 
te::gm::GeometrygetLocation () const
 It returns the location where the event happened. More...
 
void getObjects (std::vector< te::st::Object *> &output) const
 It returns the objects involved to the event. More...
 
te::dt::DateTimegetTime () const
 It returns the time when the event happened. More...
 
Eventoperator= (const Event &other)
 Copy assignment operator. More...
 
void setId (const std::string &id)
 It sets the object identification. More...
 
void setLocation (te::gm::Geometry *g)
 It sets the location where the event happened. More...
 
void setObjects (std::vector< te::st::Object *> &objs)
 It sets the objects involved to the event. More...
 
void setTime (te::dt::DateTime *t)
 It sets the time when the event happened. More...
 
virtual ~Event ()
 Virtual destructor. More...
 
Event Constructors
 Event (const std::string &id, te::dt::DateTime *t, te::gm::Geometry *g)
 Constructor. More...
 
 Event (const std::string &id, te::dt::DateTime *t, te::gm::Geometry *g, std::vector< te::st::Object *> objs)
 Constructor. More...
 
 Event (const Event &ts)
 Copy constructor. More...
 

Private Attributes

std::string m_id
 The identification of the event. More...
 
std::unique_ptr< te::gm::Geometrym_location
 The location where the event happened. More...
 
std::vector< te::st::Object * > m_objects
 The objects involved to the event. More...
 
std::unique_ptr< te::dt::DateTimem_time
 The time when the event happened. More...
 

Detailed Description

A class to represent an event.

An event is an individual episode with a definite beginning and end which can involve one or more objects.

See also
Object

Definition at line 59 of file Event.h.

Constructor & Destructor Documentation

◆ Event() [1/3]

te::st::Event::Event ( const std::string &  id,
te::dt::DateTime t,
te::gm::Geometry g 
)

Constructor.

Parameters
idThe identification of the event.
tThe time when the event happened.
gThe location where the event happened.
Note
It will take the ownership of the input pointers.

◆ Event() [2/3]

te::st::Event::Event ( const std::string &  id,
te::dt::DateTime t,
te::gm::Geometry g,
std::vector< te::st::Object *>  objs 
)

Constructor.

Parameters
idThe identification of the event.
tThe time when the event happened.
gThe location where the event happened.
objsThe objects involved to the event.
Note
It will take the ownership of the input pointers.
It will NOT take the ownership of the involved objects.

◆ Event() [3/3]

te::st::Event::Event ( const Event ts)

Copy constructor.

◆ ~Event()

virtual te::st::Event::~Event ( )
virtual

Virtual destructor.

Member Function Documentation

◆ clone()

Event* te::st::Event::clone ( ) const

It returns a clone of this event.

Returns
A new event.
Note
The caller will take the ownership of the returned pointer.

◆ getId()

std::string te::st::Event::getId ( ) const

It returns the object identification.

Returns
The object identification.

◆ getLocation()

te::gm::Geometry* te::st::Event::getLocation ( ) const

It returns the location where the event happened.

Returns
A pointer to the location where the event happened.
Note
The caller will NOT take the ownership of the returned pointer.

◆ getObjects()

void te::st::Event::getObjects ( std::vector< te::st::Object *> &  output) const

It returns the objects involved to the event.

Returns
A pointer to the objects involved to the event.
Note
The caller will NOT take the ownership of the output pointers.

◆ getTime()

te::dt::DateTime* te::st::Event::getTime ( ) const

It returns the time when the event happened.

Returns
A pointer to the time when the event happened.
Note
The caller will NOT take the ownership of the returned pointer.

◆ operator=()

Event& te::st::Event::operator= ( const Event other)

Copy assignment operator.

◆ setId()

void te::st::Event::setId ( const std::string &  id)

It sets the object identification.

Parameters
idThe object identification.

◆ setLocation()

void te::st::Event::setLocation ( te::gm::Geometry g)

It sets the location where the event happened.

Parameters
tThe location where the event happened.
Note
It will take the ownership of the input pointer.

◆ setObjects()

void te::st::Event::setObjects ( std::vector< te::st::Object *> &  objs)

It sets the objects involved to the event.

Parameters
objsThe objects involved to the event.
Note
It will NOT take the ownership of the input objects.

◆ setTime()

void te::st::Event::setTime ( te::dt::DateTime t)

It sets the time when the event happened.

Parameters
tThe time when the event happened.
Note
It will take the ownership of the input pointer.

Member Data Documentation

◆ m_id

std::string te::st::Event::m_id
private

The identification of the event.

Definition at line 184 of file Event.h.

◆ m_location

std::unique_ptr<te::gm::Geometry> te::st::Event::m_location
private

The location where the event happened.

Definition at line 186 of file Event.h.

◆ m_objects

std::vector<te::st::Object*> te::st::Event::m_objects
private

The objects involved to the event.

Definition at line 187 of file Event.h.

◆ m_time

std::unique_ptr<te::dt::DateTime> te::st::Event::m_time
private

The time when the event happened.

Definition at line 185 of file Event.h.


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