HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IMG_TileSocket.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: IMG_TileSocket (C++)
7  *
8  * COMMENTS: This class writes to a shared memory buffer for mantra
9  * It spawns a reader process which reads the tiles.
10  */
11 
12 #ifndef __IMG_TileSocket_H__
13 #define __IMG_TileSocket_H__
14 
15 #include "IMG_API.h"
16 #include <UT/UT_SysClone.h>
17 #include "IMG_TileDevice.h"
18 #include "IMG_TileInetBuf.h"
19 
20 class UT_BitArray;
21 class UT_Signal;
22 class IMG_TileInetBuf;
23 class IMG_TileInterface;
24 
26 public:
27  // The command is passed the shared memory key, the size, then the x/y res
28  IMG_TileSocket( const char *host );
29  virtual ~IMG_TileSocket();
30 
31  virtual const char *className() const;
32  virtual void getDescription(UT_WorkBuffer &wbuf) const;
33  virtual int open(const IMG_TileOptions &finfo,
34  int xres, int yres, int twidth, int theight,
35  fpreal aspect);
36 
37  virtual IMG_DataType getDataType() const;
38  virtual int writeTile(const void *data, unsigned x0, unsigned x1,
39  unsigned y0, unsigned y1);
40  virtual int close(bool keep_alive=false);
41 
42 private:
43  void clean();
44 
45  char *myHost;
46  IMG_TileInetBuf *mySock;
47 };
48 
49 #endif
virtual void getDescription(UT_WorkBuffer &wbuf) const
IMG_DataType getDataType(int idx=0) const
#define IMG_API
Definition: IMG_API.h:10
virtual const char * className() const =0
virtual int open(const IMG_TileOptions &info, int xres, int yres, int tile_device, int tile_height, fpreal aspect)=0
Open the device.
IMG_DataType
Definition: IMG_FileTypes.h:17
virtual int close(bool keep_alive=false)=0
GLboolean * data
Definition: glcorearb.h:130
virtual int writeTile(const void *data, unsigned x0, unsigned x1, unsigned y0, unsigned y1)=0
double fpreal
Definition: SYS_Types.h:270