You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

111 lines
4.0 KiB

  1. /* /////////////////////////////////////////////////////////////////////////
  2. * File: pantheios/fileline.h
  3. *
  4. * Purpose: Customisable definition of file+line, for the Pantheios
  5. * Assertion and Tracing APIs.
  6. *
  7. * Created: 11th November 2007
  8. * Updated: 7th December 2010
  9. *
  10. * Home: http://www.pantheios.org/
  11. *
  12. * Copyright (c) 2007-2010, Matthew Wilson and Synesis Software
  13. * All rights reserved.
  14. *
  15. * Redistribution and use in source and binary forms, with or without
  16. * modification, are permitted provided that the following conditions are
  17. * met:
  18. *
  19. * - Redistributions of source code must retain the above copyright notice,
  20. * this list of conditions and the following disclaimer.
  21. * - Redistributions in binary form must reproduce the above copyright
  22. * notice, this list of conditions and the following disclaimer in the
  23. * documentation and/or other materials provided with the distribution.
  24. * - Neither the name(s) of Matthew Wilson and Synesis Software nor the
  25. * names of any contributors may be used to endorse or promote products
  26. * derived from this software without specific prior written permission.
  27. *
  28. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
  29. * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  30. * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  31. * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  32. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  33. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  34. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  35. * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  36. * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  37. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  38. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  39. *
  40. * ////////////////////////////////////////////////////////////////////// */
  41. /** \file pantheios/fileline.h
  42. *
  43. * [C, C++] Customisable definition of file+line, for
  44. * the \ref group__assertion
  45. * and the \ref group__tracing.
  46. */
  47. #ifndef PANTHEIOS_INCL_PANTHEIOS_H_FILELINE
  48. #define PANTHEIOS_INCL_PANTHEIOS_H_FILELINE
  49. /* /////////////////////////////////////////////////////////////////////////
  50. * Version information
  51. */
  52. #ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION
  53. # define PANTHEIOS_VER_PANTHEIOS_H_FILELINE_MAJOR 2
  54. # define PANTHEIOS_VER_PANTHEIOS_H_FILELINE_MINOR 0
  55. # define PANTHEIOS_VER_PANTHEIOS_H_FILELINE_REVISION 1
  56. # define PANTHEIOS_VER_PANTHEIOS_H_FILELINE_EDIT 15
  57. #endif /* !PANTHEIOS_DOCUMENTATION_SKIP_SECTION */
  58. /* /////////////////////////////////////////////////////////////////////////
  59. * Includes
  60. */
  61. #ifndef PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS
  62. # include <pantheios/pantheios.h>
  63. #endif /* !PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS */
  64. #include <stlsoft/stlsoft.h>
  65. /* /////////////////////////////////////////////////////////////////////////
  66. * Tracing features
  67. */
  68. /** \def PANTHEIOS_FILELINE_A
  69. *
  70. * Default file+line format for \ref group__tracing
  71. *
  72. * \ingroup group__tracing
  73. */
  74. /** \def PANTHEIOS_FILELINE
  75. *
  76. * Default file+line format for \ref group__tracing
  77. *
  78. * \ingroup group__tracing
  79. *
  80. * \remarks Because Pantheios is currently multibyte-only, this resolves to
  81. * PANTHEIOS_FILELINE_A
  82. */
  83. /* Define the defaults here, in case we use them below. */
  84. # define PANTHEIOS_FILELINE_A __FILE__ "(" PANTHEIOS_STRINGIZE(__LINE__) "): "
  85. # define PANTHEIOS_FILELINE PANTHEIOS_FILELINE_A
  86. /* /////////////////////////////////////////////////////////////////////////
  87. * Inclusion
  88. */
  89. #ifdef STLSOFT_PPF_pragma_once_SUPPORT
  90. # pragma once
  91. #endif /* STLSOFT_PPF_pragma_once_SUPPORT */
  92. /* ////////////////////////////////////////////////////////////////////// */
  93. #endif /* !PANTHEIOS_INCL_PANTHEIOS_H_FILELINE */
  94. /* ///////////////////////////// end of file //////////////////////////// */