HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_ParmDataItem.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: GU_ParmDataItem.h ( GU Library, C++)
7  *
8  * COMMENTS: Represents geometry data in parameter.
9  */
10 
11 #ifndef __GU_ParmDataItem__
12 #define __GU_ParmDataItem__
13 
14 #include "GU_API.h"
15 #include "GU_DetailHandle.h"
16 #include "GU_Detail.h"
17 #include <PRM/PRM_Parm.h>
18 #include <PRM/PRM_Type.h>
19 
21 {
22 public:
25  : myGdh(gdh) {}
26 
27  ~GU_ParmDataItem() override {}
28 
30  { return PRM_Type::PRM_DATA_GEOMETRY; }
31  const char *getDataTypeToken() const override { return "geometry"; }
32 
33  bool saveAscii(std::ostream &os) const override;
34  bool saveBinary(std::ostream &os) const override;
35 
36  int64 getMemoryUsage() const override
37  {
38  int64 memory = sizeof(this) + myGdh.getMemoryUsage(false);
39  if (myGdh.gdp())
40  memory += myGdh.gdp()->getMemoryUsage(true);
41  return memory;
42  }
43 
44  const GU_ConstDetailHandle &gdh() const { return myGdh; }
45 
46 private:
48 };
49 
50 #endif
virtual bool saveBinary(std::ostream &os) const =0
GU_ParmDataItem(const GU_ConstDetailHandle &gdh)
int64 getMemoryUsage() const override
const char * getDataTypeToken() const override
virtual bool saveAscii(std::ostream &os) const =0
PRM_Type::PRM_DataType getDataType() const override
long long int64
Definition: SYS_Types.h:116
#define GU_API
Definition: GU_API.h:14
~GU_ParmDataItem() override
PRM_DataType
Definition: PRM_Type.h:112
const GU_ConstDetailHandle & gdh() const