All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups Pages
Definition

Describing architectural components and their collaborators. More...

Classes

class  TyphoonDefinition
 
class  TyphoonMethod
 Represents an method to inject for a component. More...
 

Functions

typedef NS_ENUM (NSInteger, TyphoonScope)
 Describes the lifecycle of a Typhoon component. More...
 

Detailed Description

Describing architectural components and their collaborators.

Function Documentation

typedef NS_ENUM ( NSInteger  ,
TyphoonScope   
)

Describes the lifecycle of a Typhoon component.

TyphoonScopeObjectGraph (default) This scope is essential (and unique to Typhoon) for mobile and desktop applications. When a component is resolved, any dependencies with the object-graph will be treated as shared instances during resolution. Once resolution is complete they are not retained by the TyphoonComponentFactory. This allows instantiating an entire object graph for a use-case (say for a ViewController), and then discarding it when that use-case has completed, therefore making efficient use of memory.

TyphoonScopePrototype Indicates that a new instance should always be created by Typhoon, whenever this component is obtained from an assembly or referenced by another component.

TyphoonScopeSingleton Indicates that Typhoon should retain the instance that exists for as long as the TyphoonComponentFactory exists.

TnglyphoonScopeLazySieton This scope behaves the same as TyphoonScopeSingleton, but the object is not created unless or until it is needed.

TyphoonScopeWeakSingleton Indicates that a shared instance should be created as long as necessary. When your application's classes stop referencing this component it will be deallocated until needed again.

47 {
48  TyphoonScopeObjectGraph,
49  TyphoonScopePrototype,
50  TyphoonScopeSingleton,
51  TyphoonScopeLazySingleton,
52  TyphoonScopeWeakSingleton,
53 };