Clarisse 5.0 SP8 SDK  5.0.5.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Static Public Member Functions | List of all members
OfCid Class Reference

Static Public Member Functions

static ParserEntryserialize_class (const OfClass &cls)
 
static void serialize_attrs (const CoreBasicArray< const OfAttr * > attrs, ParserGroup &group, const OfSerialOptions &options)
 
static ParserEntryserialize_attr (const OfAttr &attr, const OfSerialOptions &options)
 Return the serialization of a single attribute using CID syntax. This will serialize the whole attribute: its type, hints, options, values, etc.
 
static bool deserialize_attrs (OfObject &object, const CoreVector< const ParserEntry * > &attr_entries, const OfSerialOptions &options)
 
static bool deserialize_attrs (OfObject &object, const CoreVector< const ParserEntry * > &attr_entries, const OfSerialOptions &options, CoreVector< OfAttr * > &created_attrs, const bool &only_created_attrs=false)
 
static OfAttrdeserialize_attr (OfObject &object, const ParserEntry &attr_entry, const OfSerialOptions &options)
 
static bool create_attrs (OfClass &cls, const CoreString &cid)
 
static bool read_attr_name_and_type (const ParserEntry &entry, CoreString &name, OfAttr::Type &type, OfAttr::Container &container, OfAttr::VisualHint &hint)
 

Static Public Attributes

static constexpr CoreStringView KEYWORD_ACTION = "action"_sv
 
static constexpr CoreStringView KEYWORD_ALIASES = "aliases"_sv
 
static constexpr CoreStringView KEYWORD_ATTRIBUTE_GROUP = "attribute_group"_sv
 
static constexpr CoreStringView KEYWORD_BINDING = "binding"_sv
 
static constexpr CoreStringView KEYWORD_CAP_DISPLAY = "cap_display"_sv
 
static constexpr CoreStringView KEYWORD_CATEGORY = "category"_sv
 
static constexpr CoreStringView KEYWORD_COLLAPSED = "collapsed"_sv
 
static constexpr CoreStringView KEYWORD_COLORTAG = "colortag"_sv
 
static constexpr CoreStringView KEYWORD_COMMENT = "comment"_sv
 
static constexpr CoreStringView KEYWORD_CONTEXT = "context"_sv
 
static constexpr CoreStringView KEYWORD_COPY_FROM = "copy_from"_sv
 
static constexpr CoreStringView KEYWORD_CUSTOM_ATTRIBUTES = "custom_attributes"_sv
 
static constexpr CoreStringView KEYWORD_CUSTOM_UI = "custom_ui"_sv
 
static constexpr CoreStringView KEYWORD_DEFAULT_NAME = "default_name"_sv
 
static constexpr CoreStringView KEYWORD_DEPENDS_ON = "depends_on"_sv
 
static constexpr CoreStringView KEYWORD_DISABLED = "disabled"_sv
 
static constexpr CoreStringView KEYWORD_DOC = "doc"_sv
 
static constexpr CoreStringView KEYWORD_EMBEDDED_OBJECTS = "embedded_objects"_sv
 
static constexpr CoreStringView KEYWORD_EXPRESSION = "expression"_sv
 
static constexpr CoreStringView KEYWORD_EXTENSION = "extension"_sv
 
static constexpr CoreStringView KEYWORD_FCURVE = "fcurve"_sv
 
static constexpr CoreStringView KEYWORD_FILTER = "filter"_sv
 
static constexpr CoreStringView KEYWORD_FLAVOR = "flavor"_sv
 
static constexpr CoreStringView KEYWORD_GENERAL = "general"_sv
 
static constexpr CoreStringView KEYWORD_GROUP_FILTER = "group_filter"_sv
 
static constexpr CoreStringView KEYWORD_HIDDEN = "hidden"_sv
 
static constexpr CoreStringView KEYWORD_ICON = "icon"_sv
 
static constexpr CoreStringView KEYWORD_INPUT = "input"_sv
 
static constexpr CoreStringView KEYWORD_LOCKED = "locked"_sv
 
static constexpr CoreStringView KEYWORD_LOCKED_VALUES = "locked_values"_sv
 
static constexpr CoreStringView KEYWORD_MUTE_LOCAL = "mute_local"_sv
 
static constexpr CoreStringView KEYWORD_NAME = "name"_sv
 
static constexpr CoreStringView KEYWORD_NULL_LABEL = "null_label"_sv
 
static constexpr CoreStringView KEYWORD_NULL_VALUE = "null_value"_sv
 
static constexpr CoreStringView KEYWORD_OUTPUT = "output"_sv
 
static constexpr CoreStringView KEYWORD_OUTPUTS = "outputs"_sv
 
static constexpr CoreStringView KEYWORD_POSITIONS = "positions"_sv
 
static constexpr CoreStringView KEYWORD_PRESET = "preset"_sv
 
static constexpr CoreStringView KEYWORD_PRIVATE = "private"_sv
 
