Hello,
I have generated a simple attachment class with the following field
container description:
<?xml version="1.0"?>
<FieldContainer
name="HighlightMaterialAttachment"
parent="Attachment"
library="ContribDataSolid"
pointerfieldtypes="both"
structure="concrete"
systemcomponent="true"
parentsystemcomponent="true"
decoratable="false"
childFields="none"
parentFields="none"
>
DataSolid attachment that stores the actual non highlight material on
highlighting.
<Field
name="material"
type="ChunkMaterialPtr"
cardinality="single"
visibility="external"
access="public"
>
The material to be tracked.
</Field>
</FieldContainer>
Unfortunately something is wrong here because the generated classes do
not compile. I got the following error message:
1>OSGHighlightMaterialAttachmentBase.cpp
1>OSGHighlightMaterialAttachment.cpp
1>d:\_xxx\comp\intern\opensg\source\base\fieldcontainer\fields\pointerfi
elds\OSGPointerSField.inl(107) : error C2440: 'static_cast' : cannot
convert from
'OSG::PointerSFieldCommon<AccessHandlerT,NamespaceI>::value_type' to
'OSG::ChunkMaterial *'
1> with
1> [
1>
AccessHandlerT=OSG::PointerAccessHandler<OSG::UnrecordedRefCountPolicy>,
1> NamespaceI=0
1> ]
1> Types pointed to are unrelated; conversion requires
reinterpret_cast, C-style cast or function-style cast
1>
d:\_xxx\comp\intern\opensg\source\base\fieldcontainer\fields\pointerfiel
ds\OSGPointerSField.inl(106) : while compiling class template member
function 'OSG::ChunkMaterial *const
OSG::PointerSField<PtrTypeT,RefCountPolicy,NamespaceI>::getValue(void)
const'
1> with
1> [
1> PtrTypeT=OSG::ChunkMaterial *,
1> RefCountPolicy=OSG::UnrecordedRefCountPolicy,
1> NamespaceI=0
1> ]
1>
d:\_xxx\comp\intern\graphicengine\opensg\source\contrib\datasolid\fieldc
ontainer\attachments\OSGHighlightMaterialAttachmentBase.h(207) : see
reference to class template instantiation
'OSG::PointerSField<PtrTypeT,RefCountPolicy,NamespaceI>' being compiled
1> with
1> [
1> PtrTypeT=OSG::ChunkMaterial *,
1> RefCountPolicy=OSG::UnrecordedRefCountPolicy,
1> NamespaceI=0
1> ]
1>d:\_xxx\comp\intern\opensg\source\base\fieldcontainer\fields\pointerfi
elds\OSGPointerSField.inl(117) : error C2664:
'OSG::PointerSFieldCommon<AccessHandlerT,NamespaceI>::ptrStoreSet' :
cannot convert parameter 1 from 'OSG::ChunkMaterial *const ' to
'OSG::PointerSFieldCommon<AccessHandlerT,NamespaceI>::const_value'
1> with
1> [
1>
AccessHandlerT=OSG::PointerAccessHandler<OSG::UnrecordedRefCountPolicy>,
1> NamespaceI=0
1> ]
1> Types pointed to are unrelated; conversion requires
reinterpret_cast, C-style cast or function-style cast
1>
d:\_xxx\comp\intern\opensg\source\base\fieldcontainer\fields\pointerfiel
ds\OSGPointerSField.inl(116) : while compiling class template member
function 'void
OSG::PointerSField<PtrTypeT,RefCountPolicy,NamespaceI>::setValue(OSG::Ch
unkMaterial *const )'
1> with
1> [
1> PtrTypeT=OSG::ChunkMaterial *,
1> RefCountPolicy=OSG::UnrecordedRefCountPolicy,
1> NamespaceI=0
1> ]
Can anyone give me some help on how to write a correct field container
description file for an attachment just carrying a single
ChunkMaterialUnrecPtr ?
Best,
Johannes
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users