sot-core  4.10.1
Hierarchical task solver plug-in for dynamic-graph.
multi-bound.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2010,
3  * François Bleibel,
4  * Olivier Stasse,
5  *
6  * CNRS/AIST
7  *
8  */
9 
10 #ifndef __SOT_MultiBound_H__
11 #define __SOT_MultiBound_H__
12 
13 /* --------------------------------------------------------------------- */
14 /* --- INCLUDE --------------------------------------------------------- */
15 /* --------------------------------------------------------------------- */
16 
17 /* STD */
18 #include <string>
19 #include <vector>
20 
21 /* SOT */
22 #include "sot/core/api.hh"
24 
25 /* --------------------------------------------------------------------- */
26 /* --- CLASS ----------------------------------------------------------- */
27 /* --------------------------------------------------------------------- */
28 
29 namespace dynamicgraph {
30 namespace sot {
31 
33 public:
34  enum MultiBoundModeType { MODE_SINGLE, MODE_DOUBLE };
35  enum SupInfType { BOUND_SUP, BOUND_INF };
36 
37 public: // protected:
39  double boundSingle;
40  double boundSup, boundInf;
41  bool boundSupSetup, boundInfSetup;
42 
43 public:
44  MultiBound(const double x = 0.);
45  MultiBound(const double xi, const double xs);
46  MultiBound(const double x, const SupInfType bound);
47  MultiBound(const MultiBound &clone);
48 
49 public: // Acessors
50  MultiBoundModeType getMode(void) const;
51  double getSingleBound(void) const;
52  double getDoubleBound(const SupInfType bound) const;
53  bool getDoubleBoundSetup(const SupInfType bound) const;
54 
55 public: // Modifiors
56  void setDoubleBound(SupInfType boundType, double boundValue);
57  void unsetDoubleBound(SupInfType boundType);
58  void setSingleBound(double boundValue);
59 
60 public:
61  SOT_CORE_EXPORT friend std::ostream &operator<<(std::ostream &os,
62  const MultiBound &m);
63  SOT_CORE_EXPORT friend std::istream &operator>>(std::istream &is,
64  MultiBound &m);
65 };
66 
67 /* --------------------------------------------------------------------- */
68 typedef std::vector<MultiBound> VectorMultiBound;
69 SOT_CORE_EXPORT std::ostream &operator<<(std::ostream &os,
70  const VectorMultiBound &v);
71 SOT_CORE_EXPORT std::istream &operator>>(std::istream &os, VectorMultiBound &v);
72 
73 } /* namespace sot */
74 } /* namespace dynamicgraph */
75 
76 #endif // #ifndef __SOT_MultiBound_H__
SupInfType
Definition: multi-bound.hh:35
SOT_CORE_EXPORT std::ostream & operator<<(std::ostream &os, const VectorMultiBound &v)
std::vector< MultiBound > VectorMultiBound
Definition: multi-bound.hh:68
double boundSingle
Definition: multi-bound.hh:39
#define SOT_CORE_EXPORT
Definition: api.hh:20
MultiBoundModeType mode
Definition: multi-bound.hh:38
SOT_CORE_EXPORT std::istream & operator>>(std::istream &os, VectorMultiBound &v)
bool boundSupSetup
Definition: multi-bound.hh:41
double boundSup
Definition: multi-bound.hh:40
MultiBoundModeType
Definition: multi-bound.hh:34
Definition: multi-bound.hh:32
Definition: abstract-sot-external-interface.hh:17