Coder Social home page Coder Social logo

abhisheknishantpuresoftware / jfc-smart_handles Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jfcameron/jfc-smart_handles

0.0 0.0 0.0 863 KB

Scoped wrappers for "handle" types found in libraries like OpenGL, OpenAL, LibClang.

License: MIT License

CMake 8.27% C++ 91.73%

jfc-smart_handles's Introduction

Build Status Coverage Status Documentation

jfc-smart_handles

scoped wrappers for handle types found in libraries like OpenGL, OpenAL, LibClang, FreeType. Associates a handle with a deleter, to be called when the wrapper falls out of scope.

The smart_handles define move semantics, copy semantics and end of life behavior, simplifying writing objects around e.g vertex buffer handles, audio buffer handles.

The types, their interface and interactions are modeled after the stl smart pointers.

unique_handle

Unique Handle models the single owner case with move support to another unique handle or a shared handle.

shared_handle

Shared handle models the many owners case, the deletor is invoked when the final owner falls out of scope. A shared handle can also be copied to a Weak Handle.

weak_handle

Weak handle is similar to Shared, except it does not contribute to the use_count and the handle cannot be accessed directly. Instead, the lock method must be called, which returns an optional to a shared handle. If the shared handle that the weak handle is observing has not fallen out of scope at the time of the lock then the optional will contain a new shared handle to the resource. If not, then the optional will be null.

CI & Documentation

Documentation generated with doxygen ca be viewed online here: https://jfcameron.github.io/jfc-smart_handles/

Coverage calculated with gcov viewable here: https://coveralls.io/github/jfcameron/jfc-smart_handles

CI done using Travis CI. Build scripts cover Windows, Linux, Mac; Clang, GCC, MSVC, MinGW: https://travis-ci.org/jfcameron/jfc-smart_handles

catch2 unit tests available under test/.

jfc-smart_handles's People

Contributors

jfcameron avatar abhisheknishantpuresoftware 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.