1 /*  NAME:
2         QD3DMain.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 "E3Main.h"
49 #include "E3CustomElements.h"
50 #include "E3Set.h"
51 #include "E3View.h"
52 
53 
54 
55 
56 
57 //=============================================================================
58 //      Internal constants
59 //-----------------------------------------------------------------------------
60 // Internal constants go here
61 
62 
63 
64 
65 
66 //=============================================================================
67 //      Internal types
68 //-----------------------------------------------------------------------------
69 // Internal types go here
70 
71 
72 
73 
74 
75 //=============================================================================
76 //      Internal macros
77 //-----------------------------------------------------------------------------
78 // Internal macros go here
79 
80 
81 
82 
83 
84 //=============================================================================
85 //      Public functions
86 //-----------------------------------------------------------------------------
87 //      Q3Initialize : Quesa API entry point.
88 //-----------------------------------------------------------------------------
89 #pragma mark -
90 TQ3Status
Q3Initialize(void)91 Q3Initialize(void)
92 {
93 
94 
95 	// Call the bottleneck
96 	E3System_Bottleneck();
97 
98 
99 
100 	// Call our implementation
101 	return(E3Initialize());
102 }
103 
104 
105 
106 
107 
108 //=============================================================================
109 //      Q3Exit : Quesa API entry point.
110 //-----------------------------------------------------------------------------
111 TQ3Status
Q3Exit(void)112 Q3Exit(void)
113 {
114 
115 
116 	// Call the bottleneck
117 	E3System_Bottleneck();
118 
119 
120 
121 	// Call our implementation
122 	return(E3Exit());
123 }
124 
125 
126 
127 
128 
129 //=============================================================================
130 //      Q3IsInitialized : Quesa API entry point.
131 //-----------------------------------------------------------------------------
132 TQ3Boolean
Q3IsInitialized(void)133 Q3IsInitialized(void)
134 {
135 
136 
137 	// Call the bottleneck
138 	E3System_Bottleneck();
139 
140 
141 
142 	// Call our implementation
143 	return(E3IsInitialized());
144 }
145 
146 
147 
148 
149 
150 //=============================================================================
151 //      Q3GetVersion : Quesa API entry point.
152 //-----------------------------------------------------------------------------
153 TQ3Status
Q3GetVersion(TQ3Uns32 * majorRevision,TQ3Uns32 * minorRevision)154 Q3GetVersion(TQ3Uns32 *majorRevision, TQ3Uns32 *minorRevision)
155 {
156 
157 
158 	// Release build checks
159 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(majorRevision), kQ3Failure);
160 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(minorRevision), kQ3Failure);
161 
162 
163 
164 	// Debug build checks
165 #if Q3_DEBUG
166 	if (0) // Further checks on majorRevision
167 		return(kQ3Failure);
168 
169 	if (0) // Further checks on minorRevision
170 		return(kQ3Failure);
171 #endif
172 
173 
174 
175 	// Call the bottleneck
176 	E3System_Bottleneck();
177 
178 
179 
180 	// Call our implementation
181 	return(E3GetVersion(majorRevision, minorRevision));
182 }
183 
184 
185 
186 
187 
188 //=============================================================================
189 //      Q3GetReleaseVersion : Quesa API entry point.
190 //-----------------------------------------------------------------------------
191 TQ3Status
Q3GetReleaseVersion(TQ3Uns32 * releaseRevision)192 Q3GetReleaseVersion(TQ3Uns32 *releaseRevision)
193 {
194 
195 
196 	// Release build checks
197 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(releaseRevision), kQ3Failure);
198 
199 
200 
201 	// Debug build checks
202 #if Q3_DEBUG
203 	if (0) // Further checks on releaseRevision
204 		return(kQ3Failure);
205 #endif
206 
207 
208 
209 	// Call the bottleneck
210 	E3System_Bottleneck();
211 
212 
213 
214 	// Call our implementation
215 	return(E3GetReleaseVersion(releaseRevision));
216 }
217 
218 
219 
220 
221 
222 //=============================================================================
223 //      Q3ObjectHierarchy_GetTypeFromString : Quesa API entry point.
224 //-----------------------------------------------------------------------------
225 #pragma mark -
226 TQ3Status
Q3ObjectHierarchy_GetTypeFromString(const TQ3ObjectClassNameString objectClassString,TQ3ObjectType * objectClassType)227 Q3ObjectHierarchy_GetTypeFromString(const TQ3ObjectClassNameString objectClassString, TQ3ObjectType *objectClassType)
228 {
229 
230 
231 	// Release build checks
232 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(objectClassType), kQ3Failure);
233 
234 
235 
236 	// Debug build checks
237 #if Q3_DEBUG
238 	if (0) // Further checks on objectClassString
239 		return(kQ3Failure);
240 
241 	if (0) // Further checks on objectClassType
242 		return(kQ3Failure);
243 #endif
244 
245 
246 
247 	// Call the bottleneck
248 	E3System_Bottleneck();
249 
250 
251 
252 	// Call our implementation
253 	return(E3ObjectHierarchy_GetTypeFromString(objectClassString, objectClassType));
254 }
255 
256 
257 
258 
259 
260 //=============================================================================
261 //      Q3ObjectHierarchy_GetStringFromType : Quesa API entry point.
262 //-----------------------------------------------------------------------------
263 TQ3Status
Q3ObjectHierarchy_GetStringFromType(TQ3ObjectType objectClassType,TQ3ObjectClassNameString objectClassString)264 Q3ObjectHierarchy_GetStringFromType(TQ3ObjectType objectClassType, TQ3ObjectClassNameString objectClassString)
265 {
266 
267 
268 	// Release build checks
269 
270 
271 
272 	// Debug build checks
273 #if Q3_DEBUG
274 	if (0) // Further checks on objectClassType
275 		return(kQ3Failure);
276 
277 	if (0) // Further checks on objectClassString
278 		return(kQ3Failure);
279 #endif
280 
281 
282 
283 	// Call the bottleneck
284 	E3System_Bottleneck();
285 
286 
287 
288 	// Call our implementation
289 	return(E3ObjectHierarchy_GetStringFromType(objectClassType, objectClassString));
290 }
291 
292 
293 
294 
295 
296 //=============================================================================
297 //      Q3ObjectHierarchy_IsTypeRegistered : Quesa API entry point.
298 //-----------------------------------------------------------------------------
299 TQ3Boolean
Q3ObjectHierarchy_IsTypeRegistered(TQ3ObjectType objectClassType)300 Q3ObjectHierarchy_IsTypeRegistered(TQ3ObjectType objectClassType)
301 {
302 
303 
304 	// Release build checks
305 
306 
307 
308 	// Debug build checks
309 #if Q3_DEBUG
310 	if (0) // Further checks on objectClassType
311 		return(kQ3False);
312 #endif
313 
314 
315 
316 	// Call the bottleneck
317 	E3System_Bottleneck();
318 
319 
320 
321 	// Call our implementation
322 	return(E3ObjectHierarchy_IsTypeRegistered(objectClassType));
323 }
324 
325 
326 
327 
328 
329 //=============================================================================
330 //      Q3ObjectHierarchy_IsNameRegistered : Quesa API entry point.
331 //-----------------------------------------------------------------------------
332 TQ3Boolean
Q3ObjectHierarchy_IsNameRegistered(const char * objectClassName)333 Q3ObjectHierarchy_IsNameRegistered(const char *objectClassName)
334 {
335 
336 
337 	// Release build checks
338 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(objectClassName), kQ3False);
339 
340 
341 
342 	// Debug build checks
343 #if Q3_DEBUG
344 	if (0) // Further checks on objectClassName
345 		return(kQ3False);
346 #endif
347 
348 
349 
350 	// Call the bottleneck
351 	E3System_Bottleneck();
352 
353 
354 
355 	// Call our implementation
356 	return(E3ObjectHierarchy_IsNameRegistered(objectClassName));
357 }
358 
359 
360 
361 
362 
363 //=============================================================================
364 //      Q3ObjectHierarchy_GetSubClassData : Quesa API entry point.
365 //-----------------------------------------------------------------------------
366 TQ3Status
Q3ObjectHierarchy_GetSubClassData(TQ3ObjectType objectClassType,TQ3SubClassData * subClassData)367 Q3ObjectHierarchy_GetSubClassData(TQ3ObjectType objectClassType, TQ3SubClassData *subClassData)
368 {
369 
370 
371 	// Release build checks
372 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(subClassData), kQ3Failure);
373 
374 
375 
376 	// Debug build checks
377 #if Q3_DEBUG
378 	if (0) // Further checks on objectClassType
379 		return(kQ3Failure);
380 
381 	if (0) // Further checks on subClassData
382 		return(kQ3Failure);
383 #endif
384 
385 
386 
387 	// Call the bottleneck
388 	E3System_Bottleneck();
389 
390 
391 
392 	// Call our implementation
393 	return(E3ObjectHierarchy_GetSubClassData(objectClassType, subClassData));
394 }
395 
396 
397 
398 
399 
400 //=============================================================================
401 //      Q3ObjectHierarchy_EmptySubClassData : Quesa API entry point.
402 //-----------------------------------------------------------------------------
403 TQ3Status
Q3ObjectHierarchy_EmptySubClassData(TQ3SubClassData * subClassData)404 Q3ObjectHierarchy_EmptySubClassData(TQ3SubClassData *subClassData)
405 {
406 
407 
408 	// Release build checks
409 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(subClassData), kQ3Failure);
410 
411 
412 
413 	// Debug build checks
414 #if Q3_DEBUG
415 	if (0) // Further checks on subClassData
416 		return(kQ3Failure);
417 #endif
418 
419 
420 
421 	// Call the bottleneck
422 	E3System_Bottleneck();
423 
424 
425 
426 	// Call our implementation
427 	return(E3ObjectHierarchy_EmptySubClassData(subClassData));
428 }
429 
430 
431 
432 
433 
434 //=============================================================================
435 //      Q3Object_Dispose : Quesa API entry point.
436 //-----------------------------------------------------------------------------
437 #pragma mark -
438 TQ3Status
Q3Object_Dispose(TQ3Object object)439 Q3Object_Dispose(TQ3Object object)
440 {
441 
442 
443 	// Release build checks
444 	Q3_REQUIRE_OR_RESULT( object != NULL, kQ3Failure );
445 	Q3_REQUIRE_OR_RESULT( object->IsObjectValid () , kQ3Failure ) ;
446 
447 
448 
449 	// Debug build checks
450 #if Q3_DEBUG
451 	if (0) // Further checks on object
452 		return(kQ3Failure);
453 #endif
454 
455 
456 
457 	// Call the bottleneck
458 	E3System_Bottleneck();
459 
460 
461 
462 	// Call our implementation
463 	return object->Dispose () ;
464 }
465 
466 
467 
468 
469 
470 //=============================================================================
471 //      Q3Object_CleanDispose : Quesa API entry point.
472 //-----------------------------------------------------------------------------
473 TQ3Status
Q3Object_CleanDispose(TQ3Object * object)474 Q3Object_CleanDispose(TQ3Object *object)
475 {
476 
477 
478 	// Release build checks
479 	if (object != NULL && *object != NULL)
480 		Q3_REQUIRE_OR_RESULT( (*object)->IsObjectValid () , kQ3Failure ) ;
481 
482 
483 
484 	// Debug build checks
485 #if Q3_DEBUG
486 	if (0) // Further checks on object
487 		return(kQ3Failure);
488 #endif
489 
490 
491 
492 	// Call the bottleneck
493 	E3System_Bottleneck();
494 
495 
496 
497 	// Call our implementation
498 	return(E3Object_CleanDispose(object));
499 }
500 
501 
502 
503 
504 
505 //=============================================================================
506 //      Q3Object_Duplicate : Quesa API entry point.
507 //-----------------------------------------------------------------------------
508 TQ3Object
Q3Object_Duplicate(TQ3Object object)509 Q3Object_Duplicate(TQ3Object object)
510 {
511 
512 
513 	// Release build checks
514 	Q3_REQUIRE_OR_RESULT( object != NULL, NULL ) ;
515 	Q3_REQUIRE_OR_RESULT( object->IsObjectValid () , NULL ) ;
516 
517 
518 
519 	// Debug build checks
520 #if Q3_DEBUG
521 	if (0) // Further checks on object
522 		return(NULL);
523 #endif
524 
525 
526 
527 	// Call the bottleneck
528 	E3System_Bottleneck();
529 
530 
531 
532 	// Call our implementation
533 	return(E3Object_Duplicate(object));
534 }
535 
536 
537 
538 
539 
540 //=============================================================================
541 //      Q3Object_Submit : Quesa API entry point.
542 //-----------------------------------------------------------------------------
543 TQ3Status
Q3Object_Submit(TQ3Object object,TQ3ViewObject view)544 Q3Object_Submit(TQ3Object object, TQ3ViewObject view)
545 {
546 
547 
548 	// Release build checks
549 	Q3_REQUIRE_OR_RESULT( object->IsObjectValid (), kQ3Failure ) ;
550 	Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
551 
552 
553 
554 	// Debug build checks
555 #if Q3_DEBUG
556 	if (0) // Further checks on object
557 		return(kQ3Failure);
558 
559 	if (0) // Further checks on view
560 		return(kQ3Failure);
561 #endif
562 
563 
564 
565 	// Call the bottleneck
566 	E3System_Bottleneck();
567 
568 
569 
570 	// Call our implementation
571 	return(E3Object_Submit(object, view));
572 }
573 
574 
575 
576 
577 
578 //=============================================================================
579 //      Q3Object_IsDrawable : Quesa API entry point.
580 //-----------------------------------------------------------------------------
581 TQ3Boolean
Q3Object_IsDrawable(TQ3Object object)582 Q3Object_IsDrawable(TQ3Object object)
583 {
584 
585 
586 	// Release build checks
587 	Q3_REQUIRE_OR_RESULT( object->IsObjectValid () , kQ3False ) ;
588 
589 
590 
591 	// Debug build checks
592 #if Q3_DEBUG
593 	if (0) // Further checks on object
594 		return(kQ3False);
595 #endif
596 
597 
598 
599 	// Call the bottleneck
600 	E3System_Bottleneck();
601 
602 
603 
604 	// Call our implementation
605 	return(E3Object_IsDrawable(object));
606 }
607 
608 
609 
610 
611 
612 //=============================================================================
613 //      Q3Object_IsWritable : Quesa API entry point.
614 //-----------------------------------------------------------------------------
615 TQ3Boolean
Q3Object_IsWritable(TQ3Object object,TQ3FileObject theFile)616 Q3Object_IsWritable(TQ3Object object, TQ3FileObject theFile)
617 {
618 
619 
620 	// Release build checks
621 	Q3_REQUIRE_OR_RESULT( object->IsObjectValid () , kQ3False ) ;
622 	Q3_REQUIRE_OR_RESULT(Q3Object_IsType(theFile, kQ3SharedTypeFile), kQ3False);
623 
624 
625 
626 	// Debug build checks
627 #if Q3_DEBUG
628 	if (0) // Further checks on object
629 		return(kQ3False);
630 
631 	if (0) // Further checks on theFile
632 		return(kQ3False);
633 #endif
634 
635 
636 
637 	// Call the bottleneck
638 	E3System_Bottleneck();
639 
640 
641 
642 	// Call our implementation
643 	return(E3Object_IsWritable(object, theFile));
644 }
645 
646 
647 
648 
649 
650 //=============================================================================
651 //      Q3Object_GetType : Quesa API entry point.
652 //-----------------------------------------------------------------------------
653 TQ3ObjectType
Q3Object_GetType(TQ3Object object)654 Q3Object_GetType(TQ3Object object)
655 {
656 
657 
658 	// Release build checks
659 	Q3_REQUIRE_OR_RESULT( object->IsObjectValid (), kQ3ObjectTypeInvalid ) ;
660 
661 
662 
663 	// Debug build checks
664 #if Q3_DEBUG
665 	if (0) // Further checks on object
666 		return(kQ3ObjectTypeInvalid);
667 #endif
668 
669 
670 
671 	// Call the bottleneck
672 	E3System_Bottleneck();
673 
674 
675 
676 	// Call our implementation
677 	return(E3Object_GetType(object));
678 }
679 
680 
681 
682 
683 
684 //=============================================================================
685 //      Q3Object_GetLeafType : Quesa API entry point.
686 //-----------------------------------------------------------------------------
687 TQ3ObjectType
Q3Object_GetLeafType(TQ3Object object)688 Q3Object_GetLeafType(TQ3Object object)
689 {
690 
691 
692 	// Release build checks
693 	Q3_REQUIRE_OR_RESULT( object->IsObjectValid (), kQ3ObjectTypeInvalid ) ;
694 
695 
696 
697 	// Debug build checks
698 #if Q3_DEBUG
699 	if (0) // Further checks on object
700 		return(kQ3ObjectTypeInvalid);
701 #endif
702 
703 
704 
705 	// Call the bottleneck
706 	E3System_Bottleneck();
707 
708 
709 
710 	// Call our implementation
711 	return object->GetLeafType () ;
712 }
713 
714 
715 
716 
717 
718 //=============================================================================
719 //      Q3Object_IsType : Quesa API entry point.
720 //-----------------------------------------------------------------------------
721 TQ3Boolean
Q3Object_IsType(TQ3Object object,TQ3ObjectType theType)722 Q3Object_IsType(TQ3Object object, TQ3ObjectType theType)
723 {
724 
725 
726 	// Release build checks
727 	Q3_REQUIRE_OR_RESULT(object != NULL, kQ3False);
728 	Q3_REQUIRE_OR_RESULT( object->IsObjectValid () , kQ3False ) ;
729 
730 
731 
732 	// Debug build checks
733 #if Q3_DEBUG
734 	if (0) // Further checks on object
735 		return(kQ3False);
736 
737 	if (0) // Further checks on theType
738 		return(kQ3False);
739 #endif
740 
741 
742 
743 	// Call the bottleneck
744 	E3System_Bottleneck();
745 
746 
747 
748 	// Call our implementation
749 	return(E3Object_IsType(object, theType));
750 }
751 
752 
753 
754 
755 //=============================================================================
756 //      Q3Object_AddElement : Quesa API entry point.
757 //-----------------------------------------------------------------------------
758 TQ3Status
Q3Object_AddElement(TQ3Object object,TQ3ElementType theType,const void * data)759 Q3Object_AddElement(TQ3Object object, TQ3ElementType theType, const void *data)
760 {
761 
762 
763 	// Release build checks
764 	Q3_REQUIRE_OR_RESULT( object->IsObjectValid (), kQ3Failure ) ;
765 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(data), kQ3Failure);
766 
767 
768 
769 	// Debug build checks
770 #if Q3_DEBUG
771 	if (0) // Further checks on shape
772 		return(kQ3Failure);
773 
774 	if (0) // Further checks on theType
775 		return(kQ3Failure);
776 
777 	if (0) // Further checks on data
778 		return(kQ3Failure);
779 #endif
780 
781 
782 
783 	// Call the bottleneck
784 	E3System_Bottleneck();
785 
786 
787 
788 	// Call our implementation
789 	return object->AddElement ( theType, data ) ;
790 }
791 
792 
793 
794 
795 
796 //=============================================================================
797 //      Q3Object_GetElement : Quesa API entry point.
798 //-----------------------------------------------------------------------------
799 TQ3Status
Q3Object_GetElement(TQ3Object object,TQ3ElementType theType,void * data)800 Q3Object_GetElement(TQ3Object object, TQ3ElementType theType, void *data)
801 {
802 
803 
804 	// Release build checks
805 	Q3_REQUIRE_OR_RESULT( object->IsObjectValid (), kQ3Failure ) ;
806 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(data), kQ3Failure);
807 
808 
809 
810 	// Debug build checks
811 #if Q3_DEBUG
812 	if (0) // Further checks on shape
813 		return(kQ3Failure);
814 
815 	if (0) // Further checks on theType
816 		return(kQ3Failure);
817 
818 	if (0) // Further checks on data
819 		return(kQ3Failure);
820 #endif
821 
822 
823 
824 	// Call the bottleneck
825 	E3System_Bottleneck();
826 
827 
828 
829 	// Call our implementation
830 	return object->GetElement ( theType, data ) ;
831 }
832 
833 
834 
835 
836 
837 //=============================================================================
838 //      Q3Object_ContainsElement : Quesa API entry point.
839 //-----------------------------------------------------------------------------
840 TQ3Boolean
Q3Object_ContainsElement(TQ3Object object,TQ3ElementType theType)841 Q3Object_ContainsElement(TQ3Object object, TQ3ElementType theType)
842 {
843 
844 
845 	// Release build checks
846 	Q3_REQUIRE_OR_RESULT( object->IsObjectValid () , kQ3False ) ;
847 
848 
849 
850 	// Debug build checks
851 #if Q3_DEBUG
852 	if (0) // Further checks on shape
853 		return(kQ3False);
854 
855 	if (0) // Further checks on theType
856 		return(kQ3False);
857 #endif
858 
859 
860 
861 	// Call the bottleneck
862 	E3System_Bottleneck();
863 
864 
865 
866 	// Call our implementation
867 	return object->ContainsElement ( theType ) ;
868 }
869 
870 
871 
872 
873 
874 //=============================================================================
875 //      Q3Object_GetNextElementType : Quesa API entry point.
876 //-----------------------------------------------------------------------------
877 TQ3Status
Q3Object_GetNextElementType(TQ3Object object,TQ3ElementType * theType)878 Q3Object_GetNextElementType(TQ3Object object, TQ3ElementType *theType)
879 {
880 
881 
882 	// Release build checks
883 	Q3_REQUIRE_OR_RESULT( object->IsObjectValid (), kQ3Failure ) ;
884 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(theType), kQ3Failure);
885 
886 
887 
888 	// Debug build checks
889 #if Q3_DEBUG
890 	if (0) // Further checks on shape
891 		return(kQ3Failure);
892 
893 	if (0) // Further checks on theType
894 		return(kQ3Failure);
895 #endif
896 
897 
898 
899 	// Call the bottleneck
900 	E3System_Bottleneck();
901 
902 
903 
904 	// Call our implementation
905 	return object->GetNextElementType ( theType ) ;
906 }
907 
908 
909 
910 
911 
912 //=============================================================================
913 //      Q3Object_EmptyElements : Quesa API entry point.
914 //-----------------------------------------------------------------------------
915 TQ3Status
Q3Object_EmptyElements(TQ3Object object)916 Q3Object_EmptyElements(TQ3Object object)
917 {
918 
919 
920 	// Release build checks
921 	Q3_REQUIRE_OR_RESULT( object->IsObjectValid (), kQ3Failure ) ;
922 
923 
924 
925 	// Debug build checks
926 #if Q3_DEBUG
927 	if (0) // Further checks on shape
928 		return(kQ3Failure);
929 #endif
930 
931 
932 
933 	// Call the bottleneck
934 	E3System_Bottleneck();
935 
936 
937 
938 	// Call our implementation
939 	return object->EmptyElements () ;
940 }
941 
942 
943 
944 
945 
946 //=============================================================================
947 //      Q3Object_ClearElement : Quesa API entry point.
948 //-----------------------------------------------------------------------------
949 TQ3Status
Q3Object_ClearElement(TQ3Object object,TQ3ElementType theType)950 Q3Object_ClearElement(TQ3Object object, TQ3ElementType theType)
951 {
952 
953 
954 	// Release build checks
955 	Q3_REQUIRE_OR_RESULT( object->IsObjectValid (), kQ3Failure ) ;
956 
957 
958 
959 	// Debug build checks
960 #if Q3_DEBUG
961 	if (0) // Further checks on shape
962 		return(kQ3Failure);
963 
964 	if (0) // Further checks on theType
965 		return(kQ3Failure);
966 #endif
967 
968 
969 
970 	// Call the bottleneck
971 	E3System_Bottleneck();
972 
973 
974 
975 	// Call our implementation
976 	return object->ClearElement ( theType ) ;
977 }
978 
979 
980 
981 
982 
983 //=============================================================================
984 //      Q3Object_GetProperty : Quesa API entry point.
985 //-----------------------------------------------------------------------------
986 TQ3Status
Q3Object_GetProperty(TQ3Object object,TQ3ObjectType propType,TQ3Uns32 bufferSize,TQ3Uns32 * actualSize,void * buffer)987 Q3Object_GetProperty(
988 	TQ3Object				object,
989 	TQ3ObjectType			propType,
990 	TQ3Uns32				bufferSize,
991 	TQ3Uns32*				actualSize,
992 	void*					buffer )
993 {
994 	// Release build checks
995 	Q3_REQUIRE_OR_RESULT( object->IsObjectValid (), kQ3Failure ) ;
996 
997 
998 
999 	// Call the bottleneck
1000 	E3System_Bottleneck();
1001 
1002 
1003 
1004 	// Call our implementation
1005 	return (E3Object_GetProperty(object, propType, bufferSize, actualSize, buffer));
1006 }
1007 
1008 
1009 
1010 
1011 
1012 //=============================================================================
1013 //      Q3Object_RemoveProperty : Quesa API entry point.
1014 //-----------------------------------------------------------------------------
1015 TQ3Status
Q3Object_RemoveProperty(TQ3Object object,TQ3ObjectType propType)1016 Q3Object_RemoveProperty(
1017 	TQ3Object				object,
1018 	TQ3ObjectType			propType )
1019 {
1020 	// Release build checks
1021 	Q3_REQUIRE_OR_RESULT( object->IsObjectValid (), kQ3Failure ) ;
1022 
1023 
1024 
1025 	// Call the bottleneck
1026 	E3System_Bottleneck();
1027 
1028 
1029 
1030 	// Call our implementation
1031 	return (E3Object_RemoveProperty(object, propType));
1032 }
1033 
1034 
1035 
1036 
1037 
1038 //=============================================================================
1039 //      Q3Object_SetProperty : Quesa API entry point.
1040 //-----------------------------------------------------------------------------
1041 TQ3Status
Q3Object_SetProperty(TQ3Object object,TQ3ObjectType propType,TQ3Uns32 dataSize,const void * data)1042 Q3Object_SetProperty(
1043 	TQ3Object				object,
1044 	TQ3ObjectType			propType,
1045 	TQ3Uns32				dataSize,
1046 	const void*				data )
1047 {
1048 	// Release build checks
1049 	Q3_REQUIRE_OR_RESULT( object->IsObjectValid (), kQ3Failure ) ;
1050 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(data), kQ3Failure);
1051 
1052 
1053 
1054 	// Call the bottleneck
1055 	E3System_Bottleneck();
1056 
1057 
1058 
1059 	// Call our implementation
1060 	return (E3Object_SetProperty(object, propType, dataSize, data));
1061 }
1062 
1063 
1064 
1065 
1066 
1067 //=============================================================================
1068 //      Q3Object_GetSet : Quesa API entry point.
1069 //-----------------------------------------------------------------------------
1070 TQ3Status
Q3Object_GetSet(TQ3Object object,TQ3SetObject * set)1071 Q3Object_GetSet ( TQ3Object object, TQ3SetObject* set )
1072 {
1073 
1074 
1075 	// Release build checks
1076 	Q3_REQUIRE_OR_RESULT( object->IsObjectValid (), kQ3Failure ) ;
1077 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(set), kQ3Failure);
1078 
1079 
1080 
1081 	// Debug build checks
1082 #if Q3_DEBUG
1083 	if (0) // Further checks on shape
1084 		return(kQ3Failure);
1085 
1086 	if (0) // Further checks on theType
1087 		return(kQ3Failure);
1088 #endif
1089 
1090 
1091 
1092 	// Call the bottleneck
1093 	E3System_Bottleneck();
1094 
1095 
1096 
1097 	// Call our implementation
1098 	return object->GetSet ( set ) ;
1099 }
1100 
1101 
1102 
1103 
1104 
1105 //=============================================================================
1106 //      Q3Object_SetSet : Quesa API entry point.
1107 //-----------------------------------------------------------------------------
1108 TQ3Status
Q3Object_SetSet(TQ3Object object,TQ3SetObject set)1109 Q3Object_SetSet ( TQ3Object object, TQ3SetObject set )
1110 {
1111 
1112 
1113 	// Release build checks
1114 	Q3_REQUIRE_OR_RESULT( object->IsObjectValid (), kQ3Failure ) ;
1115 	Q3_REQUIRE_OR_RESULT( ( set == NULL ) || ( set->IsObjectValid () && Q3_OBJECT_IS_CLASS ( set, E3Set ) ), kQ3Failure ) ;
1116 
1117 
1118 
1119 	// Debug build checks
1120 #if Q3_DEBUG
1121 	if (0) // Further checks on shape
1122 		return(kQ3Failure);
1123 
1124 	if (0) // Further checks on theType
1125 		return(kQ3Failure);
1126 #endif
1127 
1128 
1129 
1130 	// Call the bottleneck
1131 	E3System_Bottleneck();
1132 
1133 
1134 
1135 	// Call our implementation
1136 	return object->SetSet ( set ) ;
1137 }
1138 
1139 
1140 
1141 
1142 
1143 //=============================================================================
1144 //      Q3Shared_GetType : Quesa API entry point.
1145 //-----------------------------------------------------------------------------
1146 #pragma mark -
1147 TQ3ObjectType
Q3Shared_GetType(TQ3SharedObject sharedObject)1148 Q3Shared_GetType(TQ3SharedObject sharedObject)
1149 {
1150 
1151 
1152 	// Release build checks
1153 	Q3_REQUIRE_OR_RESULT( E3Shared_IsOfMyClass ( sharedObject ), kQ3ObjectTypeInvalid);
1154 
1155 
1156 
1157 	// Debug build checks
1158 #if Q3_DEBUG
1159 	if (0) // Further checks on sharedObject
1160 		return(kQ3ObjectTypeInvalid);
1161 #endif
1162 
1163 
1164 
1165 	// Call the bottleneck
1166 	E3System_Bottleneck();
1167 
1168 
1169 
1170 	// Call our implementation
1171 	return(E3Shared_GetType(sharedObject));
1172 }
1173 
1174 
1175 
1176 
1177 
1178 //=============================================================================
1179 //      Q3Shared_GetReference : Quesa API entry point.
1180 //-----------------------------------------------------------------------------
1181 TQ3SharedObject
Q3Shared_GetReference(TQ3SharedObject sharedObject)1182 Q3Shared_GetReference(TQ3SharedObject sharedObject)
1183 {
1184 
1185 
1186 	// Release build checks
1187 	Q3_REQUIRE_OR_RESULT( E3Shared_IsOfMyClass ( sharedObject ), NULL);
1188 
1189 
1190 
1191 	// Debug build checks
1192 #if Q3_DEBUG
1193 	if (0) // Further checks on sharedObject
1194 		return(NULL);
1195 #endif
1196 
1197 
1198 
1199 	// Call the bottleneck
1200 	E3System_Bottleneck();
1201 
1202 
1203 
1204 	// Call our implementation
1205 	return ( (E3Shared*) sharedObject )->GetReference () ;
1206 }
1207 
1208 
1209 
1210 
1211 
1212 //=============================================================================
1213 //      Q3Shared_IsReferenced : Quesa API entry point.
1214 //-----------------------------------------------------------------------------
1215 TQ3Boolean
Q3Shared_IsReferenced(TQ3SharedObject sharedObject)1216 Q3Shared_IsReferenced(TQ3SharedObject sharedObject)
1217 {
1218 
1219 
1220 	// Release build checks
1221 	Q3_REQUIRE_OR_RESULT( E3Shared_IsOfMyClass ( sharedObject ), kQ3False);
1222 
1223 
1224 
1225 	// Debug build checks
1226 #if Q3_DEBUG
1227 	if (0) // Further checks on sharedObject
1228 		return(kQ3False);
1229 #endif
1230 
1231 
1232 
1233 	// Call the bottleneck
1234 	E3System_Bottleneck();
1235 
1236 
1237 
1238 	// Call our implementation
1239 	return ( (E3Shared*) sharedObject )->IsReferenced () ;
1240 }
1241 
1242 
1243 
1244 
1245 
1246 //=============================================================================
1247 //      Q3Shared_GetReferenceCount : Quesa API entry point.
1248 //-----------------------------------------------------------------------------
1249 #if QUESA_ALLOW_QD3D_EXTENSIONS
1250 TQ3Uns32
Q3Shared_GetReferenceCount(TQ3SharedObject sharedObject)1251 Q3Shared_GetReferenceCount( TQ3SharedObject               sharedObject )
1252 {
1253 
1254 	// Release build checks
1255 	Q3_REQUIRE_OR_RESULT( E3Shared_IsOfMyClass ( sharedObject ), kQ3False);
1256 
1257 
1258 
1259 	// Debug build checks
1260 #if Q3_DEBUG
1261 	if (0) // Further checks on sharedObject
1262 		return(kQ3False);
1263 #endif
1264 
1265 
1266 
1267 	// Call the bottleneck
1268 	E3System_Bottleneck();
1269 
1270 
1271 
1272 	// Call our implementation
1273 	return ( (E3Shared*) sharedObject )->GetReferenceCount () ;
1274 }
1275 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
1276 
1277 
1278 
1279 
1280 
1281 //=============================================================================
1282 //      Q3Shared_GetEditIndex : Quesa API entry point.
1283 //-----------------------------------------------------------------------------
1284 TQ3Uns32
Q3Shared_GetEditIndex(TQ3SharedObject sharedObject)1285 Q3Shared_GetEditIndex(TQ3SharedObject sharedObject)
1286 {
1287 
1288 
1289 	// Release build checks
1290 	Q3_REQUIRE_OR_RESULT( E3Shared_IsOfMyClass ( sharedObject ), 0);
1291 
1292 
1293 
1294 	// Debug build checks
1295 #if Q3_DEBUG
1296 	if (0) // Further checks on sharedObject
1297 		return(0);
1298 #endif
1299 
1300 
1301 
1302 	// Call the bottleneck
1303 	E3System_Bottleneck();
1304 
1305 
1306 
1307 	// Call our implementation
1308 	return ( (E3Shared*) sharedObject )->GetEditIndex () ;
1309 }
1310 
1311 
1312 
1313 
1314 
1315 //=============================================================================
1316 //      Q3Shared_Edited : Quesa API entry point.
1317 //-----------------------------------------------------------------------------
1318 TQ3Status
Q3Shared_Edited(TQ3SharedObject sharedObject)1319 Q3Shared_Edited(TQ3SharedObject sharedObject)
1320 {
1321 
1322 
1323 	// Release build checks
1324 	Q3_REQUIRE_OR_RESULT( E3Shared_IsOfMyClass ( sharedObject ), kQ3Failure);
1325 
1326 
1327 
1328 	// Debug build checks
1329 #if Q3_DEBUG
1330 	if (0) // Further checks on sharedObject
1331 		return(kQ3Failure);
1332 #endif
1333 
1334 
1335 
1336 	// Call the bottleneck
1337 	E3System_Bottleneck();
1338 
1339 
1340 
1341 	// Call our implementation
1342 	return ( (E3Shared*) sharedObject )->Edited () ;
1343 }
1344 
1345 
1346 
1347 
1348 
1349 //=============================================================================
1350 //      Q3Shape_GetType : Quesa API entry point.
1351 //-----------------------------------------------------------------------------
1352 #pragma mark -
1353 TQ3ObjectType
Q3Shape_GetType(TQ3ShapeObject shape)1354 Q3Shape_GetType(TQ3ShapeObject shape)
1355 {
1356 
1357 
1358 	// Release build checks
1359 	Q3_REQUIRE_OR_RESULT( E3Shape_IsOfMyClass ( shape ), kQ3ObjectTypeInvalid);
1360 
1361 
1362 
1363 	// Debug build checks
1364 #if Q3_DEBUG
1365 	if (0) // Further checks on shape
1366 		return(kQ3ObjectTypeInvalid);
1367 #endif
1368 
1369 
1370 
1371 	// Call the bottleneck
1372 	E3System_Bottleneck();
1373 
1374 
1375 
1376 	// Call our implementation
1377 	return(E3Shape_GetType(shape));
1378 }
1379 
1380 
1381 
1382 
1383 
1384 //=============================================================================
1385 //      Q3Shape_GetSet : Quesa API entry point.
1386 //-----------------------------------------------------------------------------
1387 TQ3Status
Q3Shape_GetSet(TQ3ShapeObject shape,TQ3SetObject * theSet)1388 Q3Shape_GetSet(TQ3ShapeObject shape, TQ3SetObject *theSet)
1389 {
1390 
1391 
1392 	// Release build checks
1393 	Q3_REQUIRE_OR_RESULT( E3Shape_IsOfMyClass ( shape ), kQ3Failure);
1394 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(theSet), kQ3Failure);
1395 
1396 
1397 
1398 	// Debug build checks
1399 #if Q3_DEBUG
1400 	if (0) // Further checks on shape
1401 		return(kQ3Failure);
1402 
1403 	if (0) // Further checks on theSet
1404 		return(kQ3Failure);
1405 #endif
1406 
1407 
1408 
1409 	// Call the bottleneck
1410 	E3System_Bottleneck();
1411 
1412 
1413 
1414 	// Call our implementation
1415 	return(E3Shape_GetSet(shape, theSet));
1416 }
1417 
1418 
1419 
1420 
1421 
1422 //=============================================================================
1423 //      Q3Shape_SetSet : Quesa API entry point.
1424 //-----------------------------------------------------------------------------
1425 TQ3Status
Q3Shape_SetSet(TQ3ShapeObject shape,TQ3SetObject theSet)1426 Q3Shape_SetSet(TQ3ShapeObject shape, TQ3SetObject theSet)
1427 {
1428 
1429 
1430 	// Release build checks
1431 	Q3_REQUIRE_OR_RESULT( E3Shape_IsOfMyClass ( shape ), kQ3Failure);
1432 	Q3_REQUIRE_OR_RESULT(((theSet == NULL) || ( theSet->IsObjectValid () && Q3_OBJECT_IS_CLASS ( theSet, E3Set ) ) ), kQ3Failure);
1433 
1434 
1435 
1436 	// Debug build checks
1437 #if Q3_DEBUG
1438 	if (0) // Further checks on shape
1439 		return(kQ3Failure);
1440 
1441 	if (0) // Further checks on theSet
1442 		return(kQ3Failure);
1443 #endif
1444 
1445 
1446 
1447 	// Call the bottleneck
1448 	E3System_Bottleneck();
1449 
1450 
1451 
1452 	// Call our implementation
1453 	return(E3Shape_SetSet(shape, theSet));
1454 }
1455 
1456 
1457 
1458 
1459 
1460 //=============================================================================
1461 //      Q3Shape_AddElement : Quesa API entry point.
1462 //-----------------------------------------------------------------------------
1463 TQ3Status
Q3Shape_AddElement(TQ3ShapeObject shape,TQ3ElementType theType,const void * data)1464 Q3Shape_AddElement(TQ3ShapeObject shape, TQ3ElementType theType, const void *data)
1465 {
1466 
1467 
1468 	// Release build checks
1469 	Q3_REQUIRE_OR_RESULT( shape != NULL, kQ3Failure ) ;
1470 	Q3_REQUIRE_OR_RESULT( shape->IsObjectValid () , kQ3Failure ) ;
1471 	Q3_REQUIRE_OR_RESULT( Q3_OBJECT_IS_CLASS ( shape, E3Shape ) || Q3_OBJECT_IS_CLASS ( shape, E3Set ), kQ3Failure ) ;
1472 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(data), kQ3Failure);
1473 
1474 
1475 
1476 	// Debug build checks
1477 #if Q3_DEBUG
1478 	if (0) // Further checks on shape
1479 		return(kQ3Failure);
1480 
1481 	if (0) // Further checks on theType
1482 		return(kQ3Failure);
1483 
1484 	if (0) // Further checks on data
1485 		return(kQ3Failure);
1486 #endif
1487 
1488 
1489 
1490 	// Call the bottleneck
1491 	E3System_Bottleneck();
1492 
1493 
1494 
1495 	// Call our implementation
1496 	return shape->AddElement ( theType, data ) ;
1497 }
1498 
1499 
1500 
1501 
1502 
1503 //=============================================================================
1504 //      Q3Shape_GetElement : Quesa API entry point.
1505 //-----------------------------------------------------------------------------
1506 TQ3Status
Q3Shape_GetElement(TQ3ShapeObject shape,TQ3ElementType theType,void * data)1507 Q3Shape_GetElement(TQ3ShapeObject shape, TQ3ElementType theType, void *data)
1508 {
1509 
1510 
1511 	// Release build checks
1512 	Q3_REQUIRE_OR_RESULT( shape != NULL, kQ3Failure ) ;
1513 	Q3_REQUIRE_OR_RESULT( shape->IsObjectValid () , kQ3Failure ) ;
1514 	Q3_REQUIRE_OR_RESULT( Q3_OBJECT_IS_CLASS ( shape, E3Shape ) || Q3_OBJECT_IS_CLASS ( shape, E3Set ), kQ3Failure ) ;
1515 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(data), kQ3Failure);
1516 
1517 
1518 
1519 	// Debug build checks
1520 #if Q3_DEBUG
1521 	if (0) // Further checks on shape
1522 		return(kQ3Failure);
1523 
1524 	if (0) // Further checks on theType
1525 		return(kQ3Failure);
1526 
1527 	if (0) // Further checks on data
1528 		return(kQ3Failure);
1529 #endif
1530 
1531 
1532 
1533 	// Call the bottleneck
1534 	E3System_Bottleneck();
1535 
1536 
1537 
1538 	// Call our implementation
1539 	return shape->GetElement ( theType, data ) ;
1540 }
1541 
1542 
1543 
1544 
1545 
1546 //=============================================================================
1547 //      Q3Shape_ContainsElement : Quesa API entry point.
1548 //-----------------------------------------------------------------------------
1549 TQ3Boolean
Q3Shape_ContainsElement(TQ3ShapeObject shape,TQ3ElementType theType)1550 Q3Shape_ContainsElement(TQ3ShapeObject shape, TQ3ElementType theType)
1551 {
1552 
1553 
1554 	// Release build checks
1555 	Q3_REQUIRE_OR_RESULT( shape != NULL, kQ3False ) ;
1556 	Q3_REQUIRE_OR_RESULT( shape->IsObjectValid () , kQ3False ) ;
1557 	Q3_REQUIRE_OR_RESULT( Q3_OBJECT_IS_CLASS ( shape, E3Shape ) || Q3_OBJECT_IS_CLASS ( shape, E3Set ), kQ3False ) ;
1558 
1559 
1560 
1561 	// Debug build checks
1562 #if Q3_DEBUG
1563 	if (0) // Further checks on shape
1564 		return(kQ3False);
1565 
1566 	if (0) // Further checks on theType
1567 		return(kQ3False);
1568 #endif
1569 
1570 
1571 
1572 	// Call the bottleneck
1573 	E3System_Bottleneck();
1574 
1575 
1576 
1577 	// Call our implementation
1578 	return shape->ContainsElement ( theType ) ;
1579 }
1580 
1581 
1582 
1583 
1584 
1585 //=============================================================================
1586 //      Q3Shape_GetNextElementType : Quesa API entry point.
1587 //-----------------------------------------------------------------------------
1588 TQ3Status
Q3Shape_GetNextElementType(TQ3ShapeObject shape,TQ3ElementType * theType)1589 Q3Shape_GetNextElementType(TQ3ShapeObject shape, TQ3ElementType *theType)
1590 {
1591 
1592 
1593 	// Release build checks
1594 	Q3_REQUIRE_OR_RESULT( shape != NULL, kQ3Failure ) ;
1595 	Q3_REQUIRE_OR_RESULT( shape->IsObjectValid () , kQ3Failure ) ;
1596 	Q3_REQUIRE_OR_RESULT( Q3_OBJECT_IS_CLASS ( shape, E3Shape ) || Q3_OBJECT_IS_CLASS ( shape, E3Set ), kQ3Failure ) ;
1597 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(theType), kQ3Failure);
1598 
1599 
1600 
1601 	// Debug build checks
1602 #if Q3_DEBUG
1603 	if (0) // Further checks on shape
1604 		return(kQ3Failure);
1605 
1606 	if (0) // Further checks on theType
1607 		return(kQ3Failure);
1608 #endif
1609 
1610 
1611 
1612 	// Call the bottleneck
1613 	E3System_Bottleneck();
1614 
1615 
1616 
1617 	// Call our implementation
1618 	return shape->GetNextElementType ( theType ) ;
1619 }
1620 
1621 
1622 
1623 
1624 
1625 //=============================================================================
1626 //      Q3Shape_EmptyElements : Quesa API entry point.
1627 //-----------------------------------------------------------------------------
1628 TQ3Status
Q3Shape_EmptyElements(TQ3ShapeObject shape)1629 Q3Shape_EmptyElements(TQ3ShapeObject shape)
1630 {
1631 
1632 
1633 	// Release build checks
1634 	Q3_REQUIRE_OR_RESULT( shape != NULL, kQ3Failure ) ;
1635 	Q3_REQUIRE_OR_RESULT( shape->IsObjectValid () , kQ3Failure ) ;
1636 	Q3_REQUIRE_OR_RESULT( Q3_OBJECT_IS_CLASS ( shape, E3Shape ) || Q3_OBJECT_IS_CLASS ( shape, E3Set ), kQ3Failure ) ;
1637 
1638 
1639 
1640 	// Debug build checks
1641 #if Q3_DEBUG
1642 	if (0) // Further checks on shape
1643 		return(kQ3Failure);
1644 #endif
1645 
1646 
1647 
1648 	// Call the bottleneck
1649 	E3System_Bottleneck();
1650 
1651 
1652 
1653 	// Call our implementation
1654 	return shape->EmptyElements () ;
1655 }
1656 
1657 
1658 
1659 
1660 
1661 //=============================================================================
1662 //      Q3Shape_ClearElement : Quesa API entry point.
1663 //-----------------------------------------------------------------------------
1664 TQ3Status
Q3Shape_ClearElement(TQ3ShapeObject shape,TQ3ElementType theType)1665 Q3Shape_ClearElement(TQ3ShapeObject shape, TQ3ElementType theType)
1666 {
1667 
1668 
1669 	// Release build checks
1670 	Q3_REQUIRE_OR_RESULT( shape != NULL, kQ3Failure ) ;
1671 	Q3_REQUIRE_OR_RESULT( shape->IsObjectValid () , kQ3Failure ) ;
1672 	Q3_REQUIRE_OR_RESULT( Q3_OBJECT_IS_CLASS ( shape, E3Shape ) || Q3_OBJECT_IS_CLASS ( shape, E3Set ), kQ3Failure ) ;
1673 
1674 
1675 
1676 	// Debug build checks
1677 #if Q3_DEBUG
1678 	if (0) // Further checks on shape
1679 		return(kQ3Failure);
1680 
1681 	if (0) // Further checks on theType
1682 		return(kQ3Failure);
1683 #endif
1684 
1685 
1686 
1687 	// Call the bottleneck
1688 	E3System_Bottleneck();
1689 
1690 
1691 
1692 	// Call our implementation
1693 	return shape->ClearElement ( theType ) ;
1694 }
1695 
1696 
1697 
1698 
1699 
1700 //=============================================================================
1701 //      Q3Bitmap_Empty : Quesa API entry point.
1702 //-----------------------------------------------------------------------------
1703 #pragma mark -
1704 TQ3Status
Q3Bitmap_Empty(TQ3Bitmap * bitmap)1705 Q3Bitmap_Empty(TQ3Bitmap *bitmap)
1706 {
1707 
1708 
1709 	// Release build checks
1710 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(bitmap), kQ3Failure);
1711 
1712 
1713 
1714 	// Debug build checks
1715 #if Q3_DEBUG
1716 	if (0) // Further checks on bitmap
1717 		return(kQ3Failure);
1718 #endif
1719 
1720 
1721 
1722 	// Call the bottleneck
1723 	E3System_Bottleneck();
1724 
1725 
1726 
1727 	// Call our implementation
1728 	return(E3Bitmap_Empty(bitmap));
1729 }
1730 
1731 
1732 
1733 
1734 
1735 //=============================================================================
1736 //      Q3Bitmap_GetImageSize : Quesa API entry point.
1737 //-----------------------------------------------------------------------------
1738 TQ3Uns32
Q3Bitmap_GetImageSize(TQ3Uns32 width,TQ3Uns32 height)1739 Q3Bitmap_GetImageSize(TQ3Uns32 width, TQ3Uns32 height)
1740 {
1741 
1742 
1743 	// Release build checks
1744 
1745 
1746 
1747 	// Debug build checks
1748 #if Q3_DEBUG
1749 	if (0) // Further checks on width
1750 		return(0);
1751 
1752 	if (0) // Further checks on height
1753 		return(0);
1754 #endif
1755 
1756 
1757 
1758 	// Call the bottleneck
1759 	E3System_Bottleneck();
1760 
1761 
1762 
1763 	// Call our implementation
1764 	return(E3Bitmap_GetImageSize(width, height));
1765 }
1766 
1767 
1768 
1769 
1770 
1771 //=============================================================================
1772 //      Q3Bitmap_GetBit : Quesa API entry point.
1773 //-----------------------------------------------------------------------------
1774 TQ3Boolean
Q3Bitmap_GetBit(const TQ3Bitmap * theBitmap,TQ3Uns32 x,TQ3Uns32 y)1775 Q3Bitmap_GetBit(const TQ3Bitmap *theBitmap, TQ3Uns32 x, TQ3Uns32 y)
1776 {
1777 
1778 
1779 	// Release build checks
1780 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(theBitmap), kQ3False);
1781 	Q3_REQUIRE_OR_RESULT(x < theBitmap->width,    kQ3False);
1782 	Q3_REQUIRE_OR_RESULT(y < theBitmap->height,   kQ3False);
1783 
1784 
1785 
1786 	// Debug build checks
1787 #if Q3_DEBUG
1788 	if (0) // Further checks on theBitmap
1789 		return(kQ3False);
1790 
1791 	if (0) // Further checks on x
1792 		return(kQ3False);
1793 
1794 	if (0) // Further checks on y
1795 		return(kQ3False);
1796 #endif
1797 
1798 
1799 
1800 	// Call the bottleneck
1801 	E3System_Bottleneck();
1802 
1803 
1804 
1805 	// Call our implementation
1806 	return(E3Bitmap_GetBit(theBitmap, x, y));
1807 }
1808 
1809 
1810 
1811 
1812 
1813 //=============================================================================
1814 //      Q3Bitmap_SetBit : Quesa API entry point.
1815 //-----------------------------------------------------------------------------
1816 TQ3Status
Q3Bitmap_SetBit(TQ3Bitmap * theBitmap,TQ3Uns32 x,TQ3Uns32 y,TQ3Boolean theState)1817 Q3Bitmap_SetBit(TQ3Bitmap *theBitmap, TQ3Uns32 x, TQ3Uns32 y, TQ3Boolean theState)
1818 {
1819 
1820 
1821 	// Release build checks
1822 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(theBitmap), kQ3Failure);
1823 	Q3_REQUIRE_OR_RESULT(x < theBitmap->width,    kQ3Failure);
1824 	Q3_REQUIRE_OR_RESULT(y < theBitmap->height,   kQ3Failure);
1825 
1826 
1827 
1828 	// Debug build checks
1829 #if Q3_DEBUG
1830 	if (0) // Further checks on theBitmap
1831 		return(kQ3Failure);
1832 
1833 	if (0) // Further checks on x
1834 		return(kQ3Failure);
1835 
1836 	if (0) // Further checks on y
1837 		return(kQ3Failure);
1838 
1839 	if (0) // Further checks on theState
1840 		return(kQ3Failure);
1841 #endif
1842 
1843 
1844 
1845 	// Call the bottleneck
1846 	E3System_Bottleneck();
1847 
1848 
1849 
1850 	// Call our implementation
1851 	return(E3Bitmap_SetBit(theBitmap, x, y, theState));
1852 }
1853 
1854 
1855 
1856 
1857 
1858