omni::graph::core::IBundle2_abi

Defined in omni/graph/core/bundle/IBundle2.h

Inheritance Relationships

Base Type

  • public omni::core::Inherits< IConstBundle2, OMNI_TYPE_ID("omni.graph.core.IBundle2")>

class IBundle2_abi : public omni::core::Inherits<IConstBundle2, OMNI_TYPE_ID("omni.graph.core.IBundle2")>

Provide read write access to recursive bundles.

Protected Functions

virtual BundleHandle getHandle_abi() noexcept = 0

Return handle to this bundle. Invalid handle is returned if this bundle is invalid.

virtual BundleHandle getParentBundle_abi() noexcept = 0

Return parent of this bundle, or invalid handle if there is no parent.

virtual omni::core::Result getAttributes_abi(AttributeDataHandle *const attributes, size_t *const attributeCount) noexcept = 0

Get read-write handles to all attributes in this bundle.

This method operates in two modes: query mode or get mode.

Query mode is enabled when attributes is nullptr. When in this mode, *attributeCount will be populated with the number of attributes in the bundle.

Get mode is enabled when attributes is not nullptr. Upon entering the function, *attributeCount stores the number of entries in attributes. In Get mode attributes are not nullptr, attributes array is populated with attribute handles in the bundle.

Parameters
  • attributes – The buffer to store handles of the attributes in this bundle.

  • attributeCount – Size of attributes buffer. Must not be nullptr in both modes.

Returns

Success if executed successfully, Fail for unsuccessful execution, InvalidArgument if arguments are invalid.

virtual omni::core::Result getAttributesByName_abi(NameToken const *const names, size_t nameCount, AttributeDataHandle *const attributes) noexcept = 0

Searches for read-write handles of the attribute in this bundle by using attribute names.

Parameters
  • names – The name of the attributes to be searched for.

  • nameCount – Size of names buffer.

  • attributes – The buffer to store handles of the attributes.

Returns

Success if executed successfully, Fail for unsuccessful execution, InvalidArgument if arguments are invalid.

virtual omni::core::Result getChildBundles_abi(BundleHandle *const bundles, size_t *const bundleCount) noexcept = 0

Get read write handles to all child bundles in this bundle.

This method operates in two modes: query mode or get mode.

Query mode is enabled when bundles is nullptr. When in this mode, *bundleCount will be populated with the number of bundles in the bundle.

Get mode is enabled when bundles is not nullptr. Upon entering the function, *bundleCount stores the number of entries in bundles. In Get mode bundles are not nullptr, bundles array is populated with bundle handles in the bundle.

Parameters
  • bundles – The buffer to save child bundle handles.

  • bundleCount – Size of the bundles buffer. Must not be nullptr in both modes.

Returns

Success if executed successfully, Fail for unsuccessful execution, InvalidArgument if arguments are invalid.

virtual omni::core::Result getChildBundle_abi(size_t bundleIndex, BundleHandle *const bundle) noexcept = 0

Get read write handle to child bundle by index.

Parameters
  • bundleIndex – Bundle index in range [0, childBundleCount).

  • bundle – Handle under the index. If bundle index is out of range, then invalid handle is returned.

Returns

Success if executed successfully, Fail for unsuccessful execution, InvalidArgument if arguments are invalid.

virtual omni::core::Result getChildBundlesByName_abi(NameToken const *const names, size_t nameCount, BundleHandle *const foundBundles) noexcept = 0

Lookup for read write handles to child bundles under specified names.

For children that are not found invalid handles are returned.

Parameters
  • names – The names of the child bundles in this bundle.

  • nameCount – The number of child bundles to be searched.

  • foundBundles – Output handles to the found bundles.

Returns

Success if executed successfully, Fail for unsuccessful execution, InvalidArgument if arguments are invalid.

virtual omni::core::Result copyAttributes_abi(NameToken const *const newNames, ConstAttributeDataHandle const *const sourceAttributes, size_t attributeCount, bool overwrite, AttributeDataHandle *const copiedAttributes, size_t *const copiedCount) noexcept = 0

Create new attributes by copying existing.

Source attribute handles’ data and metadata are copied. If a handle is invalid, then its source is ignored. Created attributes are owned by this bundle.

Parameters
  • newNames – The names for the new attributes, if nullptr then names are taken from the source attributes.

  • sourceAttributes – Handles to attributes whose data type is to be copied.

  • attributeCount – Number of attributes to be copied.

  • overwrite – An option to overwrite existing attributes.

  • copiedAttributes – Output handles to the newly copied attributes. Can be nullptr if no output is required.

  • copiedCount – Number of successfully copied attributes.

