Yate: MatchingItemString Class Reference

Yate

Public Member Functions | List of all members
MatchingItemString Class Reference

String comparison matching item. More...

`#include <yateclass.h>`

Inheritance diagram for MatchingItemString:

## Public Member Functions
| MatchingItemString (const char *name, const char *value, bool caseInsensitive=false, bool negated=false)
const String & | value () const
bool | caseInsensitive () const
virtual bool | runMatchString (const String &str, MatchingParams *params=0) const
virtual MatchingItemBase * | copy () const
virtual const MatchingItemString * | itemString () const
Public Member Functions inherited from MatchingItemBase
| MatchingItemBase (const char *name, bool negated=false)
const String & | name () 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 MatchingItemRegexp * | itemRegexp () const
virtual const MatchingItemRandom * | itemRandom () const
virtual const MatchingItemList * | itemList () const
virtual const MatchingItemCustom * | itemCustom () const
virtual String & | dump (String &buf, const MatchingItemDump *dump=0, const String &indent=String::empty(), const String &origIndent=String::empty(), unsigned int depth=0) const
virtual String & | dumpValue (String &buf, const MatchingItemDump *dump=0, const String &indent=String::empty(), const String &origIndent=String::empty(), unsigned int depth=0) const
virtual GenObject * | dumpXml (const MatchingItemDump *dump=0, unsigned int depth=0) const
virtual const String & | toString () const
Public Member Functions inherited from GenObject
| GenObject ()
virtual | ~GenObject ()
virtual bool | alive () const
virtual void | destruct ()
virtual const String & | traceId () const
virtual void * | getObject (const String &name) const
NamedCounter * | getObjCounter () const
NamedCounter * | setObjCounter (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 NamedCounter * | getObjCounter (const String &name, bool create=true)
static ObjList & | getObjCounters ()

## 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

  name | Item name
  value | String to match
  caseInsensitive | Set it to true to do a case insensitive match
  negated | True if matching is negated (return the opposite of match in public methods), false otherwise

References caseInsensitive(), MatchingItemBase::MatchingItemBase(), MatchingItemBase::name(), MatchingItemBase::negated(), and value().

Referenced by copy(), and itemString().

## 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

Referenced by copy(), and MatchingItemString().

## ◆ copy()

virtual MatchingItemBase * copy | ( |  | ) | const
| inlinevirtual

Copy this item

Returns
  MatchingItemBase pointer

Reimplemented from MatchingItemBase.

References caseInsensitive(), MatchingItemBase::MatchingItemBase(), MatchingItemString(), MatchingItemBase::name(), MatchingItemBase::negated(), and value().

## ◆ itemString()

virtual const MatchingItemString * itemString | ( |  | ) | const
| inlinevirtual

Check if this item is a MatchingItemString one

Returns
  MatchingItemString pointer

Reimplemented from MatchingItemBase.

References MatchingItemString().

## ◆ runMatchString()

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

String match

Parameters

  str | String to match
  params | Optional 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

Referenced by copy(), and MatchingItemString().

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

- yateclass.h