Code Monkey home page Code Monkey logo

autowiring's Introduction

Purpose

Autowiring is an inversion-of-control framework for C++11. It provides a declarative way to manage resources through dependency injection. Instead of explicitly instantiating dependencies, simply declare what you need and Autowiring will manage object creation and wiring.

Build Build Status

Autowiring project structure is specified with CMake. Simply point CMake to the root project directory and generate your desired project file. While Autowiring is written using C++11 features, it supports linking the non-C++11 STL. The C++11/ directory provides boost shims for missing C++11 library features.

Mac

Mac dependencies are installed with port or brew. If you have port installed, this will build the project:

git clone [email protected]:leapmotion/autowiring.git
cd autowiring
sudo port install boost cmake
cmake .
make
make test
sudo make install

Unix

The commands for Unix are different depending on what package manager you're using. Ubuntu's package manager is apt-get, OpenSUSE uses zypper, and CentOS systems use yum. The major apparent difference to the user will be that the package to install has a different name. For Ubuntu, do this:

git clone [email protected]:leapmotion/autowiring.git
cd autowiring
sudo apt-get install libboost-dev cmake
cmake .
make
make test
sudo make install

Windows

Unfortunately, Windows doesn't have any sort of nifty package manager, and this requires that you download and install the boost dependency by hand. Once you've followed the instructions for installing boost as indicated here you will need to set BOOST_ROOT during cmake configuration time to point to the path where boost was built. Here's the magic incantation required, assuming you're running from a MinGW terminal (comes for free with Git Extensions. You're also going to need a copy of Visual Studio 2012 or better. Other build systems will probably work, but they aren't officially supported here.

git clone [email protected]:leapmotion/autowiring.git
cd autowiring
cmake . -DBOOST_ROOT:Path=<path/to/boost/with/forward/slashes>

At this point, you'll have a solution file in your root directory called "Autowiring.sln", if you run Visual Studio as an adminstrator and build the INSTALL target then Autowiring will be installed on your system. As with the other platforms, CMake will be able to find autowiring when it's installed this way via the find_package command.

Install

Autowiring uses CPack, which knows how to use rpm/deb/wix/dragndrop, and will target the correct version depending on which system you're on. To build the installer on Windows, you must first download the wix toolset. Other CMake installations on the current system will be able to find Autowiring once the package is installed by this means.

Generally speaking, there is not really much reason to build an installer yourself unless you're testing out the bleeding edge. The releases page lists the officially supported Autowiring releases.

autowiring's People

Contributors

codemercenary avatar gtremper avatar gabrielhare avatar sillsm avatar gittyupagain avatar jdonald avatar kevinhorowitz avatar bennherrera avatar tnitz avatar mperez3232 avatar neptunius avatar joshbuddy avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.