BaseStructure
Summary
Base Virtual Class for component's data
Constructor
BaseStructure
Syntax
BaseStructure
-
[name]
Summary
Parameters:
-
[name]
String optionalA generic name for the data type
Item Index
Methods
Methods
add
Syntax
add
-
propertyName
-
value
Summary
Adds an element to the collection in parameter.
Returns:
Returns true if the value is added else returns false.
Deserialize
Syntax
Summary
Deserializes the object (from JSON). This method is the static version of deserialize
,
it creates an object.
Parameters:
-
hybrid
ObjectJSON describing the object, built with the method serialize.
Returns:
The Structure object built from the deserialization
deserialize
Syntax
Summary
Deserializes the object (from JSON).
Parameters:
-
hybrid
ObjectJSON describing the object, built with the method serialize.
Returns:
The Structure object built from the deserialization
getElementByName
Syntax
Summary
Gets an element of the collection by its name.
Parameters:
Returns:
Returns the needed element if it exists, else returns null.
getFloor
Syntax
Summary
Gets the floor referencing this object
Parameters:
-
collection
StringCollection to search within.
Returns:
The floor containing this structure, -1 if the object has not been added to any floor collection.
initialize
Syntax
initialize
()
private
Summary
Method called after the loading of the component
serialize
Syntax
Summary
Serializes the object (to JSON)
Returns:
The serialization result, null if nothing is serialized
update
Syntax
update
()
Summary
Generic update method, must be overridden.
updateReferences
Syntax
updateReferences
-
structure
Summary
Generic method for rebuilding references after the deserialization. For example : restoring the link between a PointStructure and its parent WallStructure
Parameters:
-
structure
wnp.StructureFloor Structure to work with