helics  3.5.2
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
 
HelicsInput baseObject () const
 
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)
 
int getBytes (std::vector< char > &data)
 
int getByteCount ()
 
int getStringSize ()
 
std::string getString ()
 
void getString (std::string &str)
 
void getNamedPoint (std::string &name, double *val)
 
int64_t getInteger ()
 
bool getBoolean ()
 
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)
 
DataBuffer getDataBuffer ()
 
bool isUpdated () const
 
HelicsTime getLastUpdateTime () const
 
void clearUpdate ()
 
const char * getName () const
 
const char * getUnits () const
 
const char * getInjectionUnits () const
 
const char * getPublicationType () const
 
const char * getType () const
 
const char * getTarget () const
 
const char * getInfo () const
 
void setInfo (const std::string &info)
 
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)
 
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()

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

extract the base object

◆ clearUpdate()

void helicscpp::Input::clearUpdate ( )
inline

clear the updated flag

References helicsInputClearUpdate().

◆ getBoolean()

bool helicscpp::Input::getBoolean ( )
inline

get the value as a boolean

References HELICS_TRUE, and helicsInputGetBoolean().

◆ getByteCount()

int helicscpp::Input::getByteCount ( )
inline

get the size of the raw value

References helicsInputGetByteCount().

◆ getBytes()

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()

DataBuffer helicscpp::Input::getDataBuffer ( )
inline

get a data buffer with the input value

References helicsInputGetDataBuffer().

◆ getDouble()

double helicscpp::Input::getDouble ( )
inline

get the value as a double

References helicsInputGetDouble().

◆ getInfo()

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

get the interface information field of the input`

References helicsInputGetInfo().

◆ getInjectionUnits()

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

get the units associated with an inputs publication

References helicsInputGetInjectionUnits().

◆ getInteger()

int64_t helicscpp::Input::getInteger ( )
inline

get the current value as a 64 bit integer

References helicsInputGetInteger().

◆ getLastUpdateTime()

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

Get the last time an input was updated

References helicsInputLastUpdateTime().

◆ getName()

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()

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

get the units associated with a publication of an input

References helicsInputGetPublicationType().

◆ getString() [1/2]

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()

int helicscpp::Input::getStringSize ( )
inline

get the size of the value as a string

References helicsInputGetStringSize().

◆ getTag()

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

get the value of a tag for the input

References helicsInputGetTag().

◆ getTarget()

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

get an associated target

References helicsInputGetTarget().

◆ getType()

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

get the type of the input

References helicsInputGetType().

◆ getUnits()

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()

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

Check if an input is updated

References helicsInputIsUpdated().

◆ isValid()

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: