src/core/boolean.h
changeset 4654 2eaebe77d66b
parent 3182 61fe7fe81ebd
     1.1 --- a/src/core/boolean.h	Thu May 29 23:24:10 2008 -0700
     1.2 +++ b/src/core/boolean.h	Sat Jul 04 08:15:48 2009 +0200
     1.3 @@ -42,6 +42,8 @@
     1.4    BooleanValue (bool value);
     1.5    void Set (bool value);
     1.6    bool Get (void) const;
     1.7 +  template <typename T>
     1.8 +  bool GetAccessor (T &v) const;
     1.9    
    1.10    operator bool () const;
    1.11  
    1.12 @@ -52,6 +54,13 @@
    1.13    bool m_value;
    1.14  };
    1.15  
    1.16 +template <typename T>
    1.17 +bool BooleanValue::GetAccessor (T &v) const
    1.18 +{
    1.19 +  v = T (m_value);
    1.20 +  return true;
    1.21 +}
    1.22 +
    1.23  std::ostream & operator << (std::ostream &os, const BooleanValue &value);
    1.24  
    1.25  ATTRIBUTE_CHECKER_DEFINE (Boolean);