m_pView->getOperatorManager()->setCurrentOperator(m_operator);这样一句话,看不懂啊!!
bool DPntCldRegistration::createOperator()
{
// create an operator for polyline design
m_operator = new RE_OpPntCldRegistration(m_pView);
// set the operator into operator manager
m_pView->getOperatorManager()->setCurrentOperator(m_operator);//这种变量指向函数再指向函数怎么能让在下懂一点。纠结
enablePointCloudSelection();
enableLocalFeatureSelection();
CMainFrame *pWnd;
pWnd = (CMainFrame *) (AfxGetApp()->m_pMainWnd);
pWnd->WriteOperationPrompt(IDS_PNT_CLD_REGISTRATION);
return true;
}
-----------------------------------------------------------------------------------------------------------
RE_OperatorsManager* getOperatorManager()
{ return m_pOpManager; }
-----------------------------------------------------------------------------------------------------------
void RE_OperatorsManager::setCurrentOperator(
RE_BaseOperator *_NewOperator)
{
updateOpHistory();
m_pOperator = _NewOperator;
}
求哪位大哥解释一下。严重感谢。。。。
------解决方案--------------------------------------------------------
那个函数返回一个类指针
------解决方案--------------------------------------------------------
比如
X* getOperatorManager();
架设你的getOperatorManager()返回类型为X*。
m_pView->getOperatorManager() //返回了一个X*类型的指针
->setCurrentOperator(m_operator);//调用了X::setCurrentOperator(m_operator);