Clinfo C++ object classes
The Clinfo C++ API has the following object classes: clusters, nodes, network interfaces, and resource groups.
Each network interface belongs to a single node; each node and each resource group belongs to a single cluster; this dictates the class structure. The cluster class is the most general, and the interface class is the most specific.
The grouping of functions into classes depends on the data that the functions use, with functions being placed into the most general possible class. Note that there are functions named CL_getclusterid in both the network interface and cluster classes. These are separate functions with the same name but distinguished by class. This naming convention is standard in C++.
All values are passed to the caller using the normal function return values, rather than function parameters passed by reference. When these descriptions talk about data being passed in, it is implicit that this data is coming from the object of which the function is a member.
Status is always returned in a CL_status arg, which is passed by reference and should be checked for error conditions. Return values are always data. An exception to this is the CL_isavail() function, whose primary return data is status, so it returns status rather than using the CL_status arg.
The Clinfo C++ API includes two functions that do not belong to any of the classes stated earlier. CL_getallinfo operates on an array of clusters rather than a cluster object. It returns an array of clusters, and the array pointer is passed by reference. CL_getlocalid operates on the local node rather than on a node object. The local host returns it's own name.