purity library

Author: Daniel Robinson http://github.com/0xor1

Classes

All
Special type used for listening to all events from an Emitter with a single Handler.
Consumer
An end-point object, a Consumer exists solely to provide representation for a single Source. [...]
Emitter
A mixin class to enable any object to emit events with arbitrary data types.
Event<T>
All emitted data comes inside an Event object.
Receiver
A convenience mixin to enable any object to manage Handlers listening to Emitters.
Source
An identifiable source of Emissions. [...]
TranRegistration
An object containing all the required information to successfully register a transmittable codec.
Transmittable
An object that can be serialized in to a string and back into its self again allowing named and typed properties to be sent across http connections.

Functions

generateRegistrar(String namespaceFull, String namespace, List<TranRegistration> registrations) Registrar
Returns a Registrar function that will register the codecs in registrations upon being called.

Typedefs

Handler<T>(Event<T> event) → void
Function signature of an event handler.
Registrar() → void
The signature for a Registrar function returned from generateRegistrar. [...]
TranConstructor<T extends Transmittable>() → T
A function which returns a new empty Transmittable type.
TranDecode<T>(String str) → T
A function which takes a string representation of an object of type T and returns an instance of that object.
TranEncode<T>(T obj) → String
A function which takes an object of type T and returns a String representation of that object.
ValueProcessor(dynamic value) → dynamic
The signature of a generic value processor function. [...]

Exceptions / Errors

DuplicateReceiverSettingError
Thrown when receiver attempts to add newHandler to emitters handler queue of type and an existingHandler is already assigned.
DuplicateTranKeyError
Thrown if the string key used when registering a type has already been used. [...]
DuplicateTranNamespaceError
Thrown if a call to generateRegistrar is made with the same namespace argument.
DuplicateTranTypeError
Thrown if an attempt is made to register a type which is already registered.
EmitTimeQueueChangeError
Thrown when handler attempts to add or remove Handlers from the handler queue currently being called.
InvalidTranNamespaceError
Thrown if a call to generateRegistrar is made with a namespace containing the : character.
ReservedPropertyNameError
Thrown if a setter is called with the name _isTranLocked.
TranMethodError
Thrown if a non existing method is invoked on a Transmittable object
TransmittableLockedError
Thrown if a setter or clear() is invoked on a Transmittable object after it has been locked.
UnregisteredTypeError
Thrown when serializing a Transmittable to a tran string and one of the types contained on the Transmittable object has not been registered.
UnresolvableNestedReferenceLoopError
Thrown when an unresolvable nested reference loop is detected during serialization to tran string.