HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UN_Include.h File Reference
#include "UN_API.h"
#include <UNI/UNI_Include.h>
#include <UT/UT_Array.h>
#include <UT/UT_ArrayMap.h>
#include <UT/UT_Options.h>
#include <UT/UT_StringHolder.h>
#include <UT/UT_UniquePtr.h>
#include <SYS/SYS_Types.h>
#include <SYS/SYS_Hash.h>
+ Include dependency graph for UN_Include.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  UN_DataNumber
 
class  UN_DataSize
 
class  UN_DataIndex
 
class  UN_DataIndexSpan
 
class  UN_DataIDRemapT< ID >
 Adaptor of the UN_DataIDRemap to specific data types. More...
 
class  UN_DataIDRemap
 
class  UN_DataIDRemapT< ID >
 Adaptor of the UN_DataIDRemap to specific data types. More...
 
class  UN_DataMergeInfo
 
class  UN_IDRemapInfo
 Package of remappings for various data ID types (nodes, ports, subnets). More...
 
class  UN_GraphMergeInfo
 Information about the result of a merge from another graph. More...
 
struct  UT::DefaultClearer< T >
 
struct  UT::DefaultClearer< UN_DataIndex >
 

Namespaces

 UT
 

Macros

#define UN_DATA_INDEX(Class)
 
#define UN_DATA_ID(SubClass, BaseClass)
 
#define UN_NUMBER_FORMATTER(IdOrIndexType)
 For debug printouts, etc: More...
 
#define UN_INDEX_CLEARER(ID)   template<> struct DefaultClearer<ID>: public DefaultClearer<UN_DataIndex>{};
 

Typedefs

using UN_DataID = UNI_ID
 
using UN_DataIDList = UT_Array< UN_DataID >
 
using UN_PortKind = UNI_PortKind
 Differentiates between input and output ports. More...
 
using UN_Options = UT_Options
 
using UN_OptionsPtr = UT_UniquePtr< UN_Options >
 

Macro Definition Documentation

#define UN_DATA_ID (   SubClass,
  BaseClass 
)
Value:
using SubClass = BaseClass; \
using SubClass##List = BaseClass##List; \
using SubClass##Remap = UN_DataIDRemapT< SubClass >; \
Adaptor of the UN_DataIDRemap to specific data types.
Definition: UN_Include.h:258

Data ID is unique throughout the lifespan of a graph, but only for within the same data class (eg, nodes). Ie, a node may have same data id as a wire. So it's a good idea to keep these type spaces separate. Defines types for various data ID numbers. Note, since UN is an implementation of the UNI interface, it reuses (aliases) the UNI IDs to avoid frequent type casts. However, it is possible to decouple them if really needed in the future.

Definition at line 267 of file UN_Include.h.

#define UN_DATA_INDEX (   Class)
Value:
class Class : public UN_DataIndex \
{ \
public: \
explicit Class( UN_DataIndex data_index = UN_DataIndex() ) \
: UN_DataIndex( data_index ) {} \
}; \
\
using Class##List = UT_Array< Class >; \
UN_DataIndex(ValueType value=INVALID_NUMBER)
Constructs the index object given the numerical value.
Definition: UN_Include.h:153

An index into a data container, referring to a data object. Indices may be reused for new data objects, if old ones were deleted.

Definition at line 229 of file UN_Include.h.

#define UN_INDEX_CLEARER (   ID)    template<> struct DefaultClearer<ID>: public DefaultClearer<UN_DataIndex>{};

Definition at line 605 of file UN_Include.h.

#define UN_NUMBER_FORMATTER (   IdOrIndexType)
Value:
inline size_t \
UTformatBuffer(char *buffer, size_t buffer_size, const IdOrIndexType &v) \
{ \
UT::Format::Writer w(buffer, buffer_size); \
UT::Format::Formatter f; \
return f.format(w, #IdOrIndexType "({})", {v.exintValue()}); \
} \
inline size_t \
UTformatBuffer(char *buffer, size_t buffer_size, \
{ \
UT::Format::Writer w(buffer, buffer_size); \
UT::Format::Formatter f; \
size_t bytesWritten = w("UT_Array<" #IdOrIndexType ">([", \
sizeof("UT_Array<" #IdOrIndexType ">([")-1); \
bool first = true; \
for (auto &&item : v) \
{ \
bytesWritten += f.format(w, first ? "{}" : ", {}", \
{item.exintValue()}); \
first = false; \
} \
bytesWritten += w("])", 2); \
return bytesWritten; \
}
GLint first
Definition: glcorearb.h:405
const GLdouble * v
Definition: glcorearb.h:837
size_t UTformatBuffer(char *buffer, size_t bufsize, const ApexArray< T > &v)
Definition: APEX_COW.h:138
GLuint buffer
Definition: glcorearb.h:660
OutGridT const XformOp bool bool
GLfloat f
Definition: glcorearb.h:1926
GLubyte GLubyte GLubyte GLubyte w
Definition: glcorearb.h:857
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))
Definition: UT_RTreeImpl.h:685

For debug printouts, etc:

Definition at line 551 of file UN_Include.h.

Typedef Documentation

using UN_DataID = UNI_ID

A unique identifier of a particular data object. Data objects of the same type (eg, nodes or ports) are assigned a unique ID in a given graph, and no two data objects of that type share same ID, withing the lifespan of the given graph. Ie, unlike indices, the IDs are not reused for new data objects, even if some old objects were deleted.

Definition at line 254 of file UN_Include.h.

Definition at line 255 of file UN_Include.h.

Graph serialization to UT_Options. Using UT_UniquePtr<UT_Options> to return values, to indicate the ownership. Using UT_UniquePtr<UT_OPtions> rather than UT_OptionsHolder because it is more flexible: it's easier to further edit options (editing UT_OptionsHolder is cumbersome), and it's easy to create UT_OptionsHolder from the UT_UniquePtr, if need be.

Definition at line 639 of file UN_Include.h.

Definition at line 640 of file UN_Include.h.

Differentiates between input and output ports.

Definition at line 619 of file UN_Include.h.