/* Copyright (C) 2007 One Laptop Per Child * Author: Marc Maurer * * This program 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 2 * of the License, or (at your option) any later version. * * This program 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., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. */ #ifndef ABI_DEVELOP_LANGDEV_H #define ABI_DEVELOP_LANGDEV_H #include #include using std::string; using std::vector; class LanguagePattern; class LanguageDefinition { public: static LanguageDefinition* construct(const string& fname); const string& getLanguage() const { return m_sLanguage; } const string& section() const { return m_sSection; } void addPattern(LanguagePattern* pPattern); vector& getPatterns() { return m_vPatterns; } const vector& getPatterns() const { return m_vPatterns; } private: LanguageDefinition(const string& language, const string& section); string m_sLanguage; string m_sSection; vector m_vPatterns; // TODO: LanguagePattern should be const, except for some members like comp_regex that should be mutable }; #endif /* ABI_DEVELOP_LANGDEV_H */