00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef _OSGSIMPLEATTACHMENTS_H_
00040 #define _OSGSIMPLEATTACHMENTS_H_
00041 #ifdef __sgi
00042 #pragma once
00043 #endif
00044
00045 #ifdef OSG_DOC_FILES_IN_MODULE
00046
00049 #endif
00050
00051 #include <OSGBaseTypes.h>
00052 #include <OSGAttachment.h>
00053
00054 OSG_BEGIN_NAMESPACE
00055
00060 struct NameAttachmentDesc
00061 {
00062 static FieldDescription *_desc[];
00063
00064 typedef SFString FieldTypeT;
00065
00066 static const Char8 *getTypeName (void)
00067 {
00068 return "Name";
00069 }
00070
00071 static const Char8 *getFieldName (void)
00072 {
00073 return "name";
00074 }
00075
00076 static const Char8 *getGroupName (void)
00077 {
00078 return "name";
00079 }
00080
00081 static const Char8 *getParentTypeName(void)
00082 {
00083 return "Attachment";
00084 }
00085
00086 static InitContainerF getInitMethod(void) { return NULL; }
00087
00088 static FieldDescription **getDesc (void) { return _desc; }
00089 };
00090
00094 typedef SimpleAttachment<NameAttachmentDesc > Name;
00095
00099 typedef FCPtr <AttachmentPtr, Name> NamePtr;
00100
00101
00102 class AttachmentContainerPtr;
00103
00107 OSG_SYSTEMLIB_DLLMAPPING
00108 const Char8 *getName( AttachmentContainerPtr container);
00109
00113 OSG_SYSTEMLIB_DLLMAPPING
00114 void setName( AttachmentContainerPtr container,
00115 const std::string &name );
00116
00120 OSG_SYSTEMLIB_DLLMAPPING
00121 void setName( AttachmentContainerPtr container,
00122 const Char8 *name );
00123
00124
00125 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00126
00127 #ifndef OSG_COMPILESIMPLEATTACHMENTSINST
00128 OSG_FC_DLLEXPORT_DECL(SimpleAttachment,
00129 NameAttachmentDesc,
00130 OSG_SYSTEMLIB_DLLTMPLMAPPING)
00131 #endif
00132
00133 #endif
00134
00135
00140 struct VoidPAttachmentDesc
00141 {
00142 static FieldDescription *_desc[];
00143
00144 typedef SFVoidP FieldTypeT;
00145
00146 static const Char8 *getTypeName (void)
00147 {
00148 return "VoidPAttachment";
00149 }
00150
00151 static const Char8 *getFieldName (void)
00152 {
00153 return "data";
00154 }
00155
00156 static const Char8 *getGroupName (void)
00157 {
00158 return "voidp";
00159 }
00160
00161 static const Char8 *getParentTypeName(void)
00162 {
00163 return "Attachment";
00164 }
00165
00166 static InitContainerF getInitMethod(void) { return NULL; }
00167
00168 static FieldDescription **getDesc (void) { return _desc; }
00169 };
00170
00174 typedef SimpleAttachment<VoidPAttachmentDesc > VoidPAttachment;
00175
00179 typedef FCPtr <AttachmentPtr, VoidPAttachment> VoidPAttachmentPtr;
00180
00184 OSG_SYSTEMLIB_DLLMAPPING
00185 void *getVoidP(AttachmentContainerPtr container);
00186
00190 OSG_SYSTEMLIB_DLLMAPPING
00191 void setVoidP(AttachmentContainerPtr container,
00192 void *pData,
00193 bool internal = false );
00194
00195 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00196
00197 #ifndef OSG_COMPILESIMPLEATTACHMENTSINST
00198 OSG_FC_DLLEXPORT_DECL(SimpleAttachment,
00199 VoidPAttachmentDesc,
00200 OSG_SYSTEMLIB_DLLTMPLMAPPING)
00201 #endif
00202
00203 #endif
00204
00205 OSG_END_NAMESPACE
00206
00207 #define OSGSIMPLEATTACHMENTS_HEADER_CVSID "@(#)$Id: $"
00208
00209 #endif