Hi Aron,
Aron Bierbaum wrote:
> I have come up with a few changes that seem to allow things to compile
> at least. It seems that the LIBNAME value was being used even when a
> library was not set. I don't know enough about the OpenSG type system
> to know if these changes are correct though. I have attached a patch
> file with my changes.
Looking at it:
*******
Index: TemplateFieldContainer_h.txt
===================================================================
--- TemplateFieldContainer_h.txt (revision 489)
+++ TemplateFieldContainer_h.txt (working copy)
@@ -47,13 +47,17 @@
OSG_BEGIN_NAMESPACE
/*! \brief @!Classname!@ class. See \ref
+@@if isInLibrary
[EMAIL PROTECTED]@@!Classname!@ for a description.
+@@else
+ [EMAIL PROTECTED]@ for a description.
+@@endif
*/
@@if isInLibrary
class [EMAIL PROTECTED]@_DLLMAPPING @!Classname!@ : public @[EMAIL PROTECTED]
@@else
-class [EMAIL PROTECTED]@_DLLMAPPING @!Classname!@ : public @[EMAIL PROTECTED]
+class @!Classname!@ : public @[EMAIL PROTECTED]
@@endif
{
protected:
Index: TemplateFieldContainerFields_h.txt
===================================================================
--- TemplateFieldContainerFields_h.txt (revision 489)
+++ TemplateFieldContainerFields_h.txt (working copy)
@@ -117,8 +117,12 @@
enum { Convertible = NotConvertible };
@@if PointerField
+@@if isInLibrary
static [EMAIL PROTECTED]@_DLLMAPPING
DataType &getType (void);
+@@else
+ static DataType &getType (void);
+@@endif
@@endif
@@if SFPointerField
@@ -148,7 +152,9 @@
#endif
************
All of this should be ok, AFAICS.
************
#ifndef [EMAIL PROTECTED]@INST
+@@if isInLibrary
OSG_FIELD_DLLEXPORT_DECL1(SField, @[EMAIL PROTECTED],
[EMAIL PROTECTED]@_DLLTMPLMAPPING)
+@@endif
#endif
@@endif
@@ -161,9 +167,11 @@
typedef MFieldAdaptor<@[EMAIL PROTECTED], MFFieldContainerPtr> [EMAIL
PROTECTED]@Ptr;
#endif
+@@if isInLibrary
#ifndef [EMAIL PROTECTED]@INST
OSG_FIELD_DLLEXPORT_DECL1(MField, @[EMAIL PROTECTED],
[EMAIL PROTECTED]@_DLLTMPLMAPPING)
#endif
+@@endif
@@endif
OSG_END_NAMESPACE
*************
These might be a problem. Without them you won't be able to use Fields of Ptrs
to your new class, which should work. I'm not sure what the syntax for that is
in 2, though. For now I think your changes are fine.
Dirk
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users