1#if !defined(RESIP_PARSERCATEGORY_HXX)
2#define RESIP_PARSERCATEGORY_HXX
17#define defineParam(_enum, _name, _type, _RFC_ref_ignored) \
18 const _enum##_Param::DType& param(const _enum##_Param& paramType) const; \
19 _enum##_Param::DType& param(const _enum##_Param& paramType)
23class UnknownParameter;
24class ExtensionParameter;
211 const char*
name() const noexcept
override {
return "ParserCategory::Exception"; }
302 ::operator
delete(p);
308 typedef std::vector<Parameter*, StlPoolAllocator<Parameter*, PoolBase> >
ParameterList;
The abstract base-class for all exceptions thrown by resip code.
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
The base-class for all lazily-parsed SIP grammar elements.
Represents the "name-addr" and the "addr-spec" elements in the RFC 3261 grammar.
virtual ParameterTypes::Type getTypeNum() const =0
Provides string-parsing functionality with protection from buffer overflow.
Exception class used by ParserCategory.
Exception(const Data &msg, const Data &file, const int line)
const char * name() const noexcept override
Base class for all SIP grammar elements that can have parameters.
void removeParameterByData(const Data &data)
void remove(const ParamBase ¶mType)
Removes a natively supported parameter, if the parameter is present.
void clearUnknownParameters()
void setParameter(const Parameter *parameter)
Parameter * getParameterByData(const Data &data) const
Parameter * getParameterByEnum(ParameterTypes::Type type) const
Data commutativeParameterHash() const
ParameterList mUnknownParameters
ParserCategory & operator=(const ParserCategory &rhs)
void removeParameterByEnum(ParameterTypes::Type type)
void parseParameters(ParseBuffer &pb)
bool addParameter(Parameter *param)
virtual ParserCategory * clone(PoolBase *pool) const =0
ParameterList mParameters
virtual Parameter * createParam(ParameterTypes::Type type, ParseBuffer &pb, const std::bitset< 256 > &terminators, PoolBase *pool)
int numKnownParams() const
Returns the number of known (natively supported) parameters.
static const ParameterTypeSet EmptyParameterTypeSet
Headers::Type mHeaderType
EncodeStream & encodeParameters(EncodeStream &str) const
Encodes parameters as they should appear on the wire.
std::vector< Parameter *, StlPoolAllocator< Parameter *, PoolBase > > ParameterList
virtual const Data & errorContext() const
int numUnknownParams() const
Returns the number of unknown parameters.
friend EncodeStream & operator<<(EncodeStream &, const ParserCategory &)
bool exists(const ParamBase ¶mType) const
Checks for the existence of a natively supported parameter.
@ CommasAllowedOutputCommas
@ CommasAllowedOutputMulti
virtual ~ParserCategory()
virtual ParserCategory * clone(void *location) const =0
virtual ParserCategory * clone() const =0
std::set< ParameterTypes::Type > ParameterTypeSet
void removeParametersExcept(const ParameterTypeSet &set=EmptyParameterTypeSet)
Removes all known parameters except those that are specified in set.
void freeParameter(Parameter *p)
const Data & param(const ExtensionParameter ¶m) const
Const accessor for non-natively-supported parameter types.
virtual void deallocate(void *ptr)=0
Generically used to represent any parameter that is not known by the implmentation.
dcm! – add UnusedChecking(_enum) below;
EncodeStream & operator<<(EncodeStream &strm, const BaseException &e)
Replaces STL streams for general encoding purposes.