OpenPit C++ SDK
C++17 SDK for the OpenPit pre-trade risk engine
openpit::param::Asset Class Referencefinal

Validated, owning asset or currency identifier. More...

Public Member Functions

 Asset (std::string_view value)
 Validates and owns an asset identifier. More...
 
bool operator!= (const Asset &other) const noexcept
 
bool operator< (const Asset &other) const noexcept
 
bool operator<= (const Asset &other) const noexcept
 
bool operator== (const Asset &other) const noexcept
 
bool operator> (const Asset &other) const noexcept
 
bool operator>= (const Asset &other) const noexcept
 
std::string_view View () const noexcept
 Returns a borrowed view valid while this value remains alive. More...
 

Detailed Description

Validated, owning asset or currency identifier.

The value owns its bytes, and each copy has independent storage. Construction validates the identifier and throws openpit::Error on invalid input.

Constructor & Destructor Documentation

◆ Asset()

openpit::param::Asset::Asset ( std::string_view  value)
inlineexplicit

Validates and owns an asset identifier.

Member Function Documentation

◆ operator!=()

bool openpit::param::Asset::operator!= ( const Asset other) const
inlinenoexcept

◆ operator<()

bool openpit::param::Asset::operator< ( const Asset other) const
inlinenoexcept

◆ operator<=()

bool openpit::param::Asset::operator<= ( const Asset other) const
inlinenoexcept

◆ operator==()

bool openpit::param::Asset::operator== ( const Asset other) const
inlinenoexcept

◆ operator>()

bool openpit::param::Asset::operator> ( const Asset other) const
inlinenoexcept

◆ operator>=()

bool openpit::param::Asset::operator>= ( const Asset other) const
inlinenoexcept

◆ View()

std::string_view openpit::param::Asset::View ( ) const
inlinenoexcept

Returns a borrowed view valid while this value remains alive.