EntityManager.accessor - multiple declarations

Function EntityManager.accessor

Set an accessor delegate for a component.

Prototype

void accessor(C)(
  void delegate(Entity e, C* pc) dg
) @property;

Parameters

NameDescription
C Component to which the accessor delegate will be set.
dg Delegate that will be called when using Entity.iterate. Use null to clear the accessor.

Function EntityManager.accessor

Get the accessor delegate assigned to a component.

Prototype

void delegate(Entity e, C* pc) accessor(C)() @property;

Parameters

NameDescription
C Component from which the accessor delegate will be retreived.

Returns

The accessor delegate; null if it has never been set, if it was cleared or if the component is missing.

Authors

Claude Merle

Copyright

© 2015-2016 Claude Merle

License

This file is part of EntitySysD.

EntitySysD is free software: you can redistribute it and/or modify it under the terms of the Lesser GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

EntitySysD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public License for more details.

You should have received a copy of the Lesser GNU General Public License along with EntitySysD. If not, see http://www.gnu.org/licenses/.