HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GA_SharedLoadData.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: GA_SharedLoadData.h (GA Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GA_SharedLoadData__
12 #define __GA_SharedLoadData__
13 
14 #include "GA_API.h"
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 
18 /// Class to hold shared data during the loading process.
19 ///
20 /// Some primitive types store shared data between them. This class is used as
21 /// an interface to retain data during the loading/saving process. It also
22 /// Facilitates the delayed loading of this shared data.
23 ///
24 /// <b>Saving:</b>@n
25 /// When saving, primitives will have a "pre-save" pass. During this pass,
26 /// they can add "shared" data to the GA_SaveMap. The primitive can check to
27 /// see if the data is already stored in the map, if not, it can add a
28 /// GA_SharedLoadData to the map (given a unique key). A single JSON will be
29 /// be saved. Subsequent primitives, should detect that the data is stored so
30 /// that only a single copy of the shared data is saved in the map.
31 ///
32 /// When the primitive saves its local data, it can make reference to the named
33 /// shared data.
34 ///
35 /// <b>Loading:</b>@n
36 /// Dring loading time GA_SharedDataHandles are created to represent
37 /// all the shared data. Primitives then ask the GA_LoadMap for a copy
38 /// of these handles.
39 /// Whenever the primitive needs the data it is requested from the shared data
40 /// handle and returned as a GA_SharedLoadData
42 {
43 public:
45  virtual ~GA_SharedLoadData();
46 
47  /// Returns the key that is used to refer to this shared data
48  virtual UT_StringHolder getSharedDataKey() const = 0;
49 private:
50 };
51 
52 #endif
#define GA_API
Definition: GA_API.h:14