#include <record.h>
Public Member Functions | |
NameRecord () | |
Default constructor. | |
NameRecord (identifier_type id) | |
Constructor setting the record identifier. | |
virtual bool | operator== (char const *name) const |
Checks whether a name is the same as the record's name. | |
virtual bool | matches (char const *pattern) const |
Checks whether a pattern matches the record's name. | |
virtual char const * | name () const =0 |
Returns the unique name of the record. |
The name() function must be overriden in derived classes. The matches() and operator==() functions may be overriden too.
virtual bool databases::NameRecord::operator== | ( | char const * | name | ) | const [inline, virtual] |
Checks whether the given name is the same as the record's name.
The default implementation returns !strcasecmp(this->name(), name);
[in] | name | The name to check. |
virtual bool databases::NameRecord::matches | ( | char const * | pattern | ) | const [virtual] |
Checks whether the given pattern checks the record's name. Implementation details are left entirely to the implementers.
The default implementation returns misc::match(pattern, name());
[in] | pattern | The pattern. |