• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • Examples
  • File List
  • File Members

BoundValues.h

Go to the documentation of this file.
00001 // 
00002 //   Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
00003 // 
00004 // This program is free software; you can redistribute it and/or modify
00005 // it under the terms of the GNU General Public License as published by
00006 // the Free Software Foundation; either version 3 of the License, or
00007 // (at your option) any later version.
00008 // 
00009 // This program is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 // GNU General Public License for more details.
00013 // 
00014 // You should have received a copy of the GNU General Public License
00015 // along with this program; if not, write to the Free Software
00016 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00017 
00018 #ifndef GNASH_AS_BOUND_VALUES_H
00019 #define GNASH_AS_BOUND_VALUES_H
00020 
00021 namespace gnash {
00022 namespace abc {
00023 
00024 class BoundValue;
00025 
00026 class BoundAccessor
00027 {
00028 public:
00029         bool setGetter(Method *p) { mGetter = p; return true; }
00030         bool setSetter(Method *p) { _setter = p; return true; }
00031         bool setValue(BoundValue *p) { mValue = p; return true; }
00032 
00033         BoundValue* getValue() { return mValue; }
00034         Method *getGetter() { return mGetter; }
00035         Method *getSetter() { return _setter; }
00036 
00037 private:
00038         Method *mGetter;
00039         Method *_setter;
00040         BoundValue *mValue;
00041 };
00042 
00043 class BoundValue 
00044 {
00045 public:
00046         BoundValue() : mConst(false), mValue()
00047         { mValue.set_undefined(); }
00048         void setValue(as_value &v) { mValue = v; }
00049         as_value getCurrentValue() { return mValue; }
00050 
00051         void setType(Class *t) { mType = t; }
00052         Class *getType() { return mType; }
00053 
00054 private:
00055         bool mConst;
00056         Class *mType;
00057         as_value mValue;
00058 };
00059 
00060 } // namespace abc
00061 } // namespace gnash
00062 
00063 #endif

Generated on Thu Sep 30 2010 14:34:56 for Gnash by  doxygen 1.7.1