RenderManAPI  24.0
RixRIBParser.h
Go to the documentation of this file.
1 /*
2 # ------------------------------------------------------------------------------
3 #
4 # Copyright (c) 2020 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 #ifndef RixRIBParser_h
38 #define RixRIBParser_h
39 
40 #include "RifPlugin.h" // for RifFilter, RifTokenDetail, etc
41 #include "RixInterfaces.h" // for RixInterface
42 #include "ri.h" // for RtToken
43 
93 class RixRIBParser : public RixInterface
94 {
95 public:
97  virtual int Begin(const RifFilter*) = 0;
98 
100  virtual int ParseRIBFile(const char* filename) = 0;
101 
103  virtual int ParseRIBBuffer(const char* buffer) = 0;
104 
106  virtual int End() = 0;
107 
109  virtual int GetDeclaration(
110  RtUString const t,
111  RifTokenType*,
113  int* alen) = 0;
114 
115 protected:
118  virtual ~RixRIBParser() {}
119 };
120 
121 #endif
RifTokenDetail
Definition: RifPlugin.h:109
RixRIBParser()
Constructor,Destuctor are for internal use only.
Definition: RixRIBParser.h:117
virtual int GetDeclaration(RtUString const t, RifTokenType *, RifTokenDetail *, int *alen)=0
A helper method to determine the size of parameter list entries.
virtual int ParseRIBBuffer(const char *buffer)=0
Parse the RIB in memory pointed to by buffer.
Base class for all Rix interfaces.
Definition: RixInterfaces.h:133
virtual ~RixRIBParser()
Definition: RixRIBParser.h:118
virtual int End()=0
Used to destruct the parser state in librix mode.
Definition: RifFilter.h:63
The RixRIBParser interface is used to parse a RIB file.
Definition: RixRIBParser.h:93
virtual int Begin(const RifFilter *)=0
Used to initialize the parser when in librix mode (standalone)
pxrcore::UString RtUString
Definition: RiTypesHelper.h:682
virtual int ParseRIBFile(const char *filename)=0
Parse the RIB within a file given by filename.
RifTokenType
Definition: RifPlugin.h:96