BALL  1.5.0
selectable.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 // $Id: selectable.h,v 1.20 2005/12/23 17:01:41 amoll Exp $
5 //
6 
7 #ifndef BALL_CONCEPT_SELECTABLE_H
8 #define BALL_CONCEPT_SELECTABLE_H
9 
10 #ifndef BALL_COMMON_H
11 # include <BALL/common.h>
12 #endif
13 
14 #ifndef BALL_CONCEPT_PERSISTENTOBJECT_H
16 #endif
17 
18 #define BALL_SELECTABLE_DEFAULT_SELECTION false
19 
20 namespace BALL
21 {
22 
37  {
38  public:
39 
43 
48  ;
49 
55  Selectable(const Selectable& selectable, bool deep = true)
56  ;
57 
61  virtual ~Selectable()
62  ;
63 
67  virtual void clear()
68  ;
69 
71 
75 
80  void set(const Selectable& selectable, bool deep = true)
81  ;
82 
88  const Selectable& operator = (const Selectable& selectable)
89  ;
90 
95  void get(Selectable& selectable, bool deep = true) const
96  ;
97 
101  void swap(Selectable& selectable)
102  ;
104 
108 
112  virtual void select()
113  ;
114 
118  virtual void deselect()
119  ;
120 
123  virtual void setSelected(bool selected)
124  { selected_ = selected; }
125 
127 
130 
134  bool isSelected() const
135  ;
136 
139  bool operator == (const Selectable& selectable) const
140  ;
141 
144  bool operator != (const Selectable& selectable) const
145  ;
146 
148 
152 
159  void write(PersistenceManager& pm) const
160  ;
161 
169  ;
170 
172 
175 
177  virtual void dump(::std::ostream& s = std::cout, Size depth = 0) const
178  ;
179 
181 
182  protected:
183 
184  bool selected_;
185  };
186 
187 # ifndef BALL_NO_INLINE_FUNCTIONS
188 # include <BALL/CONCEPT/selectable.iC>
189 # endif
190 
191 } // namespace BALL
192 
193 #endif // BALL_CONCEPT_SELECTABLE_H
BALL_EXPORT
#define BALL_EXPORT
Definition: COMMON/global.h:50
BALL::operator!=
BALL_EXPORT bool operator!=(const String &s1, const String &s2)
persistentObject.h
BALL::Selectable::select
virtual void select()
BALL::Selectable::~Selectable
virtual ~Selectable()
BALL::Selectable
Definition: selectable.h:37
BALL::PersistenceManager
Definition: persistenceManager.h:73
BALL::Selectable::clear
virtual void clear()
BALL::Selectable::set
void set(const Selectable &selectable, bool deep=true)
BALL
Definition: constants.h:13
BALL_SIZE_TYPE
BALL::Selectable::selected_
bool selected_
Definition: selectable.h:184
BALL::Selectable::write
void write(PersistenceManager &pm) const
BALL::Selectable::dump
virtual void dump(::std::ostream &s=std::cout, Size depth=0) const
BALL::Selectable::setSelected
virtual void setSelected(bool selected)
Definition: selectable.h:123
BALL::Selectable::Selectable
Selectable()
BALL::operator==
BALL_EXPORT bool operator==(const String &s1, const String &s2)
BALL::Selectable::get
void get(Selectable &selectable, bool deep=true) const
common.h
BALL::Selectable::isSelected
bool isSelected() const
BALL::Selectable::deselect
virtual void deselect()
BALL::Selectable::swap
void swap(Selectable &selectable)
BALL::Selectable::Selectable
Selectable(const Selectable &selectable, bool deep=true)
BALL::Selectable::read
bool read(PersistenceManager &pm)