Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

macroc.h

Go to the documentation of this file.
00001 /*
00002 Copyright (C) 1999  Carsten Winkelholz
00003 
00004 Address:  FGAN Forschungsgesellschaft fr Angewandte Naturwissenschaften e. V.
00005       Neuenahrer Str. 20
00006       D - 53343 Wachtberg
00007       
00008 Email:    winkelholz@fgan.de
00009 
00010 This program is free software; you can redistribute it and/or
00011 modify it under the terms of the GNU General Public License
00012 as published by the Free Software Foundation; either version 2
00013 of the License, or (at your option) any later version.
00014 
00015 This program is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU General Public License for more details.
00019 
00020 You should have received a copy of the GNU General Public License
00021 along with this program; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00023 */
00024 
00025 
00026 #ifndef MACROC_H
00027 #define MACROC_H
00028 
00029 #include "oaw/misc/stringc.h"
00030 #include "oaw/misc/kettec.h"
00031 
00032 #include "../oawconfig.h"
00033 
00034 OAW_BEGIN_NAMESPACE
00035 
00036 class VarC;
00037 
00038 class OAW_DLLMAPPING FragmentC
00039 {
00040 public:
00041   FragmentC() {m_pVar=0;}  
00042   FragmentC(StringC s) {m_str=s; m_pVar=0;}
00043   void SetVar(VarC* pVar){m_pVar=pVar;}
00044 public:
00045     StringC m_str;
00046     VarC* m_pVar;
00047 };
00048 
00049 class OAW_DLLMAPPING VarC
00050 {
00051 public:
00052   VarC() {m_pF=0;}
00053 public:
00054   StringC m_name;
00055   FragmentC* m_pF;
00056 };
00057 
00058 class OAW_DLLMAPPING MacroC{
00059 public:
00060   MacroC(){}
00061   MacroC(const MacroC&);
00062   virtual ~MacroC();
00063   MacroC& operator = (const MacroC&);
00064   virtual void MakeTemplate(StringC str1,StringC str2);
00065   virtual int CompareString(StringC str,StringC& strOut);   
00066 protected:
00067   void ResetTemplate();
00068   void GetStringFromTemplate(StringC& desStr);
00069   VarC* GetVar(StringC name);
00070   void AddVar(StringC keyStr, FragmentC*);
00071 protected:
00072   KetteC<FragmentC*> m_kWord1;
00073   KetteC<FragmentC*> m_kWord2;
00074   KetteC<StringC> m_kKey;
00075   KetteC<VarC> m_kVar;
00076 private:
00077   void Copy(const MacroC&);
00078 };
00079 
00080 OAW_END_NAMESPACE
00081 
00082 #endif
00083 
00084 
00085 
00086 
00087 

Generated on Tue Jul 29 14:24:14 2003 for Open ActiveWrl by doxygen1.3-rc2