ionflux.org | Impressum

NodeReference.hpp

Go to the documentation of this file.
00001 #ifndef IONFLUX_TOOLS_NODEREFERENCE
00002 #define IONFLUX_TOOLS_NODEREFERENCE
00003 /* ==========================================================================
00004  * Ionflux Tools
00005  * Copyright (c) 2004 Joern P. Meier
00006  * mail@ionflux.org
00007  * --------------------------------------------------------------------------
00008  * NodeReference.hpp                    Tree node reference.
00009  * ==========================================================================
00010  * 
00011  * This file is part of Ionflux Tools.
00012  * 
00013  * Ionflux Tools is free software; you can redistribute it and/or modify it 
00014  * under the terms of the GNU General Public License as published by the Free
00015  * Software Foundation; either version 2 of the License, or (at  your option)
00016  * any later version.
00017  * 
00018  * Ionflux Tools is distributed in the hope that it will be useful, but 
00019  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
00020  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00021  * for more details.
00022  * 
00023  * You should have received a copy of the GNU General Public License
00024  * along with Ionflux Tools; if not, write to the Free Software Foundation, 
00025  * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00026  * 
00027  * ========================================================================== */
00028 
00029 #include <string>
00030 #include <iostream>
00031 #include <vector>
00032 #include "ionflux/tools.hpp"
00033 #include "ionflux/TreeResolver.hpp"
00034 
00035 namespace Ionflux
00036 {
00037 
00038 namespace Tools
00039 {
00040 
00048 class NodeReference
00049 {
00050     protected:
00052         std::string value;
00054         int type;
00056         bool subscript;
00057         
00058     public:
00060         static const int REF_INVALID;
00062         static const int REF_NAME;
00064         static const int REF_ID;
00066         static const int REF_PATH;
00068         static const int REF_EMPTY;
00069         
00074         NodeReference();
00075         
00084         NodeReference(const std::string &refExpr);
00085         
00090         virtual ~NodeReference();
00091         
00102         virtual void setFromRef(const std::string &refExpr);
00103         
00110         virtual void setValue(const std::string& newValue);
00111         
00118         virtual void setType(int newType);
00119         
00127         virtual void setSubscript(bool newSubscript);
00128         
00133         virtual std::string getValue() const;
00134         
00139         virtual int getType() const;
00140         
00145         virtual bool isSubscript() const;
00146         
00148         virtual void clear();
00149         
00151         virtual void printDebugInfo() const;
00152 };
00153 
00154 }
00155 
00156 }
00157 
00161 #endif

Generated on Tue Mar 14 20:58:29 2006 for Ionflux Tools Class Library (iftools) by  doxygen 1.4.6