From 3f3f2e621789c3c65eb10d3ee937c047c5a46857 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 13:04:37 +0000 Subject: Utilisateur : Fcolin Date : 16/06/00 Heure : 10:14 Créé (vss 1) --- Ivy/Regexp.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Ivy/Regexp.h (limited to 'Ivy/Regexp.h') diff --git a/Ivy/Regexp.h b/Ivy/Regexp.h new file mode 100644 index 0000000..22e2699 --- /dev/null +++ b/Ivy/Regexp.h @@ -0,0 +1,44 @@ +#ifndef __REGEXP_H__ +#define __REGEXP_H__ + + +class regexp; + +class Regexp +{ +public: + enum { NSUBEXP = 20 }; + + Regexp(); + Regexp( const char * exp, bool iCase = 0 ); + Regexp( const Regexp &r ); + ~Regexp(); + const Regexp & operator=( const Regexp & r ); + + bool Match( const char * s ); + int SubStrings() const; + + const string operator[]( unsigned int i ) const; + int SubStart( unsigned int i ) const; + int SubLength( unsigned int i ) const; + + string GetReplaceString( const char * source ) const; + + string GetErrorString() const; + bool CompiledOK() const; + +#if defined( _RE_DEBUG ) + void Dump(); +#endif +private: + const char * str; /* used to return substring offsets only */ + mutable string m_szError; + regexp * rc; + + void ClearErrorString() const; + int safeIndex( unsigned int i ) const; + +}; + +#endif + -- cgit v1.1 From 00a296093ba62e3fcabc50a23f864424a8ca5af2 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 13:04:38 +0000 Subject: Utilisateur : Fcolin Date : 23/01/01 Heure : 13:12 Archivé dans $/Ivy Commentaire: remove 'using name space std;' (vss 2) --- Ivy/Regexp.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Ivy/Regexp.h') diff --git a/Ivy/Regexp.h b/Ivy/Regexp.h index 22e2699..3265561 100644 --- a/Ivy/Regexp.h +++ b/Ivy/Regexp.h @@ -18,13 +18,13 @@ public: bool Match( const char * s ); int SubStrings() const; - const string operator[]( unsigned int i ) const; + const String operator[]( unsigned int i ) const; int SubStart( unsigned int i ) const; int SubLength( unsigned int i ) const; - string GetReplaceString( const char * source ) const; + String GetReplaceString( const char * source ) const; - string GetErrorString() const; + String GetErrorString() const; bool CompiledOK() const; #if defined( _RE_DEBUG ) @@ -32,7 +32,7 @@ public: #endif private: const char * str; /* used to return substring offsets only */ - mutable string m_szError; + mutable String m_szError; regexp * rc; void ClearErrorString() const; -- cgit v1.1 From 5cbed4b3ece796dc63e8958342643fc8a3216051 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 13:04:40 +0000 Subject: Utilisateur : Fcolin Date : 31/01/01 Heure : 11:18 Archivé dans $/Ivy (vss 3) --- Ivy/Regexp.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'Ivy/Regexp.h') diff --git a/Ivy/Regexp.h b/Ivy/Regexp.h index 3265561..cf7a748 100644 --- a/Ivy/Regexp.h +++ b/Ivy/Regexp.h @@ -1,6 +1,4 @@ -#ifndef __REGEXP_H__ -#define __REGEXP_H__ - +#pragma once class regexp; @@ -18,13 +16,13 @@ public: bool Match( const char * s ); int SubStrings() const; - const String operator[]( unsigned int i ) const; + const string operator[]( unsigned int i ) const; int SubStart( unsigned int i ) const; int SubLength( unsigned int i ) const; - String GetReplaceString( const char * source ) const; + string GetReplaceString( const char * source ) const; - String GetErrorString() const; + string GetErrorString() const; bool CompiledOK() const; #if defined( _RE_DEBUG ) @@ -32,7 +30,7 @@ public: #endif private: const char * str; /* used to return substring offsets only */ - mutable String m_szError; + mutable string m_szError; regexp * rc; void ClearErrorString() const; @@ -40,5 +38,4 @@ private: }; -#endif -- cgit v1.1 From 910fbcd6d06367da9e53ec628a66e86b11b95fef Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 13:04:42 +0000 Subject: Utilisateur : Fcolin Date : 19/06/02 Heure : 14:05 Archivé dans $/Ivy Commentaire: Modif nb sub expression de 2à a 40 (vss 4) --- Ivy/Regexp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Ivy/Regexp.h') diff --git a/Ivy/Regexp.h b/Ivy/Regexp.h index cf7a748..242d1de 100644 --- a/Ivy/Regexp.h +++ b/Ivy/Regexp.h @@ -5,7 +5,7 @@ class regexp; class Regexp { public: - enum { NSUBEXP = 20 }; + enum { NSUBEXP = 40 }; Regexp(); Regexp( const char * exp, bool iCase = 0 ); -- cgit v1.1 From 3206d022a755ffe703964afe2240146127b3f7a4 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 13:04:44 +0000 Subject: Utilisateur : Fcolin Date : 2/06/05 Heure : 18:42 Archivé dans $/Bus/Ivy Commentaire: Suppression de la STL et ajout d'un namespace pour les datatypes internes Ivy (vss 5) --- Ivy/Regexp.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Ivy/Regexp.h') diff --git a/Ivy/Regexp.h b/Ivy/Regexp.h index 242d1de..3e036d9 100644 --- a/Ivy/Regexp.h +++ b/Ivy/Regexp.h @@ -16,13 +16,13 @@ public: bool Match( const char * s ); int SubStrings() const; - const string operator[]( unsigned int i ) const; + const ivy::string operator[]( unsigned int i ) const; int SubStart( unsigned int i ) const; int SubLength( unsigned int i ) const; - string GetReplaceString( const char * source ) const; + ivy::string GetReplaceString( const char * source ) const; - string GetErrorString() const; + ivy::string GetErrorString() const; bool CompiledOK() const; #if defined( _RE_DEBUG ) @@ -30,7 +30,7 @@ public: #endif private: const char * str; /* used to return substring offsets only */ - mutable string m_szError; + mutable ivy::string m_szError; regexp * rc; void ClearErrorString() const; -- cgit v1.1 From e18ab55cb4a3605cb44f39e829970f7fbd705107 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 13:04:46 +0000 Subject: Utilisateur : Fcolin Date : 23/09/05 Heure : 15:27 Archivé dans $/Bus/Ivy Commentaire: (vss 6) --- Ivy/Regexp.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Ivy/Regexp.h') diff --git a/Ivy/Regexp.h b/Ivy/Regexp.h index 3e036d9..b41d88e 100644 --- a/Ivy/Regexp.h +++ b/Ivy/Regexp.h @@ -16,9 +16,9 @@ public: bool Match( const char * s ); int SubStrings() const; - const ivy::string operator[]( unsigned int i ) const; - int SubStart( unsigned int i ) const; - int SubLength( unsigned int i ) const; + const ivy::string operator[]( size_t i ) const; + size_t SubStart( size_t i ) const; + size_t SubLength( size_t i ) const; ivy::string GetReplaceString( const char * source ) const; @@ -34,7 +34,7 @@ private: regexp * rc; void ClearErrorString() const; - int safeIndex( unsigned int i ) const; + size_t safeIndex( size_t i ) const; }; -- cgit v1.1