#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 |
Class members | |
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... | |
size_t | removeOutdatedLocalComponents (const std::string &uid, const std::string ¤tVersionId) |
size_t | removeOutdatedLocalMeasures (const std::string &uid, const std::string ¤tVersionId) |
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... | |
openstudio::path | libraryPath () const |
Returns the path to the local BCL library. More... | |
openstudio::path | dbPath () const |
Relocates the local BCL library, stores the library path in user preferences. More... | |
Public Member Functions inherited from openstudio::BCL | |
virtual | ~BCL ()=default |
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 () override |
virtual destructor More... | |
Additional Inherited Members | |
Protected Member Functions inherited from openstudio::BCL | |
BCL () | |
Default constructor. More... | |
|
overridevirtual |
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.
openstudio::path openstudio::LocalBCL::dbPath | ( | ) | const |
Relocates the local BCL library, stores the library path in user preferences.
returns the fully qualified path of the current database file
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.
openstudio::path 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.
size_t openstudio::LocalBCL::removeOutdatedLocalComponents | ( | const std::string & | uid, |
const std::string & | currentVersionId | ||
) |
size_t openstudio::LocalBCL::removeOutdatedLocalMeasures | ( | const std::string & | uid, |
const std::string & | currentVersionId | ||
) |
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::setProdAuthKey | ( | const std::string & | prodAuthKey | ) |
Set the production OAuth key, validates the auth key before saving.