CopyrightNotice

Name

CopyrightNotice -- Generate license/author credits.

Synopsis


#include <CopyrightNotice.h>
         
 class CopyrightNotice {

  static void Notice(std::ostream& out, const char* program, const char* version, const char* year);
  static void AuthorCredit(std::ostream& out, char* program, ...);
}

Description

The CopyrightNotice class provides static methods for generating license notices and copyright strings when programs start.

Public member functions

static void Notice(std::ostream& out, const char* program, const char* version, const char* year);

Outputs a copyright notice to the output stream out. program is the name of the program. version is a version string, and year is the copyright year.

static void AuthorCredit(std::ostream& out, char* program, ...);

Outputs credit for the authors. The out and program parameters have the same meaning as for Notice. These parameters are followed by a null terminated variable length list of arguments that must all be const char* pointer to names of the authors.

EXAMPLES

Create a copyright notice on stderr. This is from the main or other function that has access to the argv array:

Example 1. Creating a coypright notice on stderr


CopyrightNotice::Notice(cerr, argv[0], "2.1", "2004");
                

Create an author credit on stderr for the authors Ron and Kanayo:

Example 2. Creating an author credit on stderr


CopyrightNotice::AuthorCredit(cerr, argv[0], "Kanayo", "Ron", NULL);