- Main Page
- Namespaces
- Classes
- Files
- Related Pages

# /Users/fpy/titan-1-5-MBARI/Mers/Executives/DeductiveController/Observation/DiscreteValue.h

    00001
    00002 //
    00003 // Copyright (c) 2004           Model-based Embedded and Robotic Systems Group
    00004 // All Rights Reserved          Massachusetts Institute of Technology
    00005 //
    00006 // This software is provided as is. Model-based Embedded and Robotic Systems
    00007 // (MERS) group does not assume any responsibility.
    00008 //
    00010
    00011 #ifndef MERS_EXECUTIVES_DEDUCTIVECONTROLLER_OBSERVATION_DISCRETEVALUE
    00012 #define MERS_EXECUTIVES_DEDUCTIVECONTROLLER_OBSERVATION_DISCRETEVALUE
    00013
    00014 #include <Mers/Interfaces/DiscreteValue.h>
    00015 #include <Mers/Utils/Lang/ReferencedObject.h>
    00016
    00017 namespace Mers {
    00018         namespace Executives {
    00019                 namespace DeductiveController {
    00020                         namespace Observation {
    00021
    00022                                 class DiscreteVariable;
    00023
    00031                                 class DiscreteValue : public Mers::Interfaces::DiscreteValue,
    00032                                         public Mers::Utils::Lang::ReferencedObject
    00033                                 {
    00034                                 public:
    00052                                         DiscreteValue(DiscreteVariable * variable, const char * name,
    00053                                                 double lower, double upper, DiscreteValue * next = NULL);
    00054
    00058                                         virtual ~DiscreteValue();
    00059
    00063                                         DiscreteValue * getNext() const {
    00064                                                 return m_next;
    00065                                         }
    00066
    00075                                         bool isInRange( double value ) const {
    00076                                                 return m_lowerBound <= value && value < m_upperBound;
    00077                                         }
    00078
    00079                                 protected:
    00081                                         DiscreteValue * m_next;
    00082
    00084                                         double m_lowerBound;
    00085
    00087                                         double m_upperBound;
    00088
    00089                                 private:
    00091                                         DiscreteValue();
    00092                                         DiscreteValue(const DiscreteValue &other);
    00093                                         DiscreteValue &operator=(const DiscreteValue &other);
    00094                                 };
    00095                         }
    00096                 }
    00097         }
    00098 }
    00099
    00100 #endif
    00101