reSIProcate/stack  9694
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends
resip::FloatParameter Class Reference

Generically represents floating point values conveyed by SIP parameters. More...

#include <FloatParameter.hxx>

Inheritance diagram for resip::FloatParameter:
Inheritance graph
[legend]
Collaboration diagram for resip::FloatParameter:
Collaboration graph
[legend]

List of all members.

Public Types

typedef float Type

Public Member Functions

 FloatParameter (ParameterTypes::Type, ParseBuffer &pb, const char *terminators)
 FloatParameter (ParameterTypes::Type type)
virtual Parameterclone () const
virtual EncodeStreamencode (std::ostream &stream) const

Static Public Member Functions

static Parameterdecode (ParameterTypes::Type type, ParseBuffer &pb, const char *terminators)

Private Member Functions

Typevalue ()

Private Attributes

Type mValue

Friends

class ParserCategory

Detailed Description

Generically represents floating point values conveyed by SIP parameters.

Definition at line 19 of file FloatParameter.hxx.


Member Typedef Documentation

Definition at line 22 of file FloatParameter.hxx.


Constructor & Destructor Documentation

FloatParameter::FloatParameter ( ParameterTypes::Type  type,
ParseBuffer pb,
const char *  terminators 
)

Definition at line 17 of file FloatParameter.cxx.

References resip::ParseBuffer::eof(), resip::ParseBuffer::floatVal(), mValue, resip::ParseBuffer::position(), resip::ParseBuffer::skipChar(), and resip::ParseBuffer::skipWhitespace().

Referenced by clone(), and decode().

   : Parameter(type),
     mValue(0)
{
   pb.skipWhitespace();
   if (!pb.eof() && *pb.position() != '=')
   {
      throw ParseException("parameter constructor expected '='", "FloatParameter", __FILE__, __LINE__);
   }
   pb.skipChar();
   pb.skipWhitespace();
   
   // .dlb. not zero terminated; no error detection
   mValue = pb.floatVal();
}

Here is the call graph for this function:

FloatParameter::FloatParameter ( ParameterTypes::Type  type) [explicit]

Definition at line 35 of file FloatParameter.cxx.

   : Parameter(type),
     mValue(0.0)
{}

Member Function Documentation

Parameter * FloatParameter::clone ( ) const [virtual]

Implements resip::Parameter.

Definition at line 41 of file FloatParameter.cxx.

References FloatParameter().

{
   return new FloatParameter(*this);
}

Here is the call graph for this function:

static Parameter* resip::FloatParameter::decode ( ParameterTypes::Type  type,
ParseBuffer pb,
const char *  terminators 
) [inline, static]

Definition at line 27 of file FloatParameter.hxx.

References FloatParameter().

      {
         return new FloatParameter(type, pb, terminators);
      }

Here is the call graph for this function:

virtual EncodeStream& resip::FloatParameter::encode ( std::ostream &  stream) const [virtual]
Type& resip::FloatParameter::value ( ) [inline, private]

Definition at line 37 of file FloatParameter.hxx.

References mValue.

{return mValue;}

Friends And Related Function Documentation

friend class ParserCategory [friend]

Definition at line 36 of file FloatParameter.hxx.


Member Data Documentation

Definition at line 39 of file FloatParameter.hxx.

Referenced by FloatParameter(), and value().


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