1#if defined(HAVE_CONFIG_H)
13#define RESIPROCATE_SUBSYSTEM Subsystem::SIP
36 mComment(rhs.mComment)
46 mComment = rhs.mComment;
105 pb.
data(mComment, start);
122 if (!mComment.
empty())
124 str <<
"(" << mComment <<
")";
138 return ParameterFactories[type](type, pb, terminators, pool);
158#define defineParam(_enum, _name, _type, _RFC_ref_ignored) \
159_enum##_Param::DType& \
160UInt32Category::param(const _enum##_Param& paramType) \
163 _enum##_Param::Type* p = \
164 static_cast<_enum##_Param::Type*>(getParameterByEnum(paramType.getTypeNum())); \
167 p = new _enum##_Param::Type(paramType.getTypeNum()); \
168 mParameters.push_back(p); \
173const _enum##_Param::DType& \
174UInt32Category::param(const _enum##_Param& paramType) const \
177 _enum##_Param::Type* p = \
178 static_cast<_enum##_Param::Type*>(getParameterByEnum(paramType.getTypeNum())); \
181 InfoLog(<< "Missing parameter " _name " " << ParameterTypes::ParameterNames[paramType.getTypeNum()]); \
182 DebugLog(<< *this); \
183 throw Exception("Missing parameter " _name, __FILE__, __LINE__); \
#define defineParam(_enum, _name, _type, _RFC_ref_ignored)
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
bool empty() const noexcept
Checks whether the Data is empty.
virtual ParameterTypes::Type getTypeNum() const =0
Parameter *(* Factory)(ParameterTypes::Type, ParseBuffer &, const std::bitset< 256 > &terminators, PoolBase *pool)
Provides string-parsing functionality with protection from buffer overflow.
CurrentPosition skipNonWhitespace()
uint32_t uInt32()
dcm! – merge these, ask about length checks
CurrentPosition skipWhitespace()
CurrentPosition skipToChar(char c)
void reset(const char *pos)
CurrentPosition skipChar()
void data(Data &data, const char *start) const
make the passed in data share memory with the buffer (uses Data::Share)
const char * skipToEndQuote(char quote='"')
Base class for all SIP grammar elements that can have parameters.
Parameter * getParameterByEnum(ParameterTypes::Type type) const
ParserCategory & operator=(const ParserCategory &rhs)
void removeParameterByEnum(ParameterTypes::Type type)
void parseParameters(ParseBuffer &pb)
EncodeStream & encodeParameters(EncodeStream &str) const
Encodes parameters as they should appear on the wire.
Represents a numeric-with-comment header field value.
virtual ParserCategory * clone() const
virtual Parameter * createParam(ParameterTypes::Type type, ParseBuffer &pb, const std::bitset< 256 > &terminators, PoolBase *pool)
const Data & comment() const
void remove(const Param< UInt32Category > ¶mType)
UInt32Category & operator=(const UInt32Category &)
const uint32_t & value() const
virtual void parse(ParseBuffer &pb)
virtual EncodeStream & encodeParsed(EncodeStream &str) const
bool exists(const Param< UInt32Category > ¶mType) const
Generically represents unsigned 32-bit integer values conveyed by SIP parameters.
dcm! – add UnusedChecking(_enum) below;