GithubHelp home page GithubHelp logo

connectivecpp / utility-rack Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 1.0 1.2 MB

A small set of general purpose C++ utility classes and functions

License: Boost Software License 1.0

CMake 12.49% C++ 87.51%
utility-library cpp modern-cpp catch2 cmake cpp20

utility-rack's People

Contributors

cliffg-softwarelibre avatar crghilardi avatar nathandeutsch avatar ragerone avatar tgill880 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ragerone

utility-rack's Issues

Change C-style casts to C++ casts in example programs

All casts should be C++ style, and in general, casting should be avoided (i.e. every cast needs to be analyzed as to why it is there). Data into and out of network buffers (e.g. going into or out of a shared_buffer) should be serialized, rather than "cast in place".

Improve CMake files, including dependency management

There are multiple enhancements and improvements needed in our CMake files:

  • CMake find_package commands need to be fully implemented, and improvements made to the current design. In particular, we should have a modern and consistent approach to our dependent libraries (Asio, Catch2, etc).
  • Options for debug and release (optimized builds) need to be implemented.
  • Options for sanitizers, profilers, etc, need to be implemented.
  • A more consistent CMake design should be implemented, specially in the common CMake code.

Remove Boost dependency in wait_queue_test and example code

Currently (Apr 2019) the only Boost dependency in the utility-rack repository is in the wait_queue_test and shared_buffer_demo.cpp. The wait_queue_test can be changed to use a different circular buffer, and the shared_buffer_demo app can be changed to use the utility marshalling facilities.

A good quality circular buffer to test with (in addition to Martin's ring-span-lite) is:

https://github.com/JustasMasiulis/circular_buffer

It is a high quality, STL style, single header container.

While Boost is an excellent, high quality set of libraries, it simplifies utility-rack dependency management not to have it as a dependency.

Factor out common code in CMake files

There is significant common code in the CMake files which needs to be split out and included as appropriate. Some of it spans multiple repositories so it may make sense to have the master versions in a special place in the utility-rack repository.

Add missing const to example programs

The demo programs need to be const correct. Methods that do not modify object data need to be const qualified, and literals need to be const or constexpr, as appropriate (with constexpr preferred). Parameters to functions that are not modified or passed by value should be const qualified.

Create variable length integer functions in the low-level marshalling library

Create functions to marshall and unmarshall a variable length integer. The "append" / marshall function will take an integer in native format, and create a 1 or 2 or 3 or 4 (or more) byte integer. The first byte will contain values from 0-127, and the MSB (most significant bit) will designate whether another byte is needed (for larger values). The "extract" / unmarshall function will perform the converse.

One usage of this will be in the MQTT wire protocol (see section 1.5.5 of the MQTT 5.0 spec).

A good place for these functions is in the "extract_append_val.hpp" header in the marshall directory of the utility-rack repo.

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.