cmClassFile.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /*=========================================================================
  2. Program: Insight Segmentation & Registration Toolkit
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2000 National Library of Medicine
  8. All rights reserved.
  9. See COPYRIGHT.txt for copyright details.
  10. =========================================================================*/
  11. #ifndef cmClassFile_h
  12. #define cmClassFile_h
  13. #include "cmStandardIncludes.h"
  14. /** \class cmClassFile
  15. * \brief Represent a class loaded from a makefile.
  16. *
  17. * cmClassFile is represents a class loaded from
  18. * a makefile.
  19. */
  20. class cmClassFile
  21. {
  22. public:
  23. /**
  24. * Construct instance as a concrete class with both a
  25. * .h and .cxx file.
  26. */
  27. cmClassFile()
  28. {
  29. m_AbstractClass = false;
  30. m_HeaderFileOnly = false;
  31. m_IsExecutable = false;
  32. m_WrapExclude = false;
  33. }
  34. /**
  35. * Set the name of the file, given the directory
  36. * the file should be in. Various extensions are tried on
  37. * the name (e.g., .cxx, .cpp) in the directory to find the actual file.
  38. */
  39. void SetName(const char* name, const char* dir);
  40. /**
  41. * Set the name of the file, given the directory the file should be in. IN
  42. * this version the extesion is provided in the call. This is useful for
  43. * generated files that do not exist prior to the build.
  44. */
  45. void SetName(const char* name, const char* dir, const char *ext,
  46. bool headerFileOnly);
  47. /**
  48. * Print the structure to std::cout.
  49. */
  50. void Print();
  51. /**
  52. * Indicate whether the class is abstract (non-instantiable).
  53. */
  54. bool m_AbstractClass;
  55. /**
  56. * Indicate whether the class should not be wrapped
  57. */
  58. bool m_WrapExclude;
  59. /**
  60. * Indicate whether this class is defined with only the header file.
  61. */
  62. bool m_HeaderFileOnly;
  63. /**
  64. * Indicate whether this class is an executable file
  65. */
  66. bool m_IsExecutable;
  67. /**
  68. * The full path to the file.
  69. */
  70. std::string m_FullPath;
  71. /**
  72. * The file name associated with stripped off directory and extension.
  73. * (In most cases this is the name of the class.)
  74. */
  75. std::string m_ClassName;
  76. /**
  77. * The file name associated with stripped off directory and extension.
  78. * (In most cases this is the name of the class.)
  79. */
  80. std::string m_ClassExtension;
  81. /**
  82. * The dependencies of this class are gathered here.
  83. */
  84. std::vector<std::string> m_Depends;
  85. };
  86. #endif