|
reSIProcate/stack
9694
|
Represents a numeric-with-comment header field value. More...
#include <UInt32Category.hxx>


Public Types | |
| enum | { commaHandling = NoCommaTokenizing } |
Public Member Functions | |
| UInt32Category () | |
| UInt32Category (const HeaderFieldValue &hfv, Headers::Type type, PoolBase *pool=0) | |
| UInt32Category (const UInt32Category &orig, PoolBase *pool=0) | |
| UInt32Category & | operator= (const UInt32Category &) |
| virtual void | parse (ParseBuffer &pb) |
| virtual EncodeStream & | encodeParsed (EncodeStream &str) const |
| virtual ParserCategory * | clone () const |
| virtual ParserCategory * | clone (void *location) const |
| virtual ParserCategory * | clone (PoolBase *pool) const |
| const UInt32 & | value () const |
| const Data & | comment () const |
| UInt32 & | value () |
| Data & | comment () |
| virtual Parameter * | createParam (ParameterTypes::Type type, ParseBuffer &pb, const std::bitset< 256 > &terminators, PoolBase *pool) |
| bool | exists (const Param< UInt32Category > ¶mType) const |
| void | remove (const Param< UInt32Category > ¶mType) |
| defineParam (duration,"duration", UInt32Parameter,"RFC 3261") | |
Private Attributes | |
| UInt32 | mValue |
| Data | mComment |
Static Private Attributes | |
| static ParameterTypes::Factory | ParameterFactories [ParameterTypes::MAX_PARAMETER] = {0} |
Represents a numeric-with-comment header field value.
Definition at line 17 of file UInt32Category.hxx.
| anonymous enum |
Definition at line 20 of file UInt32Category.hxx.
| UInt32Category::UInt32Category | ( | ) |
Definition at line 18 of file UInt32Category.cxx.
Referenced by clone().
: ParserCategory(), mValue(0), mComment() {}
| UInt32Category::UInt32Category | ( | const HeaderFieldValue & | hfv, |
| Headers::Type | type, | ||
| PoolBase * | pool = 0 |
||
| ) |
Definition at line 24 of file UInt32Category.cxx.
: ParserCategory(hfv, type, pool), mValue(0), mComment() {}
| UInt32Category::UInt32Category | ( | const UInt32Category & | orig, |
| PoolBase * | pool = 0 |
||
| ) |
Definition at line 32 of file UInt32Category.cxx.
: ParserCategory(rhs, pool), mValue(rhs.mValue), mComment(rhs.mComment) {}
| ParserCategory * UInt32Category::clone | ( | ) | const [virtual] |
Implements resip::ParserCategory.
Definition at line 51 of file UInt32Category.cxx.
References UInt32Category().
{
return new UInt32Category(*this);
}

| ParserCategory * UInt32Category::clone | ( | void * | location | ) | const [virtual] |
Implements resip::ParserCategory.
Definition at line 56 of file UInt32Category.cxx.
References UInt32Category().
{
return new (location) UInt32Category(*this);
}

| ParserCategory * UInt32Category::clone | ( | PoolBase * | pool | ) | const [virtual] |
Implements resip::ParserCategory.
Definition at line 62 of file UInt32Category.cxx.
References UInt32Category().
{
return new (pool) UInt32Category(*this, pool);
}

| const Data & UInt32Category::comment | ( | ) | const |
Definition at line 75 of file UInt32Category.cxx.
References resip::LazyParser::checkParsed(), and mComment.
{
checkParsed();
return mComment;
}

| Data & UInt32Category::comment | ( | ) |
Definition at line 89 of file UInt32Category.cxx.
References resip::LazyParser::checkParsed(), and mComment.
{
checkParsed();
return mComment;
}

