GithubHelp home page GithubHelp logo

astruct's Introduction

AStruct - Avidan's C Data Structures

AStruct is a library of data structures for C. It includes:

  • AList
  • AVector
  • AStack
  • AQueue
  • AHashtable

Usage

All data structures are used as pointers and are created using AStruct->ANew(). They all share the same interface of being operated via function pointers within the data structure which are passed a pointer to the data structure as their first argument. All of the data structures should be destroyed when you're done with them using the ->destroy() function they provide.

All the values the data structures refer to are generic pointers (void *). It's up to the user to provide useful functions to operate on the actual values dereferenced by the pointers.

Build

AStruct can to be built using GCC or MSVC (tested on Linux and Windows). After the build, the library file (.so, .dll) will be in the folder build.

  • Linux/GCC, Windows/MinGW-MSYS, Windows/Cygwin

    Use the Makefile. Run the regular

      make
    

    command from the root directory of the project.

  • Windows/MSVC

    Import AStruct.vcxproj to Visual Studio and build the project from the Build menu.

Installation

  • Linux

    Run

      sudo make install
    

    After make to install the shared library and headers to standard system locations.

  • Windows

    No installation. Just copy the .dll file the and headers to the new project.

Development

Either of the following tools can be used for development:

  • Make

    Run

      make debug
    

    To build a debug build of the library. This will run the required unit tests from tests folder as well.

  • Eclipse CDT

    AStruct can be imported to Eclipse CDT. Import the root folder (containing the Eclipse project files .project and .cproject) as an existing project. The Eclipse CDT project uses the Makefile for builds, and by default uses the Debug configuration.

  • Visual Studio

    AStruct can be imported to Visual Studio. Open the project file (AStruct.vcxproj) to import the project to Visual Studio. Visual Studio builds in Debug mode by default.

Documentation

Documentation for AStruct is generated using Doxygen (1.8.3 at least). Run doxygen from the root folder, which will generate HTML documentation in the folder doc. If you're runnning Linux, run

make doc
sudo make install-doc

to generate the documentation and install it to the standard location.

Licensing

AStruct is distributed under the BSD-2 License. See LICENSE.md for details.

Links

astruct's People

Contributors

avidanborisov avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

x-lugoo

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.