summaryrefslogtreecommitdiffstats
path: root/Source/cmClassFile.h
blob: cb0f50b678838bf88a6e1db728ff6676cb012895 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/*=========================================================================

  Program:   Insight Segmentation & Registration Toolkit
  Module:    $RCSfile$
  Language:  C++
  Date:      $Date$
  Version:   $Revision$


  Copyright (c) 2000 National Library of Medicine
  All rights reserved.

  See COPYRIGHT.txt for copyright details.

=========================================================================*/
#ifndef cmClassFile_h
#define cmClassFile_h

#include "cmStandardIncludes.h"

/** \class cmClassFile
 * \brief Represent a class loaded from a makefile.
 *
 * cmClassFile is represents a class loaded from 
 * a makefile.
 */
class cmClassFile
{
public:
  /**
   * Construct instance as a concrete class with both a
   * .h and .cxx file.
   */
  cmClassFile()
    {
    m_AbstractClass = false;
    m_HeaderFileOnly = false;
    m_IsExecutable = false;
    m_WrapExclude = false;
    }
  
  /**
   * Set the name of the file, given the directory
   * the file should be in.  Various extensions are tried on 
   * the name (e.g., .cxx, .cpp) in the directory to find the actual file.
   */
  void SetName(const char* name, const char* dir);

  /**
   * Set the name of the file, given the directory the file should be in.  IN
   * this version the extesion is provided in the call. This is useful for
   * generated files that do not exist prior to the build.  
   */
  void SetName(const char* name, const char* dir, const char *ext, 
               bool headerFileOnly);

  /**
   * Print the structure to std::cout.
   */
  void Print();

  /**
   * Indicate whether the class is abstract (non-instantiable).
   */
  bool m_AbstractClass;

  /**
   * Indicate whether the class should not be wrapped
   */
  bool m_WrapExclude;

  /**
   * Indicate whether this class is defined with only the header file.
   */
  bool m_HeaderFileOnly;

  /**
   * Indicate whether this class is an executable file
   */
  bool m_IsExecutable;

  /**
   * The full path to the file.
   */
  std::string m_FullPath;

  /**
   * The file name associated with stripped off directory and extension.
   * (In most cases this is the name of the class.)
   */
  std::string m_ClassName;

  /**
   * The file name associated with stripped off directory and extension.
   * (In most cases this is the name of the class.)
   */
  std::string m_ClassExtension;

  /**
   * The dependencies of this class are gathered here.
   */
  std::vector<std::string> m_Depends;
};

#endif