![]() |
|
Element in a chain in testing a path for a match. More...
#include <ODIMPathMatcher.h>


Public Types | |
| typedef drain::Range< index_t > | idx_range_t |
Public Types inherited from ODIMPathElem | |
| typedef unsigned int | group_t |
| In H5, "groups" correspond to directories or folders in file system. | |
| typedef drain::SingleFlagger< group_t > | flag_t |
| typedef flag_t::dict_t | dict_t |
| typedef int | index_t |
Public Member Functions | |
| ODIMPathElemMatcher (ODIMPathElem::group_t groups=ROOT, index_t index=0, index_t indexMax=INDEX_MAX) | |
| ODIMPathElemMatcher (const ODIMPathElemMatcher &e) | |
| ODIMPathElemMatcher (const ODIMPathElem &e) | |
| ODIMPathElemMatcher (const std::string &s) | |
| virtual void | set (const std::string &s) |
| Assign a string to this path element. | |
| bool | isSingle () const |
| ODIMPathElemMatcher & | operator= (ODIMPathElem::group_t g) |
| ODIMPathElemMatcher & | operator= (const std::string &s) |
| bool | test (const ODIMPathElem &elem) const |
| Test if the elem has the same group, and elem.index is within [index,indexMax]. | |
| virtual std::ostream & | toStream (std::ostream &sstr) const |
| For string presentation. | |
Public Member Functions inherited from ODIMPathElem | |
| ODIMPathElem (group_t group=ROOT, index_t index=1) | |
| ODIMPathElem (const ODIMPathElem &e) | |
| ODIMPathElem (const std::string &s) | |
| ODIMPathElem (const char *s) | |
| void | reset () |
| template<class T > | |
| ODIMPathElem & | operator= (const T &s) |
| Redirects to set(const std::string &) . | |
| ODIMPathElem & | operator= (const char *s) |
| Calls set(const std::string &) . | |
| virtual void | set (group_t g, index_t i=0) |
| The fundamental assignment operator. | |
| bool | is (group_t g) const |
| Abbreviation of (group == NONE) | |
| bool | isRoot () const |
| Abbreviation of (group == ROOT) | |
| bool | empty () const |
| Equivalent to isRoot(). This method is required in recognizing the leading empty string. Consider "/usr/include". | |
| bool | isIndexed () const |
| Abbreviation of (group == NONE) | |
| bool | belongsTo (int groupFilter) const |
| Checks if the element belongs to any of groups given. | |
| group_t | getType () const |
| index_t | getIndex () const |
| const std::string & | getPrefix () const |
| Returns the name without the index. | |
| char | getCharCode () const |
| const std::string & | getKey () const |
| Debugging/logging. Returns standard name. Does not check if type is OTHER. | |
| const std::string & | str () const |
| Writes the name, including the index, to output stream. | |
| operator const std::string & () const | |
| template<> | |
| void | extractIndex (const std::string &s, ODIMPathElem::index_t &idx) |
| template<> | |
| void | extractIndex (const std::string &s, ODIMPathElem::index_t &idx) |
| template<> | |
| void | extractIndex (const std::string &s, ODIMPathElemMatcher::idx_range_t &idx) |
| template<> | |
| void | extractIndex (const std::string &s, ODIMPathElemMatcher::idx_range_t &idx) |
Public Attributes | |
| index_t | indexMax |
| drain::MultiFlagger< group_t, group_t > | flags |
Public Attributes inherited from ODIMPathElem | |
| group_t | group |
| index_t | index |
Protected Member Functions | |
| virtual void | extractIndex (const std::string &s) |
| Extracts index range of type <index>[:<indexMax>]. | |
| virtual bool | extractPrefix (const std::string &s, bool indexed) |
| Given the non-numeric prefix of a group, like "dataset" or "data", set the group. | |
Protected Member Functions inherited from ODIMPathElem | |
| void | add (const std::string &s) |
Additional Inherited Members | |
Static Public Member Functions inherited from ODIMPathElem | |
| static bool | isIndexed (group_t group) |
| static bool | isQuality (group_t group) |
| static const dict_t & | getDictionary () |
| static const std::string & | getKey (group_t g) |
| Debugging/logging. Returns standard name. Does not check if type is OTHER. | |
Static Public Attributes inherited from ODIMPathElem | |
| static const group_t | NONE = 0 |
| None (undefined) | |
| static const group_t | ROOT = 1 |
| static const group_t | DATASET = 2 |
First level group, /dataset + digit . | |
| static const group_t | DATA = 4 |
Second level group, /data + digit . | |
| static const group_t | ARRAY = 8 |
| Data group "data", at deepest level, like /dataset4/data2/quality1/data. | |
| static const group_t | QUALITY = 16 |
Special group on first or second level, /quality + digit , used for storing quality data. | |
| static const group_t | DATA_GROUPS = DATASET | DATA | QUALITY |
| Group index mask for groups under which data arrays (ARRAY type) are found. | |
| static const group_t | ALL_LEVELS = (ROOT | DATASET | DATA) |
| Abbreviation for linking (referencing) attributes at different levels (tree depths). | |
| static const group_t | WHAT = 32 |
Metadata group /what , at any depth. | |
| static const group_t | WHERE = 64 |
Metadata group /where , at any depth. | |
| static const group_t | HOW = 128 |
Metadata group /how , at any depth. | |
| static const group_t | ATTRIBUTE_GROUPS = WHAT|WHERE|HOW |
| Group index mask for groups that contain only meta data. | |
| static const group_t | ALL_GROUPS = 255 |
| User defined group, name stored as a separate string. Index allowed, but only catenated in the string. | |
| static const group_t | PALETTE = 256 |
| Palette data (to be linked). EXPERIMENTAL. | |
| static const group_t | LEGEND = 512 |
| Metadata array describing values in the image data (DATA). EXPERIMENTAL. | |
| static const group_t | OTHER = 1024 |
| User defined group, name stored as a separate string. The string may still contain numbers, but no indices will be extracted. | |
| static const group_t | IS_INDEXED = (DATASET | DATA | QUALITY ) |
| Group index mask for groups that have an index. | |
| static const index_t | INDEX_MAX = std::numeric_limits<unsigned short int>::max() |
Static Protected Member Functions inherited from ODIMPathElem | |
| template<class T > | |
| static void | extractIndex (const std::string &s, T &idx) |
Protected Attributes inherited from ODIMPathElem | |
| std::string | currentStr |
Element in a chain in testing a path for a match.
|
protectedvirtual |
Extracts index range of type <index>[:<indexMax>].
Reimplemented from ODIMPathElem.
|
protectedvirtual |
Given the non-numeric prefix of a group, like "dataset" or "data", set the group.
Check first if prefix AND index match.
Reimplemented from ODIMPathElem.
|
virtual |
Assign a string to this path element.
| s | - path element as a string, "dataset4" for example |
Note that path separator is not recognized; instead, it will be assigned as a part of the string.
Reimplemented from ODIMPathElem.
|
virtual |
For string presentation.
Step 1: prefix (by group type)
Step 2: index
Reimplemented from ODIMPathElem.
1.9.8