kwave  18.07.70
Functions.h
Go to the documentation of this file.
1 /***************************************************************************
2  Functions.h - list of simple periodic functions
3  -------------------
4  begin : Jan 21 2001
5  copyright : (C) 2001 by Thomas Eschenbacher
6  email : Thomas Eschenbacher <thomas.eschenbacher@gmx.de>
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef FUNCTIONS_H
19 #define FUNCTIONS_H
20 
21 #include "config.h"
22 
23 #include "libkwave/TypesMap.h"
24 #include <QString>
25 
26 namespace Kwave
27 {
28 
34  class Functions
35  {
36  public:
37 
38  typedef double(periodic_function_t)(double);
39 
41  Functions();
42 
44  virtual ~Functions();
45 
47  unsigned int count() const;
48 
54  QString name(unsigned int index);
55 
61  periodic_function_t &function(unsigned int index) const;
62 
63  private:
64 
66  public Kwave::TypesMap< unsigned int, periodic_function_t* >
67  {
68  public:
70  explicit FunctionTypesMap()
71  :Kwave::TypesMap<unsigned int, periodic_function_t *>()
72  {
73  fill();
74  }
75 
77  virtual void fill() Q_DECL_OVERRIDE;
78  };
79 
82 
83  };
84 }
85 
86 #endif /* FUNCTIONS_H */
87 
88 //***************************************************************************
89 //***************************************************************************
double() periodic_function_t(double)
Definition: Functions.h:38
Definition: App.h:33
unsigned int count() const
Definition: Functions.cpp:135
virtual void fill() Q_DECL_OVERRIDE
Definition: Functions.cpp:92
FunctionTypesMap m_functions_map
Definition: Functions.h:81
virtual ~Functions()
Definition: Functions.cpp:109
QString name(unsigned int index)
Definition: Functions.cpp:114