|
reSIProcate/stack
9694
|
Represents a CSeq header field value (this doesn't have an official name in the RFC 3261 grammar). More...
#include <CSeqCategory.hxx>


Public Types | |
| enum | { commaHandling = NoCommaTokenizing } |
Public Member Functions | |
| CSeqCategory () | |
| CSeqCategory (const HeaderFieldValue &hfv, Headers::Type type, PoolBase *pool=0) | |
| CSeqCategory (const CSeqCategory &orig, PoolBase *pool=0) | |
| CSeqCategory & | operator= (const CSeqCategory &) |
| MethodTypes & | method () |
| MethodTypes | method () const |
| Data & | unknownMethodName () |
| const Data & | unknownMethodName () const |
| unsigned int & | sequence () |
| unsigned int | sequence () const |
| bool | operator== (const CSeqCategory &rhs) const |
| bool | operator< (const CSeqCategory &rhs) const |
| virtual void | parse (ParseBuffer &pb) |
| virtual ParserCategory * | clone () const |
| virtual ParserCategory * | clone (void *location) const |
| virtual ParserCategory * | clone (PoolBase *pool) const |
| virtual EncodeStream & | encodeParsed (EncodeStream &str) const |
Private Attributes | |
| MethodTypes | mMethod |
| Data | mUnknownMethodName |
| unsigned int | mSequence |
Represents a CSeq header field value (this doesn't have an official name in the RFC 3261 grammar).
Definition at line 18 of file CSeqCategory.hxx.
| anonymous enum |
Definition at line 21 of file CSeqCategory.hxx.
| CSeqCategory::CSeqCategory | ( | ) |
Definition at line 28 of file CSeqCategory.cxx.
Referenced by clone().
: ParserCategory(), mMethod(UNKNOWN), mUnknownMethodName(getMethodName(UNKNOWN)), mSequence(0) {}
| CSeqCategory::CSeqCategory | ( | const HeaderFieldValue & | hfv, |
| Headers::Type | type, | ||
| PoolBase * | pool = 0 |
||
| ) |
Definition at line 22 of file CSeqCategory.cxx.
: ParserCategory(hfv, type, pool), mMethod(UNKNOWN), mSequence(0) {}
| CSeqCategory::CSeqCategory | ( | const CSeqCategory & | orig, |
| PoolBase * | pool = 0 |
||
| ) |
Definition at line 35 of file CSeqCategory.cxx.
: ParserCategory(rhs, pool), mMethod(rhs.mMethod), mUnknownMethodName(rhs.mUnknownMethodName), mSequence(rhs.mSequence) {}
| ParserCategory * CSeqCategory::clone | ( | ) | const [virtual] |
Implements resip::ParserCategory.
Definition at line 80 of file CSeqCategory.cxx.
References CSeqCategory().
{
return new CSeqCategory(*this);
}

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

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

| EncodeStream & CSeqCategory::encodeParsed | ( | EncodeStream & | str | ) | const [virtual] |
Implements resip::LazyParser.
Definition at line 165 of file CSeqCategory.cxx.
References mMethod, mSequence, mUnknownMethodName, and resip::Symbols::SPACE.
{
str << mSequence
<< Symbols::SPACE
<< (mMethod != UNKNOWN ? getMethodName(mMethod) : mUnknownMethodName);
return str;
}
| MethodTypes & CSeqCategory::method | ( | ) |
Definition at line 98 of file CSeqCategory.cxx.
References resip::LazyParser::checkParsed(), and mMethod.
{
checkParsed();
return mMethod;
}

| MethodTypes CSeqCategory::method | ( | ) | const |
Definition at line 105 of file CSeqCategory.cxx.
References resip::LazyParser::checkParsed(), and mMethod.
{
checkParsed(); return mMethod;
}

| bool CSeqCategory::operator< | ( | const CSeqCategory & | rhs | ) | const |
Definition at line 64 of file CSeqCategory.cxx.
References mSequence, and mUnknownMethodName.
{
if (mUnknownMethodName < rhs.mUnknownMethodName)
{
return true;
}
else if (mUnknownMethodName > rhs.mUnknownMethodName)
{
return false;
}
return mSequence < rhs.mSequence;
}
| CSeqCategory & CSeqCategory::operator= | ( | const CSeqCategory & | rhs | ) |
Definition at line 43 of file CSeqCategory.cxx.
References mMethod, mSequence, and mUnknownMethodName.
{
if (this != &rhs)
{
ParserCategory::operator=(rhs);
mMethod = rhs.mMethod;
mUnknownMethodName = rhs.mUnknownMethodName;
mSequence = rhs.mSequence;
}
return *this;
}
| bool CSeqCategory::operator== | ( | const CSeqCategory & | rhs | ) | const |
Definition at line 56 of file CSeqCategory.cxx.
References mMethod, mSequence, and mUnknownMethodName.
{
return (mMethod == rhs.mMethod &&
(mMethod != UNKNOWN || mUnknownMethodName == rhs.mUnknownMethodName) &&
mSequence == rhs.mSequence);
}
| void CSeqCategory::parse | ( | ParseBuffer & | pb | ) | [virtual] |
Implements resip::LazyParser.
Definition at line 151 of file CSeqCategory.cxx.
References resip::ParseBuffer::data(), mMethod, mSequence, mUnknownMethodName, resip::ParseBuffer::position(), resip::ParseBuffer::skipNonWhitespace(), resip::ParseBuffer::skipWhitespace(), and resip::ParseBuffer::uInt32().
{
pb.skipWhitespace();
mSequence = pb.uInt32();
const char* anchorPtr = pb.skipWhitespace();
pb.skipNonWhitespace(); // .dcm. maybe pass an arg that says throw if you
// don't move
mMethod = getMethodType(anchorPtr, int(pb.position() - anchorPtr));
// for backward compatibility, set the method name even if the method is known
pb.data(mUnknownMethodName, anchorPtr);
}

| unsigned int & CSeqCategory::sequence | ( | ) |
Definition at line 125 of file CSeqCategory.cxx.
References resip::LazyParser::checkParsed(), and mSequence.
{
checkParsed();
return mSequence;
}

| unsigned int CSeqCategory::sequence | ( | ) | const |
Definition at line 132 of file CSeqCategory.cxx.
References resip::LazyParser::checkParsed(), and mSequence.
{
checkParsed();
return mSequence;
}

| Data & CSeqCategory::unknownMethodName | ( | ) |
Definition at line 111 of file CSeqCategory.cxx.
References resip::LazyParser::checkParsed(), and mUnknownMethodName.
{
checkParsed();
return mUnknownMethodName;
}

| const Data & CSeqCategory::unknownMethodName | ( | ) | const |
Definition at line 118 of file CSeqCategory.cxx.
References resip::LazyParser::checkParsed(), and mUnknownMethodName.
{
checkParsed();
return mUnknownMethodName;
}

MethodTypes resip::CSeqCategory::mMethod [private] |
Definition at line 47 of file CSeqCategory.hxx.
Referenced by encodeParsed(), method(), operator=(), operator==(), and parse().
unsigned int resip::CSeqCategory::mSequence [private] |
Definition at line 49 of file CSeqCategory.hxx.
Referenced by encodeParsed(), operator<(), operator=(), operator==(), parse(), and sequence().
Data resip::CSeqCategory::mUnknownMethodName [private] |
Definition at line 48 of file CSeqCategory.hxx.
Referenced by encodeParsed(), operator<(), operator=(), operator==(), parse(), and unknownMethodName().
1.7.5.1