BaseStructure Class
Base Virtual Class for component's data
Constructor
Item Index
Methods
Methods
add
-
propertyName
-
value
Adds an element to the collection in parameter.
Returns:
Returns true if the value is added else returns false.
Deserialize
-
hybrid
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
-
hybrid
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
-
name
-
collection
Gets an element of the collection by its name.
Parameters:
Returns:
Returns the needed element if it exists, else returns null.
getFloor
-
collection
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
()
private
Method called after the loading of the component
serialize
()
Object
Serializes the object (to JSON)
Returns:
The serialization result, null if nothing is serialized
update
()
Generic update method, must be overridden.
updateReferences
-
structure
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