EventsWanted.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /*
  2. * CDE - Common Desktop Environment
  3. *
  4. * Copyright (c) 1993-2012, The Open Group. All rights reserved.
  5. *
  6. * These libraries and programs are free software; you can
  7. * redistribute them and/or modify them under the terms of the GNU
  8. * Lesser General Public License as published by the Free Software
  9. * Foundation; either version 2 of the License, or (at your option)
  10. * any later version.
  11. *
  12. * These libraries and programs are distributed in the hope that
  13. * they will be useful, but WITHOUT ANY WARRANTY; without even the
  14. * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  15. * PURPOSE. See the GNU Lesser General Public License for more
  16. * details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with these libraries and programs; if not, write
  20. * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  21. * Floor, Boston, MA 02110-1301 USA
  22. */
  23. /* $XConsortium: EventsWanted.h /main/1 1996/07/29 16:51:38 cde-hp $ */
  24. // Copyright (c) 1994 James Clark
  25. // See the file COPYING for copying permission.
  26. #ifndef EventsWanted_INCLUDED
  27. #define EventsWanted_INCLUDED 1
  28. #include "Boolean.h"
  29. #ifdef SP_NAMESPACE
  30. namespace SP_NAMESPACE {
  31. #endif
  32. class SP_API EventsWanted {
  33. public:
  34. EventsWanted();
  35. Boolean wantInstanceMarkup() const;
  36. Boolean wantCommentDecls() const; // in instance
  37. Boolean wantMarkedSections() const; // in instance
  38. Boolean wantPrologMarkup() const;
  39. void addInstanceMarkup();
  40. void addCommentDecls();
  41. void addMarkedSections();
  42. void addPrologMarkup();
  43. private:
  44. PackedBoolean instanceMarkup_;
  45. PackedBoolean commentDecls_;
  46. PackedBoolean markedSections_;
  47. PackedBoolean prologMarkup_;
  48. };
  49. inline
  50. EventsWanted::EventsWanted()
  51. : instanceMarkup_(0), commentDecls_(0), markedSections_(0), prologMarkup_(0)
  52. {
  53. }
  54. inline
  55. Boolean EventsWanted::wantInstanceMarkup() const
  56. {
  57. return instanceMarkup_;
  58. }
  59. inline
  60. void EventsWanted::addInstanceMarkup()
  61. {
  62. instanceMarkup_ = 1;
  63. commentDecls_ = 1;
  64. markedSections_ = 1;
  65. }
  66. inline
  67. Boolean EventsWanted::wantCommentDecls() const
  68. {
  69. return commentDecls_;
  70. }
  71. inline
  72. void EventsWanted::addCommentDecls()
  73. {
  74. commentDecls_ = 1;
  75. }
  76. inline
  77. Boolean EventsWanted::wantMarkedSections() const
  78. {
  79. return markedSections_;
  80. }
  81. inline
  82. void EventsWanted::addMarkedSections()
  83. {
  84. markedSections_ = 1;
  85. }
  86. inline
  87. Boolean EventsWanted::wantPrologMarkup() const
  88. {
  89. return prologMarkup_;
  90. }
  91. inline
  92. void EventsWanted::addPrologMarkup()
  93. {
  94. prologMarkup_ = 1;
  95. }
  96. #ifdef SP_NAMESPACE
  97. }
  98. #endif
  99. #endif /* not EventsWanted_INCLUDED */