From 45ab288c8256f2787e7bf694c7a48888592be4cd Mon Sep 17 00:00:00 2001 From: Barattero Laurent Date: Sat, 18 Jan 2014 10:24:55 +0100 Subject: first commit release 0.2 --- src/gloseq.hpp | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 src/gloseq.hpp (limited to 'src/gloseq.hpp') diff --git a/src/gloseq.hpp b/src/gloseq.hpp new file mode 100644 index 0000000..3487f6b --- /dev/null +++ b/src/gloseq.hpp @@ -0,0 +1,99 @@ +/* + Copyright (C) 2014 BARRATERO Laurent + + AeroUp is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + Aeroup is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ + +/* + * Filename: gloseq.hpp + * + * Description: + * + * Version: 0.2 + * Created: 27/12/2013 10:40:44 + * Revision: none + * Compiler: gcc + * + * Author: BARATTERO Laurent, laurentbalarueluberlu.net + * Organization: La rue Luberlu + */ + +#ifndef gloseq_INC +#define gloseq_INC + +#include +#include +#include +#include +#include + +#include "global.hpp" +#include "buffer.hpp" +#include "buffermanager.hpp" +#include "rules.hpp" +#include "serialprop.hpp" +#include "config.h" + +#if HAVE_LIBBOOST_REGEX + #include "regboost.hpp" +#else + #include "reglinux.hpp" +#endif + + +/* + * Class: GloSeq + * Description: Contains all the processing related to the glo file. + */ +class GloSeq +{ + public: + void verify(); + void upload(SerialProp & ser); + + GloSeq (std::string fileName); /* constructor */ + + + + private: + void cleanLine(std::string& rline); + + const char SP = 0x20; + const char TAB = 0x09; + const char CR = 0x0d; + const char LF = 0x0a; + const int NOT_VALID = -1; + + std::string file_name; + std::ifstream glofile; + + struct command + { + std::string line; + int cmd_type; + int nb_line; + }; + std::vector cmdTab; + + + Buffer buff; + Rules rules; + BufferManager buffManager; + + +}; /* ----- end of class GloSeq ----- */ + + +#endif /* ----- #ifndef gloseq_INC ----- */ -- cgit v1.2.3