Returns

Success if executed successfully, Fail for unsuccessful execution, InvalidArgument if arguments are invalid.

virtual omni::core::Result createAttributes_abi(NameToken const *const names, Type const *const types, size_t const *const elementCount, size_t attributeCount, AttributeDataHandle *const createdAttributes, size_t *const createdCount) noexcept = 0

Create attributes based on provided names and types.

Created attributes are owned by this bundle.

Parameters
  • names – The names of the attributes.

  • types – The types of the attributes.

  • elementCount – Number of elements in the array, can be nullptr if attribute is not an array.

  • attributeCount – Number of attributes to be created.

  • createdAttributes – Output handles to the newly created attributes. Can be nullptr if no output is required.

  • createdCount – Number of successfully created attributes.

Returns

Success if executed successfully, Fail for unsuccessful execution, InvalidArgument if arguments are invalid.

virtual omni::core::Result createAttributesLike_abi(ConstAttributeDataHandle const *const patternAttributes, size_t patternCount, AttributeDataHandle *const createdAttributes, size_t *const createdCount) noexcept = 0

Use attribute handles as pattern to create new attributes.

The name and type for new attributes are taken from pattern attributes, data and metadata is not copied. If pattern handle is invalid, then attribute creation is skipped. Created attributes are owned by this bundle.

Parameters
  • patternAttributes – Attributes whose name and type is to be used to create new attributes.

  • patternCount – Number of attributes to be created.

  • createdAttributes – Output handles to the newly created attributes. Can be nullptr if no output is required.

  • createdCount – Number of successfully created attributes.

Returns

Success if executed successfully, Fail for unsuccessful execution, InvalidArgument if arguments are invalid.

virtual omni::core::Result createChildBundles_abi(NameToken const *const names, size_t nameCount, BundleHandle *const createdBundles, size_t *const createdCount) noexcept = 0

Create immediate child bundles under specified names in this bundle.

Only immediate children are created. This method does not work recursively. If name token is invalid, then child bundle creation is skipped. Created bundles are owned by this bundle.

Parameters
  • names – New children names in this bundle.

  • nameCount – Number of bundles to be created.

  • createdBundles – Output handles to the newly created bundles. Can be nullptr if no output is required.

  • createdCount – Number of successfully created child bundles.

Returns

Success if executed successfully, Fail for unsuccessful execution, InvalidArgument if arguments are invalid.

virtual omni::core::Result linkAttributes_abi(NameToken const *const linkNames, ConstAttributeDataHandle const *const targetAttributes, size_t attributeCount, AttributeDataHandle *const linkedAttributes, size_t *const linkedCount) noexcept = 0

Feature not implemented yet.

Add a set of attributes to this bundle as links.

Added attributes are links to other attributes that are part of another bundle. If target handle is invalid, then linking is skipped. The links are owned by this bundle, but targets of the links are not. Removing links from this bundle does not destroy the data links point to.

Parameters
  • linkNames – The names for new links.

  • targetAttributes – Handles to attributes whose data is to be added.

  • attributeCount – Number of attributes to be added.

  • linkedAttributes – Output handles to linked attributes. Can be nullptr if no output is required.

  • linkedCount – Number of attributes successfully linked.

Returns

Success if executed successfully, Fail for unsuccessful execution, InvalidArgument if arguments are invalid.

virtual omni::core::Result copyBundle_abi(ConstBundleHandle sourceBundle, bool overwrite) noexcept = 0

Copy bundle data and metadata from the source bundle to this bundle.

If source handle is invalid, then operation is skipped.

Parameters
  • sourceBundle – Handle to bundle whose data is to be copied.

  • overwrite – An option to overwrite existing content of the bundle.

Returns

Success if executed successfully, Fail for unsuccessful execution, InvalidArgument if arguments are invalid.

virtual omni::core::Result copyChildBundles_abi(NameToken const *const newNames, ConstBundleHandle const *const sourceBundles, size_t bundleCount, bool overwrite, BundleHandle *const copiedBundles, size_t *const copiedCount) noexcept = 0

Create new child bundles by copying existing.

Source bundle handles’ data and metadata are copied. If a handle is invalid, then its source is ignored. Created bundles are owned by this bundle.

