helics  2.8.1
Public Member Functions | List of all members
helicscpp::Input Class Reference

#include <Input.hpp>

Public Member Functions

 Input (helics_input hsub) HELICS_NOTHROW
 
 Input () HELICS_NOTHROW
 
 Input (const Input &inputs) HELICS_NOTHROW
 
Inputoperator= (const Input &input)
 
 operator helics_input () const
 
helics_input 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)
 
int getRawValue (std::vector< char > &data)
 
int getRawValueSize ()
 
std::string getString ()
 
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)
 
bool isUpdated () const
 
helics_time getLastUpdateTime () const
 
void clearUpdate ()
 
const char * getKey () 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)
 
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 ( helics_input  hsub)
inlineexplicit

construct from a helics_input 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_input 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().

◆ getComplex()

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

get the value as a complex number

References helicsInputGetComplexObject().

◆ 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 filter

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

◆ getKey()

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

get the Name/Key for the input

the name is the local name if given, key is the full key name

References helicsInputGetKey().

◆ getLastUpdateTime()

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

Get the last time an input was updated

References helicsInputLastUpdateTime().

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

◆ getRawValue()

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

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

References data, helicsInputGetRawValue(), and helicsInputGetRawValueSize().

◆ getRawValueSize()

int helicscpp::Input::getRawValueSize ( )
inline

get the size of the raw value

References helicsInputGetRawValueSize().

◆ getString()

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

get the current value as a string

References helicsInputGetString(), and helicsInputGetStringSize().

◆ getTarget()

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

get an associated target

References helicsSubscriptionGetKey().

◆ 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 data, and 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 data, 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 helics_input()

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

cast to helics_input object

◆ operator=()

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

copy assign

◆ setDefault() [1/7]

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

set the default bool value

References helics_false, helics_true, and helicsInputSetDefaultBoolean().

◆ setDefault() [2/7]

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 data, and helicsInputSetDefaultRaw().

◆ setDefault() [3/7]

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

set the default complex value

References helicsInputSetDefaultComplex().

◆ setDefault() [4/7]

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

set the default value as a string

References helicsInputSetDefaultString().

◆ setDefault() [5/7]

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

set the default vector data value

References data, and helicsInputSetDefaultVector().

◆ setDefault() [6/7]

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

set the default double value

References helicsInputSetDefaultDouble().

◆ setDefault() [7/7]

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 publication

References helicsInputSetInfo().


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