📄 simpleinvoiceprinter.h.html
字号:
<html>
<head>
<title>simpleinvoiceprinter.h</title>
</head>
<body>
<pre> 1 #ifndef SIMPLEINVOICEPRINTER_H
2 #define SIMPLEINVOICEPRINTER_H
3
4 #include <string>
5 #include <vector>
6
7 using namespace std;
8
9 #include "invoiceprinter.h"
10
11 <font color='#0000cc'>/**
12 Prints an invoice in a monospaced font, using spaces to
13 align the columns.
14 */</font>
15 class SimpleInvoicePrinter : public InvoicePrinter
16 {
17 public:
18 <font color='#0000cc'>/**
19 Constructs a simple invoice printer and sets the colum widths.
20 @param widths an array of column widths
21 */</font>
22 SimpleInvoicePrinter(vector<int> widths);
23 virtual void print_header(string s);
24 virtual void print_string(string value, bool pad_right);
25 virtual void print_number(double value, int precision);
26 virtual void print_footer(string s, double total);
27 private:
28 void next_column();
29 int column;
30 vector<int> column_widths;
31 };
32
33 #endif</pre>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -