cmClassFile.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. }
  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. * Print the structure to std::cout.
  41. */
  42. void Print();
  43. /**
  44. * Indicate whether the class is abstract (non-instantiable).
  45. */
  46. bool m_AbstractClass;
  47. /**
  48. * Indicate whether this class is defined with only the header file.
  49. */
  50. bool m_HeaderFileOnly;
  51. /**
  52. * Indicate whether this class is an executable file
  53. */
  54. bool m_IsExecutable;
  55. /**
  56. * The full path to the file.
  57. */
  58. std::string m_FullPath;
  59. /**
  60. * The file name associated with stripped off directory and extension.
  61. * (In most cases this is the name of the class.)
  62. */
  63. std::string m_ClassName;
  64. /**
  65. * The dependencies of this class are gathered here.
  66. */
  67. std::vector<std::string> m_Depends;
  68. };
  69. #endif