PTRoleMap

@interface PTRoleMap : NSObject

RoleMap is a dictionary that maps the names of structure types used in the document to their approximate equivalents in the set of standard structure types.

  • Initialize a RoleMap using an existing low-level Cos/SDF role map dictionary.

    Note

    This constructor does not copy any data, but is instead the logical equivalent of a type cast.

    Declaration

    Objective-C

    - (instancetype)initWithDict:(PTObj *)dict;

    Swift

    init!(dict: PTObj!)

    Parameters

    dict

    - a low-level (SDF/Cos) RoleMap dictionary.

  • Declaration

    Objective-C

    - (BOOL)IsValid;

    Swift

    func isValid() -> Bool

    Return Value

    true if this is a valid (non-null) RoleMap, false otherwise. If the function returns false the underlying SDF/Cos object is null or is not valid and the RoleMap should be treated as NULL object.

  • Declaration

    Objective-C

    - (NSString *)GetDirectMap:(NSString *)type;

    Swift

    func getDirectMap(_ type: String!) -> String!

    Parameters

    type

    element type

    Return Value

    The direct mapping of given StructElement type, or NULL if such mapping is not defined.

  • Returns the RoleMap dictionary.

    Declaration

    Objective-C

    - (PTObj *)GetSDFObj;

    Swift

    func getSDFObj() -> PTObj!

    Return Value

    the object to the underlying SDF/Cos dictionary.