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

Generically represents unsigned 32-bit integer values conveyed by SIP parameters. More...

#include <UInt32Parameter.hxx>

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

List of all members.

Public Types

typedef UInt32 Type

Public Member Functions

 UInt32Parameter (ParameterTypes::Type, ParseBuffer &pb, const std::bitset< 256 > &terminators)
 UInt32Parameter (ParameterTypes::Type type, UInt32 value=0)
virtual EncodeStreamencode (EncodeStream &stream) const
virtual Parameterclone () const
Typevalue ()

Static Public Member Functions

static Parameterdecode (ParameterTypes::Type type, ParseBuffer &pb, const std::bitset< 256 > &terminators, PoolBase *pool)

Private Attributes

UInt32 mValue

Detailed Description

Generically represents unsigned 32-bit integer values conveyed by SIP parameters.

Definition at line 22 of file UInt32Parameter.hxx.


Member Typedef Documentation

Definition at line 25 of file UInt32Parameter.hxx.


Constructor & Destructor Documentation

UInt32Parameter::UInt32Parameter ( ParameterTypes::Type  type,
ParseBuffer pb,
const std::bitset< 256 > &  terminators 
)

Definition at line 13 of file UInt32Parameter.cxx.

References resip::ParseBuffer::assertNotEof(), resip::Symbols::EQUALS, mValue, resip::ParseBuffer::ParamTerm, resip::ParseBuffer::skipChar(), resip::ParseBuffer::skipToOneOf(), resip::ParseBuffer::skipWhitespace(), and resip::ParseBuffer::uInt32().

Referenced by clone(), and decode().

   : Parameter(type),
     mValue(0)
{
   pb.skipWhitespace();
   pb.skipChar(Symbols::EQUALS[0]);
   pb.skipWhitespace();
   
   // hack to allow expires to have an 2543 style quoted Date
   if (type == ParameterTypes::expires)
   {
      pb.assertNotEof();
      try
      {
         mValue = pb.uInt32();
      }
      catch (ParseException&)
      {
         mValue = 3600;
         pb.skipToOneOf(ParseBuffer::ParamTerm);
      }
      
   }
   else
   {
      mValue = pb.uInt32();
   }
}

Here is the call graph for this function:

UInt32Parameter::UInt32Parameter ( ParameterTypes::Type  type,
UInt32  value = 0 
) [explicit]

Definition at line 44 of file UInt32Parameter.cxx.


Member Function Documentation

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

Implements resip::Parameter.

Definition at line 50 of file UInt32Parameter.cxx.

References UInt32Parameter().

{
   return new UInt32Parameter(*this);
}

Here is the call graph for this function:

static Parameter* resip::UInt32Parameter::decode ( ParameterTypes::Type  type,
ParseBuffer pb,
const std::bitset< 256 > &  terminators,
PoolBase pool 
) [inline, static]

Definition at line 30 of file UInt32Parameter.hxx.

References UInt32Parameter().

      {
         return new (pool) UInt32Parameter(type, pb, terminators);
      }

Here is the call graph for this function:

EncodeStream & UInt32Parameter::encode ( EncodeStream stream) const [virtual]

Implements resip::Parameter.

Definition at line 56 of file UInt32Parameter.cxx.

References resip::Symbols::EQUALS, resip::Parameter::getName(), and mValue.

{
   return stream << getName() << Symbols::EQUALS << mValue;
}

Here is the call graph for this function:

Type& resip::UInt32Parameter::value ( ) [inline]

Definition at line 41 of file UInt32Parameter.hxx.

References mValue.

{return mValue;}

Member Data Documentation

Definition at line 44 of file UInt32Parameter.hxx.

Referenced by encode(), UInt32Parameter(), and value().


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