src/IplPaws/PawsStringDataSource.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 /***************************************************************************
00003  *
00004  * The IPPL Framework
00005  * 
00006  *
00007  * Visit http://people.web.psi.ch/adelmann/ for more details
00008  *
00009  ***************************************************************************/
00010 
00011 #ifndef PAWS_STRING_DATA_SOURCE_H
00012 #define PAWS_STRING_DATA_SOURCE_H
00013 
00014 /***********************************************************************
00015  * 
00016  * class PawsStringDataSource
00017  *
00018  * PawsStringDataSource is a specific version of DataSourceObject 
00019  * for connecting with a Paws application
00020  *
00021  ***********************************************************************/
00022 
00023 // include files
00024 #include "DataSource/DataSourceObject.h"
00025 
00026 // forward references
00027 template<class T> class StringDataSource;
00028 template<class T> class PawsStringData;
00029 class PawsDataConnect;
00030 
00031 template <class T>
00032 class PawsStringDataSource : public DataSourceObject {
00033 
00034 public:
00035 
00036   // constructor: the name, the connection, the transfer method,
00037   // the string to connect, and the parent node.
00038   PawsStringDataSource(const char *, DataConnect *, int, StringDataSource<T> &);
00039 
00040   // destructor
00041   virtual ~PawsStringDataSource();
00042 
00043   //
00044   // virtual function interface.
00045   //
00046   
00047   // Register an object as something that can be a source of data.
00048   
00049 
00050   // Update the object, that is, make sure the receiver of the data has a
00051   // current and consistent snapshot of the current state.  Return success.
00052   virtual bool update();
00053 
00054   // Indicate to the receiver that we're allowing them time to manipulate the
00055   // data (e.g., for a viz program, to rotate it, change representation, etc.)
00056   // This should only return when the manipulation is done.
00057   virtual void interact(const char * = 0);
00058 
00059 private:
00060   // DataSource Object
00061   StringDataSource<T> &stringDataSource;
00062 
00063   // String
00064   T* myString;
00065 
00066   // Length of string
00067   int stringLen;
00068 
00069   // The Paws string data object used to send/receive data
00070   PawsStringData<T> *pawsdata;
00071 
00072   // The connection object we're using here
00073   PawsDataConnect *pdc;
00074 };
00075 
00076 #include "IpplPaws/PawsStringDataSource.cpp"
00077 
00078 #endif  // PAWS_STRING_DATA_SOURCE_H
00079 
00080 /***************************************************************************
00081  * $RCSfile: PawsStringDataSource.h,v $   $Author: adelmann $
00082  * $Revision: 1.1.1.1 $   $Date: 2003/01/23 07:40:32 $
00083  * IPPL_VERSION_ID: $Id: PawsStringDataSource.h,v 1.1.1.1 2003/01/23 07:40:32 adelmann Exp $ 
00084  ***************************************************************************/

Generated on Mon Jan 16 13:23:49 2006 for IPPL by  doxygen 1.4.6