class EventListener
{
public:
const char* getName() { return name; }
EventListener();
EventListener(const string& n);
void addTime(CrChkTime t) { time += t; }
void resetTime() { time = 0; }
CrChkTime getTime() { return time; }
private:
virtual void dummy() {}
const char* name;
CrChkTime time;
};
typedef void (EventListener::*ftOnEventClass)(int kind, int param1, void* param2, bool& ret);
typedef struct _eventNode
{
/** For c handlers */
ftOnEvent function;
/** For c++ handlers */
ftOnEventClass functionClass;
/** Handle */
EventListener* handle;
/*...constructors...*/
} EventNode;
vector<vector<EventNode *>> m_vEventHandlerList;
for(auto& iter : m_vEventHandlerList[kind])
{
if(iter->handle != nullptr)
{
(iter->handle->*(iter)->functionClass)(kind, param1, param2, ret);
}
}
so,
(iter->handle->*(iter)->functionClass)(kind, param1, param2, ret);
is function call and working code. (and it might be a function pointer)
please can you describe me with Operator Precedence of next expression?
(iter->handle->*(iter)->functionClass)
iter->handle and.. next? i cannot follwing the code.
(I want a description like https://stackoverflow.com/a/27283893/3818785 this)