📄 ccontainerbase.h
字号:
/* * This file is part of Software PLC for RT-Linux. * * Software PLC for RT-Linux 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. * * Software PLC for RT-Linux 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 Software PLC for RT-Linux; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author: Vladimir Kloz <Vladimir.Kloz@dtg.cz> * Project home: http://sourceforge.net/projects/softwareplc * Version: $Revision: 1.7 $ */#ifndef _CCONTAINERBASE_H_ #define _CCONTAINERBASE_H_ #include <stdio.h> #include <string> #include "plc2cpp_globals.h" /** * Base class for implementation * of code containers * * @author Voloda <Vladimir.Kloz@dtg.cz> * @version $Revision: 1.7 $ */ class CContainerBase { private: protected: /** * Current line number in original source */ int m_iLineNumber; char m_pBuff[1024]; /** * Name of current parsed block, if exists */ string m_sBlockName; /** * Name of current parsed source file */ string m_sFileName; /** * Generating information about original * source file and line for generated code */ const char *GenerateLineInfo(void); /** * Write's standard begin of generated header * file */ void WriteHeaderStart(void); /** * Write's standard end of generated header * file */ void WriteHeaderEnd(void); /** * Write standard begin of generated source file */ void WriteSourceStart(void); /** * Write standard begin of all generated source. * It's comment about autogenerated file */ void WriteComment(void); /** * Show error message with line info */ void ShowError(const string &sMessage); // if iType == 0 - header file, == 1 - source // file int OpenSourceFile(int iType); public: CContainerBase(int iLineNumber = -1); virtual ~CContainerBase(void); void SetLine(int iLineNumber); const char *GetBlockName(void); };#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -