1 /*  NAME:
2         QD3DSet.c
3 
4     DESCRIPTION:
5         Entry point for Quesa API calls. Performs parameter checking and
6         then forwards each API call to the equivalent E3xxxxx routine.
7 
8     COPYRIGHT:
9         Copyright (c) 1999-2005, Quesa Developers. All rights reserved.
10 
11         For the current release of Quesa, please see:
12 
13             <http://www.quesa.org/>
14 
15         Redistribution and use in source and binary forms, with or without
16         modification, are permitted provided that the following conditions
17         are met:
18 
19             o Redistributions of source code must retain the above copyright
20               notice, this list of conditions and the following disclaimer.
21 
22             o Redistributions in binary form must reproduce the above
23               copyright notice, this list of conditions and the following
24               disclaimer in the documentation and/or other materials provided
25               with the distribution.
26 
27             o Neither the name of Quesa nor the names of its contributors
28               may be used to endorse or promote products derived from this
29               software without specific prior written permission.
30 
31         THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32         "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33         LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
34         A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35         OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
36         SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
37         TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
38         PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
39         LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
40         NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
41         SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42     ___________________________________________________________________________
43 */
44 //=============================================================================
45 //      Include files
46 //-----------------------------------------------------------------------------
47 #include "E3Prefix.h"
48 #include "E3Set.h"
49 #include "E3View.h"
50 
51 
52 
53 
54 
55 //=============================================================================
56 //      Internal constants
57 //-----------------------------------------------------------------------------
58 // Internal constants go here
59 
60 
61 
62 
63 
64 //=============================================================================
65 //      Internal types
66 //-----------------------------------------------------------------------------
67 // Internal types go here
68 
69 
70 
71 
72 
73 //=============================================================================
74 //      Internal macros
75 //-----------------------------------------------------------------------------
76 // Internal macros go here
77 
78 
79 
80 
81 
82 //=============================================================================
83 //      Public functions
84 //-----------------------------------------------------------------------------
85 //      Q3Set_New : Quesa API entry point.
86 //-----------------------------------------------------------------------------
87 #pragma mark -
88 TQ3SetObject
Q3Set_New(void)89 Q3Set_New(void)
90 {
91 
92 
93 	// Call the bottleneck
94 	E3System_Bottleneck();
95 
96 
97 
98 	// Call our implementation
99 	return(E3Set_New());
100 }
101 
102 
103 
104 
105 
106 //=============================================================================
107 //      Q3Set_GetType : Quesa API entry point.
108 //-----------------------------------------------------------------------------
109 TQ3ObjectType
Q3Set_GetType(TQ3SetObject theSet)110 Q3Set_GetType(TQ3SetObject theSet)
111 {
112 
113 
114 	// Release build checks
115 	Q3_REQUIRE_OR_RESULT( E3Set::IsOfMyClass ( theSet ), kQ3ObjectTypeInvalid);
116 
117 
118 
119 	// Debug build checks
120 #if Q3_DEBUG
121 	if (0) // Further checks on theSet
122 		return(kQ3ObjectTypeInvalid);
123 #endif
124 
125 
126 
127 	// Call the bottleneck
128 	E3System_Bottleneck();
129 
130 
131 
132 	// Call our implementation
133 	return ( (E3Set*) theSet )->GetType () ;
134 }
135 
136 
137 
138 
139 
140 //=============================================================================
141 //      Q3Set_Add : Quesa API entry point.
142 //-----------------------------------------------------------------------------
143 TQ3Status
Q3Set_Add(TQ3SetObject theSet,TQ3ElementType theType,const void * data)144 Q3Set_Add(TQ3SetObject theSet, TQ3ElementType theType, const void *data)
145 {
146 
147 
148 	// Release build checks
149 	Q3_REQUIRE_OR_RESULT( E3Set::IsOfMyClass ( theSet ), kQ3Failure);
150 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(data), kQ3Failure);
151 	Q3_REQUIRE_OR_RESULT( E3ClassTree::GetClass ( E3Attribute_AttributeToClassType ( theType ) )->IsType (
152 		kQ3ObjectTypeElement ), kQ3Failure ) ;
153 
154 
155 
156 	// Debug build checks
157 #if Q3_DEBUG
158 	if (0) // Further checks on theSet
159 		return(kQ3Failure);
160 
161 	if (0) // Further checks on theType
162 		return(kQ3Failure);
163 
164 	if (0) // Further checks on data
165 		return(kQ3Failure);
166 #endif
167 
168 
169 
170 	// Call the bottleneck
171 	E3System_Bottleneck();
172 
173 
174 
175 	// Call our implementation
176 	return ( (E3Set*) theSet )->Add ( theType, data ) ;
177 }
178 
179 
180 
181 
182 
183 //=============================================================================
184 //      Q3Set_Get : Quesa API entry point.
185 //-----------------------------------------------------------------------------
186 TQ3Status
Q3Set_Get(TQ3SetObject theSet,TQ3ElementType theType,void * data)187 Q3Set_Get(TQ3SetObject theSet, TQ3ElementType theType, void *data)
188 {
189 
190 
191 	// Release build checks
192 	Q3_REQUIRE_OR_RESULT( E3Set::IsOfMyClass ( theSet ), kQ3Failure);
193 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(data), kQ3Failure);
194 
195 
196 
197 	// Debug build checks
198 #if Q3_DEBUG
199 	if (0) // Further checks on theSet
200 		return(kQ3Failure);
201 
202 	if (0) // Further checks on theType
203 		return(kQ3Failure);
204 
205 	if (0) // Further checks on data
206 		return(kQ3Failure);
207 #endif
208 
209 
210 
211 	// Call the bottleneck
212 	E3System_Bottleneck();
213 
214 
215 
216 	// Call our implementation
217 	return ( (E3Set*) theSet )->Get ( theType, data ) ;
218 }
219 
220 
221 
222 
223 
224 //=============================================================================
225 //      Q3Set_Contains : Quesa API entry point.
226 //-----------------------------------------------------------------------------
227 TQ3Boolean
Q3Set_Contains(TQ3SetObject theSet,TQ3ElementType theType)228 Q3Set_Contains(TQ3SetObject theSet, TQ3ElementType theType)
229 {
230 
231 
232 	// Release build checks
233 	Q3_REQUIRE_OR_RESULT( E3Set::IsOfMyClass ( theSet ), kQ3False);
234 
235 
236 
237 	// Debug build checks
238 #if Q3_DEBUG
239 	if (0) // Further checks on theSet
240 		return(kQ3False);
241 
242 	if (0) // Further checks on theType
243 		return(kQ3False);
244 #endif
245 
246 
247 
248 	// Call the bottleneck
249 	E3System_Bottleneck();
250 
251 
252 
253 	// Call our implementation
254 	return ( (E3Set*) theSet )->Contains ( theType ) ;
255 }
256 
257 
258 
259 
260 
261 //=============================================================================
262 //      Q3Set_Clear : Quesa API entry point.
263 //-----------------------------------------------------------------------------
264 TQ3Status
Q3Set_Clear(TQ3SetObject theSet,TQ3ElementType theType)265 Q3Set_Clear(TQ3SetObject theSet, TQ3ElementType theType)
266 {
267 
268 
269 	// Release build checks
270 	Q3_REQUIRE_OR_RESULT( E3Set::IsOfMyClass ( theSet ), kQ3Failure);
271 
272 
273 
274 	// Debug build checks
275 #if Q3_DEBUG
276 	if (0) // Further checks on theSet
277 		return(kQ3Failure);
278 
279 	if (0) // Further checks on theType
280 		return(kQ3Failure);
281 #endif
282 
283 
284 
285 	// Call the bottleneck
286 	E3System_Bottleneck();
287 
288 
289 
290 	// Call our implementation
291 	return ( (E3Set*) theSet )->Clear ( theType ) ;
292 }
293 
294 
295 
296 
297 
298 //=============================================================================
299 //      Q3Set_Empty : Quesa API entry point.
300 //-----------------------------------------------------------------------------
301 TQ3Status
Q3Set_Empty(TQ3SetObject target)302 Q3Set_Empty(TQ3SetObject target)
303 {
304 
305 
306 	// Release build checks
307 	Q3_REQUIRE_OR_RESULT( E3Set::IsOfMyClass ( target ), kQ3Failure);
308 
309 
310 
311 	// Debug build checks
312 #if Q3_DEBUG
313 	if (0) // Further checks on target
314 		return(kQ3Failure);
315 #endif
316 
317 
318 
319 	// Call the bottleneck
320 	E3System_Bottleneck();
321 
322 
323 
324 	// Call our implementation
325 	return ( (E3Set*) target )->Empty () ;
326 }
327 
328 
329 
330 
331 
332 //=============================================================================
333 //      Q3Set_GetNextElementType : Quesa API entry point.
334 //-----------------------------------------------------------------------------
335 TQ3Status
Q3Set_GetNextElementType(TQ3SetObject theSet,TQ3ElementType * theType)336 Q3Set_GetNextElementType(TQ3SetObject theSet, TQ3ElementType *theType)
337 {
338 
339 
340 	// Release build checks
341 	Q3_REQUIRE_OR_RESULT( E3Set::IsOfMyClass ( theSet ), kQ3Failure);
342 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(theType), kQ3Failure);
343 
344 
345 
346 	// Debug build checks
347 #if Q3_DEBUG
348 	if (0) // Further checks on theSet
349 		return(kQ3Failure);
350 
351 	if (0) // Further checks on theType
352 		return(kQ3Failure);
353 #endif
354 
355 
356 
357 	// Call the bottleneck
358 	E3System_Bottleneck();
359 
360 
361 
362 	// Call our implementation
363 	return ( (E3Set*) theSet )->GetNextElementType ( theType ) ;
364 }
365 
366 
367 
368 
369 
370 //=============================================================================
371 //      Q3Set_CopyElement : Quesa API entry point.
372 //-----------------------------------------------------------------------------
373 TQ3Status
Q3Set_CopyElement(TQ3SetObject sourceSet,TQ3ElementType theType,TQ3SetObject destSet)374 Q3Set_CopyElement(
375 	TQ3SetObject				sourceSet,
376 	TQ3ElementType				theType,
377 	TQ3SetObject				destSet
378 )
379 {
380 
381 	// Release build checks
382 	Q3_REQUIRE_OR_RESULT( E3Set::IsOfMyClass ( sourceSet ), kQ3Failure);
383 	Q3_REQUIRE_OR_RESULT( E3Set::IsOfMyClass ( destSet ), kQ3Failure);
384 
385 
386 
387 	// Call the bottleneck
388 	E3System_Bottleneck();
389 
390 
391 
392 	// Call our implementation
393 	return ( (E3Set*) sourceSet )->CopyElement ( theType, destSet ) ;
394 }
395 
396 
397 
398 #pragma mark -
399 
400 //=============================================================================
401 //      Q3Attribute_Submit : Quesa API entry point.
402 //-----------------------------------------------------------------------------
403 TQ3Status
Q3Attribute_Submit(TQ3AttributeType attributeType,const void * data,TQ3ViewObject view)404 Q3Attribute_Submit(TQ3AttributeType attributeType, const void *data, TQ3ViewObject view)
405 {
406 
407 
408 	// Release build checks
409 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(data), kQ3Failure);
410 	Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
411 
412 
413 
414 	// Debug build checks
415 #if Q3_DEBUG
416 	if (0) // Further checks on attributeType
417 		return(kQ3Failure);
418 
419 	if (0) // Further checks on data
420 		return(kQ3Failure);
421 
422 	if (0) // Further checks on view
423 		return(kQ3Failure);
424 #endif
425 
426 
427 
428 	// Call the bottleneck
429 	E3System_Bottleneck();
430 
431 
432 
433 	// Call our implementation
434 	return(E3Attribute_Submit(attributeType, data, view));
435 }
436 
437 
438 
439 
440 
441 //=============================================================================
442 //      Q3AttributeSet_New : Quesa API entry point.
443 //-----------------------------------------------------------------------------
444 TQ3AttributeSet
Q3AttributeSet_New(void)445 Q3AttributeSet_New(void)
446 {
447 
448 
449 	// Call the bottleneck
450 	E3System_Bottleneck();
451 
452 
453 
454 	// Call our implementation
455 	return(E3AttributeSet_New());
456 }
457 
458 
459 
460 
461 
462 //=============================================================================
463 //      Q3AttributeSet_Add : Quesa API entry point.
464 //-----------------------------------------------------------------------------
465 TQ3Status
Q3AttributeSet_Add(TQ3AttributeSet attributeSet,TQ3AttributeType theType,const void * data)466 Q3AttributeSet_Add(TQ3AttributeSet attributeSet, TQ3AttributeType theType, const void *data)
467 	{
468 	// Release build checks
469 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(data), kQ3Failure);
470 	Q3_REQUIRE_OR_RESULT( Q3Object_IsType( attributeSet, kQ3SetTypeAttribute ), kQ3Failure );
471 	TQ3ObjectType classType = E3Attribute_AttributeToClassType ( theType ) ;
472 	E3ClassInfoPtr theClass = E3ClassTree::GetClass ( classType ) ;
473 	Q3_REQUIRE_OR_RESULT( theClass->IsType ( kQ3ElementTypeAttribute ), kQ3Failure ) ;
474 
475 
476 	// Debug build checks
477 #if Q3_DEBUG
478 	if (0) // Further checks on attributeSet
479 		return(kQ3Failure);
480 
481 	if (0) // Further checks on theType
482 		return(kQ3Failure);
483 
484 	if (0) // Further checks on data
485 		return(kQ3Failure);
486 #endif
487 
488 
489 
490 	// Call the bottleneck
491 	E3System_Bottleneck();
492 
493 
494 
495 	// Call our implementation
496 	return ( (E3Set*) attributeSet )->Add ( theType, data ) ;
497 }
498 
499 
500 
501 
502 
503 //=============================================================================
504 //      Q3AttributeSet_Contains : Quesa API entry point.
505 //-----------------------------------------------------------------------------
506 TQ3Boolean
Q3AttributeSet_Contains(TQ3AttributeSet attributeSet,TQ3AttributeType attributeType)507 Q3AttributeSet_Contains(TQ3AttributeSet attributeSet, TQ3AttributeType attributeType)
508 {
509 
510 
511 	// Release build checks
512 	Q3_REQUIRE_OR_RESULT( Q3Object_IsType( attributeSet, kQ3SetTypeAttribute ), kQ3False );
513 
514 
515 
516 	// Debug build checks
517 #if Q3_DEBUG
518 	if (0) // Further checks on attributeSet
519 		return(kQ3False);
520 
521 	if (0) // Further checks on attributeType
522 		return(kQ3False);
523 #endif
524 
525 
526 
527 	// Call the bottleneck
528 	E3System_Bottleneck();
529 
530 
531 
532 	// Call our implementation
533 	return ( (E3Set*) attributeSet )->Contains ( attributeType ) ;
534 }
535 
536 
537 
538 
539 
540 //=============================================================================
541 //      Q3AttributeSet_Get : Quesa API entry point.
542 //-----------------------------------------------------------------------------
543 TQ3Status
Q3AttributeSet_Get(TQ3AttributeSet attributeSet,TQ3AttributeType theType,void * data)544 Q3AttributeSet_Get(TQ3AttributeSet attributeSet, TQ3AttributeType theType, void *data)
545 {
546 
547 
548 	// Release build checks
549 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(data), kQ3Failure);
550 	Q3_REQUIRE_OR_RESULT( Q3Object_IsType( attributeSet, kQ3SetTypeAttribute ), kQ3Failure );
551 
552 
553 
554 	// Debug build checks
555 #if Q3_DEBUG
556 	if (0) // Further checks on attributeSet
557 		return(kQ3Failure);
558 
559 	if (0) // Further checks on theType
560 		return(kQ3Failure);
561 
562 	if (0) // Further checks on data
563 		return(kQ3Failure);
564 #endif
565 
566 
567 
568 	// Call the bottleneck
569 	E3System_Bottleneck();
570 
571 
572 
573 	// Call our implementation
574 	return ( (E3Set*) attributeSet )->Get ( theType, data ) ;
575 }
576 
577 
578 
579 
580 
581 //=============================================================================
582 //      Q3AttributeSet_Clear : Quesa API entry point.
583 //-----------------------------------------------------------------------------
584 TQ3Status
Q3AttributeSet_Clear(TQ3AttributeSet attributeSet,TQ3AttributeType theType)585 Q3AttributeSet_Clear(TQ3AttributeSet attributeSet, TQ3AttributeType theType)
586 {
587 
588 
589 	// Release build checks
590 	Q3_REQUIRE_OR_RESULT( Q3Object_IsType( attributeSet, kQ3SetTypeAttribute ), kQ3Failure );
591 
592 
593 
594 	// Debug build checks
595 #if Q3_DEBUG
596 	if (0) // Further checks on attributeSet
597 		return(kQ3Failure);
598 
599 	if (0) // Further checks on theType
600 		return(kQ3Failure);
601 #endif
602 
603 
604 
605 	// Call the bottleneck
606 	E3System_Bottleneck();
607 
608 
609 
610 	// Call our implementation
611 	return ( (E3Set*) attributeSet )->Clear ( theType ) ;
612 }
613 
614 
615 
616 
617 
618 //=============================================================================
619 //      Q3AttributeSet_Empty : Quesa API entry point.
620 //-----------------------------------------------------------------------------
621 TQ3Status
Q3AttributeSet_Empty(TQ3AttributeSet target)622 Q3AttributeSet_Empty(TQ3AttributeSet target)
623 {
624 
625 
626 	// Release build checks
627 	Q3_REQUIRE_OR_RESULT( Q3Object_IsType( target, kQ3SetTypeAttribute ), kQ3Failure );
628 
629 
630 
631 	// Debug build checks
632 #if Q3_DEBUG
633 	if (0) // Further checks on target
634 		return(kQ3Failure);
635 #endif
636 
637 
638 
639 	// Call the bottleneck
640 	E3System_Bottleneck();
641 
642 
643 
644 	// Call our implementation
645 	return ( (E3Set*) target )->Empty () ;
646 }
647 
648 
649 
650 
651 
652 //=============================================================================
653 //      Q3AttributeSet_GetNextAttributeType : Quesa API entry point.
654 //-----------------------------------------------------------------------------
655 TQ3Status
Q3AttributeSet_GetNextAttributeType(TQ3AttributeSet source,TQ3AttributeType * theType)656 Q3AttributeSet_GetNextAttributeType(TQ3AttributeSet source, TQ3AttributeType *theType)
657 {
658 
659 
660 	// Release build checks
661 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(theType), kQ3Failure);
662 	Q3_REQUIRE_OR_RESULT( Q3Object_IsType( source, kQ3SetTypeAttribute ), kQ3Failure );
663 
664 
665 
666 	// Debug build checks
667 #if Q3_DEBUG
668 	if (0) // Further checks on source
669 		return(kQ3Failure);
670 
671 	if (0) // Further checks on theType
672 		return(kQ3Failure);
673 #endif
674 
675 
676 
677 	// Call the bottleneck
678 	E3System_Bottleneck();
679 
680 
681 
682 	// Call our implementation
683 	return(E3AttributeSet_GetNextAttributeType(source, theType));
684 }
685 
686 
687 
688 
689 
690 //=============================================================================
691 //      Q3AttributeSet_Submit : Quesa API entry point.
692 //-----------------------------------------------------------------------------
693 TQ3Status
Q3AttributeSet_Submit(TQ3AttributeSet attributeSet,TQ3ViewObject view)694 Q3AttributeSet_Submit(TQ3AttributeSet attributeSet, TQ3ViewObject view)
695 {
696 
697 
698 	// Release build checks
699 	Q3_REQUIRE_OR_RESULT( Q3Object_IsType( attributeSet, kQ3SetTypeAttribute ), kQ3Failure );
700 	Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
701 
702 
703 
704 	// Debug build checks
705 #if Q3_DEBUG
706 	if (0) // Further checks on attributeSet
707 		return(kQ3Failure);
708 
709 	if (0) // Further checks on view
710 		return(kQ3Failure);
711 #endif
712 
713 
714 
715 	// Call the bottleneck
716 	E3System_Bottleneck();
717 
718 
719 
720 	// Call our implementation
721 	return(E3AttributeSet_Submit(attributeSet, view));
722 }
723 
724 
725 
726 
727 
728 //=============================================================================
729 //      Q3AttributeSet_Inherit : Quesa API entry point.
730 //-----------------------------------------------------------------------------
731 TQ3Status
Q3AttributeSet_Inherit(TQ3AttributeSet parent,TQ3AttributeSet child,TQ3AttributeSet result)732 Q3AttributeSet_Inherit(TQ3AttributeSet parent, TQ3AttributeSet child, TQ3AttributeSet result)
733 {
734 
735 
736 	// Release build checks
737 	Q3_REQUIRE_OR_RESULT( Q3Object_IsType( parent, kQ3SetTypeAttribute ), kQ3Failure );
738 	Q3_REQUIRE_OR_RESULT( Q3Object_IsType( child, kQ3SetTypeAttribute ), kQ3Failure );
739 	Q3_REQUIRE_OR_RESULT( Q3Object_IsType( result, kQ3SetTypeAttribute ), kQ3Failure );
740 
741 
742 
743 	// Debug build checks
744 #if Q3_DEBUG
745 	if (0) // Further checks on parent
746 		return(kQ3Failure);
747 
748 	if (0) // Further checks on child
749 		return(kQ3Failure);
750 
751 	if (0) // Further checks on result
752 		return(kQ3Failure);
753 #endif
754 
755 
756 
757 	// Call the bottleneck
758 	E3System_Bottleneck();
759 
760 
761 
762 	// Call our implementation
763 	return(E3AttributeSet_Inherit(parent, child, result));
764 }
765 
766 
767 
768 #pragma mark -
769 
770 //=============================================================================
771 //      Q3XElementClass_Register : Quesa API entry point.
772 //-----------------------------------------------------------------------------
773 TQ3XObjectClass
Q3XElementClass_Register(TQ3ElementType * elementType,const char * name,TQ3Uns32 sizeOfElement,TQ3XMetaHandler metaHandler)774 Q3XElementClass_Register(TQ3ElementType *elementType, const char *name, TQ3Uns32 sizeOfElement, TQ3XMetaHandler metaHandler)
775 {
776 
777 
778 	// Release build checks
779 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(elementType), NULL);
780 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(name), NULL);
781 
782 
783 
784 	// Debug build checks
785 #if Q3_DEBUG
786 	if (0) // Further checks on elementType
787 		return(NULL);
788 
789 	if (0) // Further checks on name
790 		return(NULL);
791 
792 	if (0) // Further checks on sizeOfElement
793 		return(NULL);
794 
795 	if (0) // Further checks on metaHandler
796 		return(NULL);
797 #endif
798 
799 
800 
801 	// Call the bottleneck
802 	E3System_Bottleneck();
803 
804 
805 
806 	// Call our implementation
807 	return(E3XElementClass_Register(elementType, name, sizeOfElement, metaHandler));
808 }
809 
810 
811 
812 
813 
814 //=============================================================================
815 //      Q3XElementType_GetElementSize : Quesa API entry point.
816 //-----------------------------------------------------------------------------
817 TQ3Status
Q3XElementType_GetElementSize(TQ3ElementType elementType,TQ3Uns32 * sizeOfElement)818 Q3XElementType_GetElementSize(TQ3ElementType elementType, TQ3Uns32 *sizeOfElement)
819 {
820 
821 
822 	// Release build checks
823 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(sizeOfElement), kQ3Failure);
824 
825 
826 
827 	// Debug build checks
828 #if Q3_DEBUG
829 	if (0) // Further checks on elementType
830 		return(kQ3Failure);
831 
832 	if (0) // Further checks on sizeOfElement
833 		return(kQ3Failure);
834 #endif
835 
836 
837 
838 	// Call the bottleneck
839 	E3System_Bottleneck();
840 
841 
842 
843 	// Call our implementation
844 	return(E3XElementType_GetElementSize(elementType, sizeOfElement));
845 }
846 
847 
848 
849 
850 
851 
852 //=============================================================================
853 //      Q3XAttributeClass_Register : Quesa API entry point.
854 //-----------------------------------------------------------------------------
855 TQ3XObjectClass
Q3XAttributeClass_Register(TQ3AttributeType * attributeType,const char * creatorName,TQ3Uns32 sizeOfElement,TQ3XMetaHandler metaHandler)856 Q3XAttributeClass_Register(TQ3AttributeType *attributeType, const char *creatorName, TQ3Uns32 sizeOfElement, TQ3XMetaHandler metaHandler)
857 {
858 
859 
860 	// Release build checks
861 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(attributeType), NULL);
862 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(creatorName), NULL);
863 
864 
865 
866 	// Debug build checks
867 #if Q3_DEBUG
868 	if (0) // Further checks on attributeType
869 		return(NULL);
870 
871 	if (0) // Further checks on creatorName
872 		return(NULL);
873 
874 	if (0) // Further checks on sizeOfElement
875 		return(NULL);
876 
877 	if (0) // Further checks on metaHandler
878 		return(NULL);
879 #endif
880 
881 
882 
883 	// Call the bottleneck
884 	E3System_Bottleneck();
885 
886 
887 
888 	// Call our implementation
889 	return(E3XAttributeClass_Register(attributeType, creatorName, sizeOfElement, metaHandler));
890 }
891 
892 
893 
894 
895 
896 //=============================================================================
897 //      Q3XAttributeSet_GetPointer : Quesa API entry point.
898 //-----------------------------------------------------------------------------
899 void *
Q3XAttributeSet_GetPointer(TQ3AttributeSet attributeSet,TQ3AttributeType attributeType)900 Q3XAttributeSet_GetPointer(TQ3AttributeSet attributeSet, TQ3AttributeType attributeType)
901 {
902 
903 
904 	// Release build checks
905 
906 
907 
908 	// Debug build checks
909 #if Q3_DEBUG
910 	if (0) // Further checks on attributeSet
911 		return(NULL);
912 
913 	if (0) // Further checks on attributeType
914 		return(NULL);
915 #endif
916 
917 
918 
919 	// Call the bottleneck
920 	E3System_Bottleneck();
921 
922 
923 
924 	// Call our implementation
925 	return(E3XAttributeSet_GetPointer(attributeSet, attributeType));
926 }
927 
928 
929 
930 
931 
932 //=============================================================================
933 //      Q3XAttributeSet_GetMask : Quesa API entry point.
934 //-----------------------------------------------------------------------------
935 TQ3XAttributeMask
Q3XAttributeSet_GetMask(TQ3AttributeSet attributeSet)936 Q3XAttributeSet_GetMask(TQ3AttributeSet attributeSet)
937 {
938 
939 
940 	// Release build checks
941 	if(attributeSet == NULL)
942 		return(kQ3XAttributeMaskNone);
943 
944 
945 
946 	// Debug build checks
947 #if Q3_DEBUG
948 	if (0) // Further checks on attributeSet
949 		return(kQ3XAttributeMaskNone);
950 #endif
951 
952 
953 
954 	// Call the bottleneck
955 	E3System_Bottleneck();
956 
957 
958 
959 	// Call our implementation
960 	return(E3XAttributeSet_GetMask(attributeSet));
961 }
962 
963