LibEntity

Git Source

Functions

create

Creates a new machine entity of the specified type.

function create(MACHINE_TYPE _machineType) internal returns (bytes32);

Parameters

NameTypeDescription
_machineTypeMACHINE_TYPEThe type of machine to create

Returns

NameTypeDescription
<none>bytes32entity The identifier for the newly created machine entity.

remove

Deletes the records associated with a specified entity.

function remove(bytes32 _podEntity, bytes32 _entity) internal;

Parameters

NameTypeDescription
_podEntitybytes32The identifier for the pod entity that the machine entity is associated with.
_entitybytes32The identifier for the entity whose records are to be deleted.

isBuildableMachineType

Checks if the specified machine type is buildable

function isBuildableMachineType(MACHINE_TYPE _machineType) internal pure returns (bool);

Parameters

NameTypeDescription
_machineTypeMACHINE_TYPEThe type of machine to verify

Returns

NameTypeDescription
<none>boolbool True if the machine type is among the predefined buildable types, false otherwise.