Blame view

build1/epsilon-master/apps/shared/expression_model_store.h 871 Bytes
6663b6c9   adorian   projet complet av...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
  #ifndef SHARED_EXPRESSION_MODEL_STORE_H
  #define SHARED_EXPRESSION_MODEL_STORE_H
  
  #include "expression_model.h"
  #include <stdint.h>
  
  namespace Shared {
  
  /* ExpressionModelStore is a dumb class.
   * Its only job is to store model */
  
  class ExpressionModelStore {
  public:
    ExpressionModelStore();
    virtual ExpressionModel * modelAtIndex(int i) = 0;
    ExpressionModel * addEmptyModel();
    void removeModel(ExpressionModel * f);
    virtual void removeAll();
    int numberOfModels() const { return m_numberOfModels; };
    virtual ExpressionModel * definedModelAtIndex(int i);
    int numberOfDefinedModels();
    virtual int maxNumberOfModels() const = 0;
    virtual void tidy();
  protected:
    virtual ExpressionModel * emptyModel() = 0;
    virtual ExpressionModel * nullModel() = 0;
    virtual void setModelAtIndex(ExpressionModel * f, int i) = 0;
    int m_numberOfModels;
  };
  
  }
  
  #endif