static constexpr CoreStringView KEYWORD_PROMOTED = "promoted"_sv
 
static constexpr CoreStringView KEYWORD_READ_ONLY = "read_only"_sv
 
static constexpr CoreStringView KEYWORD_RESOURCE = "resource"_sv
 
static constexpr CoreStringView KEYWORD_SET = "set"_sv
 
static constexpr CoreStringView KEYWORD_SETTINGS = "settings"_sv
 
static constexpr CoreStringView KEYWORD_SHADING_VARIABLE = "shading_variable"_sv
 
static constexpr CoreStringView KEYWORD_SOURCE = "source"_sv
 
static constexpr CoreStringView KEYWORD_SPECIALIZE = "specialize"_sv
 
static constexpr CoreStringView KEYWORD_STAGE = "stage"_sv
 
static constexpr CoreStringView KEYWORD_TEXTURE = "texture"_sv
 
static constexpr CoreStringView KEYWORD_TEXTURE_FILTER = "texture_filter"_sv
 
static constexpr CoreStringView KEYWORD_TYPE = "type"_sv
 
static constexpr CoreStringView KEYWORD_UI_NAME = "ui_name"_sv
 
static constexpr CoreStringView KEYWORD_UI_SETTINGS = "ui_settings"_sv
 
static constexpr CoreStringView KEYWORD_UI_WEIGHT = "ui_weight"_sv
 
static constexpr CoreStringView KEYWORD_UNIT_BASE = "unit_base"_sv
 
static constexpr CoreStringView KEYWORD_UNIT_SYSTEM = "unit_system"_sv
 
static constexpr CoreStringView KEYWORD_USER_DATA = "user_data"_sv
 
static constexpr CoreStringView KEYWORD_VALUE = "value"_sv
 
static constexpr CoreStringView KEYWORD_VALUE_DISABLED = "value_disabled"_sv
 
static constexpr CoreStringView KEYWORD_CAM = "CAM"_sv
 
static constexpr CoreStringView KEYWORD_CAM_RULE = "cam_rule"_sv
 
static constexpr CoreStringView KEYWORD_CAM_DISABLED = "cam_disabled"_sv
 
static constexpr CoreStringView KEYWORD_CAM_BUILTIN = "cam_builtin"_sv
 
static constexpr CoreStringView KEYWORD_EXCLUSION_CAM_RULE = "exclusion_cam_rule"_sv
 
static constexpr CoreStringView KEYWORD_COLUMN_WIDTH = "column_width"_sv
 
static constexpr CoreStringView KEYWORD_COLUMN_ELLIPSIS = "column_ellipsis"_sv
 
static constexpr CoreStringView KEYWORD_CUSTOM_CELL_UI = "custom_cell_ui"_sv
 
static constexpr CoreStringView KEYWORD_FIXED_ROW_COUNT = "fixed_row_count"_sv
 
static constexpr CoreStringView KEYWORD_MAIN_COLUMN = "main_column"_sv
 
static constexpr CoreStringView KEYWORD_REORDER_ROWS = "reorder_rows"_sv
 
static constexpr CoreStringView KEYWORD_TABLE = "table"_sv
 
static constexpr CoreStringView KEYWORD_TOGGLE_ROWS = "toggle_rows"_sv
 
static constexpr CoreStringView TAG_VALUE_UNCHANGED = "#value_unchanged"_sv
 
static constexpr CoreStringView TAG_UNLOCALIZED = "#unlocalized"_sv
 

Detailed Description

Monostate used to handle the serialization and deserialization of the Class Interface Definition (.cid) files. In spirit, it handles everything related to the definition of a class, while the OfObject/OfAttr/etc. classes are used to handle the content (or "values", basically the diff between the definition in the .cid and the actuall value of the attribute, object, etc.)

Member Function Documentation

bool OfCid::create_attrs ( OfClass cls,
const CoreString cid 
)
static

Creates attributes to the specified class from the input cid.

Parameters
[in]clsClass for which the attributes will be created.
[in]cidAttribute definitation as CID. Note: the cid mustn't include class header.
OfAttr * OfCid::deserialize_attr ( OfObject object,
const ParserEntry attr_entry,
const OfSerialOptions options 
)
static

Creates an attribute to the specified object.

Parameters
[in]objectThe objects into which the attributes will be created.
[in]attr_entryThe serialization of the attribute to create.
[in]optionsOptions used to guide the deserialization.
bool OfCid::deserialize_attrs ( OfObject object,
const CoreVector< const ParserEntry * > &  attr_entries,
const OfSerialOptions options 
)
static

Creates attributes to the specified object.

Parameters
[in]objectThe objects into which the attributes will be created.
[in]attr_entriesThe serialization of each attribute to create.
[in]optionsOptions used to guide the deserialization.
bool OfCid::deserialize_attrs ( OfObject object,
const CoreVector< const ParserEntry * > &  attr_entries,
const OfSerialOptions options,
CoreVector< OfAttr * > &  created_attrs,
const bool &  only_created_attrs = false 
)
static

