.. _ogn_tutorial_abi:

Tutorial 3 - ABI Override Node
==============================

Although the .ogn format creates an easy-to-use interface to the ABI of the OmniGraph node and the associated
data model, there may be cases where you want to override the ABI to perform special processing.

OgnTutorialABI.ogn
------------------
The *ogn* file shows the implementation of a node named "omni.graph.tutorials.Abi", in its first
version, with a simple description. The single attribute serves mostly to provide a framework for the ABI discussion.

.. literalinclude:: OgnTutorialABI.ogn
    :linenos:
    :language: json

OgnTutorialABI.cpp
------------------
The *cpp* file contains the implementation of the node class with every possible
ABI method replaced with customized processing. The node still functions the same as any other node, although it
is forced to write a lot of extra boilerplate code to do so.

.. literalinclude:: OgnTutorialABI.cpp
    :linenos:
    :language: c++

Node Type Metadata
------------------
This file introduces the *metadata* keyword, whose value is a dictionary of key/value pairs associated with the
node type that may be extracted using the ABI metadata functions. These are not persisted in any files and so must be
set either in the .ogn file or in an override of the **initializeType()** method in the node definition.

Exclusions
----------
Note the use of the **exclude** keyword in the .ogn file. This allows you to prevent generation of any of the default
files. In this case, since the ABI is handling everything the Python database will not be able to access the node's
information so it is excluded.
