summaryrefslogtreecommitdiff
path: root/development/sauce/README
diff options
context:
space:
mode:
authorAndre Barboza <bmg.andre@gmail.com>2017-02-03 13:00:16 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-02-04 06:59:40 +0700
commitda666b365bf5fb90302114f10f265fad0cbcd135 (patch)
tree551519b6ddee71b26004ee6e3e172e349992a792 /development/sauce/README
parent0294ee68a7eaee751067f0fe94d97575b28a2132 (diff)
downloadslackbuilds-da666b365bf5fb90302114f10f265fad0cbcd135.tar.gz
development/sauce: Added (C++ Dependency Injection Framework).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'development/sauce/README')
-rw-r--r--development/sauce/README24
1 files changed, 24 insertions, 0 deletions
diff --git a/development/sauce/README b/development/sauce/README
new file mode 100644
index 0000000000..026d00fcd3
--- /dev/null
+++ b/development/sauce/README
@@ -0,0 +1,24 @@
+A C++ dependency injection framework.
+
+The design and name are inspired by Google's excellent Guice framework,
+but neither Google nor Guice is otherwise affiliated in any way.
+
+In Sauce, one defines bindings that map interface types to
+implementation types. Each binding is declared in the context of a
+module which is used to organize and refer to collections of bindings
+at a time. Modules may be function pointers, or classes providing a
+certain operator(). Groups of modules may be used together, to avoid
+duplicate bindings.
+
+At runtime, one collects desired modules into a modules object, which
+produces injectors. One can then ask an injector to provide a value
+(instance) of a desired type (again supplied as a template parameter.)
+When providing a value, implicit transitive dependencies are provided
+as well. All values are exchanged with shared pointers
+((std|std::tr1|boost)::shared_ptrs are supported) and the injector
+takes care of disposing the value when the smart pointer deletes
+itself.
+
+Requesting the injector for an unbound type results in a runtime
+exception. No RTTI is used (but we use a portable, homebrew version
+of same.)