#include <LocalBCL.hpp>
Inheritance diagram for openstudio::LocalBCL: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. | |
| virtual boost::optional< BCLMeasure > | getMeasure (const std::string &uid, const std::string &versionId="") const override |
| Get the measure by uid. | |
| std::vector< BCLComponent > | components () const |
| Get all components. | |
| std::vector< BCLMeasure > | measures () const |
| Get all measures. | |
| std::vector< std::string > | measureUids () const |
| Get all measure uids. | |
| std::vector< BCLComponent > | searchComponents (const std::string &searchTerm, const std::string &componentType) const |
| Perform a component search of the library. | |
| 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. | |
| virtual std::vector< BCLMeasure > | searchMeasures (const std::string &searchTerm, const unsigned componentTypeTID) const |
Public Member Functions inherited from openstudio::BCL | |
| virtual | ~BCL ()=default |
| Virtual destructor. | |
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. | |
| 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. | |
Class members | |
| bool | addComponent (BCLComponent &component) |
| Add a component to the local library. | |
| bool | removeComponent (BCLComponent &component) |
| Remove a component from the local library and delete its directory. | |
| bool | addMeasure (BCLMeasure &measure) |
| Add a measure to the local library. | |
| bool | removeMeasure (BCLMeasure &measure) |
| Remove a measure from the local library and delete its directory. | |
| 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. | |
| std::vector< BCLMeasure > | measureAttributeSearch (const std::vector< std::pair< std::string, std::string > > &searchTerms) const |
| Search for measures with attributes matching those in searchTerms. | |
| std::string | prodAuthKey () const |
| Return production OAuth key. | |
| bool | setProdAuthKey (const std::string &prodAuthKey) |
| Set the production OAuth key, validates the auth key before saving. | |
| std::string | devAuthKey () const |
| Return development OAuth key. | |
| bool | setDevAuthKey (const std::string &devAuthKey) |
| Set the development OAuth key, validates the auth key before saving. | |
| openstudio::path | libraryPath () const |
| Returns the path to the local BCL library. | |
| openstudio::path | dbPath () const |
| Relocates the local BCL library, stores the library path in user preferences. | |
Destructors | |
| static void | close () |
| Static method to close the current local BCL singleton if it exists. | |
| virtual | ~LocalBCL () override |
| virtual destructor | |
Additional Inherited Members | |
Protected Member Functions inherited from openstudio::BCL | |
| BCL () | |
| Default constructor. | |
|
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 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.