Brion  1.6.0
The Blue Brain C++ I/O library
brion::Target Class Reference

Read access to a Target file. More...

#include <target.h>

+ Collaboration diagram for brion::Target:

Public Member Functions

BRION_API Target (const Target &from)
 Copy-construct a target file. More...
 
BRION_API ~Target ()
 Close target file. More...
 
BRION_API Targetoperator= (const Target &rhs)
 Assign a different target. More...
 

Friends

std::ostream & operator<< (std::ostream &, const Target &)
 Stream out content of target file. More...
 

Read API

BRION_API Target (const std::string &source)
 Open the given source to a target file for reading. More...
 
BRION_API const Strings & getTargetNames (const TargetType type) const
 Get list of targets for the desired type. More...
 
BRION_API const Strings & get (const std::string &name) const
 Get targets and/or GIDSet grouped by the given target. More...
 
static BRION_API GIDSet parse (const Targets &targets, const std::string &name)
 Parse a given target into a GID set. More...
 

Detailed Description

Read access to a Target file.

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

Definition at line 36 of file target.h.

Constructor & Destructor Documentation

BRION_API brion::Target::Target ( const Target from)

Copy-construct a target file.

Version
1.6
BRION_API brion::Target::~Target ( )

Close target file.

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

Open the given source to a target file for reading.

Parameters
sourcefilepath to target file
Exceptions
std::runtime_errorif file is not a valid target file
Version
1.0

Member Function Documentation

BRION_API const Strings& brion::Target::get ( const std::string &  name) const

Get targets and/or GIDSet grouped by the given target.

Parameters
nametarget name to get the values from
Returns
list of values in the target. Can be targets and/or GIDSet
Version
1.0
BRION_API const Strings& brion::Target::getTargetNames ( const TargetType  type) const

Get list of targets for the desired type.

Parameters
typedesired target type to look for
Returns
list of target names
Version
1.0
BRION_API Target& brion::Target::operator= ( const Target rhs)

Assign a different target.

Version
1.6
static BRION_API GIDSet brion::Target::parse ( const Targets &  targets,
const std::string &  name 
)
static

Parse a given target into a GID set.

All given targets are searched for the given name. If found, the named target is recursively resolved to a GID set.

Parameters
targetsthe targets to parse
namethe target name to parse
Returns
the set of cell identifiers parsed
Version
1.6

Friends And Related Function Documentation

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

Stream out content of target file.


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