X-Git-Url: http://www.andromeda.nl/gitweb/?a=blobdiff_plain;f=src%2FString.h;fp=src%2FString.h;h=a5eee1a3471be403066d6b395d589858ed98d62d;hb=644da49529f2b634c149839230210fa294a604d6;hp=2fa0127fc5e31a051921f11f8d6275f7ee7bc319;hpb=589f864578ff59a36815af5d897d2d94b9fe5578;p=AXE.git diff --git a/src/String.h b/src/String.h index 2fa0127..a5eee1a 100644 --- a/src/String.h +++ b/src/String.h @@ -5,7 +5,7 @@ *********************** ** FILE NAME : String.h ** SYSTEM NAME : Andromeda X-Windows Encapsulation -** VERSION NUMBER : $Revision: 1.3 $ +** VERSION NUMBER : $Revision: 1.4 $ ** ** DESCRIPTION : Character String class definition ** @@ -23,7 +23,10 @@ /***************************** $Log: String.h,v $ - Revision 1.3 2002-11-03 13:18:57 arjen + Revision 1.4 2007-05-04 13:56:05 arjen + Added a copy contructor to the regex class. This prevents multiple frees in the destructor. + + Revision 1.3 2002/11/03 13:18:57 arjen New functions - String::escape() and String::unescape() Revision 1.2 2002/09/28 06:45:51 arjen @@ -35,7 +38,7 @@ *****************************/ -// static const char RCSID[] = "$Id: String.h,v 1.3 2002-11-03 13:18:57 arjen Exp $"; +// static const char RCSID[] = "$Id: String.h,v 1.4 2007-05-04 13:56:05 arjen Exp $"; #ifndef STRING_H #define STRING_H @@ -46,6 +49,10 @@ #include +// Forward declarations. +class substring; +class regex; + /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ** NAME : String - Character String class. ** MEMBERS : p -> s : Pointer to the actual String data. @@ -72,7 +79,6 @@ **+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ - class String { friend class substring; @@ -359,11 +365,13 @@ class regex friend class String; regex_t expression; + String original; public: regex(const String & reg); regex(const char * reg); + regex(const regex & reg); ~regex(); friend bool operator == (const String &s, const regex &r);