databases::NameRecord Class Reference

Database named record class. More...

#include <record.h>

Inheritance diagram for databases::NameRecord:

databases::Record List of all members.

Public Member Functions

 NameRecord ()
 Default constructor.
 NameRecord (identifier_type id)
 Constructor setting the record identifier.
virtual bool operator== (char const *name)
 Checks whether a name is the same as the record's name.
virtual bool matches (char const *pattern)
 Checks whether a pattern matches the record's name.
virtual char const * name () const=0
 Returns the unique name of the record.

Detailed Description

This record class adds a unique name to identify the record as well as methods to compare names to the record.

The name() function must be overriden in derived classes. The matches() and operator==() functions may be overriden too.


Member Function Documentation

virtual bool databases::NameRecord::operator== ( char const *  name  )  [inline, virtual]

Checks whether the given name is the same as the record's name.

The default implementation returns !strcasecmp(this->name(), name);

Parameters:
[in] name The name to check.
Returns:
true if the two names are the same, false otherwise.

virtual bool databases::NameRecord::matches ( char const *  pattern  )  [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());

Parameters:
[in] pattern The pattern.
Returns:
true if the name matches the pattern, false otherwise.


The documentation for this class was generated from the following file:
Generated on Wed Aug 15 00:37:23 2007 for Epona API by  doxygen 1.5.2