Chemical Data Processing Library C++ API - Version 1.2.0
SizeSpecification.hpp
Go to the documentation of this file.
1 /*
2  * SizeSpecification.hpp
3  *
4  * This file is part of the Chemical Data Processing Toolkit
5  *
6  * Copyright (C) 2003 Thomas Seidel <thomas.seidel@univie.ac.at>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this library; see the file COPYING. If not, write to
20  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23 
29 #ifndef CDPL_VIS_SIZESPECIFICATION_HPP
30 #define CDPL_VIS_SIZESPECIFICATION_HPP
31 
32 #include "CDPL/Vis/APIPrefix.hpp"
33 
34 
35 namespace CDPL
36 {
37 
38  namespace Vis
39  {
40 
45  {
46 
47  public:
56  SizeSpecification(double value = 0.0, bool relative = false, bool input_scaling = false, bool output_scaling = false):
57  value(value), relative(relative), inputScaling(input_scaling), outputScaling(output_scaling) {}
58 
63  void setValue(double value);
64 
70  double getValue() const;
71 
81  void setRelative(bool relative);
82 
88  bool isRelative() const;
89 
99  void followInputScaling(bool follow);
100 
106  bool followsInputScaling() const;
107 
117  void followOutputScaling(bool follow);
118 
124  bool followsOutputScaling() const;
125 
131  bool operator==(const SizeSpecification& spec) const;
132 
141  bool operator!=(const SizeSpecification& spec) const;
142 
143  private:
144  double value;
145  bool relative;
146  bool inputScaling;
147  bool outputScaling;
148  };
149  } // namespace Vis
150 } // namespace CDPL
151 
152 #endif // CDPL_VIS_SIZESPECIFICATION_HPP
Definition of the preprocessor macro CDPL_VIS_API.
#define CDPL_VIS_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Specifies the value and type of a size attribute and defines how the value may change during processi...
Definition: SizeSpecification.hpp:45
void followOutputScaling(bool follow)
Specifies whether the specified size has to follow output scaling operations.
bool operator==(const SizeSpecification &spec) const
Equality comparison operator.
bool isRelative() const
Tells if the size specification is absolute or relative to another size.
void setRelative(bool relative)
Specifies if the size specification is absolute or relative to another size.
double getValue() const
Returns the value of the specified size.
void setValue(double value)
Sets value of the specified size.
bool followsOutputScaling() const
Tells if the specified size follows output scaling operations.
void followInputScaling(bool follow)
Specifies whether the specified size has to follow input scaling operations.
bool operator!=(const SizeSpecification &spec) const
Inequality comparison operator.
SizeSpecification(double value=0.0, bool relative=false, bool input_scaling=false, bool output_scaling=false)
Constructs a SizeSpecification object with the given attributes.
Definition: SizeSpecification.hpp:56
bool followsInputScaling() const
Tells if the specified size follows input scaling operations.
The namespace of the Chemical Data Processing Library.