invoice.h.html

来自「《Big C++ 》Third Edition电子书和代码全集-Part1」· HTML 代码 · 共 46 行

HTML
46
字号
<html>

<head>
	<title>invoice.h</title>
</head>

<body>
<pre>  1  #ifndef INVOICE_H
  2  #define INVOICE_H
  3  
  4  #include &lt;vector&gt;
  5  
  6  using namespace std;
  7  
  8  #include "item.h"
  9  #include "invoiceprinter.h"
 10  #include "itemiterator.h"
 11  
 12  <font color='#0000cc'>/**
 13     Describes an invoice that bills for a sequence of items.
 14  */</font>
 15  class Invoice
 16  {
 17  public:
 18     <font color='#0000cc'>/**
 19        Adds an item to this invoice.
 20        @param it the item that the customer ordered
 21     */</font>
 22     void add(Item* it);
 23     <font color='#0000cc'>/**
 24        Prints the invoice.
 25     */</font>
 26     void print(InvoicePrinter&amp; printer);
 27     <font color='#0000cc'>/**
 28        Creates an iterator through the items of this invoice.
 29        @return the iterator
 30     */</font>
 31     ItemIterator create_iterator();
 32  private:
 33     vector&lt;Item*&gt; items;
 34  };
 35  
 36  #endif</pre>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?