gnieh.sohva.entities

EntityManager

Related Doc: package entities

trait EntityManager[Result[_]] extends AnyRef

The EntityManager is responsible for creating, storing and deleting the entities and associated components. Entities are stored in a CouchDB database.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. EntityManager
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def create(uuid: String, tag: Option[String]): Result[Unit]

    Creates an entity into the entity database and returns it

  2. abstract def createSimple(): Result[Entity]

    Creates a simple untagged entity into the entity database and returns it

  3. abstract def createTagged(tag: String): Result[Entity]

    Creates a tagged entity into the entity database and returns it

  4. abstract val database: Database[Result]

  5. abstract def deleteEntity(entity: Entity): Result[Boolean]

    Deletes an entity and all attched components from the entity database

  6. abstract def entities(tag: String): Result[Set[Entity]]

    Returns the list of known entities with the given tag

  7. abstract def entities: Result[Set[Entity]]

    Returns the list of known entities

  8. abstract def getComponent[T](entity: Entity)(implicit arg0: Manifest[T]): Result[Option[T]]

    Retrieves the component of the given type attached to the entity if any

  9. abstract def hasComponent[T](entity: Entity, component: T)(implicit arg0: Manifest[T]): Result[Boolean]

    Indicates whether the entity has a component attached to it

  10. abstract def hasComponentType[T](entity: Entity)(implicit arg0: Manifest[T]): Result[Boolean]

    Indicates whether the entity has a component of the given type attached to it

  11. abstract def removeComponent[T <: IdRev](entity: Entity, component: T)(implicit arg0: Manifest[T]): Result[Boolean]

    Removes the given component from the entity.

    Removes the given component from the entity. If the entity does not exist or has not this component attached, returns false

  12. abstract def removeComponentType[T](entity: Entity)(implicit arg0: Manifest[T]): Result[Boolean]

    Removes the component with the given name from the entity.

    Removes the component with the given name from the entity. If the entity does not exist or has no component with the given name, returns false

  13. abstract def saveComponent[T <: IdRev](entity: Entity, component: T)(implicit arg0: Manifest[T]): Result[T]

    Adds or updates the component to the given entity.

    Adds or updates the component to the given entity. If the entity is unknown, does nothing. Returns the saved component.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  13. final def notify(): Unit

    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  15. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  16. def toString(): String

    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped