added Sed.hpp and Sed.cpp
This commit is contained in:
parent
6ccadde5cf
commit
3ab1bfff92
50
qse/include/qse/sed/Sed.hpp
Normal file
50
qse/include/qse/sed/Sed.hpp
Normal file
@ -0,0 +1,50 @@
|
||||
/*
|
||||
* $Id: Sed.hpp 127 2009-05-07 13:15:04Z baconevi $
|
||||
*
|
||||
Copyright 2006-2009 Chung, Hyung-Hwan.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef _QSE_SED_SED_HPP_
|
||||
#define _QSE_SED_SED_HPP_
|
||||
|
||||
#include <qse/sed/sed.h>
|
||||
|
||||
/////////////////////////////////
|
||||
QSE_BEGIN_NAMESPACE(QSE)
|
||||
/////////////////////////////////
|
||||
|
||||
/**
|
||||
* The Sed class implements a stream editor.
|
||||
*/
|
||||
class Sed:
|
||||
{
|
||||
public:
|
||||
Sed () throw ();
|
||||
~Sed () throw ();
|
||||
|
||||
int open () throw ();
|
||||
void close () throw ();
|
||||
int compile () throw ();
|
||||
int execute () throw ();
|
||||
|
||||
protected:
|
||||
qse_sed_t* sed;
|
||||
};
|
||||
|
||||
/////////////////////////////////
|
||||
QSE_END_NAMESPACE(QSE)
|
||||
/////////////////////////////////
|
||||
|
||||
#endif
|
51
qse/lib/sed/Sed.cpp
Normal file
51
qse/lib/sed/Sed.cpp
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* $Id: Sed.hpp 127 2009-05-07 13:15:04Z baconevi $
|
||||
*
|
||||
Copyright 2006-2009 Chung, Hyung-Hwan.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#include <qse/sed/Sed.hpp>
|
||||
|
||||
/////////////////////////////////
|
||||
QSE_BEGIN_NAMESPACE(QSE)
|
||||
/////////////////////////////////
|
||||
|
||||
Sed::Sed () throw () : sed (QSE_NULL)
|
||||
{
|
||||
}
|
||||
|
||||
Sed::~Sed () throw ()
|
||||
{
|
||||
close ();
|
||||
}
|
||||
|
||||
int Sed::open () throw()
|
||||
{
|
||||
}
|
||||
|
||||
void Sed::close () throw()
|
||||
{
|
||||
if (sed != QSE_NULL)
|
||||
{
|
||||
qse_sed_close (sed);
|
||||
sed = QSE_NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////
|
||||
QSE_BEGIN_NAMESPACE(QSE)
|
||||
/////////////////////////////////
|
||||
|
@ -8,3 +8,12 @@ libqseutl_la_SOURCES = \
|
||||
tgp.h
|
||||
libqseutl_la_LDFLAGS = -version-info 1:0:0 -no-undefined -L../cmn
|
||||
libqseutl_la_LIBADD = -lqsecmn
|
||||
|
||||
|
||||
if ENABLE_CXX
|
||||
lib_LTLIBRARIES += libqsesed++.la
|
||||
libqsesed___la_SOURCES = Sed.cpp
|
||||
libqsesed___la_LDFLAGS = -L. -L../cmn -L../utl -version-info 1:0:0 -no-undefined
|
||||
libqsesed___la_LIBADD = -lqsesed -lqsecmn -lqseutl
|
||||
endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user