hi,
my tag plugin(not Texpression,just Obase) code have public function to return private variable. a button on my object plug-in and my tag is the frist tag on my object. I want use the button to call public function and get the private variable.this is my code, just return 0, i really want to know what should i do.
hope your help.
tag plug-in
mytag.h:
class MyTag : public TagData{
public:
...//ellipsis virtual func
Int GetValue();
private:
Int a = 123;
};
mytag.cpp:
Int MyTag::GetValue(){
return this->a ;
}
my object plugin code:
#include "mytag.h"
...
...ellipsis
....
Bool MyObject::Message(GeListNode * node, Int32 type, void * data){
DescriptionCommand* dc = (DescriptionCommand*)data;
const Int32 id = dc->_descId[0].id;
switch (id)
{
case GET_BUTTON:
{
BaseObject* bc = (baseobject*)node;
BaseTag* tag = bc->GetFirstTag();
Int b = ( (MyTag*)tag )->GetValue();
GePrint( maxon::ToString(b,false) );
break;
}
}
return true;
}