Interface IRnObject

The Interface of the RnObject defining core object functionality.

interface IRnObject {
    objectUID: number;
    uniqueName: string;
    _copyFrom(rnObject: RnObject): void;
    getTagValue(tagName: string): any;
    matchTag(tagName: string, tagValue: string): boolean;
    matchTags(tags: RnTags): boolean;
    matchTagsAsFreeStrings(stringArray: string[]): boolean;
    tryToSetTag(tag: Tag): boolean;
    tryToSetUniqueName(name: string, toAddNameIfConflict: boolean): boolean;
    validateTagString(val: string): boolean;
}

Hierarchy (view full)

Implemented by

Properties

objectUID: number

Unique identifier for the object

uniqueName: string

Unique name string for the object

Methods

  • Internal

    Copies properties from another RnObject instance

    Parameters

    • rnObject: RnObject

      The source object to copy from

    Returns void

  • Retrieves the value of a specific tag

    Parameters

    • tagName: string

      The name of the tag to retrieve

    Returns any

    The tag value or undefined if not found

  • Checks if an object matches a specific tag name and value

    Parameters

    • tagName: string

      The tag name to match

    • tagValue: string

      The tag value to match

    Returns boolean

    True if the tag matches, false otherwise

  • Checks if the object has all the specified tags with matching values

    Parameters

    • tags: RnTags

      The tags object to match against

    Returns boolean

    True if all tags match, false otherwise

  • Checks if the object's combined tag string contains all provided strings

    Parameters

    • stringArray: string[]

      Array of strings to search for in tags

    Returns boolean

    True if all strings are found, false otherwise

  • Attempts to set a tag on the object

    Parameters

    • tag: Tag

      The tag object containing name and value

    Returns boolean

    True if the tag was successfully set, false otherwise

  • Attempts to set a unique name for the object

    Parameters

    • name: string

      The desired unique name

    • toAddNameIfConflict: boolean

      Whether to modify the name if it conflicts with existing names

    Returns boolean

    True if the name was successfully set, false otherwise

  • Validates a tag string to ensure it contains only allowed characters

    Parameters

    • val: string

      The string to validate

    Returns boolean

    True if the string is valid, false otherwise