I think we should have a test case that builds a non-system field 
container (ie. a user defined fcd for an application).  This would serve 
the purpose of making sure this is supported and also show an example of 
how to do it.

-Allen

Carsten Neumann wrote:
>       Hi,
> 
> Dirk Reiners wrote:
>>      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.
> 
> I don't know about fcdEdit, but fcdProcess.pl never supported empty
> library names (in that case it replaces @!Libname!@ and @!LIBNAME!@ with
> <UNDEF>).
> But actually I don't see a reason why this has to be the case, so I'll
> see what can be done - at least when systemcomponent="false". I'll
> prepare a patch for this.
> 
>> 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.
> 
> I agree.
> 
>> ************
>>   #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.
> 
> These macros are #defined to nothing in OSGExportDefines.h, so it should
> not matter much.
> 
> 
>       Carsten
> 
> -------------------------------------------------------------------------
> 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
> 


-------------------------------------------------------------------------
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

Reply via email to