10 #ifndef HBINFILETK_TOOLKIT
11 #define HBINFILETK_TOOLKIT
14 #ifndef HSTREAM_READONLY
16 #ifndef DOXYGEN_SHOULD_SKIP_THIS
18 class Internal_Key_Array {
20 friend class Internal_Pending_Tag;
21 friend class Internal_Segment_Processor;
23 Internal_Key_Array() { m_data = 0; }
24 ~Internal_Key_Array() {
delete [] m_data; }
30 class Internal_Pending_Tag {
32 friend class Internal_Segment_Processor;
38 Internal_Pending_Tag() { m_next = 0; m_array = 0; }
39 ~Internal_Pending_Tag() {
delete m_array; }
41 Internal_Pending_Tag * m_next;
44 Internal_Key_Array * m_array;
48 class Internal_Texture_List {
52 Internal_Texture_List * m_next;
56 bool m_do_write_image;
59 Internal_Texture_List (
char const * name,
char const * image, HC_KEY key = -1);
60 ~Internal_Texture_List();
80 unsigned char m_renumbered_scope;
85 unsigned char m_use_polypolylines;
86 unsigned char m_polylines_already_handled;
87 bool m_geometry_attributes;
91 bool m_look_for_bounds;
97 Internal_Segment_Processor (
ID_Key key = -1,
char const * name = 0);
98 ~Internal_Segment_Processor ();
107 void SetRoot (HC_KEY root) { m_root = root; }
108 HC_KEY GetRoot ()
const {
return m_root; }
113 #endif //HSTREAM_READONLY
139 friend class Internal_Segment_Processor;
149 Internal_Segment_List * m_unnamed_segments;
151 HC_KEY * m_excluded_segments;
152 int m_excluded_count;
154 #ifndef HSTREAM_READONLY
155 Internal_Segment_Processor * m_segment_processor;
156 Internal_Pending_Tag * m_pending_tags;
157 Internal_Texture_List * m_texture_list;
158 bool m_non_segment_revisits;
159 int m_revisit_offset;
161 int m_local_attributes;
163 char * m_prepend_root;
166 void * m_deferred_styles_ptr;
167 void cleanup_deferred_styles();
168 void apply_deferred_styles();
170 bool issorted_revisit(Internal_Revisit_Item *array[],
int count);
171 void qsort_revisit(Internal_Revisit_Item ** first, Internal_Revisit_Item ** last) { qsort_revisit (first, last, 0); }
172 void qsort_revisit(Internal_Revisit_Item **, Internal_Revisit_Item **,
int);
221 TK_Status GenerateBuffer (
char * b,
int s,
int & f,
char const * start_segment = 0);
237 TK_Status GenerateOneItemBuffer (
char * b,
int s,
int & f,
HC_KEY item);
249 unsigned POINTER_SIZED_INT CountObjects (
char const * start_segment = 0);
263 int GetHoopsVersion() {
if (m_hoops_version == 0) validate_hoops_version();
return m_hoops_version; }
279 TK_Status StringToOpcode (
char const *type,
unsigned char *opcode_out);
301 void SetThumbnail (
int format,
int width,
int height,
unsigned char const * data);
314 void AddExcludedSegments (
int count, HC_KEY
const keys[]);
325 bool SegmentIsExcluded (HC_KEY key)
const;
329 void ClearExcludedSegments ();
345 void SetPrependRootSegment(
const char * segment);
358 char const **m_search_strings;
362 void validate_hoops_version();
364 void add_unnamed_segment (HC_KEY key);
366 void read_completed ();
372 unsigned HLONG count_segment_objects (HC_KEY key,
char const * start_segment = 0);
374 virtual void FileDone() {
375 apply_deferred_styles();
381 #endif //HBINFILETK_TOOLKIT
Provides HOOPS/3dGS-specific handling of the TKE_Delete_Object opcode.
Definition: HOpcodeHandler.h:165
Provides HOOPS/3dGS-specific handling of the TKE_Image opcode.
Definition: HOpcodeHandler.h:1313
virtual TK_Status Read(BStreamFileToolkit &tk)=0
Provides HOOPS/3dGS-specific handling of the TKE_Named_Style_Defs.
Definition: HOpcodeHandler.h:1431
virtual TK_Status Interpret(BStreamFileToolkit &tk, ID_Key key, int variant=0)
Provides HOOPS/3dGS-specific handling of the TKE_Reopen_Segment opcodes.
Definition: HOpcodeHandler.h:82
HC_KEY m_key
segment key
Definition: HOpcodeHandler.h:1433
The BBaseOpcodeHandler abstract class is used as a base for derived classes which manage logical piec...
Definition: BOpcodeHandler.h:53
TK_Status
Codes which can be either passed to various toolkit functions, or indicate the result of a toolkit fu...
Definition: BStream.h:254
#define ID_Key
Definition: BStream.h:230
char * m_name
Definition: BOpcodeHandler.h:7930
Provides HOOPS/3dGS-specific handling of the TKE_Open_Segment opcode.
Definition: HOpcodeHandler.h:31
virtual TK_Status Clone(BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const
Definition: BOpcodeHandler.h:205
Provides HOOPS/3dGS-specific handling of the TKE_Texture.
Definition: HOpcodeHandler.h:1339
virtual TK_Status Write(BStreamFileToolkit &tk)=0
Provides HOOPS/3dGS-specific handling of the TKE_Reference opcode.
Definition: HOpcodeHandler.h:118