Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7470 in orxonox.OLD for branches/qt_gui/src/lib/gui/gui_saveable.h


Ignore:
Timestamp:
May 2, 2006, 8:21:00 AM (18 years ago)
Author:
bensch
Message:

compile again

File:
1 moved

Legend:

Unmodified
Added
Removed
  • branches/qt_gui/src/lib/gui/gui_saveable.h

    r7469 r7470  
    1212
    1313// FORWARD DECLARATION
     14  namespace OrxGui
     15  {
     16    //! A class for ...
     17    class GuiSaveable
     18    {
     19    public:
     20    protected:
     21      GuiSaveable(const std::string& optionName);
     22      virtual ~GuiSaveable();
    1423
    15 namespace OrxGui
    16 {
    17   //! A class for ...
    18   class GuiSaveable
    19   {
    20   public:
    21   protected:
    22     GuiSaveable(const std::string& optionName);
    23     virtual ~GuiSaveable();
     24      void makeSaveable();
    2425
    25     void makeSaveable();
     26      virtual void load(const MultiType& value) = 0;
     27      virtual const MultiType& save() = 0;
    2628
    27     virtual void load(const MultiType& value) = 0;
    28     virtual const MultiType& save() = 0;
     29      MultiType&       getValue() { return this->value; };
     30      const MultiType& getValue() const { return this->value; };
     31      bool             isSaveable() const { return this->bSaveable; };
    2932
    30     MultiType&       getValue() { return this->value; };
    31     const MultiType& getValue() const { return this->value; };
    32     bool             isSaveable() const { return this->bSaveable; };
     33    protected:
     34      virtual void makingElementSaveable() {};
    3335
    34   protected:
    35     virtual void makingElementSaveable() {};
    36 
    37   private:
    38     MultiType       value;
    39     bool            bSaveable;
    40   };
     36    private:
     37      MultiType       value;
     38      bool            bSaveable;
     39    };
    4140
    4241
    4342
    44   class GuiSaveableGroup : virtual public GuiSaveable
    45   {
    46   public:
    47     GuiSaveableGroup(const std::string& name);
    48     ~GuiSaveableGroup();
     43    class GuiSaveableGroup : virtual public GuiSaveable
     44    {
     45    public:
     46      GuiSaveableGroup(const std::string& name);
     47      ~GuiSaveableGroup();
    4948
    50     void addSaveable(GuiSaveable* saveable);
    51     void removeSaveable(GuiSaveable* saveable);
     49      void addSaveable(GuiSaveable* saveable);
     50      void removeSaveable(GuiSaveable* saveable);
    5251
    53   protected:
    54     virtual void makingElementSaveable();
    55   private:
    56     std::vector<GuiSaveable*>              saveables;
    57     static std::vector<GuiSaveableGroup*>  saveableGroups;
    58   };
     52    protected:
     53      virtual void makingElementSaveable();
     54    private:
     55      std::vector<GuiSaveable*>              saveables;
     56      static std::vector<GuiSaveableGroup*>  saveableGroups;
     57    };
    5958
    60 }
    61 
     59  }
    6260#endif /* _GUI_SAVEABLE_H */
Note: See TracChangeset for help on using the changeset viewer.