Parameters
  • newNames – Names for new children, if nullptr then names are taken from the source bundles.

  • sourceBundles – Handles to bundles whose data is to be copied.

  • bundleCount – Number of bundles to be copied.

  • overwrite – An option to overwrite existing child bundles.

  • copiedBundles – Output handles to the newly copied bundles. Can be nullptr if no output is required.

  • copiedCount – Number of successfully copied child bundles.

Returns

Success if executed successfully, Fail for unsuccessful execution, InvalidArgument if arguments are invalid.

virtual omni::core::Result linkBundle_abi(ConstBundleHandle const *const sourceBundle) noexcept = 0

Feature not implemented yet.

Link content from the source bundle to this bundle.

If source handle is invalid, then operation is skipped.

Parameters

sourceBundle – Handle to bundle whose data is to be linked.

Returns

Success if executed successfully, Fail for unsuccessful execution, InvalidArgument if arguments are invalid.

virtual omni::core::Result linkChildBundles_abi(NameToken const *const linkNames, ConstBundleHandle const *const targetBundles, size_t bundleCount, BundleHandle *const linkedBundles, size_t *const linkedCount) noexcept = 0

Add a set of bundles as children to this bundle as links.

Created bundles are links to other bundles that are part of another bundle. If target handle is invalid, then operation is skipped. The links are owned by this bundle, but targets of the links are not. Removing links from this bundle does not destroy the targets data.

Parameters
  • linkNames – Names for new links.

  • targetBundles – Handles to bundles whose data is to be added.

  • bundleCount – Number of bundles to be added.

  • linkedBundles – Handles to linked bundles. Can be nullptr if no output is required.

  • linkedCount – Number of child bundles successfully linked.

Returns

Success if executed successfully, Fail for unsuccessful execution, InvalidArgument if arguments are invalid.

virtual omni::core::Result removeAttributes_abi(ConstAttributeDataHandle const *const attributes, size_t attributeCount, size_t *const removedCount) noexcept = 0

Remove attributes based on provided handles.

Lookup the attribute handles and if they are part of this bundle then remove attributes’ data and metadata. Attribute handles that are not part of this bundle are ignored.

Parameters
  • attributes – Handles to attributes whose data is to be removed

  • attributeCount – Number of attributes to be removed.

  • removedCount – Number of attributes successfully removed.

Returns

Success if executed successfully, Fail for unsuccessful execution, InvalidArgument if arguments are invalid.

virtual omni::core::Result removeAttributesByName_abi(NameToken const *const names, size_t nameCount, size_t *const removedCount) noexcept = 0

Remove attributes based on provided names.

Lookup the attribute names and if they are part of this bundle then remove attributes’ data and metadata. Attribute names that are not part of this bundle are ignored.

Parameters
  • names – The names of the attributes whose data is to be removed.

  • nameCount – Number of attributes to be removed.

  • removedCount – Number of attributes successfully removed.

Returns

Success if executed successfully, Fail for unsuccessful execution, InvalidArgument if arguments are invalid.

virtual omni::core::Result removeChildBundles_abi(ConstBundleHandle const *const childHandles, size_t childCount, size_t *const removedCount) noexcept = 0

Remove child bundles based on provided handles.

Lookup the bundle handles and if they are children of the bundle then remove them and their metadata. Bundle handles that are not children of this bundle are ignored. Only empty child bundles can be removed.

Parameters
  • childHandles – Handles to bundles to be removed.

  • childCount – Number of child bundles to be removed.

  • removedCount – Number of child bundles successfully removed.

Returns

Success if executed successfully, Fail for unsuccessful execution, InvalidArgument if arguments are invalid.

virtual omni::core::Result removeChildBundlesByName_abi(NameToken const *const names, size_t nameCount, size_t *const removedCount) noexcept = 0

Remove child bundles based on provided names.

Lookup the bundle names and if the are children of the bundle then remove them and their metadata. Bundle names that are not children of this bundle are ignored. Only empty child bundles can be removed.

Parameters
  • names – The names of the child bundles to be removed.

  • nameCount – Number of child bundles to be removed.

  • removedCount – Number of child bundles successfully removed.

Returns

Success if executed successfully, Fail for unsuccessful execution, InvalidArgument if arguments are invalid.

virtual BundleHandle getMetadataStorage_abi() noexcept = 0

Deprecated:

Metadata storage is deprecated and invalid handle is returned.

