0

Greeting

I use boost ptree to get some information also put in some time.

typedef ptree MInfo;

In my application i use following style to .put or .get information into my MInfo.

a_info.put<WORD>(PathTree(SStatus)(fwDevice).str(), s_status->fwDevice);

WORD y = a_info.get<WORD>(PathTree(SStatus)(fwSensors)(S_SWITCH).str());

In my new method i use the same structure to put info on my ptree to get it later.

HRESULT SBase::getPortStatusEvent(AInfo &a_info, LPARAM lParam)
{
    ...

    using namespace boost::property_tree;

    a_info.put<WORD>(PathTree(SEvent)(wPortType).str(), port_Status->wPortType);      //This Line Cause the Error!!
    a_info.put<WORD>(PathTree(SEvent)(wPortIndex).str(), port_Status->wPortIndex);    //This Line Cause the Error!!
    a_info.put<WORD>(PathTree(SEvent)(wPortStatus).str(), port_Status->wPortStatus);  //This Line Cause the Error!!

    ....

    return WFS_SUCCESS;
}

I get error in a_info.put.

Any Idea ?!

M.H.
  • 223
  • 3
  • 10
  • 23

1 Answers1

0

The problem was mapping this part to actual string path.

PathTree(SEvent)(wPortType).str()

I made method to handle it by my own!

M.H.
  • 223
  • 3
  • 10
  • 23