OpenStudioCore:utilities
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
List of all members
openstudio::OnDemandGenerator Class Reference

#include <OnDemandGenerator.hpp>

Public Member Functions

Destructors
virtual ~OnDemandGenerator ()
 virtual destructor More...
 
Class members
std::string name () const
 Get the name of the generator. More...
 
std::string uid () const
 Get the uid of the generator. More...
 
std::string versionId () const
 Get the version id of the generator. More...
 
std::string description () const
 Get the description of the generator. More...
 
std::vector
< OnDemandGeneratorArgument
arguments () const
 Returns the top level arguments, user will have to navigate any nested arguments on their own for. More...
 
std::vector
< OnDemandGeneratorArgument
activeArguments () const
 Returns all arguments which are currently active in depth first search order (e.g. More...
 
std::vector< std::string > activeArgumentNames () const
 Returns the name of all arguments which are currently active in depth first search order (e.g. More...
 
boost::optional
< OnDemandGeneratorArgument
getActiveArgument (const std::string &name) const
 Returns argument by name, searches through the active argument tree. More...
 
bool setArgumentValue (const std::string &name, const std::string &value)
 Sets the argument value, this will search through the active argument tree Setting an argument to a value may change the active argument tree. More...
 
bool setArgumentValue (const std::string &name, double value)
 
bool setArgumentValue (const std::string &name, int value)
 
bool checkArgumentValues () const
 Returns false until valid values have been set for all required arguments. More...
 

Constructor

static boost::optional
< OnDemandGenerator
load (const openstudio::path &path)
 Load an OnDemandGenerator from its xml description. More...
 
 OnDemandGenerator (const QDomElement &generatorElement)
 Constructs an OnDemandGenerator from its xml description. More...
 

Detailed Description

Class for accessing on demand generators in the online BCL.

An on demand generator is a script which accepts user arguments, is called through the online BCL API, and returns a BCLComponent.

Constructor & Destructor Documentation

openstudio::OnDemandGenerator::OnDemandGenerator ( const QDomElement &  generatorElement)

Constructs an OnDemandGenerator from its xml description.

virtual openstudio::OnDemandGenerator::~OnDemandGenerator ( )
virtual

virtual destructor

Member Function Documentation

std::vector<std::string> openstudio::OnDemandGenerator::activeArgumentNames ( ) const

Returns the name of all arguments which are currently active in depth first search order (e.g.

top level arguments + nested arguments directly underneath arguments with value set)

std::vector<OnDemandGeneratorArgument> openstudio::OnDemandGenerator::activeArguments ( ) const

Returns all arguments which are currently active in depth first search order (e.g.

top level arguments + nested arguments directly underneath arguments with value set)

std::vector<OnDemandGeneratorArgument> openstudio::OnDemandGenerator::arguments ( ) const

Returns the top level arguments, user will have to navigate any nested arguments on their own for.

bool openstudio::OnDemandGenerator::checkArgumentValues ( ) const

Returns false until valid values have been set for all required arguments.

std::string openstudio::OnDemandGenerator::description ( ) const

Get the description of the generator.

boost::optional<OnDemandGeneratorArgument> openstudio::OnDemandGenerator::getActiveArgument ( const std::string &  name) const

Returns argument by name, searches through the active argument tree.

static boost::optional<OnDemandGenerator> openstudio::OnDemandGenerator::load ( const openstudio::path &  path)
static

Load an OnDemandGenerator from its xml description.

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

Get the name of the generator.

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

Sets the argument value, this will search through the active argument tree Setting an argument to a value may change the active argument tree.

bool openstudio::OnDemandGenerator::setArgumentValue ( const std::string &  name,
double  value 
)
bool openstudio::OnDemandGenerator::setArgumentValue ( const std::string &  name,
int  value 
)
std::string openstudio::OnDemandGenerator::uid ( ) const

Get the uid of the generator.

std::string openstudio::OnDemandGenerator::versionId ( ) const

Get the version id of the generator.