TimeStamp Class Reference

#include <timestamp.h>

详细描述

A TimeStamp represents the value of an ExecutionTime at a certain instant. You can compare a TimeStamp with an ExecutionTime to see if the ExecutionTime has changed since the last update of the TimeStamp (in this case the ExecutionTime will be greater than the TimeStamp ).

另请参阅
ExecutionTime

Public Types

enum   MAX_ENUM { VALUE }

公共成员函数

constexpr  TimeStamp ()
  TimeStamp ( ExecutionTime time)
constexpr  TimeStamp ( ExecutionTime::ValueType time)
enum maxon::TimeStamp::MAX_ENUM   MAXON_ENUM_LIST_CLASS ( MAX_ENUM )
MAXON_IMPLICIT   TimeStamp ( MAX_ENUM )
void  UpdateUnchecked ( TimeStamp src )
void  UpdateUnordered ( ExecutionTime time)
Bool   UpdateAtomic ( ExecutionTime time)
Bool   更新 ( ExecutionTime time)
  operator ExecutionTime::ValueType () const
  MAXON_OPERATOR_EQUALITY_HASHCODE ( TimeStamp , _value )
String   ToString (const FormatStatement *fs=nullptr) const

静态公共成员函数

static const TimeStamp NullValue ()

静态公共属性

static const MAX_ENUM   MAX

Private Attributes

ExecutionTime::ValueType   _value

Member Enumeration Documentation

◆  MAX_ENUM

enum MAX_ENUM
strong
Enumerator
VALUE 

构造函数 & 析构函数文档编制

◆  TimeStamp() [1/4]

constexpr TimeStamp ( )
constexpr

Construct a new TimeStamp . The internal value will be set to 0. Because ExecutionTime starts with 1, this means that an initial TimeStamp will be in the past of any valid ExecutionTime .

◆  TimeStamp() [2/4]

TimeStamp ( ExecutionTime   time )
explicit

◆  TimeStamp() [3/4]

constexpr TimeStamp ( ExecutionTime::ValueType   time )
explicit constexpr

◆  TimeStamp() [4/4]

MAXON_IMPLICIT TimeStamp ( MAX_ENUM   )

Construct a new TimeStamp with a maximum value. I.e., the constructed TimeStamp will be in the future of every valid ExecutionTime .

成员函数文档编制

◆  MAXON_ENUM_LIST_CLASS()

enum maxon::TimeStamp::MAX_ENUM MAXON_ENUM_LIST_CLASS ( MAX_ENUM   )

◆  UpdateUnchecked()

void UpdateUnchecked ( TimeStamp   src )

◆  UpdateUnordered()

void UpdateUnordered ( ExecutionTime   time )

Updates this TimeStamp to the current value of time . This TimeStamp must not be in the future of time .

参数
[in] time Time to which this TimeStamp is set.

◆  UpdateAtomic()

Bool UpdateAtomic ( ExecutionTime   time )

Atomically updates this TimeStamp to the current value of time . The update is done only if this TimeStamp is currently in the past of time .

参数
[in] time Time to which this TimeStamp is set.
返回
True if this TimeStamp has been changed, false otherwise.

◆  Update()

Bool 更新 ( ExecutionTime   time )

◆  operator ExecutionTime::ValueType()

operator ExecutionTime::ValueType ( ) const

Returns the internal integer value of this TimeStamp . This can be compared with the value of an ExecutionTime to see if the ExecutionTime has changed since the last update of the TimeStamp .

返回
Internal integer value of this TimeStamp .

◆  NullValue()

static const TimeStamp & NullValue ( )
static

◆  MAXON_OPERATOR_EQUALITY_HASHCODE()

MAXON_OPERATOR_EQUALITY_HASHCODE ( TimeStamp   ,
_value    
)

◆  ToString()

String ToString ( const FormatStatement fs = nullptr ) const

Member Data Documentation

◆  MAX

const MAX_ENUM MAX static

◆  _value

ExecutionTime::ValueType _value
private