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

Represents a CSeq header field value (this doesn't have an official name in the RFC 3261 grammar). More...

#include <CSeqCategory.hxx>

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

List of all members.

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)
CSeqCategoryoperator= (const CSeqCategory &)
MethodTypes & method ()
MethodTypes method () const
DataunknownMethodName ()
const DataunknownMethodName () 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 ParserCategoryclone () const
virtual ParserCategoryclone (void *location) const
virtual ParserCategoryclone (PoolBase *pool) const
virtual EncodeStreamencodeParsed (EncodeStream &str) const

Private Attributes

MethodTypes mMethod
Data mUnknownMethodName
unsigned int mSequence

Detailed Description

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.


Member Enumeration Documentation

anonymous enum
Enumerator:
commaHandling 

Definition at line 21 of file CSeqCategory.hxx.


Constructor & Destructor Documentation

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)
{}

Member Function Documentation

ParserCategory * CSeqCategory::clone ( ) const [virtual]

Implements resip::ParserCategory.

Definition at line 80 of file CSeqCategory.cxx.

References CSeqCategory().

{
   return new CSeqCategory(*this);
}

Here is the call graph for this function:

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);
}

Here is the call graph for this function:

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);
}

Here is the call graph for this function:

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;
}

Here is the call graph for this function:

MethodTypes CSeqCategory::method ( ) const

Definition at line 105 of file CSeqCategory.cxx.

References resip::LazyParser::checkParsed(), and mMethod.

{
   checkParsed(); return mMethod;
}

Here is the call graph for this function:

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);
}

Here is the call graph for this function:

unsigned int & CSeqCategory::sequence ( )

Definition at line 125 of file CSeqCategory.cxx.

References resip::LazyParser::checkParsed(), and mSequence.

{
   checkParsed(); 
   return mSequence;
}

Here is the call graph for this function:

unsigned int CSeqCategory::sequence ( ) const

Definition at line 132 of file CSeqCategory.cxx.

References resip::LazyParser::checkParsed(), and mSequence.

{
   checkParsed(); 
   return mSequence;
}

Here is the call graph for this function:

Data & CSeqCategory::unknownMethodName ( )

Definition at line 111 of file CSeqCategory.cxx.

References resip::LazyParser::checkParsed(), and mUnknownMethodName.

Here is the call graph for this function:

const Data & CSeqCategory::unknownMethodName ( ) const

Definition at line 118 of file CSeqCategory.cxx.

References resip::LazyParser::checkParsed(), and mUnknownMethodName.

Here is the call graph for this function:


Member Data Documentation

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().


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