Commit 54c87980 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

proceeding

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 2454
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 8fba12de
# this is <Makefile>
# ----------------------------------------------------------------------------
# $Id: Makefile,v 1.29 2006-03-29 09:20:36 tforb Exp $
# $Id: Makefile,v 1.30 2007-12-05 12:20:01 tforb Exp $
#
# Copyright (c) 2002 by Thomas Forbriger (IMG Frankfurt)
#
......@@ -42,6 +42,9 @@
# 24/06/2003 V1.1 disabled blitz part of the code
# 28/03/2006 V1.2 provide a package
# 29/03/2006 V1.3 temporary header install path for package creation
# 05/12/2007 V1.4 migration:
# - provide regexx wrapper class
# - use new environment variables
#
# ============================================================================
#
......@@ -77,11 +80,17 @@ EMPTYPRINT=1
REMCMMNT=remcmmnt
#REMCMMNT=cat
FLAGS=
CXXFLAGS=-fhonor-std -Wall $(FLAGS)
# set switch flag for regexx
ifeq ($(TF_LIBREGEXX),yes)
REGEXXFLAG=-DOLDLIBREGEXX
else
REGEXXFLAG=
endif
FLAGS=$(MYFLAGS)
CXXFLAGS=-fhonor-std -Wall $(FLAGS)
CXXFLAGS=$(FLAGS)
LDFLAGS=-L$(LOCLIBDIR)
CPPFLAGS=-I$(LOCINCLUDEDIR) $(FLAGS)
CPPFLAGS=-I$(LOCINCLUDEDIR) $(FLAGS) $(REGEXXFLAG)
#CPPFLAGS=-I$(LOCINCLUDEDIR) $(FLAGS) -I$(BLITZINCLUDE)
all: install doxydoc
......@@ -155,7 +164,7 @@ install-include: $(INSTHEADER)
#======================================================================
# documentation part
# ------------------
DOXYWWWPATH=$(HOME)/public_html/txt/cxx/libtfxx
DOXYWWWPATH=$(WWWBASEDIR)/libtfxx
.PHONY: doxyclean doxyview doxybriefview doxyfullconf doxybriefconf
doxyclean: ;/bin/rm -rfv docfull/* docbrief/* docfull docbrief
......@@ -176,7 +185,7 @@ doxyfull doxybrief: doxy%: doc%/html/index.html
doxydoc: doxyclean doxybrief doxyfull
doxyfullview doxybriefview: doxy%view: doxy%
mozilla doc$(patsubst doxy%view,%,$@)/html/index.html &
$(TF_BROWSER) doc$(patsubst doxy%view,%,$@)/html/index.html &
doxyview: doxyfullview
#======================================================================
......
/*! \file regexx.cc
* \brief provide regular expression functionality (implementation)
*
* ----------------------------------------------------------------------------
*
* $Id: regexx.cc,v 1.1 2007-12-05 12:20:02 tforb Exp $
* \author Thomas Forbriger
* \date 05/12/2007
*
* provide regular expression functionality (implementation)
*
* Copyright (c) 2007 by Thomas Forbriger (BFO Schiltach)
*
* ----
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* ----
*
* REVISIONS and CHANGES
* - 05/12/2007 V1.0 Thomas Forbriger
*
* ============================================================================
*/
#define TF_REGEXX_CC_VERSION \
"TF_REGEXX_CC V1.0 "
#define TF_REGEXX_CC_CVSID \
"$Id: regexx.cc,v 1.1 2007-12-05 12:20:02 tforb Exp $"
#include <regexx.h>
namespace tf {
}
/* ----- END OF regexx.cc ----- */
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: regexx.h,v 1.2 2007-12-05 12:05:26 tforb Exp $
* $Id: regexx.h,v 1.3 2007-12-05 12:20:02 tforb Exp $
* \author Thomas Forbriger
* \date 05/12/2007
*
......@@ -39,7 +39,7 @@
#define TF_REGEXX_H_VERSION \
"TF_REGEXX_H V1.0"
#define TF_REGEXX_H_CVSID \
"$Id: regexx.h,v 1.2 2007-12-05 12:05:26 tforb Exp $"
"$Id: regexx.h,v 1.3 2007-12-05 12:20:02 tforb Exp $"
#include<string>
......@@ -47,6 +47,29 @@ namespace tfxx {
namespace string {
namespace helper {
/*! we need a helper class to hide the internals.
*
* delegate everything to the container class.
*/
class regexxcontainer {
//! create instance.
regexx();
//! create instance and set expression to \c e.
regexx(const std::string& e);
//! create instance and set expression to \c e.
virtual ~regexx();
//! set expression to \c e.
virtual void expression(const std::string& e);
//! return expression
virtual std::string expression() const;
//! return true is \c s matches expression.
virtual bool match(const std::string s);
}; // class regexxcontainer
} // namespace helper
/*! interface to regular expression functionality.
*
* This class provides an interface either to libregexx or libboost_regex,
......@@ -56,16 +79,22 @@ namespace tfxx {
* the match function you can check strings against the expression.
*/
class regexx {
//! create instance.
regexx();
//! create instance and set expression to \c e.
regexx(const std::string& e);
//! set expression to \c e.
void expression(const std::string& e);
//! return expression
std::string expression() const;
//! return true is \c s matches expression.
bool match(const std::string s);
public:
//! create instance.
regexx();
//! create instance and set expression to \c e.
regexx(const std::string& e);
//! set expression to \c e.
void expression(const std::string& e)
{ Mcontainer->expression(e); }
//! return expression
std::string expression() const
{ return(Mcontainer->expression()); }
//! return true is \c s matches expression.
bool match(const std::string s)
{ return(Mcontainer->match(s)); }
private:
tfxx::string::helper::regexxcontainer* Mcontainer;
}; // class regexx
} // namespace string
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment