helics 3.7.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
helicscpp::Input Class Reference

#include <Input.hpp>

Public Member Functions

 Input (HelicsInput hsub) HELICS_NOTHROW
 
 Input () HELICS_NOTHROW
 
 Input (const Input &inputs) HELICS_NOTHROW
 
Inputoperator= (const Input &input)
 
 operator HelicsInput () const
 
HELICS_NODISCARD HelicsInput baseObject () const
 
HELICS_NODISCARD bool isValid () const
 
void addTarget (const std::string &target)
 
void setDefault (const char *data, int len)
 
void setDefault (const std::string &str)
 
void setDefault (int64_t val)
 
void setDefault (bool val)
 
void setDefault (double val)
 
void setDefault (const std::complex< double > &cmplx)
 
void setDefault (const std::vector< double > &data)
 
void setDefault (const std::vector< std::complex< double > > &data)
 
HELICS_NODISCARD int getBytes (std::vector< char > &data)
 
HELICS_NODISCARD int getByteCount ()
 
HELICS_NODISCARD int getStringSize ()
 
HELICS_NODISCARD std::string getString ()
 
void getString (std::string &str)
 
void getNamedPoint (std::string &name, double *val)
 
HELICS_NODISCARD int64_t getInteger ()
 
HELICS_NODISCARD bool getBoolean ()
 
HELICS_NODISCARD double getDouble ()
 
std::complex< double > getComplex ()
 
int getVector (double *data, int maxlen)
 
void getVector (std::vector< double > &data)
 
int getComplexVector (double *data, int maxlen)
 
void getComplexVector (std::vector< std::complex< double > > &data)
 
HELICS_NODISCARD DataBuffer getDataBuffer ()
 
HELICS_NODISCARD bool isUpdated () const
 
HELICS_NODISCARD HelicsTime getLastUpdateTime () const
 
void clearUpdate ()
 
HELICS_NODISCARD const char * getName () const
 
HELICS_NODISCARD const char * getUnits () const
 
HELICS_NODISCARD const char * getInjectionUnits () const
 
HELICS_NODISCARD const char * getPublicationType () const
 
HELICS_NODISCARD const char * getType () const
 
HELICS_NODISCARD const char * getTarget () const
 
HELICS_NODISCARD const char * getInfo () const
 
void setInfo (const std::string &info)
 
HELICS_NODISCARD const char * getTag (const std::string &tagname) const
 
void setTag (const std::string &tagname, const std::string &tagvalue)
 
void setOption (int32_t option, int32_t value=1)
 
HELICS_NODISCARD int32_t getOption (int32_t option)
 

Detailed Description

C++98 interface for a helics Input

Constructor & Destructor Documentation

◆ Input() [1/3]

helicscpp::Input::Input ( HelicsInput  hsub)
inlineexplicit

construct from a HelicsInput object

◆ Input() [2/3]

helicscpp::Input::Input ( )
inline

default constructor

◆ Input() [3/3]

helicscpp::Input::Input ( const Input inputs)
inline

copy constructor

Member Function Documentation

◆ addTarget()

void helicscpp::Input::addTarget ( const std::string &  target)
inline

add a publication target to the input

References helicsInputAddTarget().

◆ baseObject()

HELICS_NODISCARD HelicsInput helicscpp::Input::baseObject ( ) const
inline

extract the base object

◆ clearUpdate()

void helicscpp::Input::clearUpdate ( )
inline

clear the updated flag

References helicsInputClearUpdate().

◆ getBoolean()

HELICS_NODISCARD bool helicscpp::Input::getBoolean ( )
inline

get the value as a boolean

References HELICS_TRUE, and helicsInputGetBoolean().

◆ getByteCount()

HELICS_NODISCARD int helicscpp::Input::getByteCount ( )
inline

get the size of the raw value

References helicsInputGetByteCount().

◆ getBytes()

HELICS_NODISCARD int helicscpp::Input::getBytes ( std::vector< char > &  data)
inline

Methods to get subscription values get a raw value as a character vector

References helicsInputGetByteCount(), and helicsInputGetBytes().

◆ getComplex()

std::complex< double > helicscpp::Input::getComplex ( )
inline

get the value as a complex number

References helicsInputGetComplexObject().

◆ getComplexVector() [1/2]

int helicscpp::Input::getComplexVector ( double *  data,
int  maxlen 
)
inline

get the current value as a vector of doubles in alternating real and imaginary

Parameters
datapointer to space to store the current values
maxlenthe maximum size of the allowed vector
Returns
the actual size of the vector stored

References helicsInputGetComplexVector().

◆ getComplexVector() [2/2]

void helicscpp::Input::getComplexVector ( std::vector< std::complex< double > > &  data)
inline

get the current value and store it in a std::vector<std::complex<double>>

References helicsInputGetComplexVector(), and helicsInputGetVectorSize().

◆ getDataBuffer()

HELICS_NODISCARD DataBuffer helicscpp::Input::getDataBuffer ( )
inline

get a data buffer with the input value

References helicsInputGetDataBuffer().

◆ getDouble()

HELICS_NODISCARD double helicscpp::Input::getDouble ( )
inline

get the value as a double

References helicsInputGetDouble().

◆ getInfo()

HELICS_NODISCARD const char * helicscpp::Input::getInfo ( ) const
inline

