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.

86 lines
2.6 KiB

  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #include "cmDocumentationSection.h"
  14. //----------------------------------------------------------------------------
  15. void cmDocumentationSection::Append(const char *data[][3])
  16. {
  17. int i = 0;
  18. while(data[i][1])
  19. {
  20. this->Entries.push_back(cmDocumentationEntry(data[i][0],
  21. data[i][1],
  22. data[i][2]));
  23. data += 1;
  24. }
  25. }
  26. //----------------------------------------------------------------------------
  27. void cmDocumentationSection::Prepend(const char *data[][3])
  28. {
  29. std::vector<cmDocumentationEntry> tmp;
  30. int i = 0;
  31. while(data[i][1])
  32. {
  33. tmp.push_back(cmDocumentationEntry(data[i][0],
  34. data[i][1],
  35. data[i][2]));
  36. data += 1;
  37. }
  38. this->Entries.insert(this->Entries.begin(),tmp.begin(),tmp.end());
  39. }
  40. //----------------------------------------------------------------------------
  41. void cmDocumentationSection::Append(const char *n, const char *b,
  42. const char *f)
  43. {
  44. this->Entries.push_back(cmDocumentationEntry(n,b,f));
  45. }
  46. #if 0
  47. //----------------------------------------------------------------------------
  48. void cmDocumentationSection::Set(const cmDocumentationEntry* header,
  49. const cmDocumentationEntry* section,
  50. const cmDocumentationEntry* footer)
  51. {
  52. this->Entries.erase(this->Entries.begin(), this->Entries.end());
  53. if(header)
  54. {
  55. for(const cmDocumentationEntry* op = header; op->brief; ++op)
  56. {
  57. this->Entries.push_back(*op);
  58. }
  59. }
  60. if(section)
  61. {
  62. for(const cmDocumentationEntry* op = section; op->brief; ++op)
  63. {
  64. this->Entries.push_back(*op);
  65. }
  66. }
  67. if(footer)
  68. {
  69. for(const cmDocumentationEntry* op = footer; op->brief; ++op)
  70. {
  71. this->Entries.push_back(*op);
  72. }
  73. }
  74. cmDocumentationEntry empty = {0,0,0};
  75. this->Entries.push_back(empty);
  76. }
  77. #endif