00001 // 00002 // aegis - project change supervisor 00003 // Copyright (C) 1994, 1996, 2002, 2005-2008 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_STRUCT_H 00021 #define AEGIS_AER_VALUE_STRUCT_H 00022 00023 #include <common/symtab/template.h> 00024 #include <libaegis/aer/value.h> 00025 00030 class rpt_value_struct: 00031 public rpt_value 00032 { 00033 public: 00037 virtual ~rpt_value_struct(); 00038 00046 rpt_value_struct(); 00047 00052 static rpt_value::pointer create(); 00053 00062 void assign(const nstring &name, const rpt_value::pointer &value); 00063 00073 rpt_value::pointer lookup(const char *name) const; 00074 00084 rpt_value::pointer lookup(const nstring &name) const; 00085 00095 rpt_value::pointer lookup(string_ty *name) const; 00096 00097 protected: 00098 // See base class for documentation. 00099 const char *name() const; 00100 00101 // See base class for documentation. 00102 bool is_a_struct() const; 00103 00104 // See base class for documentation. 00105 rpt_value::pointer undefer() const; 00106 00107 // See base class for documentation. 00108 rpt_value::pointer lookup(const rpt_value::pointer &rhs, bool lvalue) const; 00109 00110 // See base class for documentation. 00111 rpt_value::pointer keys() const; 00112 00113 // See base class for documentation. 00114 rpt_value::pointer count() const; 00115 00116 private: 00125 mutable symtab<rpt_value::pointer> members; 00126 00130 rpt_value_struct(const rpt_value_struct &); 00131 00135 rpt_value_struct &operator=(const rpt_value_struct &); 00136 }; 00137 00138 #endif // AEGIS_AER_VALUE_STRUCT_H