CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
TrVisIdMap.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, Open Design Alliance (the "Alliance").
3// All rights reserved.
4//
5// This software and its documentation and related materials are owned by
6// the Alliance. The software may only be incorporated into application
7// programs owned by members of the Alliance, subject to a signed
8// Membership Agreement and Supplemental Software License Agreement with the
9// Alliance. The structure and organization of this software are the valuable
10// trade secrets of the Alliance and its suppliers. The software is also
11// protected by copyright law and international treaty provisions. Application
12// programs incorporating this software must include the following statement
13// with their copyright notices:
14//
15// This application incorporates Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 by Open Design Alliance.
18// All rights reserved.
19//
20// By use of this software, its documentation or related materials, you
21// acknowledge and accept the above terms.
23// GLES2 Id mapping
24
25#ifndef ODTRVISREGENTRY
26#define ODTRVISREGENTRY
27
28#include "TD_PackPush.h"
29
30#include "TrVisRendition.h"
31
32class OdGsFiler;
33
38{
39 public:
40 static const OdChar* getClassName();
41 static void attachToFiler(OdGsFiler *pFiler);
43 static void detachFromFiler(OdGsFiler *pFiler);
44
45 // Id Maps accessors
46
47 virtual void add(OdTrVisRendition::DataType type, OdTrVisId nPrev, OdTrVisId nNew) = 0;
49
51 virtual void clear() = 0;
52
53 virtual OdTrVisId get(OdTrVisRendition::DataType type, OdTrVisId nPrev, bool *bRes = NULL) const = 0;
54 virtual bool get(OdTrVisRendition::DataType type, OdTrVisId nPrev, OdTrVisId &nNew) const = 0;
55
56 virtual OdTrVisId longSearch(OdTrVisRendition::DataType type, OdTrVisId nNew, bool *bRes = NULL) const = 0;
57 virtual bool longSearch(OdTrVisRendition::DataType type, OdTrVisId nNew, OdTrVisId &nPrev) const = 0;
58
60 virtual const void *getEntry(OdTrVisRendition::DataType type, const void *pIndex, OdTrVisId &nPrev, OdTrVisId &nNew) const = 0;
61
62 // Resource data accessors
63
65 {
66 public:
67 virtual bool getResourceData(OdTrVisId resourceId, void *pDataStorage) = 0;
68 };
69
72
74 virtual void clearDataAccessors() = 0;
75
77 virtual void clearAll() = 0;
78
80 virtual bool dataAccess(OdTrVisRendition::DataType type, OdTrVisId resourceId, void *pDataStorage) const = 0;
81
82 // Texture data accessor
83
85 {
86 public:
88 {
89 return getResourceData(textureId, &pDef);
90 }
91 };
92
94 {
96 }
98 {
99 return dataAccess(OdTrVisRendition::kTextureData, textureId, &pDef);
100 }
101};
102
103// OdGsFiler helpers
104// for OdTrVisRendition::ClientSettings
107// for OdTrVisSurfaceDef
111// for OdTrVisViewParamsDef
115// for OdTrVisViewportDef
119// for OdTrVisViewportLineStyleDef
123// for OdTrVisViewportFadingDef
127// for OdTrVisViewportLineweightsDef
131// for OdTrVisViewportShadingDef
135// for OdTrVisViewportClipDef
139// for OdTrVisViewportData
143// for OdTrVisLightDef
145bool odTrVisLoadLightDef(OdGsFiler *pFiler, OdTrVisLightDef &pDef, OdTrVisIdMap *pIdMap = NULL);
147// for OdTrVisFlatMetafileContainer
149bool odTrVisLoadRawMetafileData(OdGsFiler *pFiler, OdTrVisFlatMetafileContainerPtr &pMf, OdTrVisIdMap *pIdMap = NULL, bool bDisplayId = false);
151// for OdTrVisMetafileContainer
153bool odTrVisLoadMetafileData(OdGsFiler *pFiler, OdTrVisMetafileContainerPtr &pMf, OdTrVisIdMap *pIdMap = NULL, bool bDisplayId = false);
155// for OdTrVisMetafileDef
157bool odTrVisLoadMetafileDef(OdGsFiler *pFiler, OdTrVisMetafileDef &pDef, OdTrVisIdMap *pIdMap = NULL, bool bDisplayId = false);
158void odTrVisLoadPostprocessMetafileDef(OdTrVisMetafileDef &pDef, OdTrVisIdMap *pIdMap, bool bDisplayId = false);
159// for OdTrVisStateBranchDef
163// for OdTrVisTextureDef
169// for OdTrVisMaterialDef
173// for OdTrVisVisualStyle
176// for OdTrVisLayerProps
179// for OdTrVisLayerDef
181bool odTrVisLoadLayerDef(OdGsFiler *pFiler, OdTrVisLayerDef &pDef, OdTrVisIdMap *pIdMap = NULL);
183// for OdTrVisExtentsDef
186
187#include "TD_PackPop.h"
188
189#endif // ODTRVISREGENTRY
unsigned int OdUInt32
wchar_t OdChar
bool odTrVisSaveStateBranchDef(OdGsFiler *pFiler, const OdTrVisStateBranchDef &pDef)
bool odTrVisLoadMetafileDef(OdGsFiler *pFiler, OdTrVisMetafileDef &pDef, OdTrVisIdMap *pIdMap=NULL, bool bDisplayId=false)
bool odTrVisSaveRawMetafileData(OdGsFiler *pFiler, const OdTrVisFlatMetafileContainer *pMf)
bool odTrVisLoadViewportLineStyleDef(OdGsFiler *pFiler, OdTrVisViewportLineStyleDef &pDef, OdTrVisIdMap *pIdMap=NULL)
bool odTrVisSaveViewportDef(OdGsFiler *pFiler, const OdTrVisViewportDef &pDef)
bool odTrVisSaveMaterialDef(OdGsFiler *pFiler, const OdTrVisMaterialDef &pDef)
void odTrVisLoadPostprocessRawMetafileData(OdTrVisFlatMetafileContainer *pMf, OdTrVisIdMap *pIdMap, bool bDisplayId=false)
bool odTrVisLoadTextureDef(OdGsFiler *pFiler, OdTrVisTextureDef &pDef, OdTrVisIdMap *pIdMap=NULL)
bool odTrVisLoadViewportData(OdGsFiler *pFiler, OdTrVisViewportData &pDef, OdTrVisIdMap *pIdMap=NULL)
bool odTrVisSaveTexturePtr(OdGsFiler *pFiler, const OdTrVisTexture *tex)
void odTrVisLoadPostprocessViewportClipDef(OdTrVisViewportClipDef &pDef, OdTrVisIdMap *pIdMap)
bool odTrVisLoadLayerDefProps(OdGsFiler *pFiler, OdTrVisLayerProps &pProps)
void odTrVisLoadPostprocessLightDef(OdTrVisLightDef &pDef, OdTrVisIdMap *pIdMap)
void odTrVisLoadPostprocessMetafileData(OdTrVisMetafileContainer *pMf, OdTrVisIdMap *pIdMap, bool bDisplayId=false)
void odTrVisLoadPostprocessSurfaceDef(OdTrVisSurfaceDef &pDef, OdTrVisIdMap *pIdMap)
void odTrVisLoadPostprocessViewportFadingDef(OdTrVisViewportFadingDef &pDef, OdTrVisIdMap *pIdMap)
void odTrVisLoadPostprocessViewportDef(OdTrVisViewportDef &pDef, OdTrVisIdMap *pIdMap)
bool odTrVisSaveLayerDef(OdGsFiler *pFiler, const OdTrVisLayerDef &pDef)
bool odTrVisSaveViewportLineweightsDef(OdGsFiler *pFiler, const OdTrVisViewportLineweightsDef &pDef)
bool odTrVisSaveViewportClipDef(OdGsFiler *pFiler, const OdTrVisViewportClipDef &pDef)
void odTrVisLoadPostprocessViewportLineStyleDef(OdTrVisViewportLineStyleDef &pDef, OdTrVisIdMap *pIdMap)
bool odTrVisSaveMetafileDef(OdGsFiler *pFiler, const OdTrVisMetafileDef &pDef)
bool odTrVisLoadLightDef(OdGsFiler *pFiler, OdTrVisLightDef &pDef, OdTrVisIdMap *pIdMap=NULL)
void odTrVisLoadPostprocessMaterialDef(OdTrVisMaterialDef &pDef, OdTrVisIdMap *pIdMap)
bool odTrVisLoadSurfaceDef(OdGsFiler *pFiler, OdTrVisSurfaceDef &pDef, OdTrVisIdMap *pIdMap=NULL)
bool odTrVisSaveLightDef(OdGsFiler *pFiler, const OdTrVisLightDef &pDef)
bool odTrVisLoadViewportDef(OdGsFiler *pFiler, OdTrVisViewportDef &pDef, OdTrVisIdMap *pIdMap=NULL)
void odTrVisLoadPostprocessViewParamsDef(OdTrVisViewParamsDef &pDef, OdTrVisIdMap *pIdMap)
void odTrVisSaveLayerDefProps(OdGsFiler *pFiler, const OdTrVisLayerProps &pProps)
bool odTrVisLoadLayerDef(OdGsFiler *pFiler, OdTrVisLayerDef &pDef, OdTrVisIdMap *pIdMap=NULL)
void odTrVisLoadPostprocessLayerDef(OdTrVisLayerDef &pDef, OdTrVisIdMap *pIdMap)
bool odTrVisLoadExtentsDef(OdGsFiler *pFiler, OdTrVisExtentsDef &pDef)
void odTrVisLoadPostprocessStateBranchDef(OdTrVisStateBranchDef &pDef, OdTrVisIdMap *pIdMap)
bool odTrVisLoadViewportLineweightsDef(OdGsFiler *pFiler, OdTrVisViewportLineweightsDef &pDef, OdTrVisIdMap *pIdMap=NULL)
OdTrVisTexturePtr odTrVisLoadTexturePtr(OdGsFiler *pFiler)
bool odTrVisLoadMaterialDef(OdGsFiler *pFiler, OdTrVisMaterialDef &pDef, OdTrVisIdMap *pIdMap=NULL)
void odTrVisLoadPostprocessViewportShadingDef(OdTrVisViewportShadingDef &pDef, OdTrVisIdMap *pIdMap)
bool odTrVisSaveViewportFadingDef(OdGsFiler *pFiler, const OdTrVisViewportFadingDef &pDef)
bool odTrVisLoadViewportFadingDef(OdGsFiler *pFiler, OdTrVisViewportFadingDef &pDef, OdTrVisIdMap *pIdMap=NULL)
void odTrVisLoadPostprocessViewportLineweightsDef(OdTrVisViewportLineweightsDef &pDef, OdTrVisIdMap *pIdMap)
bool odTrVisLoadRawMetafileData(OdGsFiler *pFiler, OdTrVisFlatMetafileContainerPtr &pMf, OdTrVisIdMap *pIdMap=NULL, bool bDisplayId=false)
void odTrVisLoadPostprocessMetafileDef(OdTrVisMetafileDef &pDef, OdTrVisIdMap *pIdMap, bool bDisplayId=false)
bool odTrVisSaveMetafileData(OdGsFiler *pFiler, const OdTrVisMetafileContainer *pMf)
bool odTrVisSaveViewParamsDef(OdGsFiler *pFiler, const OdTrVisViewParamsDef &pDef)
bool odTrVisLoadViewportShadingDef(OdGsFiler *pFiler, OdTrVisViewportShadingDef &pDef, OdTrVisIdMap *pIdMap=NULL)
bool odTrVisSaveViewportShadingDef(OdGsFiler *pFiler, const OdTrVisViewportShadingDef &pDef)
bool odTrVisSaveClientSettings(OdGsFiler *pFiler, const OdTrVisRendition::ClientSettings &cliSets)
bool odTrVisLoadVisualStyle(OdGsFiler *pFiler, OdTrVisVisualStyle &pVS)
bool odTrVisSaveTextureDef(OdGsFiler *pFiler, const OdTrVisTextureDef &pDef)
bool odTrVisLoadViewParamsDef(OdGsFiler *pFiler, OdTrVisViewParamsDef &pDef, OdTrVisIdMap *pIdMap=NULL)
bool odTrVisLoadViewportClipDef(OdGsFiler *pFiler, OdTrVisViewportClipDef &pDef, OdTrVisIdMap *pIdMap=NULL)
bool odTrVisSaveViewportData(OdGsFiler *pFiler, const OdTrVisViewportData &pDef)
bool odTrVisSaveViewportLineStyleDef(OdGsFiler *pFiler, const OdTrVisViewportLineStyleDef &pDef)
void odTrVisLoadPostprocessTextureDef(OdTrVisTextureDef &pDef, OdTrVisIdMap *pIdMap)
bool odTrVisLoadMetafileData(OdGsFiler *pFiler, OdTrVisMetafileContainerPtr &pMf, OdTrVisIdMap *pIdMap=NULL, bool bDisplayId=false)
bool odTrVisSaveSurfaceDef(OdGsFiler *pFiler, const OdTrVisSurfaceDef &pDef)
bool odTrVisLoadStateBranchDef(OdGsFiler *pFiler, OdTrVisStateBranchDef &pDef, OdTrVisIdMap *pIdMap=NULL)
bool odTrVisSaveExtentsDef(OdGsFiler *pFiler, const OdTrVisExtentsDef &pDef)
bool odTrVisLoadClientSettings(OdGsFiler *pFiler, OdTrVisRendition::ClientSettings &cliSets)
bool odTrVisSaveVisualStyle(OdGsFiler *pFiler, const OdTrVisVisualStyle &pVS)
void odTrVisLoadPostprocessViewportData(OdTrVisViewportData &pDef, OdTrVisIdMap *pIdMap)
virtual bool getResourceData(OdTrVisId resourceId, void *pDataStorage)=0
bool getTextureData(OdTrVisTextureId textureId, OdTrVisTextureDef &pDef)
Definition: TrVisIdMap.h:87
virtual OdTrVisId get(OdTrVisRendition::DataType type, OdTrVisId nPrev, bool *bRes=NULL) const =0
virtual bool dataAccess(OdTrVisRendition::DataType type, OdTrVisId resourceId, void *pDataStorage) const =0
virtual const void * getEntry(OdTrVisRendition::DataType type, const void *pIndex, OdTrVisId &nPrev, OdTrVisId &nNew) const =0
static void detachFromFiler(OdGsFiler *pFiler)
virtual void clearDataAccessors()=0
virtual void clearDataAccessors(OdTrVisRendition::DataType type)=0
static OdTrVisIdMap * getFromFiler(OdGsFiler *pFiler)
virtual void add(OdTrVisRendition::DataType type, OdTrVisId nPrev, OdTrVisId nNew)=0
virtual OdTrVisId longSearch(OdTrVisRendition::DataType type, OdTrVisId nNew, bool *bRes=NULL) const =0
virtual bool longSearch(OdTrVisRendition::DataType type, OdTrVisId nNew, OdTrVisId &nPrev) const =0
virtual void kill(OdTrVisRendition::DataType type, OdTrVisId nPrev)=0
virtual void addDataAccessor(OdTrVisRendition::DataType type, OdTrVisId resourceId, ResourceDataAccessor *pAccessor)=0
virtual ResourceDataAccessor * getDataAccessor(OdTrVisRendition::DataType type, OdTrVisId resourceId) const =0
TextureDataAccessor * getTextureDataAccessor(OdTrVisTextureId textureId) const
Definition: TrVisIdMap.h:93
virtual void killDataAccessor(OdTrVisRendition::DataType type, OdTrVisId resourceId)=0
virtual void clearAll(OdTrVisRendition::DataType type)=0
static const OdChar * getClassName()
static void attachToFiler(OdGsFiler *pFiler)
virtual void clear(OdTrVisRendition::DataType type)=0
bool textureDataAccess(OdTrVisTextureId textureId, OdTrVisTextureDef &pDef)
Definition: TrVisIdMap.h:97
virtual OdUInt32 numEntries(OdTrVisRendition::DataType type) const =0
virtual void clear()=0
virtual bool get(OdTrVisRendition::DataType type, OdTrVisId nPrev, OdTrVisId &nNew) const =0
virtual void clearAll()=0
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274