cmClassFile.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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_WrapExclude = false;
  32. }
  33. /**
  34. * Set the name of the file, given the directory
  35. * the file should be in. Various extensions are tried on
  36. * the name (e.g., .cxx, .cpp) in the directory to find the actual file.
  37. */
  38. void SetName(const char* name, const char* dir);
  39. /**
  40. * Set the name of the file, given the directory the file should be in. IN
  41. * this version the extesion is provided in the call. This is useful for
  42. * generated files that do not exist prior to the build.
  43. */
  44. void SetName(const char* name, const char* dir, const char *ext,
  45. bool headerFileOnly);
  46. /**
  47. * Print the structure to std::cout.
  48. */
  49. void Print() const;
  50. /**
  51. * Indicate whether the class is abstract (non-instantiable).
  52. */
  53. bool m_AbstractClass;
  54. /**
  55. * Indicate whether the class should not be wrapped
  56. */
  57. bool m_WrapExclude;
  58. /**
  59. * Indicate whether this class is defined with only the header file.
  60. */
  61. bool m_HeaderFileOnly;
  62. /**
  63. * The full path to the file.
  64. */
  65. std::string m_FullPath;
  66. /**
  67. * The file name associated with stripped off directory and extension.
  68. * (In most cases this is the name of the class.)
  69. */
  70. std::string m_ClassName;
  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_ClassExtension;
  76. /**
  77. * The dependencies of this class are gathered here.
  78. */
  79. std::vector<std::string> m_Depends;
  80. };
  81. #endif