report.h
来自「这是一个银行系统的管理软件」· C头文件 代码 · 共 69 行
H
69 行
/**********************************************************************************
* *
* Henry Banking System ATM Module *
* Copyright (c) 2004 by Henry. All rights reserved. *
* *
* Permission to use, copy, modify, and distribute this software for any purpose *
* is hereby granted without fee, provided that this copyright and permissions *
* notice appear in all copies and derivatives, and that no charge may be made *
* for the software and its documentation except to cover cost of distribution. *
* *
* This software is provided "as is" without express or implied warranty. *
* *
**********************************************************************************/
/*
* Description:
*
* Generate a report form in a CUI way.
*
* Notes:
*
* This code has been written to conform to standard C++ and STL. It has been
* compiled successfully using Visual C++ 7.0.
*/
#ifndef GUARD_report_h
#define GUARD_report_h
#include <string>
using namespace std;
namespace report
{
class ReportForm
{
public:
struct ReportItem
{
string caption;
string text;
};
string header, footer;
vector<ReportItem> body;
size_t captionSize, textSize;
public:
ReportForm::ReportForm()
{
captionSize= 30;
textSize = 35;
body.clear();
}
size_t size();
void show();
void appendItem(string caption, string text);
void appendItem(string caption);
void appendItem();
private:
void showHeader();
void showBody();
void showFooter();
void showItem(ReportItem item);
void showLine();
};
}
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?