Brion  1.7.0
The Blue Brain C++ I/O library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Pages
brion::BlueConfig Class Reference

Read access to a BlueConfig or CircuitConfig file. More...

#include <blueConfig.h>

+ Inheritance diagram for brion::BlueConfig:
+ Collaboration diagram for brion::BlueConfig:

Public Member Functions

 ~BlueConfig ()
 Close BlueConfig or CircuitConfig file. More...
 
Read API
 BlueConfig (const std::string &source)
 Open given filepath to a BlueConfig or CircuitConfig for reading. More...
 
const Strings & getSectionNames (const BlueConfigSection section) const
 Get names of given section type. More...
 
const std::string & get (const BlueConfigSection section, const std::string &sectionName, const std::string &key) const
 Get value as string for key in given section. More...
 
template<typename T >
get (const BlueConfigSection section, const std::string &sectionName, const std::string &key) const
 Get value as type T for key in given section. More...
 
Targets getTargets () const
 
Semantic read API
URI getCircuitSource () const
 
URI getSynapseSource () const
 
URI getMorphologySource () const
 
URI getReportSource (const std::string &report) const
 
URI getSpikeSource () const
 
std::string getCircuitTarget () const
 
GIDSet parseTarget (const std::string &target) const
 
float getTimestep () const
 

Friends

std::ostream & operator<< (std::ostream &, const BlueConfig &)
 Stream out content of BlueConfig or CircuitConfig file. More...
 

Detailed Description

Read access to a BlueConfig or CircuitConfig file.

Following RAII, this class is ready to use after the creation and will ensure release of resources upon destruction.

Definition at line 39 of file blueConfig.h.

Constructor & Destructor Documentation

brion::BlueConfig::~BlueConfig ( )

Close BlueConfig or CircuitConfig file.

Version
1.0
brion::BlueConfig::BlueConfig ( const std::string &  source)
explicit

Open given filepath to a BlueConfig or CircuitConfig for reading.

Parameters
sourcefilepath to BlueConfig or CircuitConfig file
Exceptions
std::runtime_errorif source is not a valid BlueConfig or CircuitConfig file
Version
1.0

Member Function Documentation

const std::string& brion::BlueConfig::get ( const BlueConfigSection  section,
const std::string &  sectionName,
const std::string &  key 
) const

Get value as string for key in given section.

Parameters
sectiontype of section to get the value from
sectionNamename of section to get the value from
keyname of the key to the value from
Returns
value as string of the given section & key, empty if not found
Version
1.0
template<typename T >
T brion::BlueConfig::get ( const BlueConfigSection  section,
const std::string &  sectionName,
const std::string &  key 
) const
inline

Get value as type T for key in given section.

Parameters
sectiontype of section to get the value from
sectionNamename of section to get the value from
keyname of the key to the value from
Returns
value as type T of the given section & key
Exceptions
boost::bad_lexical_castif value cannot be casted to type T
Version
1.0

Definition at line 87 of file blueConfig.h.

URI brion::BlueConfig::getCircuitSource ( ) const
Returns
the URI to the circuit information.
See Also
Circuit
Version
1.7
std::string brion::BlueConfig::getCircuitTarget ( ) const
Returns
the name of the circuit target
Version
1.7
URI brion::BlueConfig::getMorphologySource ( ) const
Returns
the full path to the morphology database. A suffix may be prepended to the to the bare path from the BlueConfig.
Version
1.7
URI brion::BlueConfig::getReportSource ( const std::string &  report) const
Returns
the URI to the named report.
See Also
CompartmentReport
Version
1.7
const Strings& brion::BlueConfig::getSectionNames ( const BlueConfigSection  section) const

Get names of given section type.

Parameters
sectiontype of section to get their names from
Returns
names of sections matching the query type
Version
1.0
URI brion::BlueConfig::getSpikeSource ( ) const
Returns
the URI to the default spike data source.
See Also
SpikeReport
Version
1.7
Targets brion::BlueConfig::getTargets ( ) const
Returns
the user and circuit file target parsers.
Version
1.7
float brion::BlueConfig::getTimestep ( ) const
Returns
the simulation timestep in ms or NaN if undefined.
Version
1.7
GIDSet brion::BlueConfig::parseTarget ( const std::string &  target) const
Returns
the set of GIDs for the given target
Exceptions
std::runtime_errorif target is invalid
Version
1.7

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  ,
const BlueConfig  
)
friend

Stream out content of BlueConfig or CircuitConfig file.


The documentation for this class was generated from the following file: