Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members

FXIOSlave.h

Go to the documentation of this file.
00001 /********************************************************************************
00002 *                                                                               *
00003 *                  Base type for various IO protocols                           *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 2003 by Mathew Robertson.   All Rights Reserved.                *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or                 *
00009 * modify it under the terms of the GNU Lesser General Public                    *
00010 * License as published by the Free Software Foundation; either                  *
00011 * version 2.1 of the License, or (at your option) any later version.            *
00012 *                                                                               *
00013 * This library is distributed in the hope that it will be useful,               *
00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of                *
00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU             *
00016 * Lesser General Public License for more details.                               *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public              *
00019 * License along with this library; if not, write to the Free Software           *
00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.    *
00021 *********************************************************************************/
00022 #ifndef FXIOSLAVE_h
00023 #define FXIOSLAVE_h
00024 
00025 #ifndef FXBASEOBJECT_H
00026 #include "FXBaseObject.h"
00027 #endif
00028 namespace FXEX {
00029 
00030 /**
00031  * Base class of generic IO protocol objects
00032  */
00033 class FXAPI FXIOSlave : public FXBaseObject {
00034     FXDECLARE_ABSTRACT(FXIOSlave)
00035 
00036   protected:
00037     FXIOState state;
00038 
00039   protected:
00040     FXIOSlave() : FXBaseObject() {}
00041 
00042   protected:
00043     /// sub-class this
00044     FXIOSlave(FXApp *a,FXObject *tgt=NULL,FXSelector sel=0);
00045 
00046   public:
00047     /// open IO connector
00048     virtual void open()=0;
00049 
00050     /// close IO connector
00051     virtual void close()=0;
00052 
00053     /// get a list
00054     virtual void list()=0;
00055 
00056     /// dtor
00057     virtual ~FXIOSlave();
00058   };
00059 
00060 } // namespace FXEX
00061 #endif // FXIOSLAVE_H