Class Algorithm

Inheritance Relationships

Derived Type

Class Documentation

class Algorithm

Abstract algorithm class. This class cannot been constructed. It defines some interface commonly used in spatial algorithms.

Subclassed by gwm::SpatialAlgorithm

Public Functions

inline Algorithm()

Construct a new Algorithm object.

inline virtual ~Algorithm()

Destroy the Algorithm object.

inline const std::unique_ptr<ITelegram> &telegram() const

Ge the reference of pointer to Telegram object. Reference of pointer to Telegram object.

inline void setTelegram(std::unique_ptr<ITelegram> telegram)

Set the Telegram pointer. The pointer to the new Telegram object. This instance will take the management of pointer telegram.

inline void debug(std::string message, std::string function, std::string file)

Manually send a debug message via telegram.

Parameters:
  • message – Telegram message.

  • function – Caller’s name.

  • file – Name of the file where caller defined.

inline const Status status() const

Get the status of this algorithm.

Returns:

const Status of this algorithm.

virtual bool isValid() = 0

Check whether the algorithm’s configuration is valid.

Returns:

true if the algorithm’s configuration is valid.

Returns:

false if the algorithm’s configuration is invalid.

Protected Functions

inline void setStatus(Status status)

Set the Status of this algorithm.

Parameters:

status – Status of this algorithm

Protected Attributes

std::unique_ptr<ITelegram> mTelegram = nullptr

Pointer to the ITelegram instance.

Status mStatus = Status::Success

Algorithm status.