invoiceprinter.h

来自「BigC++的源码」· C头文件 代码 · 共 41 行

H
41
字号
#ifndef INVOICEPRINTER_H
#define INVOICEPRINTER_H

#include <string>

using namespace std;

/**
   Formats an invoice.
*/
class InvoicePrinter
{
public:
   /**
      Prints the invoice header.
      @param s the header string
   */
   virtual void print_header(string s) = 0;
   /**
      Prints a string in the next table cell.
      @param value the value to print
      @param pad_right true if the cell is padded on the right
      with spaces
   */
   virtual void print_string(string value, bool pad_right) = 0;
   /**
      Prints a number in the next table cell.
      @param value the value to print
      @param precision the number of digits after the decimal point
   */
   virtual void print_number(double value, int precision) = 0;
   /**
      Prints the invoice footer.
      @param s the footer string
      @param total the total amount due
   */
   virtual void print_footer(string s, double total) = 0;
};

#endif

⌨️ 快捷键说明

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