MNE-CPP
beta 1.0
|
Directory tree structure. More...
#include <fiff_dir_tree.h>
Public Types | |
typedef QSharedPointer< FiffDirTree > | SPtr |
typedef QSharedPointer< const FiffDirTree > | ConstSPtr |
Public Member Functions | |
FiffDirTree () | |
FiffDirTree (const FiffDirTree &p_FiffDirTree) | |
~FiffDirTree () | |
void | clear () |
bool | isEmpty () const |
QList< FiffDirTree > | dir_tree_find (fiff_int_t p_kind) const |
bool | find_tag (FiffStream *p_pStream, fiff_int_t findkind, QSharedPointer< FiffTag > &p_pTag) const |
bool | has_tag (fiff_int_t findkind) |
bool | has_kind (fiff_int_t p_kind) const |
Static Public Member Functions | |
static bool | copy_tree (QSharedPointer< FiffStream > p_pStreamIn, FiffId &in_id, QList< FiffDirTree > &p_Nodes, QSharedPointer< FiffStream > p_pStreamOut) |
static qint32 | make_dir_tree (FiffStream *p_pStream, QList< FiffDirEntry > &p_Dir, FiffDirTree &p_Tree, qint32 start=0) |
Public Attributes | |
fiff_int_t | block |
FiffId | id |
FiffId | parent_id |
QList< FiffDirEntry > | dir |
fiff_int_t | nent |
fiff_int_t | nent_tree |
QList< FiffDirTree > | children |
fiff_int_t | nchild |
Directory tree structure.
Replaces _fiffDirNode struct
Definition at line 80 of file fiff_dir_tree.h.
typedef QSharedPointer<const FiffDirTree> FIFFLIB::FiffDirTree::ConstSPtr |
Const shared pointer type for FiffDirTree.
Definition at line 84 of file fiff_dir_tree.h.
typedef QSharedPointer<FiffDirTree> FIFFLIB::FiffDirTree::SPtr |
Shared pointer type for FiffDirTree.
Definition at line 83 of file fiff_dir_tree.h.
FiffDirTree::FiffDirTree | ( | ) |
Constructors the directory tree structure.
Definition at line 62 of file fiff_dir_tree.cpp.
FiffDirTree::FiffDirTree | ( | const FiffDirTree & | p_FiffDirTree | ) |
Copy constructor.
[in] | p_FiffDirTree | Directory tree structure which should be copied |
Definition at line 73 of file fiff_dir_tree.cpp.
FiffDirTree::~FiffDirTree | ( | ) |
Destroys the fiffDirTree.
Definition at line 89 of file fiff_dir_tree.cpp.
void FiffDirTree::clear | ( | ) |
Initializes directory tree structure.
Definition at line 100 of file fiff_dir_tree.cpp.
|
static |
Copies directory subtrees from fidin to fidout
[in] | p_pStreamIn | fiff file to copy from |
[in] | in_id | file id description |
[out] | p_Nodes | subtree directories to be copied |
[in] | p_pStreamOut | fiff file to write to |
Definition at line 115 of file fiff_dir_tree.cpp.
QList< FiffDirTree > FiffDirTree::dir_tree_find | ( | fiff_int_t | p_kind | ) | const |
Find nodes of the given kind from a directory tree structure
[in] | p_kind | the given kind |
Definition at line 293 of file fiff_dir_tree.cpp.
bool FiffDirTree::find_tag | ( | FiffStream * | p_pStream, |
fiff_int_t | findkind, | ||
QSharedPointer< FiffTag > & | p_pTag | ||
) | const |
Implementation of the find_tag function in various files e.g. fiff_read_named_matrix.m
Founds a tag of a given kind within a tree, and reeds it from file. Note: In difference to mne-matlab this is not a static function. This is a method of the FiffDirTree class, that's why a tree object doesn't need to be handed to the function.
[in] | p_pStream | the opened fif file |
[in] | findkind | the kind which should be found |
[out] | p_pTag | the found tag |
Definition at line 309 of file fiff_dir_tree.cpp.
bool FiffDirTree::has_kind | ( | fiff_int_t | p_kind | ) | const |
Checks whether a DirTree has a specific kind
[in] | findkind | kind to find |
Definition at line 338 of file fiff_dir_tree.cpp.
bool FiffDirTree::has_tag | ( | fiff_int_t | findkind | ) |
Implementation of the has_tag function in fiff_read_named_matrix.m
[in] | findkind | kind to find |
Definition at line 328 of file fiff_dir_tree.cpp.
|
inline |
Returns true if directory tree structure contains no data.
Definition at line 133 of file fiff_dir_tree.h.
|
static |
Create the directory tree structure
[in] | p_pStream | the opened fiff file |
[in] | p_Dir | the dir entries of which the tree should be constructed |
[out] | p_Tree | the created dir tree |
[in] | start | dir entry to start (optional, by default 0) |
Definition at line 200 of file fiff_dir_tree.cpp.
fiff_int_t FIFFLIB::FiffDirTree::block |
Block type for this directory
Definition at line 202 of file fiff_dir_tree.h.
QList<FiffDirTree> FIFFLIB::FiffDirTree::children |
Child nodes
Definition at line 208 of file fiff_dir_tree.h.
QList<FiffDirEntry> FIFFLIB::FiffDirTree::dir |
Directory of tags in this node
Definition at line 205 of file fiff_dir_tree.h.
FiffId FIFFLIB::FiffDirTree::id |
Id of this block if any
Definition at line 203 of file fiff_dir_tree.h.
fiff_int_t FIFFLIB::FiffDirTree::nchild |
Number of child nodes
Definition at line 209 of file fiff_dir_tree.h.
fiff_int_t FIFFLIB::FiffDirTree::nent |
Number of entries in this node
Definition at line 206 of file fiff_dir_tree.h.
fiff_int_t FIFFLIB::FiffDirTree::nent_tree |
Number of entries in the directory tree node
Definition at line 207 of file fiff_dir_tree.h.
FiffId FIFFLIB::FiffDirTree::parent_id |
Newly added to stay consistent with MATLAB implementation
Definition at line 204 of file fiff_dir_tree.h.