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

dtool/src/dconfig/symbolEnt.h

Go to the documentation of this file.
00001 // Filename: symbolEnt.h
00002 // Created by:  drose (15May00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #ifndef SYMBOLENT_H
00020 #define SYMBOLENT_H
00021 
00022 #include <dtoolbase.h>
00023 
00024 #include "config_setup.h"
00025 #include "pvector.h"
00026 
00027 namespace Config {
00028 
00029 class EXPCL_DTOOLCONFIG SymbolEnt {
00030    public:
00031       enum SymbolEntSrc { ConfigFile, Environment, CommandEnv, Commandline,
00032                           Other, Invalid };
00033    private:
00034       ConfigString _src;
00035       ConfigString _val;
00036       bool _state;
00037       enum SymbolEntSrc _srctok;
00038    public:
00039       SymbolEnt() : _srctok(Invalid) {}
00040       SymbolEnt(enum SymbolEntSrc tok, const ConfigString& val,
00041                 const ConfigString& src = "", bool state = false)
00042         : _src(src), _val(val), _state(state), _srctok(tok) {}
00043       SymbolEnt(const SymbolEnt& c) : _src(c._src), _val(c._val),
00044           _state(c._state), _srctok(c._srctok) {}
00045       INLINE SymbolEnt& operator=(const SymbolEnt&);
00046 
00047       // We need these so we can explicitly instantiate the vector,
00048       // below.  They're not actually used and do nothing useful.
00049       INLINE bool operator == (const SymbolEnt &other) const;
00050       INLINE bool operator != (const SymbolEnt &other) const;
00051       INLINE bool operator < (const SymbolEnt &other) const;
00052 
00053       INLINE ConfigString Src(void) const;
00054       INLINE ConfigString Val(void) const;
00055       INLINE SymbolEntSrc SrcTok(void) const;
00056       INLINE bool State(void) const;
00057 };
00058 
00059 } // close Config namespace
00060 
00061 #define EXPCL EXPCL_DTOOLCONFIG
00062 #define EXPTP EXPTP_DTOOLCONFIG
00063 #define TYPE Config::SymbolEnt
00064 #define NAME vector_SymbolEnt
00065 #include "vector_src.h"
00066 
00067 namespace Config {
00068 
00069 typedef ::vector_SymbolEnt vector_SymbolEnt;
00070 
00071 #include "symbolEnt.I"
00072 
00073 } // close Config namespace
00074 
00075 
00076 // Tell GCC that we'll take care of the instantiation explicitly here.
00077 #ifdef __GNUC__
00078 #pragma interface
00079 #endif
00080 
00081 #endif

Generated on Thu May 1 22:12:58 2003 for DTool by doxygen1.3