Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

node.h

Go to the documentation of this file.
00001 /***
00002  * Copyright (c) 2005, SkeTo Project
00003  * All rights reserved.
00004  */
00011 #ifndef __NODE_H__
00012 #define __NODE_H__
00013 
00017 template< typename A >
00018 class node {
00020   // constants
00021 public:
00022   typedef enum {
00024     NORMAL = 0,
00026     CUTNODE = 1, 
00027   } nodetype_t;
00028 
00032 public:
00033   typedef enum {
00035     SER_NODE = 0,
00037     SER_LEAF = 1,
00039     SER_CUTNODE = 2,
00040   } serializetype_t;
00041     
00043   // member variables
00044 public:
00046   nodetype_t nodetype;
00047 
00049   node< A > *left;
00051   node< A > *right;
00053   node< A > *parent;
00054   
00056   A   value;
00057 
00059   // Constructors and Destructor
00060 public:
00064   node( const A& value, nodetype_t nodetype = NORMAL );
00065 
00069   node( );
00070   
00075   ~node( );
00076 
00078   // Access Method
00079 
00080 public:
00085   bool isLeaf( ) const;
00086 
00087 };
00088 
00089 #include "node.tpp"
00090 
00091 #endif /* __NODE_H__ */

Generated on Wed Jan 18 22:19:29 2006 for SkeTo -- Skeleton Library in Tokyo by  doxygen 1.4.4