5 from FCDElement
import FCDElement
;
64 "RenderPropBitVector" : "Base",
70 "Quaternion" : "Math",
71 "Quaternionr" : "Math",
72 "Quaternionfx" : "Math",
144 class Field(FCDElement
):
145 """Represents a <Field/> element from a .fcd file.
149 super(Field
, self
).__init
__();
150 self
.m_log
= logging
.getLogger("Field");
151 self
.m_fieldContainer
= None;
154 def initFCDDict(self
):
155 """Sets the fcd dictionary to default values.
157 self
.setFCD("name", "", True);
158 self
.setFCD("category", "", True);
159 self
.setFCD("type", "", True);
160 self
.setFCD("pointerType", "", True);
161 self
.setFCD("typeNamespace", "", True);
162 self
.setFCD("cardinality", "", True);
163 self
.setFCD("visibility", "external", True);
164 self
.setFCD("fieldFlags", "", True);
165 self
.setFCD("defaultValue", "", True);
166 self
.setFCD("access", "public", True);
167 self
.setFCD("defaultHeader", "", True);
168 self
.setFCD("fieldHeader", "(AUTO)", True);
169 self
.setFCD("typeHeader", "(AUTO)", True);
170 self
.setFCD("description", "", True);
171 self
.setFCD("linkSParent", "false", True);
172 self
.setFCD("linkMParent", "false", True);
173 self
.setFCD("removeTo", "", True);
174 self
.setFCD("removeToSet", "false", True);
175 self
.setFCD("pod", "(AUTO)", True);
176 self
.setFCD("storeless", "false", True);
177 self
.setFCD("virtual", "false", True);
178 self
.setFCD("publicRead", "false", True);
180 self
.setFCD("clearMField", "true", True);
182 # are mf access functions for ptr field available (they might be user generated)
183 self
.setFCD("hasPushToField", "false", True);
184 self
.setFCD("hasAssignMField", "false", True);
185 self
.setFCD("hasInsertIntoMField", "false", True);
186 self
.setFCD("hasReplaceInMFieldIndex", "false", True);
187 self
.setFCD("hasReplaceInMFieldObject", "false", True);
188 self
.setFCD("hasRemoveFromMFieldIndex", "false", True);
189 self
.setFCD("hasRemoveFromMFieldObject", "false", True);
190 self
.setFCD("hasClearField", "false", True);
192 # names of the mf access functions for ptr field
193 self
.setFCD("pushToFieldAs", "", True);
194 self
.setFCD("assignMFieldAs", "", True);
195 self
.setFCD("insertIntoMFieldAs", "", True);
196 self
.setFCD("replaceInMFieldIndexAs", "", True);
197 self
.setFCD("replaceInMFieldObjectAs", "", True);
198 self
.setFCD("removeFromMFieldIndexAs", "", True);
199 self
.setFCD("removeFromMFieldObjectAs", "", True);
200 self
.setFCD("clearFieldAs", "", True);
202 self
.setFCD("ptrFieldAccess", "std", True);
204 self
.setFCD("disallowNULL", "false", True);
205 self
.setFCD("childParentType", "", True);
206 self
.setFCD("linkParentField", "XX", True);
208 self
.setFCD("interfaceType", "", True);
209 self
.setFCD("customBinCopy", "false", True);
210 self
.setFCD("customSync", "false", True);
212 self
.setFCD("fromNamespace", "OSG", True);
214 self
.setFCD("osg2Ignore", "false", True);
216 def setFieldContainer(self
, container
):
217 self
.m_fieldContainer
= container
;
219 def getFieldContainer(self
):
220 return self
.m_fieldContainer
;
225 def isProtected(self
):
226 return self
["access"] == "protected";
229 return self
["access"] == "public";
231 def isPublicRead(self
):
232 return self
["publicRead"] == "true" or self
.isPublic();
234 def isPublicWrite(self
):
235 return self
.isPublic();
238 return self
["access"] != "none";
241 return self
["isSField"];
244 return self
["isMField"];
246 def isPtrField(self
):
247 return self
["category"] == "pointer";
249 def isChildField(self
):
250 return self
["pointertype"] == "child";
252 def isParentField(self
):
253 return self
["pointertype"] == "parent";
256 # Fill out dictionary from in (fcd) dictionary
260 # make sure old files work
261 if self
.getFCD("category") == "":
262 if self
.getFCD("type").endswith("Ptr"):
263 self
.setFCD("category", "pointer");
264 self
.setFCD("type", self
.getFCD("type")[:-3]);
266 typeStart
= self
.getFCD("type").rfind("::");
269 self
.setFCD("typeNamespace", self
.getFCD("type")[:typeStart
]);
270 self
.setFCD("type", self
.getFCD("type")[typeStart
+2:]);
272 self
["isStoreless"] = self
.getFCD("storeless") == "True";
274 # -----------------------------------------------------------------
276 # -----------------------------------------------------------------
278 TypeRaw
= self
.getFCD("type");
279 TypeRawCaps
= self
._upcaseFirst
(TypeRaw
);
281 Type
= self
.getFCD("type");
282 TypeNS
= self
.getFCD("typeNamespace");
283 TypeCaps
= self
._upcaseFirst
(Type
);
285 self
.nsFilePrefix
= ""
287 if TypeNS
!= "" and \
288 TypeNS
== self
.m_fieldContainer
.getFCD("libnamespace") and \
289 TypeNS
!= "OSG" and \
292 self
.nsFilePrefix
= TypeNS
295 if TypeNS
!= "" and not TypeNS
.endswith("::"):
296 TypeNS
= TypeNS
+ "::"
298 # -----------------------------------------------------------------
300 # -----------------------------------------------------------------
302 self
["category"] = "";
303 self
["pointertype"] = "";
304 self
["pointerbasetype"] = "";
305 self
["isChildField"] = False
306 self
["isParentField"] = False
308 if self
.getFCD("category") == "data" or self
.getFCD("category") == "":
309 self
.m_log
.info("finalize: \"category\" is empty, assuming \"data\"");
311 FieldTypeNS
= TypeNS
;
312 FieldTypeCaps
= TypeCaps
;
314 elif self
.getFCD("category") == "pointer":
315 self
["category"] = "pointer";
316 self
["pointertype"] = "internal";
318 TypeCaps
= self
._upcaseFirst
(Type
+ "Ptr");
320 FieldType
= "Unrec" + TypeRaw
+ "Ptr"; # + "InternalPtr";
321 FieldTypeNS
= TypeNS
;
322 FieldTypeCaps
= "Unrec" + TypeRawCaps
+ "Ptr"; # + "InternalPtr";
324 elif self
.getFCD("category") == "recpointer":
325 self
["category"] = "pointer";
326 self
["pointertype"] = "internal";
328 TypeCaps
= self
._upcaseFirst
(Type
+ "Ptr");
330 FieldType
= "Rec" + TypeRaw
+ "Ptr"; # + "InternalPtr";
331 FieldTypeNS
= TypeNS
;
332 FieldTypeCaps
= "Rec" + TypeRawCaps
+ "Ptr"; # + "InternalPtr";
334 elif self
.getFCD("category") == "childpointer":
335 self
["category"] = "pointer";
336 self
["pointertype"] = "child";
337 self
["isChildField"] = True
339 if self
.getFCD("childParentType") == "":
340 self
["childparenttype"] = "FieldContainer"
342 self
["childparenttype"] = self
.getFCD("childParentType")
344 TypeCaps
= self
._upcaseFirst
(Type
+ "Ptr");
346 FieldType
= "Unrec" + "Child" + TypeRaw
+ "Ptr";
347 FieldTypeNS
= TypeNS
;
348 FieldTypeCaps
= "Unrec" + "Child" + TypeRawCaps
+ "Ptr";
350 elif self
.getFCD("category") == "parentpointer":
351 self
["category"] = "pointer";
352 self
["pointertype"] = "parent";
353 self
["isParentField"] = True
355 TypeCaps
= self
._upcaseFirst
(Type
);
357 FieldType
= "Parent" + TypeRaw
+ "Ptr";
358 self
["FieldTypeRaw"] = TypeRaw
+ "Ptr";
359 FieldTypeNS
= TypeNS
;
360 FieldTypeCaps
= "Parent" + TypeRawCaps
+ "Ptr";
362 elif self
.getFCD("category") == "weakpointer":
363 self
["category"] = "pointer";
364 self
["pointertype"] = "weak";
366 TypeCaps
= self
._upcaseFirst
(Type
+ "Ptr");
368 FieldType
= "Weak" + TypeRaw
+ "Ptr"; #TypeRaw + "WeakPtr";
369 FieldTypeNS
= TypeNS
;
370 FieldTypeCaps
= "Weak" + TypeRawCaps
+ "Ptr"; #TypeRawCaps + "WeakPtr";
371 elif self
.getFCD("category") == "uncountedpointer":
372 self
["category"] = "pointer";
373 self
["pointertype"] = "uncounted";
375 TypeCaps
= self
._upcaseFirst
(Type
+ "Ptr");
377 FieldType
= "Uncounted" + TypeRaw
+ "Ptr"; #TypeRaw + "WeakPtr";
378 FieldTypeNS
= TypeNS
;
379 FieldTypeCaps
= "Uncounted" + TypeRawCaps
+ "Ptr"; #TypeRawCaps + "WeakPtr";
381 elif self
.getFCD("category") == "custompointer":
382 self
["category"] = "pointer";
383 self
["pointertype"] = "internal";
386 FieldTypeNS
= TypeNS
;
387 FieldTypeCaps
= TypeCaps
;
390 self
.m_log
.warning("finalize: \"category\" has invalid value: >%s<",
391 self
.getFCD("category"));
393 if TypeNS
== "std::":
397 self
["TypeNamespace"] = TypeNS
;
398 self
["TypeNS"] = TypeNS
;
399 self
["TypeCaps"] = TypeCaps
;
401 if self
.getFCD("interfaceType") != "":
402 self
["FullType"] = self
.getFCD("interfaceType");
404 self
["FullType"] = TypeNS
+ Type
;
406 self
["TypeRaw"] = TypeRaw
;
408 self
["FieldType"] = FieldType
;
409 self
["FieldTypeNS"] = FieldTypeNS
;
410 self
["FieldTypeCaps"] = FieldTypeCaps
412 self
["linkParentField"] = self
.getFCD("linkParentField");
414 if self
.getFCD("customBinCopy") == "" or \
415 self
.getFCD("customBinCopy") == "false":
417 self
["customBinCopy"] = False
419 self
["customBinCopy"] = True
421 if self
.getFCD("customSync") == "" or \
422 self
.getFCD("customSync") == "false":
424 self
["customSync"] = False
426 self
["customSync"] = True
430 # -----------------------------------------------------------------
431 # Name and Cardinality
432 # -----------------------------------------------------------------
434 self
["Name"] = self
.getFCD("name")[0].upper() + self
.getFCD("name")[1:];
435 self
["DescName"] = self
.getFCD("name");
437 if self
.getFCD("name") == "id":
438 self
.m_log
.warning("finalize: invalid field name: >%s<",
440 self
["Name"] = self
["Name"] + "_invalidFieldname"
441 self
["DescName"] = self
["DescName"] + "_invalidFieldname"
443 self
["isSField"] = False;
444 self
["isMField"] = False;
446 if self
.getFCD("cardinality") == "single":
447 self
["cardinality"] = "single"
448 self
["isSField"] = True;
450 self
["VarName"] = "sf" + self
["Name"];
451 elif self
.getFCD("cardinality") == "multi":
452 self
["cardinality"] = "multi"
453 self
["isMField"] = True;
455 self
["VarName"] = "mf" + self
["Name"];
457 self
.m_log
.warning("finalize: \"cardinality\" has invalid value: %s",
458 self
.getFCD("cardinality"));
460 if self
.getFCD("access") == "protected":
461 self
["access"] = "protected";
462 self
["isProtected"] = True;
463 elif self
.getFCD("access") == "public":
464 self
["access"] = "public";
465 self
["isPublic"] = True;
466 elif self
.getFCD("access") == "none":
467 self
["access"] = "none";
468 self
["noAccess"] = True;
470 self
.m_log
.warning("finalize: \"access\" has invalid value: >%s<",
471 self
.getFCD("access"));
474 if self
.getFCD("publicRead") == "true" or self
["access"] == "public":
475 self
["publicRead"] = "true";
476 self
["isPublicRead"] = True;
478 self
["publicRead"] = "false";
479 self
["isPublicRead"] = False;
482 if "isPublic" in self
and self
["access"] == "public" and self
["pointertype"] != "parent":
483 self
["isPublicWrite"] = True;
485 self
["isPublicWrite"] = False;
487 if self
.getFCD("description").strip() == "":
488 self
["Description"] = "";
489 self
["SafeDescription"] = "\"\"";
491 self
["Description"] = self
._formatString
(self
.getFCD("description"), 4)
492 self
["SafeDescription"] = self
._formatSafeString
(self
.getFCD("description"), 8)
494 if self
["isMField"] == True:
495 self
["GenFieldFlags"] = "(Field::MFDefaultFlags"
497 self
["GenFieldFlags"] = "(Field::SFDefaultFlags"
499 if self
.getFCD("linkSParent") == "true":
500 self
["linkSParent"] = True;
501 self
["GenFieldFlags"] = \
502 self
["GenFieldFlags"] + " | Field::FLinkParents"
504 self
["linkSParent"] = False;
506 if self
.getFCD("linkMParent") == "true":
507 self
["linkMParent"] = True;
508 self
["GenFieldFlags"] = \
509 self
["GenFieldFlags"] + " | Field::FLinkParents"
511 self
["linkMParent"] = False;
515 # if ((self.getFCD("header") == "") or
516 # (self.getFCD("header") == "(AUTO)") ):
517 # if self.getFieldContainer().isSystemComponent():
518 # typeInclude = "OSG";
520 # typeInclude = "OpenSG/OSG";
522 # if includeTable.has_key(TypeRawCaps):
523 # typeInclude = typeInclude + includeTable[TypeRawCaps] + "Fields.h"
525 # typeInclude = typeInclude + TypeRawCaps + "Fields.h"
528 # typeInclude = self.getFCD("header");
530 # self["TypeInclude"] = typeInclude;
533 if self
.getFieldContainer().isDecoratable() or \
534 self
.getFCD("virtual") == "true":
536 self
["MethodType"] = "virtual";
540 self
["MethodType"] = "";
545 if self
.getFCD("pod") == "(AUTO)":
547 if podTable
.has_key(self
.getFCD("type")) == True:
548 isPod
= podTable
[self
.getFCD("type")]
552 elif self
.getFCD("pod") == "false":
556 self
["RetConst"] = " ";
557 self
["RetRef"] = " ";
560 self
["RetConst"] = "const";
561 self
["RetRef"] = "&";
562 self
["ArgRef"] = "&";
564 if self
.getFCD("defaultValue") != "":
565 if self
["category"] == "pointer" and self
["cardinality"] == "single":
566 self
["TypedDefault"] = self
.getFCD("defaultValue");
567 elif self
["category"] == "pointer" and self
["cardinality"] == "multi":
568 self
["TypedDefault"] = "";
570 self
["TypedDefault"] = \
571 self
["FullType"] + "(" + \
572 self
.getFCD("defaultValue") + ")";
574 if self
["category"] == "pointer" and self
["cardinality"] == "single":
575 # self["TypedDefault"] = self["TypeNS"] + self["Type"] + "(NULL)";
576 self
["TypedDefault"] = "NULL";
578 self
["TypedDefault"] = "";
580 if self
.getFCD("visibility") == "external":
581 self
["Visibility"] = "false";
582 elif self
.getFCD("visibility") == "internal":
583 self
["Visibility"] = "true";
584 # self["GenFieldFlags"] = \
585 # self["GenFieldFlags"] + " | Field::FInternal"
587 self
.m_log
.warning("finalize: \"visibility\" has invalid value: %s",
588 self
.getFCD("visibility"));
590 self
["writePushToField"] = False;
591 self
["hasPushToField"] = False;
592 self
["writeAssignMField"] = False;
593 self
["hasAssignMField"] = False;
594 self
["writeInsertIntoMField"] = False;
595 self
["hasInsertIntoMField"] = False;
596 self
["writeReplaceInMFieldIndex"] = False;
597 self
["hasRemoveFromMFieldIndex"] = False;
598 self
["writeReplaceInMFieldObject"] = False;
599 self
["hasReplaceInMFieldObject"] = False;
600 self
["writeRemoveFromMFieldIndex"] = False;
601 self
["hasRemoveFromMFieldIndex"] = False;
602 self
["writeRemoveFromMFieldObject"] = False;
603 self
["hasRemoveFromMFieldObject"] = False;
604 self
["writeClearField"] = False;
605 self
["hasClearField"] = False;
607 self
["ptrFieldCustomAccess"] = False;
608 self
["ptrFieldNullCheckAccess"] = False;
609 self
["ptrFieldStandardAccess"] = False;
611 if self
.getFCD("ptrFieldAccess") == "std":
612 self
["ptrFieldStandardAccess"] = True;
613 self
["writePushToField"] = True;
614 self
["hasPushToField"] = True;
615 self
["writeRemoveFromMFieldIndex"] = True;
616 self
["hasRemoveFromMFieldIndex"] = True;
617 self
["writeRemoveFromMFieldObject"] = True;
618 self
["hasRemoveFromMFieldObject"] = True;
619 self
["writeClearField"] = True;
620 self
["hasClearField"] = True;
621 self
["writeAssignMField"] = True;
622 self
["hasAssignMField"] = True;
624 elif self
.getFCD("ptrFieldAccess") == "nullCheck":
625 self
["ptrFieldNullCheckAccess"] = True;
626 self
["writePushToField"] = True;
627 self
["hasPushToField"] = True;
628 self
["writeAssignMField"] = True;
629 self
["hasAssignMField"] = True;
630 self
["writeInsertIntoMField"] = True;
631 self
["hasInsertIntoMField"] = True;
632 self
["writeReplaceInMFieldIndex"] = True;
633 self
["hasReplaceInMFieldIndex"] = True;
634 self
["writeReplaceInMFieldObject"] = True;
635 self
["hasReplaceInMFieldObject"] = True;
636 self
["writeRemoveFromMFieldIndex"] = True;
637 self
["hasRemoveFromMFieldIndex"] = True;
638 self
["writeRemoveFromMFieldObject"] = True;
639 self
["hasRemoveFromMFieldObject"] = True;
640 self
["writeClearField"] = True;
641 self
["hasClearField"] = True;
643 elif self
.getFCD("ptrFieldAccess") == "custom":
644 self
["ptrFieldCustomAccess"] = True;
645 self
["hasPushToField"] = (self
.getFCD("hasPushToField") == "true" or
646 self
.getFCD("pushToFieldAs") != "" );
647 self
["hasAssignMField"] = (self
.getFCD("hasAssignMField") == "true" or
648 self
.getFCD("assignMFieldAs") != "" );
649 self
["hasInsertIntoMField"] = (self
.getFCD("hasInsertIntoMField") == "true" or
650 self
.getFCD("insertIntoMFieldAs") != "" );
651 self
["hasReplaceInMFieldIndex"] = (self
.getFCD("hasReplaceInMFieldIndex") == "true" or
652 self
.getFCD("replaceInMFieldIndexAs") != "" );
653 self
["hasReplaceInMFieldObject"] = (self
.getFCD("hasReplaceInMFieldObject") == "true" or
654 self
.getFCD("replaceInMFieldObjectAs") != "" );
655 self
["hasRemoveFromMFieldIndex"] = (self
.getFCD("hasRemoveFromMFieldIndex") == "true" or
656 self
.getFCD("removeFromMFieldIndexAs") != "" );
657 self
["hasRemoveFromMFieldObject"] = (self
.getFCD("hasRemoveFromMFieldObject") == "true" or
658 self
.getFCD("removeFromMFieldObjectAs") != "" );
659 self
["hasClearField"] = (self
.getFCD("hasClearField") == "true" or
660 self
.getFCD("clearFieldAs") != "" );
663 print "Unknown pointer field acess mode ", self
.getFCD("ptrFieldAccess")
666 if self
["ptrFieldStandardAccess"]:
667 self
["GenFieldFlags"] += " | Field::FStdAccess";
668 elif self
["ptrFieldNullCheckAccess"]:
669 self
["GenFieldFlags"] += " | Field::FNullCheckAccess";
670 elif self
["ptrFieldCustomAccess"]:
671 self
["GenFieldFlags"] += " | Field::FCustomAccess";
673 self
["GenFieldFlags"] = self
["GenFieldFlags"] + ")"
674 # No changes to GenFieldFlags past this point!
676 if self
.getFCD("pushToFieldAs") != "":
677 self
["PushToField"] = self
.getFCD("pushToFieldAs");
679 self
["PushToField"] = "pushTo" + self
["Name"];
683 if self
.getFCD("assignMFieldAs") != "":
684 self
["AssignMField"] = self
.getFCD("assignMFieldAs");
686 self
["AssignMField"] = "assign" + self
["Name"];
690 if self
.getFCD("insertIntoMFieldAs") != "":
691 self
["InsertIntoMField"] = self
.getFCD("insertIntoMFieldAs");
693 self
["InsertIntoMField"] = "insertInto" + self
["Name"];
697 if self
.getFCD("replaceInMFieldIndexAs") != "":
698 self
["ReplaceInMFieldIndex"] = self
.getFCD("replaceInMFieldIndexAs");
700 self
["ReplaceInMFieldIndex"] = "replaceIn" + self
["Name"];
704 if self
.getFCD("replaceInMFieldObjectAs") != "":
705 self
["ReplaceInMFieldObject"] = self
.getFCD("replaceInMFieldObjectAs");
707 self
["ReplaceInMFieldObject"] = "replaceObjIn" + self
["Name"];
711 if self
.getFCD("removeFromMFieldIndexAs") != "":
712 self
["RemoveFromMFieldIndex"] = self
.getFCD("removeFromMFieldIndexAs");
714 self
["RemoveFromMFieldIndex"] = "removeFrom" + self
["Name"];
718 if self
.getFCD("removeFromMFieldObjectAs") != "":
719 self
["RemoveFromMFieldObject"] = self
.getFCD("removeFromMFieldObjectAs");
721 self
["RemoveFromMFieldObject"] = "removeObjFrom" + self
["Name"];
725 if self
.getFCD("clearFieldAs") != "":
726 self
["ClearField"] = self
.getFCD("clearFieldAs");
728 self
["ClearField"] = "clear" + self
["Name"];
733 if self
.getFCD("removeTo") != "":
734 self
.setFCD("removeToSet", True);
735 self
["isRemoveToSet"] = True;
736 self
["RemoveTo"] = self
.getFCD("removeTo");
738 self
.setFCD("removeToSet", False);
739 self
["isRemoveToSet"] = False;
741 if self
.getFCD("clearMField") == "true":
742 self
["doClearMField"] = True;
744 self
["doClearMField"] = False;
747 fieldFlagsOverride
= False;
751 if self
.getFCD("fieldFlags") != "":
752 fieldFlagsOverride
= True;
754 flags
= self
["GenFieldFlags"];
756 elif self
.isMField():
757 if self
.getFCD("fieldFlags") != "":
758 fieldFlagsOverride
= True;
760 flags
= self
["GenFieldFlags"];
762 if fieldFlagsOverride
:
763 flagsFCD
= self
.getFCD("fieldFlags").split(",");
764 numFlags
= len(flagsFCD
);
768 for i
, flag
in enumerate(flagsFCD
):
769 flag
= flag
.replace(" ", "");
770 flag
= flag
.replace("\t", "");
771 flag
= flag
.replace("\n", "");
773 if (i
== 0) and (i
!= numFlags
- 1):
774 flags
= flags
+ "Field::" + flag
+ " |";
777 if i
== numFlags
- 1:
779 flags
= flags
+ " Field::" + flag
;
781 flags
= flags
+ "Field::" + flag
;
785 flags
= flags
+ " Field::" + flag
+ " |";
789 self
["Flags"] = flags
;
793 if self
.getFCD("defaultHeader") != "":
794 self
["needDefaultInclude"] = True;
796 if ((self
.getFCD("defaultHeader").find("\"") == -1) and
797 (self
.getFCD("defaultHeader").find("<") == -1) ):
798 self
["DefaultInclude"] = "\"" + self
.getFCD("defaultHeader") + "\"";
800 self
["DefaultInclude"] = self
.getFCD("defaultHeader");
802 self
["needDefaultInclude"] = False;
807 if ((self
.getFCD("fieldHeader") == "" ) or
808 (self
.getFCD("fieldHeader") == "(AUTO)") ):
810 if self
.getFieldContainer().isSystemComponent():
811 fieldInclude
= "OSG" + self
.nsFilePrefix
813 fieldInclude
= "OpenSG/OSG" + self
.nsFilePrefix
815 if includeTable
.has_key(TypeRawCaps
):
816 fieldInclude
= "\"" + fieldInclude
+ includeTable
[TypeRawCaps
] + "Fields.h" + "\""
818 fieldInclude
= "\"" + fieldInclude
+ TypeRawCaps
+ "Fields.h" + "\""
821 if ((self
.getFCD("fieldHeader").find("\"") == -1) and
822 (self
.getFCD("fieldHeader").find("<") == -1) ):
823 fieldInclude
= "\"" + self
.getFCD("fieldHeader") + "\"";
825 fieldInclude
= self
.getFCD("fieldHeader");
827 self
["FieldInclude"] = fieldInclude
828 self
["needFieldInclude"] = True;
833 if self
["category"] == "pointer":
834 if ((self
.getFCD("typeHeader") == "") or
835 (self
.getFCD("typeHeader") == "(AUTO)") ):
837 if self
.getFieldContainer().isSystemComponent():
838 typeInclude
= "OSG" + self
.nsFilePrefix
;
840 typeInclude
= "OpenSG/OSG" + self
.nsFilePrefix
;
842 typeInclude
= typeInclude
+ TypeRawCaps
;
844 typeInclude
= typeInclude
.replace("Parent", "");
845 typeInclude
= "\"" + typeInclude
+ ".h" + "\""
848 if ((self
.getFCD("typeHeader").find("\"") == -1) and
849 (self
.getFCD("typeHeader").find("<") == -1) ):
850 typeInclude
= "\"" + self
.getFCD("typeHeader") + "\"";
852 typeInclude
= self
.getFCD("typeHeader");
854 self
["TypeInclude"] = typeInclude
;
855 self
["needTypeInclude"] = True;
858 self
["TypeInclude"] = None
859 self
["needTypeInclude"] = False
863 if self
.isPtrField():
864 self
["isPtrField"] = True;
867 def _dumpValues(self
):
868 self
.m_log
.info("Field dumpValues:");
869 super(Field
, self
)._dumpValues
(self
.m_log
);