From f8ac52e520aa5e20a256a3fd9a649b461f3afeef Mon Sep 17 00:00:00 2001 From: mescalinum Date: Fri, 25 Sep 2009 17:19:25 +0000 Subject: rewrite in C++ svn path=/trunk/externals/ffext/; revision=12451 --- composer/Pattern.hpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 composer/Pattern.hpp (limited to 'composer/Pattern.hpp') diff --git a/composer/Pattern.hpp b/composer/Pattern.hpp new file mode 100644 index 0000000..1607414 --- /dev/null +++ b/composer/Pattern.hpp @@ -0,0 +1,33 @@ +#ifndef COMPOSER_PATTERN_H_INCLUDED +#define COMPOSER_PATTERN_H_INCLUDED + +#include +#include + +#include + +using std::string; +using std::vector; + +typedef t_atom Cell; + +typedef vector Row; + +class Pattern +{ +private: + string name; + vector rows; + int columns; +public: + Pattern(int numRows, int numCols, string patternName); + void print(); + void resize(int numRows, int numCols); + void setCell(int row, int col, Cell cell); + Cell getCell(int row, int col); + inline const string &getName() {return name;} + inline unsigned int getRows() {return rows.size();} + inline unsigned int getColumns() {return columns;} +}; + +#endif // COMPOSER_PATTERN_H_INCLUDED -- cgit v1.2.1