Minsky
schemaHelper.h File Reference
#include "operation.h"
#include "variable.h"
#include "godleyTable.h"
#include "godleyIcon.h"
#include "ravelWrap.h"
#include "variableValue.h"
#include <xml_unpack_base.h>
Include dependency graph for schemaHelper.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  minsky::SchemaHelper
 

Namespaces

 minsky
 Creation and access to the minskyTCL_obj object, which has code to record whenever Minsky's state changes.
 

Functions

template<class T >
ecolab::array< T > toArray (const std::vector< T > &v)
 
template<class T >
std::vector< T > toVector (const ecolab::array< T > &a)
 
template<class T >
std::vector< double > toDoubleVector (const ecolab::array< T > &a)
 
template<class PreviousSchema , class CurrentSchema >
void minsky::loadSchema (CurrentSchema &currentSchema, classdesc::xml_unpack_t &data, const std::string &rootElement)
 
classdesc::pack_t minsky::decode (const classdesc::CDATA &)
 decode ascii-encoded representation to binary data More...
 
classdesc::CDATA minsky::encode (const classdesc::pack_t &)
 encode binary data to ascii-encoded More...
 

Function Documentation

◆ toArray()

template<class T >
ecolab::array<T> toArray ( const std::vector< T > &  v)

Definition at line 32 of file schemaHelper.h.

33 {
34  ecolab::array<T> a(v.size());
35  for (std::size_t i=0; i<v.size(); ++i) a[i]=v[i];
36  return a;
37 }

◆ toDoubleVector()

template<class T >
std::vector<double> toDoubleVector ( const ecolab::array< T > &  a)

Definition at line 48 of file schemaHelper.h.

49 {
50  std::vector<double> v(a.size());
51  for (std::size_t i=0; i<v.size(); ++i) v[i]=a[i];
52  return v;
53 }

◆ toVector()

template<class T >
std::vector<T> toVector ( const ecolab::array< T > &  a)

Definition at line 40 of file schemaHelper.h.

41 {
42  std::vector<T> v(a.size());
43  for (std::size_t i=0; i<v.size(); ++i) v[i]=a[i];
44  return v;
45 }