| Parameter * UInt32Category::createParam | ( | ParameterTypes::Type | type, |
| ParseBuffer & | pb, | ||
| const std::bitset< 256 > & | terminators, | ||
| PoolBase * | pool | ||
| ) | [virtual] |
Reimplemented from resip::ParserCategory.
Definition at line 134 of file UInt32Category.cxx.
References resip::ParameterTypes::MAX_PARAMETER, ParameterFactories, type, and resip::ParameterTypes::UNKNOWN.
{
if(type > ParameterTypes::UNKNOWN && type < ParameterTypes::MAX_PARAMETER && ParameterFactories[type])
{
return ParameterFactories[type](type, pb, terminators, pool);
}
return 0;
}
| resip::UInt32Category::defineParam | ( | duration | , |
| "duration" | , | ||
| UInt32Parameter | , | ||
| "RFC 3261" | |||
| ) |
| EncodeStream & UInt32Category::encodeParsed | ( | EncodeStream & | str | ) | const [virtual] |
Implements resip::LazyParser.
Definition at line 118 of file UInt32Category.cxx.
References resip::Data::empty(), resip::ParserCategory::encodeParameters(), mComment, and mValue.
{
str << mValue;
if (!mComment.empty())
{
str << "(" << mComment << ")";
}
encodeParameters(str);
return str;
}

| bool UInt32Category::exists | ( | const Param< UInt32Category > & | paramType | ) | const |
Definition at line 144 of file UInt32Category.cxx.
References resip::LazyParser::checkParsed(), resip::ParserCategory::getParameterByEnum(), and resip::ParamBase::getTypeNum().
{
checkParsed();
bool ret = getParameterByEnum(paramType.getTypeNum()) != NULL;
return ret;
}

| UInt32Category & UInt32Category::operator= | ( | const UInt32Category & | rhs | ) |
Definition at line 40 of file UInt32Category.cxx.
References mComment, and mValue.
{
if (this != &rhs)
{
ParserCategory::operator=(rhs);
mValue = rhs.mValue;
mComment = rhs.mComment;
}
return *this;
}
| void UInt32Category::parse | ( | ParseBuffer & | pb | ) | [virtual] |
Implements resip::LazyParser.
Definition at line 96 of file UInt32Category.cxx.
References resip::ParseBuffer::data(), resip::ParseBuffer::eof(), mComment, mValue, resip::ParserCategory::parseParameters(), resip::ParseBuffer::reset(), resip::ParseBuffer::skipChar(), resip::ParseBuffer::skipNonWhitespace(), resip::ParseBuffer::skipToChar(), resip::ParseBuffer::skipToEndQuote(), resip::ParseBuffer::skipWhitespace(), and resip::ParseBuffer::uInt32().
{
const char* start = pb.skipWhitespace();
mValue = pb.uInt32();
pb.skipToChar('(');
if (!pb.eof())
{
start = pb.skipChar();
pb.skipToEndQuote(')');
pb.data(mComment, start);
pb.skipChar();
}
else
{
pb.reset(start);
start = pb.skipNonWhitespace();
}
parseParameters(pb);
}

| void UInt32Category::remove | ( | const Param< UInt32Category > & | paramType | ) |
Definition at line 152 of file UInt32Category.cxx.
References resip::LazyParser::checkParsed(), resip::ParamBase::getTypeNum(), and resip::ParserCategory::removeParameterByEnum().
{
checkParsed();
removeParameterByEnum(paramType.getTypeNum());
}

| const UInt32 & UInt32Category::value | ( | ) | const |
Definition at line 68 of file UInt32Category.cxx.
References resip::LazyParser::checkParsed(), and mValue.
{
checkParsed();
return mValue;
}

| UInt32 & UInt32Category::value | ( | ) |
Definition at line 82 of file UInt32Category.cxx.
References resip::LazyParser::checkParsed(), and mValue.
{
checkParsed();
return mValue;
}

Data resip::UInt32Category::mComment [private] |
Definition at line 63 of file UInt32Category.hxx.
Referenced by comment(), encodeParsed(), operator=(), and parse().
UInt32 resip::UInt32Category::mValue [private] |
Definition at line 62 of file UInt32Category.hxx.
Referenced by encodeParsed(), operator=(), parse(), and value().
ParameterTypes::Factory UInt32Category::ParameterFactories = {0} [static, private] |
Definition at line 65 of file UInt32Category.hxx.
Referenced by createParam().
1.7.5.1