2
* This file is part of wxSmith plugin for Code::Blocks Studio
3
* Copyright (C) 2006-2007 Bartlomiej Swiecki
5
* wxSmith is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 3 of the License, or
8
* (at your option) any later version.
10
* wxSmith is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with wxSmith. If not, see <http://www.gnu.org/licenses/>.
19
* $Id: wxscodinglang.h 8251 2012-08-28 02:31:00Z ollydbg $
20
* $HeadURL: http://svn.code.sf.net/p/codeblocks/code/branches/release-16.xx/src/plugins/contrib/wxSmith/wxscodinglang.h $
23
#ifndef WXSCODINGLANG_H
24
#define WXSCODINGLANG_H
26
#include <wx/string.h>
28
/** \brief This enumeration contains all coding languages supported in wxSmith */
32
wxsUnknownLanguage = 0x8000
35
/** \brief Namespace with useful common functions for supported coding languages */
36
namespace wxsCodeMarks
38
/** \brief Getting wxString name of coding language */
39
wxString Name(wxsCodingLang Id);
41
/** \brief Getting id of coding language's name */
42
wxsCodingLang Id(const wxString& Name);
44
/** \brief Getting coding language from file's extension */
45
wxsCodingLang IdFromExt(const wxString& Extension);
47
/** \brief Helper function for generating block begin */
48
wxString Beg(wxsCodingLang Lang,const wxString& BlockName);
50
/** \brief Helper function for generating block begin */
51
wxString Beg(wxsCodingLang Lang,const wxString& BlockName,const wxString& Param);
53
/** \brief Helper function for generating block end */
54
wxString End(wxsCodingLang Lang);
56
/** \brief Converting given string into representation of string in source code */
57
wxString String(wxsCodingLang Lang,const wxString& Source);
59
/** \brief Converting given string into Wx-like representation */
60
wxString WxString(wxsCodingLang Lang,const wxString& Source,bool WithTranslation=true);
62
/** \brief Checking if given string can be valid identifier in selected language
63
* (can be name of variable)
65
bool ValidateIdentifier(wxsCodingLang Lang,const wxString& Identifier);
67
/** \brief Posting notification message about unknown coding language */
68
void Unknown(const wxString& Function,wxsCodingLang Lang);