quick start:g++ [flags ...] file ... #include <Node.h> Node(); boolean assign(const Node<TObject>& copy_node); TObject* getItem() const; boolean clear();
description:// declare a character node and insert a character in it // Node<Char> node0; Char item(L'a'); node0.assign(&item); // use the copy constructor to create a second node // Node<Char> node1(node0); // get the items out of each of the nodes // Char* char1 = node0.getItem(); Char* char2 = node1.getItem(); // test the characters for equality // if (!char1->eq(*char2)) { // error }
static const SysString CLASS_NAME = L"Node";
static const SysString DEF_PARAM = L"item";
static const long ERR = 40000;
static const long ERR_NOITEM = 40001;
TObject* item_d;
static Integral::DEBUG debug_level_d;
static MemoryManager mgr_d;
static const String& name();
static boolean diagnose(Integral::DEBUG debug_level);
boolean debug(const unichar* message) const;
static boolean setDebug(Integral::DEBUG debug_level);
~Node();
Node();
Node(const Node<TObject>& copy_node);
boolean assign(const Node<TObject>& copy_node);
Node<TObject>& operator=(const Node<TObject>& arg);
boolean eq(const Node<TObject>& compare_node) const;
long sofSize() const;
boolean read(Sof& sof, long tag);
boolean write(Sof& sof, long tag) const;
boolean read(Sof& sof, long tag, const String& name);
boolean write(Sof& sof, long tag, const String& name) const;
boolean readData(Sof& sof, const String& pname = DEF_PARAM,long size = SofParser::FULL_OBJECT, boolean param = true, boolean nested = false);
boolean writeData(Sof& sof, const String& pname = DEF_PARAM) const;
static void* operator new(size_t size);
static void* operator new[](size_t size);
static void operator delete(void* ptr);
static void operator delete[](void* ptr);
static boolean setGrowSize(long grow_size);
boolean clear(Integral::CMODE cmode_a = Integral::DEF_CMODE);
Node(TObject* item);
boolean assign(TObject* item);
boolean ne(const Node<TObject>& compare_node) const;
boolean lt(const Node<TObject>& compare_node) const;
boolean gt(const Node<TObject>& compare_node) const;
const TObject* getItem() const;
TObject* getItem();
boolean setItem(TObject* item);
TObject* accessByMode(TObject* ptr, ALLOCATION mode) const;
boolean assignByMode(TObject* ptr, ALLOCATION mode);
const long hash(long capacity) const;
friend class NodeDiagnose;examples:
include <Char.h> include <Node.h> int main () { // declare a character // Char item(L'a'); // declare a node // Node<Char> char_node_0; char_node_0.assign(&item); // declare another node // Node<Char> char_node_1(&item); // see if the two nodes are equivalent // if (!char_node_0.eq(char_node_1)) { // exit with error // Integral::exit(); } // exit gracefully // Integral::exit(); }