stromx  0.7.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Parameter.h
1 /*
2  * Copyright 2011 Matthias Fuchs
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef STROMX_RUNTIME_PARAMETER_H
18 #define STROMX_RUNTIME_PARAMETER_H
19 
20 #include "stromx/runtime/DescriptionBase.h"
21 
22 namespace stromx
23 {
24  namespace runtime
25  {
26  class ParameterGroup;
27 
34  class STROMX_RUNTIME_API Parameter : public DescriptionBase
35  {
36  public:
94  {
121  ACTIVATED_WRITE
122  };
123 
125  {
159  INTERNAL
160  };
161 
163  Parameter(const unsigned int id, const VariantHandle& variant, ParameterGroup* const group = 0);
164 
166  AccessMode accessMode() const { return m_access; }
167 
169  void setAccessMode(const AccessMode mode) { m_access = mode; }
170 
177  UpdateBehavior updateBehavior() const { return m_behavior; }
178 
180  void setUpdateBehavior(const UpdateBehavior behavior) { m_behavior = behavior; }
181 
186  virtual const Parameter* group() const { return m_group; }
187 
192  virtual const std::vector<const Parameter*> & members() const { return NO_MEMBERS; }
193 
194  private:
195  static const std::vector<const Parameter*> NO_MEMBERS;
196 
197  AccessMode m_access;
198  UpdateBehavior m_behavior;
199  const Parameter* m_group;
200  };
201  }
202 }
203 
204 #endif // STROMX_RUNTIME_PARAMETER_H
Abstract description of an ID to variant map.
Definition: DescriptionBase.h:69
Definition: VariantHandle.h:34
UpdateBehavior updateBehavior() const
Definition: Parameter.h:177
Definition: Parameter.h:98
Definition: Parameter.h:137
Definition: Parameter.h:96
A group of parameters.
Definition: ParameterGroup.h:28
void setUpdateBehavior(const UpdateBehavior behavior)
Definition: Parameter.h:180
The stromx class library.
Definition: AdjustRgbChannels.cpp:29
virtual const Parameter * group() const
Definition: Parameter.h:186
virtual const std::vector< const Parameter * > & members() const
Definition: Parameter.h:192
Definition: Parameter.h:103
AccessMode accessMode() const
Definition: Parameter.h:166
Definition: Parameter.h:153
Description of a parameter.
Definition: Parameter.h:34
Definition: Parameter.h:145
void setAccessMode(const AccessMode mode)
Definition: Parameter.h:169
AccessMode
Definition: Parameter.h:93
UpdateBehavior
Definition: Parameter.h:124