RenderMan API  23.0
RixRIB.h
Go to the documentation of this file.
1 /*
2 # ------------------------------------------------------------------------------
3 #
4 # Copyright (c) 1986-2019 Pixar. All rights reserved.
5 #
6 # The information in this file (the "Software") is provided for the exclusive
7 # use of the software licensees of Pixar ("Licensees"). Licensees have the
8 # right to incorporate the Software into other products for use by other
9 # authorized software licensees of Pixar, without fee. Except as expressly
10 # permitted herein, the Software may not be disclosed to third parties, copied
11 # or duplicated in any form, in whole or in part, without the prior written
12 # permission of Pixar.
13 #
14 # The copyright notices in the Software and this entire statement, including the
15 # above license grant, this restriction and the following disclaimer, must be
16 # included in all copies of the Software, in whole or in part, and all permitted
17 # derivative works of the Software, unless such copies or derivative works are
18 # solely in the form of machine-executable object code generated by a source
19 # language processor.
20 #
21 # PIXAR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
22 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL PIXAR BE
23 # LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
24 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
25 # OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
26 # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. IN NO CASE WILL
27 # PIXAR'S TOTAL LIABILITY FOR ALL DAMAGES ARISING OUT OF OR IN CONNECTION WITH
28 # THE USE OR PERFORMANCE OF THIS SOFTWARE EXCEED $50.
29 #
30 # Pixar
31 # 1200 Park Ave
32 # Emeryville CA 94608
33 #
34 # ------------------------------------------------------------------------------
35 */
36 
37 
38 #ifndef RixRIB_h
39 #define RixRIB_h
40 
41 #include "RixInterfaces.h" // for RixInterface
42 #include "ri.h" // for RtBound
43 
44 class Ri;
45 
67 class RixZipSubfile;
68 
69 class RixZipWriter {
70 public:
71 
75  virtual bool
76  BeginSubfile(const char *subfilename, bool compress, bool bufferall,
77  RixZipSubfile **result) = 0;
78 
80  virtual int
81  EndSubfile() = 0;
82 
85  virtual const char*
86  GetError(void) = 0;
87 
88  virtual
90 };
91 
97 public:
98 
100  virtual size_t
101  GetSize(void) = 0;
102 
104  virtual void
105  BeginReading(void) = 0;
106 
108  virtual void
109  Read(void *blk, size_t blocksize) = 0;
110 
112  virtual void
113  EndReading(void) = 0;
114 
116  virtual void
117  Write(const void *blk, size_t blocksize) = 0;
118 
119 
120  virtual
122 };
123 
124 
125 
126 class RixRIB : public RixInterface
127 {
128 public:
130  {
131  enum Format
132  {
136  };
138  {
142  };
144  {
145  k_asIndented = 0x1,
146  k_asWide = 0x2,
147  };
148  Configuration() : format(k_fmtUndef), compression(k_cmpUndef), asciiStyle(0), precision(0), bbox{0,0,0,0,0,0} {}
154  };
155 
159  virtual Ri* CreateRIBGenerator(Ri* parent = 0L, Configuration* config = nullptr) = 0;
160 
162  virtual void DestroyRIBGenerator(Ri*) = 0;
163 
166  virtual RixZipWriter*
167  GetZipWriter(void) = 0;
168 
172  virtual RixZipSubfile*
173  OpenSubfileForRead(const char* path, const char* subfileName) = 0;
174 
177  virtual bool GetBound(const char* archiveName, RtBound bound) = 0;
178 
179 protected:
182 };
183 
184 #endif
virtual bool BeginSubfile(const char *subfilename, bool compress, bool bufferall, RixZipSubfile **result)=0
Compression compression
Definition: RixRIB.h:150
RixRIB()
Constructor is for internal use only.
Definition: RixRIB.h:181
float RtBound[6]
Definition: ri.h:64
virtual int EndSubfile()=0
returns non zero on error
Definition: ri.hpp:46
virtual const char * GetError(void)=0
Definition: RixRIB.h:126
virtual ~RixZipSubfile()
Definition: RixRIB.h:121
virtual ~RixZipWriter()
Definition: RixRIB.h:89