aermicioi.aedi.configurer.annotation.annotation

This module implements annotation based configuration of containers.

Public Imports

aermicioi.aedi.factory.reference
public import aermicioi.aedi.factory.reference : lref, anonymous;

Members

Aliases

autowired
alias autowired = AutowiredAnnotation

Annotation used to mark constructor or method for auto wiring.

component
alias component = ComponentAnnotation

Annotation used to denote a component that should be stored into an container.

Functions

allocator
AllocatorAnnotation!T allocator(T allocator)
AllocatorAnnotation!T allocator()

Use allocator to allocate component.

callback
auto callback(void delegate(Locator!(), ref T, Args) dg, Args args)
auto callback(void function(Locator!(), ref T, Args) dg, Args args)
auto callback(void delegate(Locator!(), T, Args) dg, Args args)
auto callback(void function(Locator!(), T, Args) dg, Args args)

Annotation that specifies a delegate to be used to configure component somehow.

callbackDestructor
CallbackDestructor callbackDestructor(Dg dg, Args args)

Use callback stored in annotation to destroy a component of type T

constructor
auto constructor(Args args)

Annotation used to mark a constructor to be used for component instantiation.

contained
ContainedAnnotation contained(string id)

When objects are registered into a component container, this annotation marks in which sub-container it is required to store.

destructorMethod
CallbackDestructor destructorMethod()

Use method from instance of type T to destroy a component of type Z

fact
auto fact(T delegate(RCIAllocator, Locator!(), Args) dg, Args args)
auto fact(T function(RCIAllocator, Locator!(), Args) dg, Args args)

Annotation that specifies a delegate to be used to instantiate component.

qualifier
QualifierAnnotation qualifier(string id)
QualifierAnnotation qualifier()

An annotation used to provide custom identity for an object in container.

qualifier
QualifierAnnotation qualifier()

An annotation used to provide custom identity for an object in container by some interface.

setter
auto setter(Args args)

Annotation used to mark a member to be called or set (in case of fields), with args passed to setter.

value
ValueAnnotation!T value(T value)

Construct the instance using value provided in annotation

Structs

AllocatorAnnotation
struct AllocatorAnnotation(T = RCIAllocator)
struct AllocatorAnnotation(T)

Use allocator to allocate component.

AutowiredAnnotation
struct AutowiredAnnotation

Annotation used to mark constructor or method for auto wiring.

CallbackConfigurerAnnotation
struct CallbackConfigurerAnnotation(Z, Dg, Args...)

Annotation that specifies a delegate to be used to configure component somehow.

CallbackDestructor
struct CallbackDestructor(T, Dg : void delegate(RCIAllocator, ref T destructable, Args), Args...)

Use callback stored in annotation to destroy a component of type T

CallbackFactoryAnnotation
struct CallbackFactoryAnnotation(Z, Dg, Args...)

Annotation that specifies a delegate to be used to instantiate component.

ComponentAnnotation
struct ComponentAnnotation

Annotation used to denote a component that should be stored into an container.

ConstructorAnnotation
struct ConstructorAnnotation(Args...)

Annotation used to mark a constructor to be used for component instantiation.

ContainedAnnotation
struct ContainedAnnotation

When objects are registered into a component container, this annotation marks in which sub-container it is required to store.

DestructorMethod
struct DestructorMethod(string method, T, Z, Args...)

Use method from instance of type T to destroy a component of type Z

QualifierAnnotation
struct QualifierAnnotation

An annotation used to provide custom identity for an object in container.

SetterAnnotation
struct SetterAnnotation(Args...)

Annotation used to mark a member to be called or set (in case of fields), with args passed to setter.

ValueAnnotation
struct ValueAnnotation(Value)

Construct the instance using value provided in annotation

Variables

isAllocatorAnnotation
enum bool isAllocatorAnnotation(T);
enum bool isAllocatorAnnotation(alias T);

Check if T is instance of AllocatorAnnotation

isAutowiredAnnotation
enum bool isAutowiredAnnotation(T);
enum bool isAutowiredAnnotation(alias T);

Check if T is instance of AutowiredAnnotation

isCallbackConfigurerAnnotation
enum bool isCallbackConfigurerAnnotation(T);
enum bool isCallbackConfigurerAnnotation(alias T);

Check if T is instance of CallbackConfigurerAnnotation

isCallbackDestructor
enum bool isCallbackDestructor(T);
enum bool isCallbackDestructor(alias T);

Check if T is instance of CallbackDestructor

isCallbackFactoryAnnotation
enum bool isCallbackFactoryAnnotation(T);
enum bool isCallbackFactoryAnnotation(alias T);

Check if T is instance of CallbackFactoryAnnotation

isComponentAnnotation
enum bool isComponentAnnotation(T);
enum bool isComponentAnnotation(alias T);

Check if T is instance of ComponentAnnotation

isConstructorAnnotation
enum bool isConstructorAnnotation(T);
enum bool isConstructorAnnotation(alias T);

Check if T is instance of ConstructorAnnotation

isContainedAnnotation
enum bool isContainedAnnotation(T);
enum bool isContainedAnnotation(alias T);

Check if T is instance of ContainedAnnotation

isDestructorMethod
enum bool isDestructorMethod(T);
enum bool isDestructorMethod(alias T);

Check if T is instance of DestructorMethod

isQualifierAnnotation
enum bool isQualifierAnnotation(T);
enum bool isQualifierAnnotation(alias T);

Check if T is instance of QualifierAnnotation

isSetterAnnotation
enum bool isSetterAnnotation(T);
enum bool isSetterAnnotation(alias T);

Check if T is instance of SetterAnnotation

isValueAnnotation
enum bool isValueAnnotation(T);
enum bool isValueAnnotation(alias T);

Check if T is instance of ValueAnnotation

Meta

License

Boost Software License - Version 1.0 - August 17th, 2003

Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following:

The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Authors

Alexandru Ermicioi