Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 

75 рядки
1.9 KiB

  1. /******************************************************************************
  2. *
  3. * file: CmdLineOutput.h
  4. *
  5. * Copyright (c) 2004, Michael E. Smoot
  6. * All rights reverved.
  7. *
  8. * See the file COPYING in the top directory of this distribution for
  9. * more information.
  10. *
  11. * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS
  12. * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  13. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  14. * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  15. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  16. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  17. * DEALINGS IN THE SOFTWARE.
  18. *
  19. *****************************************************************************/
  20. #ifndef TCLAP_CMDLINEOUTPUT_H
  21. #define TCLAP_CMDLINEOUTPUT_H
  22. #include <string>
  23. #include <vector>
  24. #include <list>
  25. #include <iostream>
  26. #include <iomanip>
  27. #include <algorithm>
  28. namespace TCLAP {
  29. class CmdLineInterface;
  30. class ArgException;
  31. /**
  32. * The interface that any output object must implement.
  33. */
  34. class CmdLineOutput
  35. {
  36. public:
  37. /**
  38. * Virtual destructor.
  39. */
  40. virtual ~CmdLineOutput() {}
  41. /**
  42. * Generates some sort of output for the USAGE.
  43. * \param c - The CmdLine object the output is generated for.
  44. */
  45. virtual void usage(CmdLineInterface& c)=0;
  46. /**
  47. * Generates some sort of output for the version.
  48. * \param c - The CmdLine object the output is generated for.
  49. */
  50. virtual void version(CmdLineInterface& c)=0;
  51. /**
  52. * Generates some sort of output for a failure.
  53. * \param c - The CmdLine object the output is generated for.
  54. * \param e - The ArgException that caused the failure.
  55. */
  56. virtual void failure( CmdLineInterface& c,
  57. ArgException& e )=0;
  58. };
  59. } //namespace TCLAP
  60. #endif