|
open62541pp 0.19.0
C++ wrapper of open62541
|
#include <types.hpp>
UA_DateTime wrapper class.
An instance in time. A DateTime value is encoded as a 64-bit signed integer which represents the number of 100 nanosecond intervals since January 1, 1601 (UTC).
Public Types | |
| using | DefaultClock = std::chrono::system_clock |
| using | UaDuration = std::chrono::duration< int64_t, std::ratio< 1, 10 '000 '000 > > |
Public Types inherited from opcua::Wrapper< UA_DateTime > | |
| using | NativeType = UA_DateTime |
| using | HandlerType = TypeHandler< UA_DateTime > |
Public Member Functions | |
| template<typename Clock , typename Duration > | |
| DateTime (std::chrono::time_point< Clock, Duration > timePoint) | |
| template<typename Clock = DefaultClock, typename Duration = UaDuration> | |
| std::chrono::time_point< Clock, Duration > | toTimePoint () const |
| int64_t | toUnixTime () const noexcept |
| UA_DateTimeStruct | toStruct () const noexcept |
| int64_t | get () const noexcept |
| String | format (std::string_view format, bool localtime=false) const |
| constexpr | Wrapper () noexcept=default |
| constexpr | Wrapper (const Wrapper &other) |
| constexpr | Wrapper (const T &native) |
| constexpr | Wrapper (Wrapper &&other) noexcept |
| constexpr | Wrapper (T &&native) noexcept |
Public Member Functions inherited from opcua::Wrapper< UA_DateTime > | |
| constexpr | Wrapper () noexcept=default |
| constexpr | Wrapper (const Wrapper &other) |
| constexpr | Wrapper (const UA_DateTime &native) |
| constexpr | Wrapper (Wrapper &&other) noexcept |
| constexpr | Wrapper (UA_DateTime &&native) noexcept |
| ~Wrapper () noexcept=default | |
| constexpr Wrapper & | operator= (const Wrapper &other) |
| constexpr Wrapper & | operator= (const UA_DateTime &native) |
| constexpr Wrapper & | operator= (Wrapper &&other) noexcept |
| constexpr Wrapper & | operator= (UA_DateTime &&native) noexcept |
| constexpr | operator UA_DateTime & () noexcept |
| constexpr | operator const UA_DateTime & () const noexcept |
| constexpr UA_DateTime * | operator-> () noexcept |
| constexpr const UA_DateTime * | operator-> () const noexcept |
| constexpr UA_DateTime * | handle () noexcept |
| constexpr const UA_DateTime * | handle () const noexcept |
| constexpr void | swap (Wrapper &other) noexcept |
| constexpr void | swap (UA_DateTime &native) noexcept |
Static Public Member Functions | |
| static DateTime | now () noexcept |
| template<typename Clock , typename Duration > | |
| static DateTime | fromTimePoint (std::chrono::time_point< Clock, Duration > timePoint) |
| static DateTime | fromUnixTime (int64_t unixTime) noexcept |
| static int64_t | localTimeUtcOffset () noexcept |
Additional Inherited Members | |
Protected Member Functions inherited from opcua::Wrapper< UA_DateTime > | |
| constexpr const UA_DateTime & | native () const noexcept |
| constexpr UA_DateTime & | native () noexcept |
| constexpr void | clear () noexcept |
Related Symbols inherited from opcua::Wrapper< UA_DateTime > | |
| constexpr UA_DateTime * | asWrapper (typename T::NativeType *native) noexcept |
| constexpr const UA_DateTime * | asWrapper (const typename T::NativeType *native) noexcept |
| constexpr UA_DateTime & | asWrapper (typename T::NativeType &native) noexcept |
| constexpr const UA_DateTime & | asWrapper (const typename T::NativeType &native) noexcept |
| constexpr T::NativeType * | asNative (UA_DateTime *wrapper) noexcept |
| constexpr const T::NativeType * | asNative (const UA_DateTime *wrapper) noexcept |
| constexpr T::NativeType & | asNative (UA_DateTime &wrapper) noexcept |
| constexpr const T::NativeType & | asNative (const UA_DateTime &wrapper) noexcept |
| using opcua::DateTime::DefaultClock = std::chrono::system_clock |
| using opcua::DateTime::UaDuration = std::chrono::duration<int64_t, std::ratio<1, 10'000'000> > |
|
inline |
| String opcua::DateTime::format | ( | std::string_view | format, |
| bool | localtime = false |
||
| ) | const |
Convert to string with given format (same format codes as strftime).
|
inlinestatic |
Get DateTime from std::chrono::time_point.
Definition at line 399 of file types.hpp.
Referenced by opcua::TypeConverter< std::chrono::time_point< Clock, Duration > >::toNative().
|
inlinestaticnoexcept |
|
inlinenoexcept |
|
inlinestaticnoexcept |
|
inlinenoexcept |
Convert to UA_DateTimeStruct.
|
inline |
Convert to std::chrono::time_point.
Definition at line 418 of file types.hpp.
Referenced by opcua::TypeConverter< std::chrono::time_point< Clock, Duration > >::fromNative().
|
inlinenoexcept |
|
constexprdefaultnoexcept |
|
inlineexplicitconstexpr |
Copy constructor with native object.
Definition at line 151 of file wrapper.hpp.
|
inlineconstexpr |
Copy constructor.
Definition at line 147 of file wrapper.hpp.
|
inlineconstexprnoexcept |
Move constructor with native object.
Definition at line 159 of file wrapper.hpp.
|
inlineconstexprnoexcept |
Move constructor.
Definition at line 155 of file wrapper.hpp.