reSIProcate/stack  9694
Public Member Functions | Private Attributes
resip::QValue Class Reference

#include <QValue.hxx>

Collaboration diagram for resip::QValue:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 QValue ()
 QValue (int val)
 QValue (const Data &data)
 operator int () const
bool operator< (const QValue &rhs) const
bool operator> (const QValue &rhs) const
bool operator<= (const QValue &rhs) const
bool operator>= (const QValue &rhs) const
bool operator== (const QValue &rhs) const
bool operator!= (const QValue &rhs) const
bool operator< (const int rhs) const
bool operator> (const int rhs) const
bool operator<= (const int rhs) const
bool operator>= (const int rhs) const
bool operator== (const int rhs) const
bool operator!= (const int rhs) const
bool operator< (const long rhs) const
bool operator> (const long rhs) const
bool operator<= (const long rhs) const
bool operator>= (const long rhs) const
bool operator== (const long rhs) const
bool operator!= (const long rhs) const
QValueoperator= (const QValue &rhs)
QValueoperator= (const int rhs)
QValueoperator= (const long rhs)
float floatVal () const
 operator float () const
 operator double () const
bool operator< (const float rhs) const
bool operator> (const float rhs) const
bool operator<= (const float rhs) const
bool operator>= (const float rhs) const
bool operator== (const float rhs) const
bool operator!= (const float rhs) const
bool operator< (const double rhs) const
bool operator> (const double rhs) const
bool operator<= (const double rhs) const
bool operator>= (const double rhs) const
bool operator== (const double rhs) const
bool operator!= (const double rhs) const
QValueoperator= (const float rhs)
QValueoperator= (const double rhs)
void setValue (int val)
void setValue (const Data &data)
int getValue () const
const DatagetData () const
EncodeStreamencode (EncodeStream &stream) const

Private Attributes

int mValue
Data mDataValue

Detailed Description

Definition at line 15 of file QValue.hxx.


Constructor & Destructor Documentation

resip::QValue::QValue ( ) [inline, explicit]

Definition at line 18 of file QValue.hxx.

: mValue(0) { }
resip::QValue::QValue ( int  val) [inline, explicit]

Definition at line 19 of file QValue.hxx.

: mValue(val) { }
resip::QValue::QValue ( const Data data) [inline, explicit]

Definition at line 20 of file QValue.hxx.

References setValue().

{ setValue(data); }

Here is the call graph for this function:


Member Function Documentation

EncodeStream & QValue::encode ( EncodeStream stream) const

Definition at line 22 of file QValue.cxx.

{
        int i = mValue;
        
   if (i == 1000)
   {
      return stream << "1.0";
   }     
   
   stream << "0." << (i / 100);
   i %= 100;
        
   if (i)
   {
      stream << (i / 10);
                i %= 10;
                
                if (i)
                {
                        stream << i;
                }
   }
   
   return stream;
}
float resip::QValue::floatVal ( ) const [inline]

Definition at line 51 of file QValue.hxx.

References mValue.

Referenced by operator double(), and operator float().

{ return mValue/float(1000.0); }
const Data & QValue::getData ( ) const

Definition at line 14 of file QValue.cxx.

{
   DataStream strm(mDataValue);
   encode(strm);
   return mDataValue;
}
int resip::QValue::getValue ( ) const [inline]

Definition at line 75 of file QValue.hxx.

References mValue.

Referenced by resip::QValueParameter::qval().

{ return mValue; }
resip::QValue::operator double ( ) const [inline]

Definition at line 54 of file QValue.hxx.

References floatVal().

{ return (double) floatVal(); }         

Here is the call graph for this function:

resip::QValue::operator float ( ) const [inline]

Definition at line 53 of file QValue.hxx.

References floatVal().

{ return floatVal(); }

Here is the call graph for this function:

resip::QValue::operator int ( ) const [inline]

Definition at line 22 of file QValue.hxx.

References mValue.

{ return mValue; }
bool resip::QValue::operator!= ( const QValue rhs) const [inline]

