|
static void | combineStandardIndexFileSectionPath (UT_String &source_section_path, const char *index_file_path, const char *section_name) |
|
static bool | splitStandardIndexFileSectionPath (const char *source_section_path, UT_String &index_file_path, UT_String §ion_name) |
|
static void | getOpTypeDefSectionName (UT_String §name, const char *table_name, const char *op_name) |
|
|
static bool | startsWithOpDefPrefix (const char *path) |
|
static bool | startsWithOpLibPrefix (const char *path) |
|
static bool | startsWithOpDataBlockPrefix (const char *path) |
|
|
static void | combineOpIndexFileSectionPath (UT_String &path, const char *prefix, const char *table_and_opname, const char *section_name) |
|
static void | combineOpIndexFileSectionPath (UT_String &path, const char *prefix, const char *table_and_opname, const UT_StringArray §ion_names) |
|
|
static void | splitOpIndexFileSectionPath (const char *path, UT_String *prefix, UT_String *table_and_opname, UT_String *section) |
|
static void | splitOpIndexFileSectionPath (const char *path, UT_String *prefix, UT_String *table_and_opname, UT_StringArray §ion_names) |
|
static void | splitOpIndexFileSectionPath (const char *path, UT_WorkBuffer *prefix, UT_WorkBuffer *table_and_opname, UT_StringArray *section_names) |
|
|
static void | combineTableAndOpName (UT_WorkBuffer &table_and_opname, const char *table_name, const char *op_name) |
|
static void | combineTableAndOpName (UT_String &table_and_opname, const char *table_name, const char *op_name) |
|
|
static void | splitTableAndOpName (const char *table_and_opname, UT_String &table_name, UT_String &op_name) |
|
static void | splitTableAndOpName (const char *table_and_opname, UT_WorkBuffer &table_name, UT_WorkBuffer &op_name) |
|
|
static void | getFullNameFromComponents (UT_WorkBuffer &full_name, const char *scope_opname, const char *namespace_name, const char *op_name, const char *version) |
|
static void | getFullNameFromComponents (UT_String &full_name, const char *scope_opname, const char *namespace_name, const char *op_name, const char *version) |
|
|
static void | getComponentsFromFullName (const char *full_name, UT_WorkBuffer *scope_opname, UT_WorkBuffer *namespace_name, UT_WorkBuffer *op_name, UT_WorkBuffer *version) |
|
static void | getComponentsFromFullName (const char *full_name, UT_String *scope_opname, UT_String *namespace_name, UT_String *op_name, UT_String *version) |
|
|
static void | ensureValidOpBasedFileName (UT_String &filename) |
|
static void | ensureValidOpBasedFileName (UT_WorkBuffer &filename) |
|
Definition at line 20 of file UT_OpUtils.h.
Extract the components from a full operator type name. The full operator name may include a scope operator (ie, a subnet operator only in which 'op_name' operator can be created), namespaces and version tag. The caller can pass NULL for the components that it's not interested in. E.g., "artistA::my_op::2.0" -> NULL, "artistA", "my_op", and "2.0" "artistA::Object/my_op::2.0" -> NULL, "artistA", "Object/my_op", "2.0" "Object/light::Sop/mybulb" -> "Object/light", NULL, "Sop/mybulb", NULL "aA::Object/outer::1.0::aB:Sop/inner::2.0" -> "aA::Object/outer::1.0", "aB", "Sop/inner", and "2.0".
Extract the components from a full operator type name. The full operator name may include a scope operator (ie, a subnet operator only in which 'op_name' operator can be created), namespaces and version tag. The caller can pass NULL for the components that it's not interested in. E.g., "artistA::my_op::2.0" -> NULL, "artistA", "my_op", and "2.0" "artistA::Object/my_op::2.0" -> NULL, "artistA", "Object/my_op", "2.0" "Object/light::Sop/mybulb" -> "Object/light", NULL, "Sop/mybulb", NULL "aA::Object/outer::1.0::aB:Sop/inner::2.0" -> "aA::Object/outer::1.0", "aB", "Sop/inner", and "2.0".
static void UT_OpUtils::getFullNameFromComponents |
( |
UT_WorkBuffer & |
full_name, |
|
|
const char * |
scope_opname, |
|
|
const char * |
namespace_name, |
|
|
const char * |
op_name, |
|
|
const char * |
version |
|
) |
| |
|
static |
Build a full operator type name string that includes a scope operator, namespace, op name, and version tags, out of the (separate) components given by the arguments. The caller can pass NULL for the components that don't apply. E.g., NULL, "artistA", "my_op", and "2.0" -> "artistA::my_op::2.0" and NULL, "artistA", "Object/my_op", and "2.0" -> "artistA::Object/my_op::2.0" "Object/light", NULL, "Sop/mybulb", NULL -> "Object/light::Sop/mybulb" "vA::Object/outer::1.0", "vB", "Sop/inner", and "2.0" -> "vA::Object/outer::1.0::vB:Sop/inner::2.0"
static void UT_OpUtils::getFullNameFromComponents |
( |
UT_String & |
full_name, |
|
|
const char * |
scope_opname, |
|
|
const char * |
namespace_name, |
|
|
const char * |
op_name, |
|
|
const char * |
version |
|
) |
| |
|
static |
Build a full operator type name string that includes a scope operator, namespace, op name, and version tags, out of the (separate) components given by the arguments. The caller can pass NULL for the components that don't apply. E.g., NULL, "artistA", "my_op", and "2.0" -> "artistA::my_op::2.0" and NULL, "artistA", "Object/my_op", and "2.0" -> "artistA::Object/my_op::2.0" "Object/light", NULL, "Sop/mybulb", NULL -> "Object/light::Sop/mybulb" "vA::Object/outer::1.0", "vB", "Sop/inner", and "2.0" -> "vA::Object/outer::1.0::vB:Sop/inner::2.0"
A fuction to split the original opdef or oplib source path into the the prefix, table-and-opname, and section name components. The path should start with either UT_OTL_LIBRARY_PREFIX (ie, "oplib:"), or UT_HDA_DEFINITION_PREFIX (ie, "opdef:"). Eg, "oplib:/Object/hda?Object/hda" -> "oplib:", "Object/hda", "Object/hda" "opdef:/Object/hda?section" -> "opdef:", "Object/hda", "section" "opdef:.?section" -> "opdef:", ".", "section" "opdef:/Sop/hda?outer?inner" -> "opdef:", "Sop/hda", ["outer", "inner"]
- Parameters
-
[in] | path | The original source path to split. |
[out] | prefix | The prefix specifying the type of the main index file (OTL or HDA), and will be either UT_OTL_LIBRARY_PREFIX (ie, "oplib:") or UT_HDA_DEFINITION_PREFIX (ie, "opdef:"). |
[out] | table_and_opname | The operator type name including the table name. This will specifie the operator type OTL library or HDA definition that contains the section. This argument can be further parsed with splitTableAndOpName() method. |
[out] | section_name | If the original source path is expected to contain only one section (ie, no nested section) then this string parameter will contain the name of that section. It is an error to use it for paths with nested sections, and the string array argument should be used instead. |
[out] | section_names | If the original source path refers to a section that is nested within other sections (that themselves are index files), then this parameter is set to these section names, with the outermost section at the beginning of the array and the innermost section (contained within the outer sections) at the end of the array. If there is just a single section, the array will contain a single entry (the single section name) |
A fuction to split the original opdef or oplib source path into the the prefix, table-and-opname, and section name components. The path should start with either UT_OTL_LIBRARY_PREFIX (ie, "oplib:"), or UT_HDA_DEFINITION_PREFIX (ie, "opdef:"). Eg, "oplib:/Object/hda?Object/hda" -> "oplib:", "Object/hda", "Object/hda" "opdef:/Object/hda?section" -> "opdef:", "Object/hda", "section" "opdef:.?section" -> "opdef:", ".", "section" "opdef:/Sop/hda?outer?inner" -> "opdef:", "Sop/hda", ["outer", "inner"]
- Parameters
-
[in] | path | The original source path to split. |
[out] | prefix | The prefix specifying the type of the main index file (OTL or HDA), and will be either UT_OTL_LIBRARY_PREFIX (ie, "oplib:") or UT_HDA_DEFINITION_PREFIX (ie, "opdef:"). |
[out] | table_and_opname | The operator type name including the table name. This will specifie the operator type OTL library or HDA definition that contains the section. This argument can be further parsed with splitTableAndOpName() method. |
[out] | section_name | If the original source path is expected to contain only one section (ie, no nested section) then this string parameter will contain the name of that section. It is an error to use it for paths with nested sections, and the string array argument should be used instead. |
[out] | section_names | If the original source path refers to a section that is nested within other sections (that themselves are index files), then this parameter is set to these section names, with the outermost section at the beginning of the array and the innermost section (contained within the outer sections) at the end of the array. If there is just a single section, the array will contain a single entry (the single section name) |
A fuction to split the original opdef or oplib source path into the the prefix, table-and-opname, and section name components. The path should start with either UT_OTL_LIBRARY_PREFIX (ie, "oplib:"), or UT_HDA_DEFINITION_PREFIX (ie, "opdef:"). Eg, "oplib:/Object/hda?Object/hda" -> "oplib:", "Object/hda", "Object/hda" "opdef:/Object/hda?section" -> "opdef:", "Object/hda", "section" "opdef:.?section" -> "opdef:", ".", "section" "opdef:/Sop/hda?outer?inner" -> "opdef:", "Sop/hda", ["outer", "inner"]
- Parameters
-
[in] | path | The original source path to split. |
[out] | prefix | The prefix specifying the type of the main index file (OTL or HDA), and will be either UT_OTL_LIBRARY_PREFIX (ie, "oplib:") or UT_HDA_DEFINITION_PREFIX (ie, "opdef:"). |
[out] | table_and_opname | The operator type name including the table name. This will specifie the operator type OTL library or HDA definition that contains the section. This argument can be further parsed with splitTableAndOpName() method. |
[out] | section_name | If the original source path is expected to contain only one section (ie, no nested section) then this string parameter will contain the name of that section. It is an error to use it for paths with nested sections, and the string array argument should be used instead. |
[out] | section_names | If the original source path refers to a section that is nested within other sections (that themselves are index files), then this parameter is set to these section names, with the outermost section at the beginning of the array and the innermost section (contained within the outer sections) at the end of the array. If there is just a single section, the array will contain a single entry (the single section name) |
static bool UT_OpUtils::splitStandardIndexFileSectionPath |
( |
const char * |
source_section_path, |
|
|
UT_String & |
index_file_path, |
|
|
UT_String & |
section_name |
|
) |
| |
|
static |
Utility function to split the source path into an index file path and a section name, if the source indeed refers to an index file section (according to the standard convention of using UT_SECTION_SEPARATOR_CHAR, '?', as a separator). If source_section_path refers to a section, then index_file_path is set to the index file and section_name to the name. If source_section_path does not refer to any section, then index_file_path is set to the original path and section_name to an empty string. Note, some non-standard index file file protocols may use '?' for other purposses than separating a section name (eg "http:/foo?bar=baz"), and this function should not be used for such paths. Returns true if the original path indeed contains a section name.