src/models/property/property.ts
Abstract base class for a serializable REDHAWK Property model
Properties |
Methods |
constructor(id?: string, name?: string, value?: AnyValueType)
|
||||||||||||||||
Defined in src/models/property/property.ts:23
|
||||||||||||||||
Constructor
Parameters :
|
copy |
copy()
|
Defined in src/models/property/property.ts:58
|
Create a copy of this Property.
Returns :
Property
|
deserialize | ||||||||
deserialize(input: any)
|
||||||||
Defined in src/models/property/property.ts:47
|
||||||||
WARNING: This is a partial deserialization. Used the derived classes instead:
Parameters :
Returns :
this
|
id |
id:
|
Type : string
|
Defined in src/models/property/property.ts:13
|
Property's unique ID |
kinds |
kinds:
|
Type : Array | scaKind.ScaKindPost200
|
Default value : 'property'
|
Defined in src/models/property/property.ts:21
|
The 'kinds' of the property |
mode |
mode:
|
Type : Mode
|
Default value : 'readwrite'
|
Defined in src/models/property/property.ts:23
|
Access mode |
name |
name:
|
Type : string
|
Defined in src/models/property/property.ts:15
|
Typically, a more human-readable Name |
scaType |
scaType:
|
Type : ScaType
|
Defined in src/models/property/property.ts:19
|
SCA Type of the property |
value |
value:
|
Type : AnyValueType
|
Defined in src/models/property/property.ts:17
|
value of the property |
import { ISerializable } from '../serialization/index';
import { AnyValueType } from './any-value-type';
import { Mode } from './mode';
import { ScaType } from './sca-types';
import * as scaKind from './sca-kinds';
/**
* Abstract base class for a serializable REDHAWK Property model
*/
export abstract class Property implements ISerializable<Property> {
/** Property's unique ID */
id: string;
/** Typically, a more human-readable Name */
name: string;
/** value of the property */
value: AnyValueType;
/** SCA Type of the property */
scaType: ScaType;
/** The 'kinds' of the property */
kinds: Array<scaKind.ScaKindPre200> | scaKind.ScaKindPost200 = 'property';
/** Access mode */
mode: Mode = 'readwrite';
/**
* Constructor
* @param [id] The property's ID
* @param [name] The property's Name
* @param [value] The value of the property
*/
constructor(id?: string, name?: string, value?: AnyValueType) {
this.id = id;
this.name = name;
this.value = value;
this.kinds = [];
}
/**
* **WARNING:** This is a partial deserialization.
* Used the derived classes instead:
* * {@link SimpleProperty}
* * {@link SimpleSeqProperty}
* * {@link StructProperty}
* * {@link StructSeqProperty}
* @param input The JSON object to deserialize into this property's members.
*/
deserialize(input: any) {
this.id = input.id;
this.name = input.name;
this.mode = input.mode;
this.kinds = input.kinds;
return this;
}
/**
* Create a copy of this Property.
*/
abstract copy(): Property;
}