Definition at line 29 of file QValue.hxx.

References mValue.

{ return mValue != rhs.mValue; }                        
bool resip::QValue::operator!= ( const int  rhs) const [inline]

Definition at line 36 of file QValue.hxx.

References mValue.

{ return mValue != rhs; }                       
bool resip::QValue::operator!= ( const long  rhs) const [inline]

Definition at line 43 of file QValue.hxx.

References mValue.

{ return mValue != rhs; }                       
bool resip::QValue::operator!= ( const float  rhs) const [inline]

Definition at line 61 of file QValue.hxx.

References doubleToInt(), and mValue.

{ return mValue != doubleToInt(rhs*1000.0); }

Here is the call graph for this function:

bool resip::QValue::operator!= ( const double  rhs) const [inline]

Definition at line 68 of file QValue.hxx.

References doubleToInt(), and mValue.

{ return mValue != doubleToInt(rhs*1000.0); }

Here is the call graph for this function:

bool resip::QValue::operator< ( const QValue rhs) const [inline]

Definition at line 24 of file QValue.hxx.

References mValue.

{ return mValue < rhs.mValue; }
bool resip::QValue::operator< ( const int  rhs) const [inline]

Definition at line 31 of file QValue.hxx.

References mValue.

{ return mValue < rhs; }
bool resip::QValue::operator< ( const long  rhs) const [inline]

Definition at line 38 of file QValue.hxx.

References mValue.

{ return mValue < rhs; }
bool resip::QValue::operator< ( const float  rhs) const [inline]

Definition at line 56 of file QValue.hxx.

References doubleToInt(), and mValue.

{ return mValue < doubleToInt(rhs*1000.0); }

Here is the call graph for this function:

bool resip::QValue::operator< ( const double  rhs) const [inline]

Definition at line 63 of file QValue.hxx.

References doubleToInt(), and mValue.

{ return mValue < doubleToInt(rhs*1000.0); }

Here is the call graph for this function:

bool resip::QValue::operator<= ( const QValue rhs) const [inline]

Definition at line 26 of file QValue.hxx.

References mValue.

{ return mValue <= rhs.mValue; }
bool resip::QValue::operator<= ( const int  rhs) const [inline]

Definition at line 33 of file QValue.hxx.

References mValue.

{ return mValue <= rhs; }
bool resip::QValue::operator<= ( const long  rhs) const [inline]

Definition at line 40 of file QValue.hxx.

References mValue.

{ return mValue <= rhs; }
bool resip::QValue::operator<= ( const float  rhs) const [inline]

Definition at line 58 of file QValue.hxx.

References doubleToInt(), and mValue.

{ return mValue <= doubleToInt(rhs*1000.0); }

Here is the call graph for this function:

bool resip::QValue::operator<= ( const double  rhs) const [inline]

Definition at line 65 of file QValue.hxx.

References doubleToInt(), and mValue.

{ return mValue <= doubleToInt(rhs*1000.0); }

Here is the call graph for this function:

QValue& resip::QValue::operator= ( const QValue rhs) [inline]

Definition at line 45 of file QValue.hxx.

References mValue.

{ mValue = rhs.mValue;  return (*this); }
QValue& resip::QValue::operator= ( const int  rhs) [inline]

Definition at line 46 of file QValue.hxx.

References setValue().

{ setValue(rhs); return (*this); }                      

Here is the call graph for this function:

QValue& resip::QValue::operator= ( const long  rhs) [inline]

Definition at line 47 of file QValue.hxx.

References setValue().

{ setValue(rhs); return (*this); }                      

Here is the call graph for this function:

QValue& resip::QValue::operator= ( const float  rhs) [inline]

Definition at line 70 of file QValue.hxx.

References doubleToInt(), and setValue().

{ setValue(doubleToInt(rhs*1000.0)); return (*this); }                  

Here is the call graph for this function:

QValue& resip::QValue::operator= ( const double  rhs) [inline]

