HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GDT_Token.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: GDT Library. (Geo Delta)
7  *
8  * COMMENTS: A Token describes changes to a gdp attribute or position,
9  * on points, primitives or vertices.
10  *
11  */
12 #ifndef __GDT_Token_h__
13 #define __GDT_Token_h__
14 
15 #include "GDT_API.h"
16 #include <SYS/SYS_Types.h>
17 
18 class GEO_Detail;
19 class GDT_TokenList;
20 class GDT_JSON;
21 class UT_IStream;
22 class UT_JSONWriter;
23 class UT_JSONParser;
24 
25 class GA_AIFEditDeltaMap;
26 
27 // This is the base class for all tokens.
29 {
30 public:
31  GDT_Token() {}
32  GDT_Token(const GDT_Token &) {}
33  virtual ~GDT_Token() {}
34  virtual int64 getMemoryUsage(bool inclusive=false) const = 0;
35 
36  // TODO: Should we wrap GA_AIFEditDeltaMap so that we're passing around a
37  // slightly less attribute-related mapping?
38  virtual void applyDeltas(const GDT_TokenList &list,
39  GEO_Detail &gdp,
40  const GA_AIFEditDeltaMap &map,
41  bool inverse=false) const = 0;
42 
43  virtual bool legacyLoad(UT_IStream &is,
44  unsigned int numtotal) = 0;
45 
46  virtual bool save(UT_JSONWriter &w,
47  const GDT_JSON &json) const = 0;
48  virtual bool load(UT_JSONParser &p,
49  const GDT_JSON &json) = 0;
50 };
51 
52 #endif
#define GDT_API
Definition: GDT_API.h:10
JSON reader class which handles parsing of JSON or bJSON files.
Definition: UT_JSONParser.h:87
Class which writes ASCII or binary JSON streams.
Definition: UT_JSONWriter.h:37
virtual ~GDT_Token()
Definition: GDT_Token.h:33
long long int64
Definition: SYS_Types.h:116
GDT_Token(const GDT_Token &)
Definition: GDT_Token.h:32
GLubyte GLubyte GLubyte GLubyte w
Definition: glcorearb.h:857
GDT_Token()
Definition: GDT_Token.h:31
Class for mapping between an index and an attribute data offset.
Definition: GA_AIFEdit.h:48