ChimeraTK-DeviceAccess
03.18.00
|
#include <DeviceInfoMap.h>
Classes | |
class | DeviceInfo |
Stores information about one device. More... | |
class | ErrorList |
Stores information about errors and warnings. More... | |
Public Types | |
using | iterator = std::vector< DeviceInfo >::iterator |
using | const_iterator = std::vector< DeviceInfo >::const_iterator |
Public Member Functions | |
bool | check (ErrorList &err, ErrorList::ErrorElem::TYPE level) |
Checks logical correctness of DMAP file. More... | |
void | getDeviceInfo (const std::string &deviceName, DeviceInfo &value) |
Returns information about specified device. More... | |
size_t | getSize () |
Returns number of records in DMAP file. More... | |
iterator | begin () |
Return iterator to first device described in DMAP file. More... | |
const_iterator | begin () const |
iterator | end () |
Return iterator to element after last one in DMAP file. More... | |
const_iterator | end () const |
std::vector< std::string > | getPluginLibraries () |
You can define shared libraries with Backend plugins in the DMAP file. More... | |
void | addPluginLibrary (const std::string &soFile) |
Add the name of a library to the list. More... | |
DeviceInfoMap (std::string fileName) | |
Constructor. More... | |
void | insert (const DeviceInfo &elem) |
Insert new element read from DMAP file. More... | |
Protected Attributes | |
std::vector< DeviceInfo > | _deviceInfoElements |
vector storing parsed contents of DMAP file More... | |
std::string | _dmapFileName |
name of DMAP file More... | |
std::vector< std::string > | _pluginLibraries |
Names of the so files with the plugins. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const DeviceInfoMap &deviceInfoMap) |
@brief Provides container to store information about devices described
in DMAP file.
Stores detailed information about all devices described in DMAP file. Provides functionality like searching for detailed information about device and checking for DMAP file correctness. Does not perform DMAP
file parsing
Definition at line 25 of file DeviceInfoMap.h.
using ChimeraTK::DeviceInfoMap::const_iterator = std::vector<DeviceInfo>::const_iterator |
Definition at line 61 of file DeviceInfoMap.h.
using ChimeraTK::DeviceInfoMap::iterator = std::vector<DeviceInfo>::iterator |
Definition at line 60 of file DeviceInfoMap.h.
|
explicit |
Constructor.
Initialize DMAP file name stored into object but does not perform DMAP file parsing
fileName | name of DMAP file |
Definition at line 14 of file DeviceInfoMap.cc.
void ChimeraTK::DeviceInfoMap::addPluginLibrary | ( | const std::string & | soFile | ) |
Add the name of a library to the list.
Definition at line 147 of file DeviceInfoMap.cc.
DeviceInfoMap::iterator ChimeraTK::DeviceInfoMap::begin | ( | ) |
Return iterator to first device described in DMAP file.
Definition at line 139 of file DeviceInfoMap.cc.
const_iterator ChimeraTK::DeviceInfoMap::begin | ( | ) | const |
bool ChimeraTK::DeviceInfoMap::check | ( | DeviceInfoMap::ErrorList & | err, |
ErrorList::ErrorElem::TYPE | level | ||
) |
Checks logical correctness of DMAP file.
Checks if names in DMAP file are unique. Errors are not reported if two devices with the same name have the same parameters. Checks only syntactic correctness of data stored in DMAP file. Syntax and lexical analizys are performed by DMAP file parser.
err | list of detected errors |
level | level of checking - if ERROR is selected only errors will be reported, if WARNING is selected errors and warning will be reported |
Definition at line 58 of file DeviceInfoMap.cc.
DeviceInfoMap::iterator ChimeraTK::DeviceInfoMap::end | ( | ) |
Return iterator to element after last one in DMAP file.
Definition at line 143 of file DeviceInfoMap.cc.
const_iterator ChimeraTK::DeviceInfoMap::end | ( | ) | const |
void ChimeraTK::DeviceInfoMap::getDeviceInfo | ( | const std::string & | deviceName, |
DeviceInfo & | value | ||
) |
Returns information about specified device.
exDmapFile | [exLibMap::EX_NO_DEVICE_IN_DMAP_FILE] - no device with specified name |
deviceName | name of the device |
value | detailed information about device taken from DMAP file |
Definition at line 36 of file DeviceInfoMap.cc.
std::vector< std::string > ChimeraTK::DeviceInfoMap::getPluginLibraries | ( | ) |
You can define shared libraries with Backend plugins in the DMAP file.
Definition at line 151 of file DeviceInfoMap.cc.
size_t ChimeraTK::DeviceInfoMap::getSize | ( | ) |
Returns number of records in DMAP file.
Definition at line 16 of file DeviceInfoMap.cc.
void ChimeraTK::DeviceInfoMap::insert | ( | const DeviceInfo & | elem | ) |
Insert new element read from DMAP file.
elem | element describing detailes of one device taken from DMAP file |
Definition at line 32 of file DeviceInfoMap.cc.
|
friend |
Definition at line 20 of file DeviceInfoMap.cc.
|
protected |
vector storing parsed contents of DMAP file
Definition at line 196 of file DeviceInfoMap.h.
|
protected |
name of DMAP file
Definition at line 197 of file DeviceInfoMap.h.
|
protected |
Names of the so files with the plugins.
Definition at line 198 of file DeviceInfoMap.h.