OMNI_STRUCTURED_LOG_ADD_SCHEMA
Defined in omni/structuredlog/StructuredLogCommon.h
-
OMNI_STRUCTURED_LOG_ADD_SCHEMA(schemaType_, schemaName_, version_, parser_)
Sets that a schema should be registered on module load.
Remark
This creates and registers a helper function that will call into a generated schema’s registerSchema() function during omni core or framework initialization. The symbol used to force the registration at C++ initialization time is named based on the schema’s name, schema’s version, parser version, and the line number in the header file that this call appears on. All of these values are used to differentiate this schema’s registration from that of all others, even for different versions of the same generated schema.
- Parameters
schemaType_ – The name and fully qualified namespace of the generated schema class to be registered. This will be added to a list of schemas to be registered when the module is initialized.
schemaName_ – The name of the schema to be registered. This may be any valid C++ token string, but should reflect the schema’s name. This is used to make the initialization symbol more unique to the generated schema class.
version_ – The schema’s version expressed as a C++ token. This should replace any dots (“.”), dashes (“-“), colons (“:”), whitespace (” “), or commas (“,”) with an underscore (“_”). This is used to make the initialization symbol more unique to the generated schema class.
parser_ – The parser version being used for the generated schema expressed as a C++ token. This should replace any dots (“.”), dashes (“-“), colons (“:”), whitespace (” “), or commas (“,”) with an underscore (“_”). This is used to make the initialization symbol more unique to the generated schema class.
- Returns
No return value.