ordered_node.h

Go to the documentation of this file.
00001 #ifndef ORDERED_NODE_CLASS
00002 #define ORDERED_NODE_CLASS
00003 
00004 /*****************************************************************************\
00005 *                                                                             *
00006 *  Name   : ordered_node                                                      *
00007 *  Author : M McLeod                                                          *
00008 *                                                                             *
00009 *******************************************************************************
00010 * Copyright (c) 2000-$now By Author.  This program is free software; you can  *
00011 * redistribute it and/or modify it under the terms of the GNU General Public  *
00012 * License as published by the Free Software Foundation; either version 2 of   *
00013 * the License or (at your option) any later version.  This is online at:      *
00014 *     http://www.fsf.org/copyleft/gpl.html                                    *
00015 * Please send any updates to: fred@gruntose.com                               *
00016 \*****************************************************************************/
00017 
00018 #include "node.h"
00019 
00020 namespace nodes {
00021 
00023 
00024 class NODES_CLASS_STYLE ordered_node : public node {
00025 
00026 public:
00027     ordered_node(int number_of_links = 0)
00028       : node(number_of_links)
00029         {}
00031 
00032     virtual ~ordered_node()
00033         {}
00034 
00035     enum MODES { EXACT=0 };
00036     enum COMPARE_OUTCOMES { NODE_ERROR = -99, LESS = -1, EQUAL = 0, GREAT = 1 };
00037 
00038     virtual int compare(const ordered_node &formal(other), int mode = EXACT) const
00039         { if (mode) {}; return LESS; }
00041 
00045 };
00046 
00047 } // namespace.
00048 
00049 #endif
00050 

Generated on Fri Nov 28 04:29:17 2008 for HOOPLE Libraries by  doxygen 1.5.1