get the interface information field of the input`

References helicsInputGetInfo().

◆ getInjectionUnits()

HELICS_NODISCARD const char * helicscpp::Input::getInjectionUnits ( ) const
inline

get the units associated with an inputs publication

References helicsInputGetInjectionUnits().

◆ getInteger()

HELICS_NODISCARD int64_t helicscpp::Input::getInteger ( )
inline

get the current value as a 64 bit integer

References helicsInputGetInteger().

◆ getLastUpdateTime()

HELICS_NODISCARD HelicsTime helicscpp::Input::getLastUpdateTime ( ) const
inline

Get the last time an input was updated

References helicsInputLastUpdateTime().

◆ getName()

HELICS_NODISCARD const char * helicscpp::Input::getName ( ) const
inline

get the Name for the input

the name is full name vs the local one for non-global interfaces

References helicsInputGetName().

◆ getNamedPoint()

void helicscpp::Input::getNamedPoint ( std::string &  name,
double *  val 
)
inline

get the current value as a named point

References helicsInputGetNamedPoint(), and helicsInputGetStringSize().

◆ getPublicationType()

HELICS_NODISCARD const char * helicscpp::Input::getPublicationType ( ) const
inline

get the units associated with a publication of an input

References helicsInputGetPublicationType().

◆ getString() [1/2]

HELICS_NODISCARD std::string helicscpp::Input::getString ( )
inline

get the current value as a string

References helicsInputGetString(), and helicsInputGetStringSize().

◆ getString() [2/2]

void helicscpp::Input::getString ( std::string &  str)
inline

get the current value as a string

References helicsInputGetString(), and helicsInputGetStringSize().

◆ getStringSize()

HELICS_NODISCARD int helicscpp::Input::getStringSize ( )
inline

get the size of the value as a string

References helicsInputGetStringSize().

◆ getTag()

HELICS_NODISCARD const char * helicscpp::Input::getTag ( const std::string &  tagname) const
inline

get the value of a tag for the input

References helicsInputGetTag().

◆ getTarget()

HELICS_NODISCARD const char * helicscpp::Input::getTarget ( ) const
inline

get an associated target

References helicsInputGetTarget().

◆ getType()

HELICS_NODISCARD const char * helicscpp::Input::getType ( ) const
inline

get the type of the input

References helicsInputGetType().

◆ getUnits()

HELICS_NODISCARD const char * helicscpp::Input::getUnits ( ) const
inline

get the units associated with a input

References helicsInputGetExtractionUnits().

◆ getVector() [1/2]

int helicscpp::Input::getVector ( double *  data,
int  maxlen 
)
inline

get the current value as a vector of doubles

Parameters
datapointer to space to store the current values
maxlenthe maximum size of the allowed vector
Returns
the actual size of the vector stored

References helicsInputGetVector().

◆ getVector() [2/2]

void helicscpp::Input::getVector ( std::vector< double > &  data)
inline

get the current value and store it in a std::vector<double>

References helicsInputGetVector(), and helicsInputGetVectorSize().

◆ isUpdated()

HELICS_NODISCARD bool helicscpp::Input::isUpdated ( ) const
inline

Check if an input is updated

References helicsInputIsUpdated().

◆ isValid()

HELICS_NODISCARD bool helicscpp::Input::isValid ( ) const
inline

check if the input is valid

References HELICS_TRUE, and helicsInputIsValid().

◆ operator HelicsInput()

helicscpp::Input::operator HelicsInput ( ) const
inline

cast to HelicsInput object

◆ operator=()

Input & helicscpp::Input::operator= ( const Input input)
inline

copy assign

◆ setDefault() [1/8]

void helicscpp::Input::setDefault ( bool  val)
inline

set the default bool value

References HELICS_FALSE, HELICS_TRUE, and helicsInputSetDefaultBoolean().

◆ setDefault() [2/8]

void helicscpp::Input::setDefault ( const char *  data,
int  len 
)
inline

Methods to set default values for inputs set the default value as a raw data with length

References helicsInputSetDefaultBytes().

◆ setDefault() [3/8]

void helicscpp::Input::setDefault ( const std::complex< double > &  cmplx)
inline

set the default complex value

References helicsInputSetDefaultComplex().

◆ setDefault() [4/8]

void helicscpp::Input::setDefault ( const std::string &  str)
inline

set the default value as a string

References helicsInputSetDefaultString().

◆ setDefault() [5/8]

void helicscpp::Input::setDefault ( const std::vector< double > &  data)
inline

set the default complex vector data value

References helicsInputSetDefaultVector().

◆ setDefault() [6/8]

void helicscpp::Input::setDefault ( const std::vector< std::complex< double > > &  data)
inline

set the default complex vector data value

References helicsInputSetDefaultComplexVector().

◆ setDefault() [7/8]

void helicscpp::Input::setDefault ( double  val)
inline

set the default double value

References helicsInputSetDefaultDouble().

◆ setDefault() [8/8]

void helicscpp::Input::setDefault ( int64_t  val)
inline

set the default value as an integer

References helicsInputSetDefaultInteger().

◆ setInfo()

void helicscpp::Input::setInfo ( const std::string &  info)
inline

set the interface information field of the input

References helicsInputSetInfo().

◆ setTag()

void helicscpp::Input::setTag ( const std::string &  tagname,
const std::string &  tagvalue 
)
inline

set the value of a tag for the input

References helicsInputSetTag().


The documentation for this class was generated from the following file: