StructClass Class

A Typescript class representation of an ECStructClass.

Extends

Methods

Name Description
constructor(schema: Schema, name: string, modifier?: ECClassModifier): StructClass    

Inherited methods

Name Inherited from Description
addCustomAttribute(customAttribute: CustomAttribute): void Protected Inherited ECClass  
addProperty<T extends Property>(prop: T): T Protected Inherited ECClass Convenience method for adding an already loaded ECProperty used by create*Property methods.
buildPropertyCache(result: Property[], existingValues?: Map<string, number>, resetBaseCaches: booleanfalse): Promise<void> Protected Inherited ECClass  
buildPropertyCacheSync(result: Property[], existingValues?: Map<string, number>, resetBaseCaches: booleanfalse): void Protected Inherited ECClass  
createPrimitiveArrayProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveArrayProperty> Protected Inherited ECClass Creates a PrimitiveArrayECProperty.
createPrimitiveArrayProperty(name: string, primitiveType: Enumeration): Promise<EnumerationArrayProperty> Protected Inherited ECClass  
createPrimitiveArrayPropertySync(name: string, primitiveType: PrimitiveType): PrimitiveArrayProperty Protected Inherited ECClass Creates a PrimitiveArrayECProperty.
createPrimitiveArrayPropertySync(name: string, primitiveType: Enumeration): EnumerationArrayProperty Protected Inherited ECClass  
createPrimitiveProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveProperty> Protected Inherited ECClass Creates a PrimitiveECProperty.
createPrimitiveProperty(name: string, primitiveType: Enumeration): Promise<EnumerationProperty> Protected Inherited ECClass  
createPrimitivePropertySync(name: string, primitiveType: PrimitiveType): PrimitiveProperty Protected Inherited ECClass Creates a PrimitiveECProperty.
createPrimitivePropertySync(name: string, primitiveType: Enumeration): EnumerationProperty Protected Inherited ECClass  
createStructArrayProperty(name: string, structType: string | StructClass): Promise<StructArrayProperty> Protected Inherited ECClass  
createStructArrayPropertySync(name: string, structType: string | StructClass): StructArrayProperty Protected Inherited ECClass  
createStructProperty(name: string, structType: string | StructClass): Promise<StructProperty> Protected Inherited ECClass  
createStructPropertySync(name: string, structType: string | StructClass): StructProperty Protected Inherited ECClass  
fromJSON(classProps: ClassProps): Promise<void> Inherited ECClass  
fromJSONSync(classProps: ClassProps): void Inherited ECClass  
getAllBaseClasses(): AsyncIterableIterator<ECClass, any, any> Inherited ECClass Iterates (recursively) over all base classes and mixins, in "property override" order.
getAllBaseClassesSync(): Iterable<AnyClass, any, any> Inherited ECClass  
getBaseClassSync(): undefined | ECClass Inherited ECClass  
getCustomAttributes(): Promise<> Inherited ECClass Retrieve all custom attributes in the current class and its bases
getCustomAttributesSync(): Inherited ECClass Retrieve all custom attributes in the current class and its bases.
getInheritedProperty(name: string): Promise<undefined | Property> Inherited ECClass Searches the base class, if one exists, for the property with the name provided.
getInheritedPropertySync(name: string): undefined | Property Inherited ECClass Searches the base class, if one exists, for the property with the name provided.
getProperties(resetCache: booleanfalse): Promise<Property[]> Inherited ECClass Iterates all properties, including the ones merged from base classes and mixins.
getPropertiesSync(resetCache: booleanfalse): Property[] Inherited ECClass Iterates all properties, including the ones merged from base classes and mixins.
getProperty(name: string, includeInherited: booleanfalse): Promise<undefined | Property> Inherited ECClass Searches, case-insensitive, for a local ECProperty with the name provided.
getPropertySync(name: string, includeInherited: booleanfalse): undefined | Property Inherited ECClass Searches, case-insensitive, for a local ECProperty with the name provided.
is(targetClass: string, schemaName: string): Promise<boolean> Inherited ECClass Indicates if the targetClass is of this type.
is(targetClass: ECClass): Promise<boolean> Inherited ECClass  
isSync(targetClass: ECClass): boolean Inherited ECClass A synchronous version of the ECClass.is, indicating if the targetClass is of this type.
loadPrimitiveType(primitiveType: string | PrimitiveType | Enumeration, schema: Schema): Promise<PrimitiveType | Enumeration> Protected Inherited ECClass  
loadPrimitiveTypeSync(primitiveType: string | PrimitiveType | Enumeration, schema: Schema): PrimitiveType | Enumeration Protected Inherited ECClass  
loadStructType(structType: string | StructClass, schema: Schema): Promise<StructClass> Protected Inherited ECClass  
loadStructTypeSync(structType: string | StructClass, schema: Schema): StructClass Protected Inherited ECClass  
toJSON(standalone: booleanfalse, includeSchemaVersion: booleanfalse): ClassProps Inherited ECClass Save this Classes properties to an object for serializing to JSON.
traverseBaseClasses(callback: (ecClass: ECClass, arg?: any) => boolean, arg?: any): Promise<boolean> Inherited ECClass Asynchronously traverses through the inheritance tree, using depth-first traversal, calling the given callback
traverseBaseClassesSync(callback: (ecClass: ECClass, arg?: any) => boolean, arg?: any): boolean Inherited ECClass Synchronously traverses through the inheritance tree, using depth-first traversal, calling the given callback
equalByKey(thisSchemaItem: SchemaItem, thatSchemaItemOrKey?: SchemaItemKey | SchemaItem): boolean Static Inherited ECClass Indicates if the two SchemaItem objects are equal by comparing their respective key properties.
mergeProperties(target: Property[], existingValues: Map<string, number>, propertiesToMerge: Property[], overwriteExisting: boolean): void Protected Static Inherited ECClass  
parseFullName(fullName: string): [string, string] Static Inherited ECClass Parses the given full name, {schemaName}.{schemaItemName} or {schemaName}:{schemaItemName}, into two separate strings.

Properties

Name Type Description
schemaItemType Readonly StructClass    

Inherited properties

Name Type Inherited from Description
_baseClass Protected Inherited LazyLoadedECClass | undefined ECClass  
_description Protected Inherited string | undefined ECClass  
_key Protected Inherited SchemaItemKey ECClass  
_label Protected Inherited string | undefined ECClass  
_modifier Protected Inherited ECClassModifier ECClass  
_properties Protected Inherited Map<string, Property> | undefined ECClass  
baseClass Accessor Inherited undefined | LazyLoadedECClass ECClass  
customAttributes Accessor Inherited ReadOnly undefined | ECClass  
description Accessor Inherited ReadOnly undefined | string ECClass  
fullName Accessor Inherited ReadOnly string ECClass  
key Accessor Inherited ReadOnly SchemaItemKey ECClass  
label Accessor Inherited ReadOnly undefined | string ECClass  
modifier Accessor Inherited ReadOnly ECClassModifier ECClass  
name Accessor Inherited ReadOnly string ECClass  
properties Accessor Inherited ReadOnly undefined | IterableIterator<Property, any, any> ECClass  
schema Readonly Inherited Schema ECClass  

Defined in

Last Updated: 17 December, 2024