OpenStudio:utilities
Loading...
Searching...
No Matches
openstudio::WorkflowStepValue Class Reference

#include <WorkflowStepResult.hpp>

Public Member Functions

Getters
std::string name () const
 
std::string displayName () const
 
boost::optional< std::string > units () const
 
VariantType variantType () const
 get the variant value type
 
Variant valueAsVariant () const
 get value as a Variant
 
bool valueAsBoolean () const
 get value as a bool
 
int valueAsInteger () const
 get value as int
 
double valueAsDouble () const
 get value as double
 
std::string valueAsString () const
 get value as string
 
Json::Value valueAsJSON () const
 

Constructors and Destructors

 WorkflowStepValue (const std::string &name, const Variant &value)
 
 WorkflowStepValue (const std::string &name, const std::string &value)
 
 WorkflowStepValue (const std::string &name, const char *value)
 
 WorkflowStepValue (const std::string &name, double value)
 
 WorkflowStepValue (const std::string &name, int value)
 
 WorkflowStepValue (const std::string &name, bool value)
 
Json::Value toJSON () const
 
std::string string () const
 Serialize to JSON formatted string.
 
static boost::optional< WorkflowStepValuefromString (const std::string &s)
 Construct from JSON formatted string.
 

Setters

void setName (const std::string &name)
 
void setDisplayName (const std::string &displayName)
 
void resetDisplayName ()
 
void setUnits (const std::string &units)
 
void resetUnits ()
 
 WorkflowStepValue (std::shared_ptr< detail::WorkflowStepValue_Impl > impl)
 Protected constructor from impl.
 

Detailed Description

Class for storing a value set by OSRunner::registerValue.

Constructor & Destructor Documentation

◆ WorkflowStepValue() [1/7]

openstudio::WorkflowStepValue::WorkflowStepValue ( const std::string & name,
const Variant & value )

◆ WorkflowStepValue() [2/7]

openstudio::WorkflowStepValue::WorkflowStepValue ( const std::string & name,
const std::string & value )

◆ WorkflowStepValue() [3/7]

openstudio::WorkflowStepValue::WorkflowStepValue ( const std::string & name,
const char * value )

◆ WorkflowStepValue() [4/7]

openstudio::WorkflowStepValue::WorkflowStepValue ( const std::string & name,
double value )

◆ WorkflowStepValue() [5/7]

openstudio::WorkflowStepValue::WorkflowStepValue ( const std::string & name,
int value )

◆ WorkflowStepValue() [6/7]

openstudio::WorkflowStepValue::WorkflowStepValue ( const std::string & name,
bool value )

◆ WorkflowStepValue() [7/7]

openstudio::WorkflowStepValue::WorkflowStepValue ( std::shared_ptr< detail::WorkflowStepValue_Impl > impl)
protected

Protected constructor from impl.

Member Function Documentation

◆ displayName()

std::string openstudio::WorkflowStepValue::displayName ( ) const

◆ fromString()

static boost::optional< WorkflowStepValue > openstudio::WorkflowStepValue::fromString ( const std::string & s)
static

Construct from JSON formatted string.

◆ name()

std::string openstudio::WorkflowStepValue::name ( ) const

◆ resetDisplayName()

void openstudio::WorkflowStepValue::resetDisplayName ( )

◆ resetUnits()

void openstudio::WorkflowStepValue::resetUnits ( )

◆ setDisplayName()

void openstudio::WorkflowStepValue::setDisplayName ( const std::string & displayName)

◆ setName()

void openstudio::WorkflowStepValue::setName ( const std::string & name)

◆ setUnits()

void openstudio::WorkflowStepValue::setUnits ( const std::string & units)

◆ string()

std::string openstudio::WorkflowStepValue::string ( ) const

Serialize to JSON formatted string.

◆ toJSON()

Json::Value openstudio::WorkflowStepValue::toJSON ( ) const

◆ units()

boost::optional< std::string > openstudio::WorkflowStepValue::units ( ) const

◆ valueAsBoolean()

bool openstudio::WorkflowStepValue::valueAsBoolean ( ) const

get value as a bool

◆ valueAsDouble()

double openstudio::WorkflowStepValue::valueAsDouble ( ) const

get value as double

◆ valueAsInteger()

int openstudio::WorkflowStepValue::valueAsInteger ( ) const

get value as int

◆ valueAsJSON()

Json::Value openstudio::WorkflowStepValue::valueAsJSON ( ) const

◆ valueAsString()

std::string openstudio::WorkflowStepValue::valueAsString ( ) const

get value as string

◆ valueAsVariant()

Variant openstudio::WorkflowStepValue::valueAsVariant ( ) const

get value as a Variant

◆ variantType()

VariantType openstudio::WorkflowStepValue::variantType ( ) const

get the variant value type