Creates attributes to the specified object.

Parameters
[in]optionsOptions used to guide the deserialization.
[in]objectThe objects into which the attributes will be created.
[in]specifiestrue to get only created attributes in created_attrs array, false to get all attributes related in attr_entries
[in]attr_entriesThe serialization of each attribute to create.
[out]created_attrsThe created attributes
[in]only_created_attrsControls how created_attrs is filled: when true, only the attrs that didn't previously exist in object are added.
bool OfCid::read_attr_name_and_type ( const ParserEntry entry,
CoreString name,
OfAttr::Type type,
OfAttr::Container container,
OfAttr::VisualHint hint 
)
static

Extract the name, type, container type and visual hint of an attribute definition.

Parameters
[in]attr_entryThe serialization of the attribute.
[out]nameThe name of the attribute.
[out]typeThe type of the attribute.
[out]containerThe container type of the attribute.
[out]hintThe visual hint of the attribute.
ParserEntry * OfCid::serialize_attr ( const OfAttr attr,
const OfSerialOptions options 
)
static

Return the serialization of a single attribute using CID syntax. This will serialize the whole attribute: its type, hints, options, values, etc.

Parameters
[in]attrThe attribute to serialize.
[in]optionsOptions used to guide the serialization.
void OfCid::serialize_attrs ( const CoreBasicArray< const OfAttr * >  attrs,
ParserGroup group,
const OfSerialOptions options 
)
static

Serializes the given attributes into the specified group using CID syntax.

Parameters
[in]attrsThe attributes to serialize.
[in]attrsgroup The group in which the attribute serials will be added.
[in]optionsOptions used to guide the serialization.
ParserEntry * OfCid::serialize_class ( const OfClass cls)
static

Returns a serialization of the given OfClass using CID syntax

Parameters
[in]clsThe OfClass to serialize

Member Data Documentation

constexpr CoreStringView OfCid::KEYWORD_ACTION = "action"_sv
static

OfCidSerializationKeywords Serialization Keywords

List of keywords commonly used during serialization of cid files. Note that some tags are used in other files than of_cid.*.

By convention, keyword KEYWORD_FOO contains the string "foo" (the lower cased string of what comes after KEYWORD_ in the keyword' name)

constexpr CoreStringView OfCid::KEYWORD_COLUMN_ELLIPSIS = "column_ellipsis"_sv
static

This lets you set on which side the text will be truncated with an ellipsis. If not specified, cell text is truncated on the right side by default. If specified, the supported values are "right and "left".

Note
this keyword is only valid in an attr inside a table group.
constexpr CoreStringView OfCid::KEYWORD_COLUMN_WIDTH = "column_width"_sv
static

This lets you set the width of a column in the attribute editor. It's followed by an integer (fixed width in pixels) or double (between 0.0 and 1.0, width ratio)

Note
this keyword is only valid in an attr inside a table group.
constexpr CoreStringView OfCid::KEYWORD_CUSTOM_CELL_UI = "custom_cell_ui"_sv
static

When a module wants to custom the default cells used to display and edit a table's content, this keyword followed by yes can be used. In this case, a module callback will be used to to get the cell (cb_get_custom_table_cell_ui)

Note
this keyword is only valid in an table group.
See Also
ModuleObject::GetCustomTableCellUi
constexpr CoreStringView OfCid::KEYWORD_FIXED_ROW_COUNT = "fixed_row_count"_sv
static

By default tables are empty, and rows can be added. Use this keyword followed by yes in the table definition to disable the possibility to add and remove rows from through the UI.

Note
this keyword is only supported in a table group.
constexpr CoreStringView OfCid::KEYWORD_MAIN_COLUMN = "main_column"_sv
static

Specify the name of the column attr that is used to drive the attribute editor's "Add..." editor (when adding a new row, it will automatically use the main column's editor to let you set its value)

Note
this keyword is only supported in a table group.
constexpr CoreStringView OfCid::KEYWORD_REORDER_ROWS = "reorder_rows"_sv
static

By default, rows can't be reordered. Use this keyword followed by yes to be able to move rows around by drag & dropping them in the attribute editor.

Note
this keyword is only supported in a table group.
constexpr CoreStringView OfCid::KEYWORD_TABLE = "table"_sv
static

Define a table. This works a bit like an attribute group. Inside the table, usual attr definitions (with some limitations, documented in CID syntax introduction)

constexpr CoreStringView OfCid::KEYWORD_TOGGLE_ROWS = "toggle_rows"_sv
static

By default, all rows of a table are enabled. Use this keyword followed by yes to add a virtual column in the attribute editor that lets you toggle the enabled state of whole rows.

Note
this keyword is only supported in a table group.
constexpr CoreStringView OfCid::TAG_VALUE_UNCHANGED = "#value_unchanged"_sv
static

OfCidSerializationTags Serialization Tags

Works like the keywords (see OfCidSerializationKeywords) but tags are the special strings that begin by the # character.