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
20namespace 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
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
Definition: constants.h:13
BALL_EXPORT bool operator==(const String &s1, const String &s2)
BALL_EXPORT bool operator!=(const String &s1, const String &s2)
virtual void select()
bool read(PersistenceManager &pm)
virtual void setSelected(bool selected)
Definition: selectable.h:123
virtual void deselect()
void write(PersistenceManager &pm) const
virtual void clear()
void get(Selectable &selectable, bool deep=true) const
void set(const Selectable &selectable, bool deep=true)
Selectable(const Selectable &selectable, bool deep=true)
virtual void dump(::std::ostream &s=std::cout, Size depth=0) const
void swap(Selectable &selectable)
bool isSelected() const
virtual ~Selectable()
#define BALL_EXPORT
Definition: COMMON/global.h:50