toctave

t(iny)octave
git clone https://0xff.ir/g/toctave.git
Log | Files | Refs | README

env.hpp (420B)


      1 // Runtime environment
      2 
      3 // Copyright (C) 2022, Mohammad-Reza Nabipoor
      4 // SPDX-License-Identifier: GPL-3.0-or-later
      5 
      6 #pragma once
      7 
      8 #include <string>
      9 #include <vector>
     10 
     11 extern "C"
     12 {
     13   bool toctave_var(void*, const char* name, double* val);
     14   void toctave_var_set(void*, const char* name, double val);
     15 }
     16 
     17 namespace env {
     18 
     19 struct Var
     20 {
     21   std::string name;
     22   double val;
     23 };
     24 
     25 using Env = std::vector<Var>;
     26 
     27 } // namespace env