类 Algorithm

  • 在 :ref:`file_include_gwmodelpp_Algorithm.h`中定义

继承关系

派生类

类文档

class Algorithm

抽象算法基类。 该类无法被构造。该类型定义了一些在空间算法中常用的接口。

Subclassed by gwm::SpatialAlgorithm

公有方法

inline Algorithm()

构造一个新的 Algorithm 类对象。

inline virtual ~Algorithm()

销毁 Algorithm 类对象。

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

返回 Telegram 指针的引用。

返回:

const std::unique_ptr<ITelegram>& Telegram 指针的引用

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

设置 Telegram 指针。

参数:

telegram -- 新的 Telegram 对象的指针。所有权将被该 Algorithm 实例接管。

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

Manually send a debug message via telegram.

参数:
  • 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.

返回:

const Status of this algorithm.

virtual bool isValid() = 0

检查算法配置是否合法。

返回:

true 如果算法配置是合法的。

返回:

false 如果算法配置不合法。

Protected Functions

inline void setStatus(Status status)

Set the Status of this algorithm.

参数:

status -- Status of this algorithm

Protected Attributes

std::unique_ptr<ITelegram> mTelegram = nullptr

指向 ITelegram 实例的指针

Status mStatus = Status::Success

算法状态