fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / FieldContainer / Attachments / OSGVoidPAttachment.h
blobbec6739018003d8bc76e706c6d7f17aa710b765c
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2005 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
18 * *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
23 * *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGVOIDPATTACHMENT_H_
40 #define _OSGVOIDPATTACHMENT_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include "OSGSystemDef.h"
46 #include "OSGBaseTypes.h"
47 #include "OSGSimpleAttachment.h"
48 #include "OSGSysSFields.h"
50 OSG_BEGIN_NAMESPACE
52 /*! \ingroup GrpSystemFieldContainerAttachments
53 \nohierarchy
56 struct VoidPAttachmentDesc
58 typedef SFVoidP FieldTypeT;
60 static const Char8 *getTypeName (void)
62 return "VoidPAttachment";
65 static const Char8 *getFieldName (void)
67 return "data";
70 static const Char8 *getGroupName (void)
72 return "voidp";
75 static const Char8 *getParentTypeName(void)
77 return "Attachment";
80 static InitContainerF getInitMethod(void) { return NULL; }
84 #ifndef DOXYGEN_SHOULD_SKIP_THIS
85 /*! \ingroup GrpSystemFieldContainerAttachments
87 typedef SimpleAttachment<VoidPAttachmentDesc> VoidPAttachment;
88 #else
89 /*! \ingroup GrpSystemFieldContainerAttachments
91 class VoidPAttachment : public SimpleAttachment<VoidPAttachmentDesc> {};
92 #endif
94 #ifndef DOXYGEN_SHOULD_SKIP_THIS
95 OSG_GEN_CONTAINERPTR(VoidPAttachment);
96 #endif
98 #ifdef WIN32
99 /*! \ingroup GrpSystemFieldContainerAttachments
102 template <> OSG_SYSTEM_DLLMAPPING
103 SimpleAttachment<VoidPAttachmentDesc>::TypeObject &
104 SimpleAttachment<VoidPAttachmentDesc>::getType(void);
106 /*! \ingroup GrpSystemFieldContainerAttachments
109 template <> OSG_SYSTEM_DLLMAPPING
110 const SimpleAttachment<VoidPAttachmentDesc>::TypeObject &
111 SimpleAttachment<VoidPAttachmentDesc>::getType(void) const;
113 /*! \ingroup GrpSystemFieldContainerAttachments
116 template <> OSG_SYSTEM_DLLMAPPING
117 SimpleAttachment<VoidPAttachmentDesc>::TypeObject &
118 SimpleAttachment<VoidPAttachmentDesc>::getClassType(void);
119 #endif
122 /*! \ingroup GrpSystemFieldContainerAttachments
125 OSG_SYSTEM_DLLMAPPING
126 void *getVoidP(AttachmentContainer * const container);
128 /*! \ingroup GrpSystemFieldContainerAttachments
131 OSG_SYSTEM_DLLMAPPING
132 void setVoidP(AttachmentContainer * const container,
133 void * pData,
134 bool bInternal = false);
136 OSG_END_NAMESPACE
138 #endif /* _OSGNAMEATTACHMENT_H_ */