Definition at line 71 of file QValue.hxx.

References doubleToInt(), and setValue().

{ setValue(doubleToInt(rhs*1000.0)); return (*this); }                  

Here is the call graph for this function:

bool resip::QValue::operator== ( const QValue rhs) const [inline]

Definition at line 28 of file QValue.hxx.

References mValue.

{ return mValue == rhs.mValue; }
bool resip::QValue::operator== ( const int  rhs) const [inline]

Definition at line 35 of file QValue.hxx.

References mValue.

{ return mValue == rhs; }
bool resip::QValue::operator== ( const long  rhs) const [inline]

Definition at line 42 of file QValue.hxx.

References mValue.

{ return mValue == rhs; }
bool resip::QValue::operator== ( const float  rhs) const [inline]

Definition at line 60 of file QValue.hxx.

References doubleToInt(), and mValue.

{ return mValue == doubleToInt(rhs*1000.0); }

Here is the call graph for this function:

bool resip::QValue::operator== ( const double  rhs) const [inline]

Definition at line 67 of file QValue.hxx.

References doubleToInt(), and mValue.

{ return mValue == doubleToInt(rhs*1000.0); }

Here is the call graph for this function:

bool resip::QValue::operator> ( const QValue rhs) const [inline]

Definition at line 25 of file QValue.hxx.

References mValue.

{ return mValue > rhs.mValue; }
bool resip::QValue::operator> ( const int  rhs) const [inline]

Definition at line 32 of file QValue.hxx.

References mValue.

{ return mValue > rhs; }
bool resip::QValue::operator> ( const long  rhs) const [inline]

Definition at line 39 of file QValue.hxx.

References mValue.

{ return mValue > rhs; }
bool resip::QValue::operator> ( const float  rhs) const [inline]

Definition at line 57 of file QValue.hxx.

References doubleToInt(), and mValue.

{ return mValue > doubleToInt(rhs*1000.0); }

Here is the call graph for this function:

bool resip::QValue::operator> ( const double  rhs) const [inline]

Definition at line 64 of file QValue.hxx.

References doubleToInt(), and mValue.

{ return mValue > doubleToInt(rhs*1000.0); }

Here is the call graph for this function:

bool resip::QValue::operator>= ( const QValue rhs) const [inline]

Definition at line 27 of file QValue.hxx.

References mValue.

{ return mValue >= rhs.mValue; }
bool resip::QValue::operator>= ( const int  rhs) const [inline]

Definition at line 34 of file QValue.hxx.

References mValue.

{ return mValue >= rhs; }
bool resip::QValue::operator>= ( const long  rhs) const [inline]

Definition at line 41 of file QValue.hxx.

References mValue.

{ return mValue >= rhs; }
bool resip::QValue::operator>= ( const float  rhs) const [inline]

Definition at line 59 of file QValue.hxx.

References doubleToInt(), and mValue.

{ return mValue >= doubleToInt(rhs*1000.0); }

Here is the call graph for this function:

bool resip::QValue::operator>= ( const double  rhs) const [inline]

Definition at line 66 of file QValue.hxx.

References doubleToInt(), and mValue.

{ return mValue >= doubleToInt(rhs*1000.0); }

Here is the call graph for this function:

void resip::QValue::setValue ( int  val) [inline]

Definition at line 73 of file QValue.hxx.

References mValue.

Referenced by operator=(), resip::Pidf::parse(), QValue(), and resip::QValueParameter::QValueParameter().

{ mValue = (val<0) || (val>1000) ? 1000 : val; }
void resip::QValue::setValue ( const Data data) [inline]

Definition at line 74 of file QValue.hxx.

References mValue, and resip::ParseBuffer::qVal().

{ ParseBuffer pb(data); mValue = pb.qVal(); }

Here is the call graph for this function:


Member Data Documentation

Data resip::QValue::mDataValue [mutable, private]

Definition at line 81 of file QValue.hxx.

int resip::QValue::mValue [private]

The documentation for this class was generated from the following files: