Check validity of child names and create new names. More...
Public Member Functions | |
string | GenerateUniqueChildName (string defaultName) |
Generates a unique name. More... | |
string | GetInvalidityReasonOfNewName (string newName) |
Returns the reason why the passed name is not valid. More... | |
Check validity of child names and create new names.
string GenerateUniqueChildName | ( | string | defaultName | ) |
Generates a unique name.
In Kanzi the names of property types and sibling nodes must be unique. If in this function you propose a name that another property type or a sibling node already uses, this function uses the name, but adds _n after the name.
defaultName | The proposed name. If another property type or a sibling node already uses the proposed name, this function uses the proposed name as a base for the name it generates. |
Examples
To create a unique name for the new child item:
string GetInvalidityReasonOfNewName | ( | string | newName | ) |
Returns the reason why the passed name is not valid.
This function does not assign the name.
newName | The name the validity of which the function checks. |
Examples
To check whether a name for a property type is valid:
To check whether a name for a project item is valid: