Public Types | Public Member Functions

HDFMetadataNode Class Reference

#include <hdfmetadatanode.h>

Collaboration diagram for HDFMetadataNode:
Collaboration graph
[legend]

List of all members.

Public Types

enum  value_type {
  BAD, STRING, INTEGER, FLOAT,
  ARRAY_INTEGER, ARRAY_FLOAT, ARRAY_STRING
}

Public Member Functions

 HDFMetadataNode ()
 HDFMetadataNode (void *_value, HDFMetadataNode::value_type _typecode)
 ~HDFMetadataNode ()
void set_next_sibling (HDFMetadataNode *val)
HDFMetadataNodeget_next_sibling () const
void set_child (HDFMetadataNode *val)
HDFMetadataNodeget_child () const
void print_val () const
const bool is_leaf () const
void read_node_value (void *val=NULL)
HDFMetadataNode::value_type get_typecode () const
void * get_value () const

Detailed Description

Tree node like xml's DOM Tree Node. One node contain one metadata hierarchie level. Computingly talking, it's a binary tree node. A node is define by :


Member Enumeration Documentation

define the type of values that can be found in hdf metadata. FLOAT means double


Constructor & Destructor Documentation

HDFMetadataNode::HDFMetadataNode (  ) 

default constructor

HDFMetadataNode::HDFMetadataNode ( void *  _value,
HDFMetadataNode::value_type  _typecode 
)

Constructor

Parameters:
_value the value of the node
_typecode a value_type code representing the type of the node's value
HDFMetadataNode::~HDFMetadataNode (  ) 

Destructor


Member Function Documentation

HDFMetadataNode * HDFMetadataNode::get_child (  )  const

access to the child node

Returns:
the child node (can be NULL)
HDFMetadataNode * HDFMetadataNode::get_next_sibling (  )  const

access to the next sibling

Returns:
the next sibling (can be NULL)
HDFMetadataNode::value_type HDFMetadataNode::get_typecode (  )  const

access to the type_code of the node's value

Returns:
the type_code of the node's value
void * HDFMetadataNode::get_value (  )  const

access to the value itself, via a pointer

Returns:
a pointer to the value
const bool HDFMetadataNode::is_leaf (  )  const

Check is a node is a leaf. In other words, if the node has no child and no sibling.

Returns:
true if the node is a leaf.
void HDFMetadataNode::print_val (  )  const

print out the value of the node

void HDFMetadataNode::read_node_value ( void *  val = NULL  ) 

Fill val with the node value.

Parameters:
val (output) the value (or buffer if the node's value is an array)
void HDFMetadataNode::set_child ( HDFMetadataNode val  ) 

set the child node

Parameters:
val the child node
void HDFMetadataNode::set_next_sibling ( HDFMetadataNode val  ) 

set the next sibling node

Parameters:
val the next sibling node

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