ulxr_file_resource.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                   ulxr_call.h  -  create xml-rpc calling data
00003                              -------------------
00004     begin                : Sun May 1 2005
00005     copyright            : (C) 2002-2007 by Ewald Arnold
00006     email                : ulxmlrpcpp@ewald-arnold.de
00007 
00008     $Id: ulxr_file_resource.h 940 2006-12-30 18:22:05Z ewald-arnold $
00009 
00010  ***************************************************************************/
00011 
00012 /**************************************************************************
00013  *
00014  * This program is free software; you can redistribute it and/or modify
00015  * it under the terms of the GNU Lesser General Public License as
00016  * published by the Free Software Foundation; either version 2 of the License,
00017  * or (at your option) any later version.
00018  *
00019  * This program is distributed in the hope that it will be useful,
00020  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00022  * GNU General Public License for more details.
00023  *
00024  * You should have received a copy of the GNU Lesser General Public License
00025  * along with this program; if not, write to the Free Software
00026  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00027  *
00028  ***************************************************************************/
00029 
00030 #ifndef ULXR_FILE_RESOURCE_H
00031 #define ULXR_FILE_RESOURCE_H
00032 
00033 #include <ulxmlrpcpp/ulxmlrpcpp.h>  // always first header
00034 
00035 #include <ulxmlrpcpp/ulxr_cached_resource.h>
00036 
00037 
00038 namespace ulxr {
00039 
00043 class ULXR_API_DECL0 FileResource : public CachedResource
00044 {
00045   public:
00046 
00052    FileResource(const CppString &res_name, const CppString &file_name, bool do_read = true);
00053 
00056    virtual ~FileResource();
00057 
00060    virtual void open();
00061 
00065    virtual void open(bool do_read);
00066 
00070    virtual void close();
00071 
00077    virtual bool good();
00078 
00081    CppString getFilename() const;
00082 
00087    virtual void clear();
00088 
00091    virtual void reset();
00092 
00093   private:
00094 
00095    CppString  filename;
00096    bool       error;
00097    bool       opened;
00098 };
00099 
00100 
00101 };  // namespace ulxr
00102 
00103 #endif // ULXR_FILE_RESOURCE_H

Generated on Sun Aug 19 20:08:57 2007 for ulxmlrpcpp by  doxygen 1.5.1