Coder Social home page Coder Social logo

dynamicarray's Introduction

DynamicArray

This is a basic library that allows one to easily create dynamic arrays using a C interface. Actually, it was intended as a DLL plug-in for the Zorro Trading Automaton. The backend was written in Win32 C++17 using Visual Studio. Its only dependency is the STL library.

What This Library Does

  • A dynamic array is basically the equivalent of a C++ std::vector.
  • Dynamic arrays can be created, modified, and deleted from memory.
  • When you create an array, you define its element size permanently. (For example, sizeof(int) for a dynamic array of ints, or sizeof(STRUCTNAME) for an array of STRUCTNAMEs.)
  • You can track an array with a handler, returned from da_new().
  • You are advised to delete any dynamic array no longer needed. Simply call da_delete(h), where h is the handler.
  • You also have the option of clearing all dynamic arrays. Simply call da_delete_all(). It will clear all dynamic arrays from memory, no exceptions.
  • All of the remaining functions are simply wrappers for the std::vector library. You can insert elements or arrays of elements at any location in a given dynamic array. You can erase any element(s) at the beginning, middle, or end. You can resize, reserve, and shrink-to-fit.
  • All of the individual functions are documented in detail in the include/dynamic.h file.

Build Instructions

Currently, the library is meant to be built in Visual Studio 2017, though it should not be hard to recycle the core code for UNIX, since it only depends on the STL library.

To build a DLL for Zorro, simply open the solution file, and build in the Release/x86 mode.

Zorro Installation Instructions

To install DynamicArray in Zorro, the procedure is simple:

  1. Build DynamicArray.dll
  2. Copy the newly built DynamicArray.dll to your Zorro folder.
  3. Copy dynamic.h to your Zorro/include folder.
  4. Optionally, copy Zorro/DynamicArray.c to your Zorro/Strategy folder. This script demonstrates most of the functionality of the library.

License

This project is licensed under the MIT License - see the LICENSE file for details.

dynamicarray's People

Contributors

andrewamd avatar

Watchers

 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.