|
reSIProcate/stack
9694
|
Generically represents integer values conveyed by SIP parameters. More...
#include <IntegerParameter.hxx>


Public Types | |
| typedef int | Type |
Public Member Functions | |
| IntegerParameter (ParameterTypes::Type, ParseBuffer &pb, const std::bitset< 256 > &terminators) | |
| IntegerParameter (ParameterTypes::Type type, int value=-666999666) | |
| virtual EncodeStream & | encode (EncodeStream &stream) const |
| virtual Parameter * | clone () const |
Static Public Member Functions | |
| static Parameter * | decode (ParameterTypes::Type type, ParseBuffer &pb, const std::bitset< 256 > &terminators, PoolBase *pool) |
Private Member Functions | |
| Type & | value () |
Private Attributes | |
| int | mValue |
Friends | |
| class | ParserCategory |
| class | Uri |
Generically represents integer values conveyed by SIP parameters.
Definition at line 20 of file IntegerParameter.hxx.
| typedef int resip::IntegerParameter::Type |
Definition at line 23 of file IntegerParameter.hxx.
| IntegerParameter::IntegerParameter | ( | ParameterTypes::Type | type, |
| ParseBuffer & | pb, | ||
| const std::bitset< 256 > & | terminators | ||
| ) |
Definition at line 13 of file IntegerParameter.cxx.
References resip::ParseBuffer::assertNotEof(), resip::Symbols::EQUALS, resip::ParseBuffer::integer(), mValue, resip::ParseBuffer::ParamTerm, resip::ParseBuffer::skipChar(), resip::ParseBuffer::skipToOneOf(), and resip::ParseBuffer::skipWhitespace().
Referenced by clone(), and decode().
: Parameter(type), mValue(0) { pb.skipWhitespace(); pb.skipChar(Symbols::EQUALS[0]); pb.skipWhitespace(); pb.assertNotEof(); // hack to allow expires to have an 2543 style quoted Date if (type == ParameterTypes::expires) { try { mValue = pb.integer(); } catch (ParseException&) { mValue = 3600; pb.skipToOneOf(ParseBuffer::ParamTerm); } if(mValue < 0) { mValue = 3600; } } else { mValue = pb.integer(); } }

| IntegerParameter::IntegerParameter | ( | ParameterTypes::Type | type, |
| int | value = -666999666 |
||
| ) | [explicit] |
| Parameter * IntegerParameter::clone | ( | ) | const [virtual] |
Implements resip::Parameter.
Definition at line 54 of file IntegerParameter.cxx.
References IntegerParameter().
{
return new IntegerParameter(*this);
}

| static Parameter* resip::IntegerParameter::decode | ( | ParameterTypes::Type | type, |
| ParseBuffer & | pb, | ||
| const std::bitset< 256 > & | terminators, | ||
| PoolBase * | pool | ||
| ) | [inline, static] |
Definition at line 28 of file IntegerParameter.hxx.
References IntegerParameter().
{
return new (pool) IntegerParameter(type, pb, terminators);
}

| EncodeStream & IntegerParameter::encode | ( | EncodeStream & | stream | ) | const [virtual] |
Implements resip::Parameter.
Definition at line 60 of file IntegerParameter.cxx.
References resip::Symbols::EQUALS, resip::Parameter::getName(), and mValue.
{
return stream << getName() << Symbols::EQUALS << mValue;
}

| Type& resip::IntegerParameter::value | ( | ) | [inline, private] |
friend class ParserCategory [friend] |
Definition at line 40 of file IntegerParameter.hxx.
friend class Uri [friend] |
Definition at line 41 of file IntegerParameter.hxx.
int resip::IntegerParameter::mValue [private] |
Definition at line 44 of file IntegerParameter.hxx.
Referenced by encode(), IntegerParameter(), and value().
1.7.5.1