Numworks Epsilon  1.4.1
Graphing Calculator Operating System
function_store.h
Go to the documentation of this file.
1 #ifndef SHARED_FUNCTION_STORE_H
2 #define SHARED_FUNCTION_STORE_H
3 
4 #include "function.h"
5 #include <stdint.h>
6 
7 namespace Shared {
8 
9 /* FunctionStore is a dumb class.
10  * Its only job is to store functions and to give them a color. */
11 
13 public:
14  FunctionStore();
15  virtual uint32_t storeChecksum() = 0;
16  virtual Function * functionAtIndex(int i) = 0;
17  virtual Function * activeFunctionAtIndex(int i);
18  virtual Function * definedFunctionAtIndex(int i);
19  virtual Function * addEmptyFunction() = 0;
20  virtual void removeFunction(Function * f) = 0;
21  virtual void removeAll() = 0;
22  int numberOfFunctions();
23  // Functions can be undefined when they have a color and a name but no content
25  // An active function must be defined to be counted
27  virtual int maxNumberOfFunctions() = 0;
28  virtual char symbol() const = 0;
29  void tidy();
30 protected:
32 private:
33  virtual const char * firstAvailableName() = 0;
34  virtual const KDColor firstAvailableColor() = 0;
35 };
36 
37 }
38 
39 #endif
virtual Function * functionAtIndex(int i)=0
virtual int maxNumberOfFunctions()=0
virtual Function * definedFunctionAtIndex(int i)
unsigned int uint32_t
Definition: stdint.h:6
virtual void removeAll()=0
virtual uint32_t storeChecksum()=0
Definition: color.h:6
virtual Function * activeFunctionAtIndex(int i)
virtual char symbol() const =0
virtual Function * addEmptyFunction()=0
virtual void removeFunction(Function *f)=0