Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A tiny (experimental) spreadsheet library for C++

branch: master
README.md

Inspect Build Status

Overview

Inspect is a very simple spreadsheet library for C++.

This project is essentially experimental code - I wrote it while learning how to use Ragel and Lemon to build a parser. The build system was hacked together pretty quickly so that it would work on Mac (command line) and Windows (Visual C++). It should compile cleanly on Linux systems, but I have not tested this recently.

License

Inspect is licensed under the Simplified BSD License. See the LICENSE file for more information.

Dependencies

Boost version 1.53.

Build tools (included in 'tools' directory).

Source code and Visual C++ project files are included for these tools. On UNIX-based systems, the CMake build system assumes that ragel and lemon have been installed on your syste On UNIX-based systems, the CMake build system assumes that ragel and lemon have been installed on your system.

Build instructions

UNIX-based systems:

On UNIX-based systems, Inspect should be built using CMake. The recommended approach is to create a build directory, and to run 'cmake' from there. For example:

mkdir build
cd build
cmake ..
make

Windows:

  • VS2010 Solution files for Inspect can be found in the 'msvc' directory.
  • VS2010 Solution files for Ragel and Lemon can be found in: 'tools/lemon/msvc' and 'tools/ragel/msvc'

Example

#include <iostream>
#include "inspect/Inspect.hpp"

using namespace inspect;
using namespace std;

int main() {

    // Create a spreadsheet
    Sheet sheet;

    // Update a cell and recalculate the sheet
    sheet.setFormula(Address("A1"), "=1")
    sheet.setFormula(Address("B12"), "=A1+1");
    sheet.recalculate();

    // Output the result
    cout << sheet.getValue(Address("B12")) << endl;

    return 0;
}

Project structure

  * deps         Third party library dependencies
  * examples     Source code for examples
  * include      Header files for Inspect library
  * msvc         Visual Studio solution files
  * src          Source files
    * formula      Formula parser source code
  * test         Test source files
  * tools        Build tools
    * gnu          GNU tools for Windows
    * lemon        Lemon parser generator
    * ragel        Ragel state machine generator (lexer)
    * scons        SConstruct
Something went wrong with that request. Please try again.