oversion.cpp 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*====================================================================*
  2. *
  3. * oversion.cpp - oversion class impelemetnation;
  4. *
  5. * implement a standard means of program version identification;
  6. *
  7. * Motley Tools by Charles Maier <cmaier@cmassoc.net>;
  8. * Copyright 2001-2006 by Charles Maier Associates;
  9. * Licensed under the Internet Software Consortium License;
  10. *
  11. *--------------------------------------------------------------------*/
  12. #ifndef oVERSION_SOURCE
  13. #define oVERSION_SOURCE
  14. /*====================================================================*
  15. * custom header files;
  16. *--------------------------------------------------------------------*/
  17. #include <iostream>
  18. /*====================================================================*
  19. * custom header files;
  20. *--------------------------------------------------------------------*/
  21. #include "../classes/oversion.hpp"
  22. /*====================================================================*
  23. *
  24. * oversion & print (void);
  25. *
  26. * print usage vector on stderr; this presents the user with a help
  27. * summary; program_name is defined in ogetoptv::getoptv() but it could be
  28. * defined in main or another component; getoptv.h is included above
  29. * for GETOPTV_C_OPTIONS which is normally '-' but could be anything;
  30. *
  31. *--------------------------------------------------------------------*/
  32. oversion & oversion::print (void)
  33. {
  34. extern char const * program_name;
  35. std::cerr << program_name << " ";
  36. std::cerr << PACKAGE << "-";
  37. std::cerr << VERSION << " ";
  38. std::cerr << RELEASE << " ";
  39. std::cerr << "ECMA C++" << " ";
  40. std::cerr << COMPANY << " ";
  41. std::cerr << __TIME__ << " ";
  42. std::cerr << __DATE__ << " ";
  43. std::cerr << LICENSE << " ";
  44. std::cerr << std::endl;
  45. return (*this);
  46. }
  47. /*====================================================================*
  48. *
  49. * oversion ();
  50. *
  51. *--------------------------------------------------------------------*/
  52. oversion::oversion ()
  53. {
  54. return;
  55. }
  56. /*====================================================================*
  57. *
  58. * ~oversion ();
  59. *
  60. *--------------------------------------------------------------------*/
  61. oversion::~oversion ()
  62. {
  63. return;
  64. }
  65. /*====================================================================*
  66. * end definition
  67. *--------------------------------------------------------------------*/
  68. #endif