TF++, Miscellaneous classes and modules in C++:
regexx.h
Go to the documentation of this file.
1 
35 // include guard
36 #ifndef TF_REGEXX_H_VERSION
37 
38 #define TF_REGEXX_H_VERSION \
39  "TF_REGEXX_H V1.0"
40 
41 #include<string>
42 
43 namespace tfxx {
44 
45  namespace string {
46 
47  namespace helper {
48 
54  public:
58  regexxcontainer(const std::string& e);
60  virtual ~regexxcontainer();
62  virtual void expression(const std::string& e) =0;
64  virtual std::string expression() const =0;
66  virtual bool match(const std::string s) =0;
67  }; // class regexxcontainer
68 
69  } // namespace helper
70 
79  class regexx {
80  public:
82  regexx();
84  regexx(const std::string& e);
86  ~regexx();
88  void expression(const std::string& e)
89  { Mcontainer->expression(e); }
91  std::string expression() const
92  { return(Mcontainer->expression()); }
94  bool match(const std::string s)
95  { return(Mcontainer->match(s)); }
96  private:
98  }; // class regexx
99 
100  } // namespace string
101 
102 } // namespace tfxx
103 
104 #endif // TF_REGEXX_H_VERSION (includeguard)
105 
106 /* ----- END OF regexx.h ----- */
bool match(const std::string s)
return true is s matches expression.
Definition: regexx.h:94
void expression(const std::string &e)
set expression to e.
Definition: regexx.h:88
regexx()
create instance.
Definition: regexx.cc:142
virtual bool match(const std::string s)=0
return true is s matches expression.
std::string expression() const
return expression
Definition: regexx.h:91
virtual void expression(const std::string &e)=0
set expression to e.
tfxx::string::helper::regexxcontainer * Mcontainer
Definition: regexx.h:97
~regexx()
remove instance.
Definition: regexx.cc:148
virtual std::string expression() const =0
return expression
virtual ~regexxcontainer()
create instance and set expression to e.
Definition: regexx.cc:61
regexxcontainer()
create instance.
Definition: regexx.cc:57
Namespace containing all code of library libtfxx.