NAME

OTC_Pattern - Abstract base class for patterns which will be matched against strings.

SYNOPSIS


#include <OTC/text/pattern.hh>

class OTC_Pattern
{
  public:
    virtual ~OTC_Pattern();
    OTC_Pattern(char const* thePattern);
    inline char const* pattern() const;
    virtual OTC_Boolean match(char const* theString) = 0;
    virtual u_int start() const = 0;
    virtual u_int length() const = 0;
    OTC_Range range() const;
    virtual OTC_Boolean isValid() const = 0;
};

CLASS TYPE

Abstract

DESCRIPTION

This class is used as the base class for various pattern matching methods. This allows certain matching routines to be simply expressed in terms of a pattern and not a specific type of pattern.

INITIALISATION

OTC_Pattern(char const* thePattern);

QEURY

inline char const* pattern() const;

PATTERN OPERATIONS

virtual OTC_Boolean match(char const* theString) = 0;
virtual u_int start() const = 0;
virtual u_int length() const = 0;
OTC_Range range() const;
virtual OTC_Boolean isValid() const = 0;

LIBRARY

OTC

AUTHOR(S)

Graham Dumpleton

COPYRIGHT

Copyright 1991 OTC LIMITED
Copyright 1994 DUMPLETON SOFTWARE CONSULTING PTY LIMITED