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 "IMG_TileDevice.h"
17 #include "IMG_TileInetBuf.h"
18 #include <UT/UT_NonCopyable.h>
19 #include <UT/UT_SysClone.h>
20 
21 class UT_BitArray;
22 class UT_Signal;
23 class IMG_TileInetBuf;
24 class IMG_TileInterface;
25 
27 {
28 public:
29  // The command is passed the shared memory key, the size, then the x/y res
30  IMG_TileSocket( const char *host );
31  ~IMG_TileSocket() override;
32 
34 
35  const char *className() const override;
36  void getDescription(UT_WorkBuffer &wbuf) const override;
37  int open(const IMG_TileOptions &finfo,
38  int xres, int yres, int twidth, int theight,
39  fpreal aspect) override;
40 
41  virtual IMG_DataType getDataType() const;
42  int writeTile(const void *data,
43  unsigned x0, unsigned x1,
44  unsigned y0, unsigned y1) override;
45  int close(bool keep_alive=false) override;
46 
47 private:
48  void clean();
49 
50  char *myHost;
51  IMG_TileInetBuf *mySock;
52 };
53 
54 #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
GLdouble y1
Definition: glad.h:2349
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
virtual int writeTile(const void *data, unsigned x0, unsigned x1, unsigned y0, unsigned y1)=0
fpreal64 fpreal
Definition: SYS_Types.h:277
Definition: format.h:895