Yate
MatchingItemString Class Reference

String comparison matching item. More...

#include <yateclass.h>

Inheritance diagram for MatchingItemString:
MatchingItemBase GenObject

Public Member Functions

 MatchingItemString (const char *name, const char *value, bool caseInsensitive=false, bool negated=false)
 
const Stringvalue () const
 
bool caseInsensitive () const
 
virtual bool runMatchString (const String &str, MatchingParams *params=0) const
 
virtual MatchingItemBasecopy () const
 
virtual const MatchingItemStringitemString () const
 
- Public Member Functions inherited from MatchingItemBase
 MatchingItemBase (const char *name, bool negated=false)
 
const Stringname () const
 
bool negated () const
 
bool matchString (const String &str, MatchingParams *params=0) const
 
bool matchListParam (const NamedList &list, MatchingParams *params=0) const
 
virtual bool runMatchListParam (const NamedList &list, MatchingParams *params=0) const
 
virtual const MatchingItemRegexpitemRegexp () const
 
virtual const MatchingItemRandomitemRandom () const
 
virtual const MatchingItemListitemList () const
 
virtual const MatchingItemCustomitemCustom () const
 
virtual Stringdump (String &buf, const MatchingItemDump *dump=0, const String &indent=String::empty(), const String &origIndent=String::empty(), unsigned int depth=0) const
 
virtual StringdumpValue (String &buf, const MatchingItemDump *dump=0, const String &indent=String::empty(), const String &origIndent=String::empty(), unsigned int depth=0) const
 
virtual GenObjectdumpXml (const MatchingItemDump *dump=0, unsigned int depth=0) const
 
virtual const StringtoString () const
 
- Public Member Functions inherited from GenObject
 GenObject ()
 
virtual ~GenObject ()
 
virtual bool alive () const
 
virtual void destruct ()
 
virtual const StringtraceId () const
 
virtual void * getObject (const String &name) const
 
NamedCountergetObjCounter () const
 
NamedCountersetObjCounter (NamedCounter *counter)
 

Additional Inherited Members

- Static Public Member Functions inherited from GenObject
static void * getObject (const String &name, const GenObject *obj)
 
static bool getObjCounting ()
 
static void setObjCounting (bool enable)
 
static NamedCountergetObjCounter (const String &name, bool create=true)
 
static ObjListgetObjCounters ()
 

Detailed Description

String comparison matching item.

Match using a string comparison

Constructor & Destructor Documentation

◆ MatchingItemString()

MatchingItemString ( const char * name,
const char * value,
bool caseInsensitive = false,
bool negated = false )
inline

Constructor

Parameters
nameItem name
valueString to match
caseInsensitiveSet it to true to do a case insensitive match
negatedTrue if matching is negated (return the opposite of match in public methods), false otherwise

Member Function Documentation

◆ caseInsensitive()

bool caseInsensitive ( ) const
inline

Check if this item is using a case insensitive comparison

Returns
True if this item is using a case insensitive comparison

◆ copy()

virtual MatchingItemBase * copy ( ) const
inlinevirtual

Copy this item

Returns
MatchingItemBase pointer

Reimplemented from MatchingItemBase.

◆ itemString()

virtual const MatchingItemString * itemString ( ) const
inlinevirtual

Check if this item is a MatchingItemString one

Returns
MatchingItemString pointer

Reimplemented from MatchingItemBase.

◆ runMatchString()

virtual bool runMatchString ( const String & str,
MatchingParams * params = 0 ) const
inlinevirtual

String match

Parameters
strString to match
paramsOptional parameters used during match
Returns
True if matched, false otherwise

Reimplemented from MatchingItemBase.

◆ value()

const String & value ( ) const
inline

Retrieve the string to match

Returns
String to match

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