On 31/08/2017 at 02:17, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R16
Platform: Windows ;
Language(s) : C++ ;
---------
I have a tag plugin with a sorted basearray and everything was ok, until I implemented CopyTo().
Now I am getting "error C2248: 'maxon::SortedArray<MYSELF,ARRAY>::operator =' : cannot access private member declared in class 'maxon::SortedArray<MYSELF,ARRAY>' c:\program files\maxon\cinema 4d r16\plugins oggle visibility development\source oggle visibility.cpp 10 1 Toggle Visibility"
What to do?
I read other posts about this issue, but I did not see a solution.
struct MySortedIntegerArray : public maxon::SortedArray<MySortedIntegerArray, maxon::BaseArray<Int> >
{
// your sorted array must implement a LessThan() method
static inline maxon::Bool LessThan(Int a, Int b) { return a < b; }
};
class ToggleVisibilityC : public TagData
{
public:
MySortedIntegerArray switchFramesList; //is automatically sorted.
Int32 switchFramesStartOnOff;
virtual Bool Init(GeListNode* node);
virtual EXECUTIONRESULT Execute(BaseTag* tag, BaseDocument* doc, BaseObject* op, BaseThread* bt, Int32 priority, EXECUTIONFLAGS flags);
virtual Bool GetDDescription(GeListNode* node, Description* description, DESCFLAGS_DESC& flags);
virtual Bool Message(GeListNode* node, Int32 type, void* data);
virtual Bool CopyTo(NodeData* dest, GeListNode* snode, GeListNode* dnode, COPYFLAGS flags, AliasTrans* trn);
....
};
Bool ToggleVisibilityC::CopyTo(NodeData* dest, GeListNode* snode, GeListNode* dnode, COPYFLAGS flags, AliasTrans* trn)
{
((ToggleVisibilityC* )dest)->switchFramesList = switchFramesList; // <== Error
((ToggleVisibilityC* )dest)->switchFramesStartOnOff = switchFramesStartOnOff;
return NodeData::CopyTo(dest, snode, dnode, flags, trn);
//return true;
}