PluginOutputConnectionHelper
Importante
This C++ SDK uses outdated technology that limits your extension opportunities. We've built a new Platform SDK using Python and the latest open-source technology to deliver a vastly improved development experience. Go to Platform SDK to get started!
PluginOutputConnectionHelper
The PluginOutputConnectionHelper
class manages outgoing data connections for the plugin. An instance of the class controls a single output connection.
Constructor
To instantiate a new instance of the PluginOutputConnectionHelper
class:
PluginOutputConnectionHelper(int nToolId, EngineInterface *pEngineInterface)
nToolId
: The ID of the tool calling the function.
pEngineInterface
: A pointer to the associated EngineInterface
instance.
Methods
AddOutgoingConnection
Add an outgoing connection to the list of connections being managed.
void AddOutgoingConnection(IncomingConnectionInterface *pIncConnInt)
pIncConnInt
: A pointer to the outgoing connection being added.
AssertClose
Evaluate if connections are properly closed.
void AssertClose()
Call AssertClose
in the PI_Close
method of the PluginInterface
class to ensure all connections are properly closed.
Close
Close all outgoing connections that are being managed by the PluginOutConnectionHelper
instance.
void Close()
Init
Initialize the object and notify downstream tools of the outgoing record metadata.
bool Init(const wchar_t * pXmlRecordMetaInfo)
pXmlRecordMetaInfo
: The XML metadata for the outgoing record, which should be in the following format:
<MetaInfo connection="Output"> <RecordInfo> <Field name="FieldName" source="InputSource" type="DataType"/> //For numeric field types <Field name="FieldName" size="SizeInBytes" source="InputSource" type="DataType"/> //For all other field types ... </RecordInfo> <SortInfo> //If the incoming connection has been pre-sorted <Field field="FieldName" order="SortOrder" /> //Sort order will be either "Asc" or "Desc" ... </SortInfo> </MetaInfo>
Sort information is optional.
IsValid
Evaluate if the collection of output connections is valid. Returns True if valid.
bool IsValid()
OutputRecordCount
Notify the Alteryxengine of the number and size of records that have been sent downstream.
void OutputRecordCount(bool bFinal)
bFinal
: Determine if the Alteryxengine should be notified after all records have been sent downstream. Set to True to notify the Alteryxengine. This should be done after all records are sent or if you need to force the record count message to be sent.
The message is only sent if the record count is less than 256, a multiple of 256, or bFinal is set to True.
PushRecord
Push a record to all output connections being managed.
bool PushRecord(const RecordData * pRecord, bool bNoAutoClose=false)
pRecord
: The RecordData
structure that represents the data being sent downstream.
bNoAutoClose
: Determine if connections close automatically when complete:
True: Complete connections do not close automatically.
False: Complete connections close automatically. Default is False.
UpdateProgress
All outgoing connections report current progress of downstream tools to Alteryxengine. Progress is reported by the tools using the OutputToolProgress
method of the EngineInterface
class.
void UpdateProgress(double dPercent)
dPercent
: The percent completion of the plugin. Valid values are 0.0 to 1.0.