ThingWorx C SDK
Macros
DataShape Macros

Macros

#define TW_MAKE_DATASHAPE(shapeName, firstShape, ...)   twDataShape_CreateFromEntries(shapeName,firstShape,##__VA_ARGS__,VAR_ARG_END)
 Accepts a shape name and n number of arguments, each being a description of the datatype of a column as created by TW_DS_ENTRY(). Each argument must be presented in column order to describe the columns of a table. More...
 
#define TW_DECLARE_DS_ENTRY(fieldName, description, type)   twDataShapeEntry_Create(fieldName, description, type)
 Creates a DataShapeEntry for use in conjunction with the TW_MAKE_DATASHAPE macro. Each DataShapeEntry represents a column definition in your datashape. More...
 
#define TW_DS_ENTRY(fieldName, description, type)   twDataShapeEntry_Create(fieldName, description, type)
 A shorter version of TW_DECLARE_DS_ENTRY. Creates a DataShapeEntry for use in conjunction with the TW_MAKE_DATASHAPE macro. Each DataShapeEntry represents a column definition in your datashape. More...
 

Detailed Description

Macro Definition Documentation

#define TW_DECLARE_DS_ENTRY (   fieldName,
  description,
  type 
)    twDataShapeEntry_Create(fieldName, description, type)

Creates a DataShapeEntry for use in conjunction with the TW_MAKE_DATASHAPE macro. Each DataShapeEntry represents a column definition in your datashape.

Parameters
fieldNameconst char * [in] The name of the DataShape to create. DataShape names are optional and the constant TW_SHAPE_NAME_NONE can be used if no name is required.
descriptionA text description of the purpose of this column. If no description is required use TW_NO_DESCRIPTION
typetwDataShapeEntry* [in] A DataShapeEntry created using the macro TW_DS_ENTRY or TW_DECLARE_DS_ENTRY. This argument can be repeated once or each DataShape column you need to add to your DataShape entry.
Returns
a twDataShapeEntry* structure
#define TW_DS_ENTRY (   fieldName,
  description,
  type 
)    twDataShapeEntry_Create(fieldName, description, type)

A shorter version of TW_DECLARE_DS_ENTRY. Creates a DataShapeEntry for use in conjunction with the TW_MAKE_DATASHAPE macro. Each DataShapeEntry represents a column definition in your datashape.

Parameters
fieldNameconst char * [in] The name of the DataShape to create. DataShape names are optional and the constant TW_SHAPE_NAME_NONE can be used if no name is required.
descriptionA text description of the purpose of this column. If no description is required use TW_NO_DESCRIPTION
typetwDataShapeEntry* [in] A DataShapeEntry created using the macro TW_DS_ENTRY or TW_DECLARE_DS_ENTRY. This argument can be repeated once or each DataShape column you need to add to your DataShape entry.
Returns
a twDataShapeEntry* structure
#define TW_MAKE_DATASHAPE (   shapeName,
  firstShape,
  ... 
)    twDataShape_CreateFromEntries(shapeName,firstShape,##__VA_ARGS__,VAR_ARG_END)

Accepts a shape name and n number of arguments, each being a description of the datatype of a column as created by TW_DS_ENTRY(). Each argument must be presented in column order to describe the columns of a table.

Parameters
shapeNameconst char * [in] The name of the DataShape to create. DataShape names are optional and the constant TW_SHAPE_NAME_NONE can be used if no name is required.
firstShapetwDataShapeEntry* [in] A DataShapeEntry created using the macro TW_DS_ENTRY or TW_DECLARE_DS_ENTRY. This argument can be repeated once or each DataShape column you need to declare.
Returns
a twDataShape* structure