OpenStudio:alfalfa
Loading...
Searching...
No Matches
openstudio::alfalfa::AlfalfaPoint Class Reference

#include <AlfalfaPoint.hpp>

Public Member Functions

 AlfalfaPoint (AlfalfaPoint &&other)=default
 
 AlfalfaPoint (const AlfalfaPoint &other)=default
 
 AlfalfaPoint (const std::string &display_name)
 
std::string displayName () const
 Get display name of point.
 
std::string id () const
 Get id of point.
 
boost::optional< AlfalfaComponentinput () const
 Get input component of point.
 
bool isOptional () const
 Get whether a point is marked as optional or not.
 
AlfalfaPointoperator= (AlfalfaPoint &&)=default
 
AlfalfaPointoperator= (const AlfalfaPoint &)=default
 
bool operator== (const AlfalfaPoint &rhs) const
 
boost::optional< AlfalfaComponentoutput () const
 Get output component of point.
 
void setDisplayName (const std::string &display_name)
 Set display name of point.
 
void setId (const std::string &id)
 Set id of point.
 
void setInput (const AlfalfaComponent &component)
 Set input of point.
 
void setOptional (bool optional)
 Set whether a point is marked as optional or not.
 
void setOutput (const AlfalfaComponent &component)
 Set output component of point.
 
void setUnits (const std::string &units)
 Set the units of the point.
 
Json::Value toJSON () const
 
boost::optional< std::string > units () const
 Get the units of the point.
 
virtual ~AlfalfaPoint ()=default
 

Constructor & Destructor Documentation

◆ AlfalfaPoint() [1/3]

openstudio::alfalfa::AlfalfaPoint::AlfalfaPoint ( const std::string & display_name)
explicit

◆ ~AlfalfaPoint()

virtual openstudio::alfalfa::AlfalfaPoint::~AlfalfaPoint ( )
virtualdefault

◆ AlfalfaPoint() [2/3]

openstudio::alfalfa::AlfalfaPoint::AlfalfaPoint ( const AlfalfaPoint & other)
default

◆ AlfalfaPoint() [3/3]

openstudio::alfalfa::AlfalfaPoint::AlfalfaPoint ( AlfalfaPoint && other)
default

Member Function Documentation

◆ displayName()

std::string openstudio::alfalfa::AlfalfaPoint::displayName ( ) const

Get display name of point.

◆ id()

std::string openstudio::alfalfa::AlfalfaPoint::id ( ) const

Get id of point.

By default this will be a version of the display name with spaces removed.

◆ input()

boost::optional< AlfalfaComponent > openstudio::alfalfa::AlfalfaPoint::input ( ) const

Get input component of point.

◆ isOptional()

bool openstudio::alfalfa::AlfalfaPoint::isOptional ( ) const

Get whether a point is marked as optional or not.

◆ operator=() [1/2]

AlfalfaPoint & openstudio::alfalfa::AlfalfaPoint::operator= ( AlfalfaPoint && )
default

◆ operator=() [2/2]

AlfalfaPoint & openstudio::alfalfa::AlfalfaPoint::operator= ( const AlfalfaPoint & )
default

◆ operator==()

bool openstudio::alfalfa::AlfalfaPoint::operator== ( const AlfalfaPoint & rhs) const

◆ output()

boost::optional< AlfalfaComponent > openstudio::alfalfa::AlfalfaPoint::output ( ) const

Get output component of point.

◆ setDisplayName()

void openstudio::alfalfa::AlfalfaPoint::setDisplayName ( const std::string & display_name)

Set display name of point.

◆ setId()

void openstudio::alfalfa::AlfalfaPoint::setId ( const std::string & id)

Set id of point.

This is the component which will uniquely identify the point in the API.

◆ setInput()

void openstudio::alfalfa::AlfalfaPoint::setInput ( const AlfalfaComponent & component)

Set input of point.

This component will be written to by the Alfalfa API.

◆ setOptional()

void openstudio::alfalfa::AlfalfaPoint::setOptional ( bool optional)

Set whether a point is marked as optional or not.

If a point is marked as optional it will allow the model to run even if the point cannot be instantiated.

◆ setOutput()

void openstudio::alfalfa::AlfalfaPoint::setOutput ( const AlfalfaComponent & component)

Set output component of point.

This component will be read to report a value to the Alfalfa API.

◆ setUnits()

void openstudio::alfalfa::AlfalfaPoint::setUnits ( const std::string & units)

Set the units of the point.

◆ toJSON()

Json::Value openstudio::alfalfa::AlfalfaPoint::toJSON ( ) const

◆ units()

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

Get the units of the point.