![]() |
RenderMan
26.0
|
The RixRIBParser interface is used to parse a RIB file. More...
#include <RixRIBParser.h>
Inherits RixInterface.
Public Types | |
enum | Type { k_Float, k_Integer, k_StringV, k_Color, k_Normal, k_Vector, k_Point, k_HPoint, k_MPoint, k_Matrix } |
Public Member Functions | |
virtual int | Begin (const RifFilter *)=0 |
Used to initialize the parser when in librix mode (standalone) More... | |
virtual int | ParseRIBFile (const char *filename)=0 |
Parse the RIB within a file given by filename. More... | |
virtual int | ParseRIBBuffer (const char *buffer)=0 |
Parse the RIB in memory pointed to by buffer. More... | |
virtual int | End ()=0 |
Used to destruct the parser state in librix mode. More... | |
virtual int | GetDeclaration (RtUString const t, RifTokenType *, RifTokenDetail *, int *alen)=0 |
A helper method to determine the size of parameter list entries. More... | |
virtual int | GetVersion () const |
Get the version number of this interface. More... | |
Protected Member Functions | |
RixRIBParser () | |
Constructor,Destuctor are for internal use only. More... | |
virtual | ~RixRIBParser () |
Protected Attributes | |
int | m_version |
Version number of this interface. More... | |
The RixRIBParser interface is used to parse a RIB file.
RIB files can be either binary or ascii, and, optionally, can be located within a .zip file. Caller provides callbacks in the form of a RifFilter and should include the appropriate RifFilter headers as well. Calls to ParseRIBFile can be nested. A code snippet illustrating this class is below:
This example would parse the RIB in the file "hello.rib" and call user-defined filter functions for Sphere, Cone, and ReadArchive.
Brief: This interface can be used in both standalone (librix) mode and from within procedural and Rif plugins. It cannot be used in other render-time contexts, including RixShadingPlugins, subdiv evaluation, and implicit fields. In the standalone mode caller must invoke the Begin() and End() method. In rendertime mode, the caller should not use Begin() / End() because the renderer has already setup the parsing state, thus can only initiate the parsing in the context of the active Rif chain.
In librix mode:
In procedural primitive and Rif plugins:
|
inherited |
|
inlineprotected |
Constructor,Destuctor are for internal use only.
|
inlineprotectedvirtual |
|
pure virtual |
Used to initialize the parser when in librix mode (standalone)
|
pure virtual |
Used to destruct the parser state in librix mode.
|
pure virtual |
A helper method to determine the size of parameter list entries.
|
inlinevirtualinherited |
Get the version number of this interface.
Different interfaces might have different version numbers in a given release.
References RixInterface::m_version.
|
pure virtual |
Parse the RIB in memory pointed to by buffer.
|
pure virtual |
Parse the RIB within a file given by filename.
|
protectedinherited |
Version number of this interface.
Referenced by RixInterface::GetVersion().