#include <LocalBCL.hpp>
Public Member Functions | |
Inherited members | |
virtual boost::optional < BCLComponent > | getComponent (const std::string &uid, const std::string &versionId="") const override |
Get the component by uid. More... | |
virtual boost::optional < BCLMeasure > | getMeasure (const std::string &uid, const std::string &versionId="") const override |
Get the measure by uid. More... | |
std::vector< BCLComponent > | components () const |
Get all components. More... | |
std::vector< BCLMeasure > | measures () const |
Get all measures. More... | |
std::vector< std::string > | measureUids () const |
Get all measure uids. More... | |
std::vector< BCLComponent > | searchComponents (const std::string &searchTerm, const std::string &componentType) const |
Perform a component search of the library. More... | |
std::vector< BCLComponent > | searchComponents (const std::string &searchTerm, const unsigned componentTypeTID) const |
virtual std::vector< BCLMeasure > | searchMeasures (const std::string &searchTerm, const std::string &componentType) const |
Perform a measure search of the library. More... | |
virtual std::vector< BCLMeasure > | searchMeasures (const std::string &searchTerm, const unsigned componentTypeTID) const |
Public Member Functions inherited from openstudio::BCL | |
virtual | ~BCL () |
Virtual destructor. More... | |
Static Public Member Functions | |
Constructor | |
static LocalBCL & | instance () |
Static method to retrieve the current local BCL singleton If a local BCL singleton does not exist, one will be created at the default library path stored in user preferences. More... | |
static LocalBCL & | instance (const path &libraryPath) |
Static method to retrieve the local BCL singleton at the given library path If a local BCL singleton does not exist, one will be created at the given library path If a local BCL singleton does exist, but is not at the given path, the current one will be closed and a new one will be created at the given library path. More... | |
Destructors | |
static void | close () |
Static method to close the current local BCL singleton if it exists. More... | |
virtual | ~LocalBCL () |
virtual destructor More... | |
Class members | |
bool prodAuthKeyUserPrompt * | parent |
Prompt the user for auth key using a modal dialog, this is a blocking call that requires user input. More... | |
bool devAuthKeyUserPrompt * | parent |
bool | addComponent (BCLComponent &component) |
Add a component to the local library. More... | |
bool | removeComponent (BCLComponent &component) |
Remove a component from the local library and delete its directory. More... | |
bool | addMeasure (BCLMeasure &measure) |
Add a measure to the local library. More... | |
bool | removeMeasure (BCLMeasure &measure) |
Remove a measure from the local library and delete its directory. More... | |
std::vector< BCLComponent > | componentAttributeSearch (const std::vector< std::pair< std::string, std::string > > &searchTerms) const |
Search for components with attributes matching those in searchTerms. More... | |
std::vector< BCLMeasure > | measureAttributeSearch (const std::vector< std::pair< std::string, std::string > > &searchTerms) const |
Search for measures with attributes matching those in searchTerms. More... | |
std::string | prodAuthKey () const |
Return production OAuth key. More... | |
bool | setProdAuthKey (const std::string &prodAuthKey) |
Set the production OAuth key, validates the auth key before saving. More... | |
std::string | devAuthKey () const |
Return development OAuth key. More... | |
bool | setDevAuthKey (const std::string &devAuthKey) |
Set the development OAuth key, validates the auth key before saving. More... | |
QString | libraryPath () const |
Returns the path to the local BCL library. More... | |
bool | setLibraryPath (const std::string &libraryPath) |
Relocates the local BCL library, stores the library path in user preferences. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from openstudio::BCL | |
BCL (QObject *parent=nullptr) | |
Default constructor. More... | |
|
virtual |
virtual destructor
bool openstudio::LocalBCL::addComponent | ( | BCLComponent & | component | ) |
Add a component to the local library.
bool openstudio::LocalBCL::addMeasure | ( | BCLMeasure & | measure | ) |
Add a measure to the local library.
|
static |
Static method to close the current local BCL singleton if it exists.
std::vector<BCLComponent> openstudio::LocalBCL::componentAttributeSearch | ( | const std::vector< std::pair< std::string, std::string > > & | searchTerms | ) | const |
Search for components with attributes matching those in searchTerms.
std::vector<BCLComponent> openstudio::LocalBCL::components | ( | ) | const |
Get all components.
std::string openstudio::LocalBCL::devAuthKey | ( | ) | const |
Return development OAuth key.
|
overridevirtual |
Get the component by uid.
Implements openstudio::BCL.
|
overridevirtual |
Get the measure by uid.
Implements openstudio::BCL.
|
static |
|
static |
Static method to retrieve the local BCL singleton at the given library path If a local BCL singleton does not exist, one will be created at the given library path If a local BCL singleton does exist, but is not at the given path, the current one will be closed and a new one will be created at the given library path.
QString openstudio::LocalBCL::libraryPath | ( | ) | const |
Returns the path to the local BCL library.
std::vector<BCLMeasure> openstudio::LocalBCL::measureAttributeSearch | ( | const std::vector< std::pair< std::string, std::string > > & | searchTerms | ) | const |
Search for measures with attributes matching those in searchTerms.
std::vector<BCLMeasure> openstudio::LocalBCL::measures | ( | ) | const |
Get all measures.
std::vector<std::string> openstudio::LocalBCL::measureUids | ( | ) | const |
Get all measure uids.
std::string openstudio::LocalBCL::prodAuthKey | ( | ) | const |
Return production OAuth key.
bool openstudio::LocalBCL::removeComponent | ( | BCLComponent & | component | ) |
Remove a component from the local library and delete its directory.
bool openstudio::LocalBCL::removeMeasure | ( | BCLMeasure & | measure | ) |
Remove a measure from the local library and delete its directory.
std::vector<BCLComponent> openstudio::LocalBCL::searchComponents | ( | const std::string & | searchTerm, |
const std::string & | componentType | ||
) | const |
Perform a component search of the library.
std::vector<BCLComponent> openstudio::LocalBCL::searchComponents | ( | const std::string & | searchTerm, |
const unsigned | componentTypeTID | ||
) | const |
|
virtual |
Perform a measure search of the library.
|
virtual |
bool openstudio::LocalBCL::setDevAuthKey | ( | const std::string & | devAuthKey | ) |
Set the development OAuth key, validates the auth key before saving.
bool openstudio::LocalBCL::setLibraryPath | ( | const std::string & | libraryPath | ) |
Relocates the local BCL library, stores the library path in user preferences.
bool openstudio::LocalBCL::setProdAuthKey | ( | const std::string & | prodAuthKey | ) |
Set the production OAuth key, validates the auth key before saving.
bool prodAuthKeyUserPrompt* openstudio::LocalBCL::parent |
Prompt the user for auth key using a modal dialog, this is a blocking call that requires user input.
If user enters input returns the value of setAuthKey, otherwise returns false
bool devAuthKeyUserPrompt* openstudio::LocalBCL::parent |