TIBCO Adapter SDK C++ Reference
MInstance::get
MInstance
Retrieve the value of the specified attribute in this MInstance as an MData pointer. You can then use the MData methods to retrieve the actual attribute value.
Parameters
Parameters Description
const MString& rsAttributeName Name of the attribute to retrieve.
Mboolean rsAttributeNameIsAPath = Mfalse This parameter is not supported. It is for internal use by the SDK.
Examples
// convert the instance to a MTree

MTree mTree;

instOrder1.serialize(mTree);

 

cout << endl << "serialized tree = \n" << mTree.toString() << endl;

 

// create a new instance from the serialized Tree

MInstance* pSalesOrder = new MInstance(this, mTree);

cout << endl << "after deserialization: " << pSalesOrder->toString()

<< endl;

OrderId = 0;

 

OrderId = pSalesOrder->get(sOrderId)->getAsInt();

CustomerId = pSalesOrder->get(sCustomerId)->getAsInt();

Exceptions
MException is thrown on failure to retrieve the specified attribute.
Declaration
virtual const MData* get(const MString& rsAttributeName, Mboolean rsAttributeNameIsAPath = Mfalse) const throw(MException);
Links
Copyright (c) 2010 TIBCO Software Inc. All rights reserved.