00001 /* 00002 * PROPRIETARY INFORMATION. This software is proprietary to 00003 * Side Effects Software Inc., and is not to be reproduced, 00004 * transmitted, or disclosed in any way without written permission. 00005 * 00006 * Produced by: 00007 * Mark Elendt 00008 * Side Effects Software Inc. 00009 * 20 Maud St. 00010 * Toronto, Ontario, M5V 2M5 00011 * Canada 00012 * 416-366-4607 00013 * 00014 * NAME: IMG_TileSocket (C++) 00015 * 00016 * COMMENTS: This class writes to a shared memory buffer for mantra 00017 * It spawns a reader process which reads the tiles. 00018 */ 00019 00020 #ifndef __IMG_TileSocket_H__ 00021 #define __IMG_TileSocket_H__ 00022 00023 #include "IMG_API.h" 00024 #include <UT/UT_SysClone.h> 00025 #include "IMG_TileDevice.h" 00026 #include "IMG_TileInetBuf.h" 00027 00028 class UT_BitArray; 00029 class UT_Signal; 00030 class IMG_TileInetBuf; 00031 class IMG_TileInterface; 00032 00033 class IMG_API IMG_TileSocket : public IMG_TileDevice { 00034 public: 00035 // The command is passed the shared memory key, the size, then the x/y res 00036 IMG_TileSocket( const char *host ); 00037 virtual ~IMG_TileSocket(); 00038 00039 virtual int open(const IMG_TileOptions &finfo, 00040 int xres, int yres, int twidth, int theight, 00041 fpreal aspect); 00042 00043 virtual IMG_DataType getDataType() const; 00044 virtual int writeTile(const void *data, unsigned x0, unsigned x1, 00045 unsigned y0, unsigned y1); 00046 virtual int close(); 00047 00048 private: 00049 void clean(); 00050 00051 char *myHost; 00052 IMG_TileInetBuf *mySock; 00053 IMG_TileInterface *myTiles; 00054 }; 00055 00056 #endif
1.5.9