virtual omni::core::Result getBundleMetadataByName_abi(NameToken const *const fieldNames, size_t fieldCount, AttributeDataHandle *const bundleMetadata) noexcept = 0

Search for bundle metadata fields based on provided names.

Invalid attribute handles are returned for not existing names.

Parameters
  • fieldNames – Bundle metadata field names to be searched for.

  • fieldCount – Size of fieldNames and bundleMetadata arrays.

  • bundleMetadata – Handles to bundle metadata fields in this bundle.

Returns

Success if executed successfully, Fail for unsuccessful execution, InvalidArgument if arguments are invalid.

virtual omni::core::Result createBundleMetadata_abi(NameToken const *const fieldNames, Type const *const fieldTypes, size_t const *const elementCount, size_t fieldCount, AttributeDataHandle *const bundleMetadata, size_t *const createdCount) noexcept = 0

Create bundle metadata fields in this bundle.

Parameters
  • fieldNames – Names of new bundle metadata fields.

  • fieldTypes – Types of new bundle metadata fields.

  • elementCount – Number of elements in the array, can be nullptr if field is not an array.

  • fieldCount – Size of fieldNames and fieldTypes arrays.

  • bundleMetadata – Handles to the newly created bundle metadata fields. Can be nullptr if no output is required.

  • createdCount – Number of child bundles successfully created.

Returns

Success if executed successfully, Fail for unsuccessful execution, InvalidArgument if arguments are invalid.

virtual omni::core::Result removeBundleMetadata_abi(NameToken const *const fieldNames, size_t fieldCount, size_t *const removedCount) noexcept = 0

Remove bundle metadata based on provided field names.

Parameters
  • fieldNames – Names of the bundle metadata fields whose data is to be removed.

  • fieldCount – Number of the bundle metadata fields to be removed.

  • removedCount – Number of bundle metadata fields successfully removed.

Returns

Success if executed successfully, Fail for unsuccessful execution, InvalidArgument if arguments are invalid.

virtual omni::core::Result getAttributeMetadataByName_abi(NameToken attribute, NameToken const *const fieldNames, size_t fieldCount, AttributeDataHandle *const attributeMetadata) noexcept = 0

Search for read write field handles in the attribute by using field names.

Parameters
  • attribute – The name of the attribute.

  • fieldNames – The names of attribute metadata fields to be searched for.

  • fieldCount – Size of fieldNames and attributeMetadata arrays.

  • attributeMetadata – Handles to attribute metadata fields in the attribute.

Returns

Success if executed successfully, Fail for unsuccessful execution, InvalidArgument if arguments are invalid.

virtual omni::core::Result createAttributeMetadata_abi(NameToken attribute, NameToken const *const fieldNames, Type const *const fieldTypes, size_t const *const elementCount, size_t fieldCount, AttributeDataHandle *const attributeMetadata, size_t *const createdCount) noexcept = 0

Create attribute metadata fields.

Parameters
  • attribute – Name of the attribute.

  • fieldNames – Names of new attribute metadata fields.

  • fieldTypes – Types of new attribute metadata fields.

  • elementCount – Number of elements in the array, can be nullptr if field is not an array.

  • fieldCount – Size of fieldNames and fieldTypes arrays.

  • attributeMetadata – Handles to the newly created attribute metadata. Can be nullptr if no output is required.

  • createdCount – Number of attribute metadata fields successfully created.

Returns

Success if executed successfully, Fail for unsuccessful execution, InvalidArgument if arguments are invalid.

virtual omni::core::Result removeAttributeMetadata_abi(NameToken attribute, NameToken const *const fieldNames, size_t fieldCount, size_t *const removedCount) noexcept = 0

Remove attribute metadata fields.

Parameters
  • attribute – Name of the attribute.

  • fieldNames – Names of the attribute metadata fields to be removed.

  • fieldCount – Size of fieldNames array.

  • removedCount – Number of attribute metadata fields successfully removed.

Returns

Success if executed successfully, Fail for unsuccessful execution, InvalidArgument if arguments are invalid.

virtual omni::core::Result clearContents_abi(bool bundleMetadata, bool attributes, bool childBundles) noexcept = 0

Remove all attributes, child bundles and metadata from this bundle, but keep the bundle itself.

Parameters
  • bundleMetadata – Clears bundle metadata in this bundle.

  • attributes – Clears attributes in this bundle.

  • childBundles – Clears child bundles in this bundle.

Returns

Success if executed successfully, Fail for unsuccessful execution, InvalidArgument if arguments are invalid.