Aegis  4.25.D505
/home/archives/aegis/branch.4/branch.25/delta28933.505/libaegis/aer/value/pstate.h
Go to the documentation of this file.
00001 //
00002 //      aegis - project change supervisor
00003 //      Copyright (C) 1994, 1996, 2002, 2005-2008, 2012 Peter Miller
00004 //
00005 //      This program is free software; you can redistribute it and/or modify
00006 //      it under the terms of the GNU General Public License as published by
00007 //      the Free Software Foundation; either version 3 of the License, or
00008 //      (at your option) any later version.
00009 //
00010 //      This program is distributed in the hope that it will be useful,
00011 //      but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 //      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 //      GNU General Public License for more details.
00014 //
00015 //      You should have received a copy of the GNU General Public License
00016 //      along with this program. If not, see
00017 //      <http://www.gnu.org/licenses/>.
00018 //
00019 
00020 #ifndef AEGIS_AER_VALUE_PSTATE_H
00021 #define AEGIS_AER_VALUE_PSTATE_H
00022 
00023 #include <common/nstring.h>
00024 #include <libaegis/aer/value.h>
00025 
00031 class rpt_value_pstate:
00032     public rpt_value
00033 {
00034 public:
00038     virtual ~rpt_value_pstate();
00039 
00040 private:
00048     rpt_value_pstate(const nstring &pname);
00049 
00050 public:
00058     static rpt_value::pointer create(const nstring &name);
00059 
00067     static rpt_value::pointer create(string_ty *name);
00068 
00069 protected:
00070     // See base class for documentation.
00071     const char *name() const;
00072 
00073     // See base class for documentation.
00074     bool is_a_struct() const;
00075 
00076     // See base class for documentation.
00077     rpt_value::pointer lookup(const rpt_value::pointer &rhs, bool lvalue) const;
00078 
00079     // See base class for documentation.
00080     rpt_value::pointer keys() const;
00081 
00082     // See base class for documentation.
00083     rpt_value::pointer count() const;
00084 
00085     // See base class for documentation.
00086     rpt_value::pointer undefer_or_null() const;
00087 
00088     // See base class for documentation.
00089     const char *type_of() const;
00090 
00091 private:
00096     nstring pname;
00097 
00103     mutable rpt_value::pointer value;
00104 
00108     void grab() const;
00109 
00113     rpt_value_pstate();
00114 
00118     rpt_value_pstate(const rpt_value_pstate &);
00119 
00123     rpt_value_pstate &operator=(const rpt_value_pstate &);
00124 };
00125 
00126 #endif // AEGIS_AER_VALUE_PSTATE_H
00127 // vim: set ts=8 sw=4 et :