~ubuntu-branches/ubuntu/jaunty/cmake/jaunty-security

« back to all changes in this revision

Viewing changes to Source/cmCableWrapTclCommand.h

  • Committer: Bazaar Package Importer
  • Author(s): A. Maitland Bottoms
  • Date: 2005-03-02 09:22:44 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050302092244-y6o9j8wr27vqcqvx
Tags: 2.0.5-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*=========================================================================
2
 
 
3
 
  Program:   Insight Segmentation & Registration Toolkit
4
 
  Module:    $RCSfile: cmCableWrapTclCommand.h,v $
5
 
  Language:  C++
6
 
  Date:      $Date: 2001/09/20 19:08:20 $
7
 
  Version:   $Revision: 1.7 $
8
 
 
9
 
Copyright (c) 2001 Insight Consortium
10
 
All rights reserved.
11
 
 
12
 
Redistribution and use in source and binary forms, with or without
13
 
modification, are permitted provided that the following conditions are met:
14
 
 
15
 
 * Redistributions of source code must retain the above copyright notice,
16
 
   this list of conditions and the following disclaimer.
17
 
 
18
 
 * Redistributions in binary form must reproduce the above copyright notice,
19
 
   this list of conditions and the following disclaimer in the documentation
20
 
   and/or other materials provided with the distribution.
21
 
 
22
 
 * The name of the Insight Consortium, nor the names of any consortium members,
23
 
   nor of any contributors, may be used to endorse or promote products derived
24
 
   from this software without specific prior written permission.
25
 
 
26
 
  * Modified source versions must be plainly marked as such, and must not be
27
 
    misrepresented as being the original software.
28
 
 
29
 
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
30
 
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31
 
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32
 
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
33
 
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
34
 
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
35
 
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
 
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
37
 
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38
 
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39
 
 
40
 
=========================================================================*/
41
 
#ifndef cmCableWrapTclCommand_h
42
 
#define cmCableWrapTclCommand_h
43
 
 
44
 
#include "cmStandardIncludes.h"
45
 
#include "cmCommand.h"
46
 
#include "cmCableClassSet.h"
47
 
 
48
 
class cmMakeDepend;
49
 
 
50
 
/** \class cmCableWrapTclCommand
51
 
 * \brief Define a command that wraps a set of classes in Tcl.
52
 
 */
53
 
class cmCableWrapTclCommand : public cmCommand
54
 
{
55
 
public:
56
 
  cmCableWrapTclCommand();
57
 
  virtual ~cmCableWrapTclCommand();
58
 
 
59
 
  /**
60
 
   * This is a virtual constructor for the command.
61
 
   */
62
 
  virtual cmCommand* Clone()
63
 
    {
64
 
      return new cmCableWrapTclCommand;
65
 
    }
66
 
 
67
 
  /**
68
 
   * This is called when the command is first encountered in
69
 
   * the CMakeLists.txt file.
70
 
   */
71
 
  virtual bool InitialPass(std::vector<std::string> const& args);  
72
 
  
73
 
  /**
74
 
   * The name of the command as specified in CMakeList.txt.
75
 
   */
76
 
  virtual const char* GetName() { return "CABLE_WRAP_TCL";}
77
 
 
78
 
  /**
79
 
   * Succinct documentation.
80
 
   */
81
 
  virtual const char* GetTerseDocumentation() 
82
 
    {
83
 
    return "Wrap a set of classes in Tcl.";
84
 
    }
85
 
  
86
 
  /**
87
 
   * More documentation.
88
 
   */
89
 
  virtual const char* GetFullDocumentation()
90
 
    {
91
 
    return
92
 
      "CABLE_WRAP_TCL(target class1 class2 ...)\n"
93
 
      "Wrap the given set of classes in Tcl using the CABLE tool.  The set\n"
94
 
      "of source files produced for the given package name will be added to\n"
95
 
      "a source list with the given name.";
96
 
    }
97
 
  
98
 
  cmTypeMacro(cmCableWrapTclCommand, cmCommand);
99
 
 
100
 
protected:
101
 
  void GenerateCableFiles() const;
102
 
  void GenerateCableClassFiles(const char*, const cmCableClass&, const char*) const;
103
 
  std::string GetGccXmlFromCache() const;
104
 
  std::string GetGccXmlFlagsFromCache() const;
105
 
  std::string GetCableFromCache() const;
106
 
  void AddGccXmlFlagsFromCache(std::vector<std::string>&) const;
107
 
  
108
 
  class cmGccXmlFlagsParser;
109
 
 
110
 
private:
111
 
  /**
112
 
   * The name of the package of wrappers to produce.
113
 
   */
114
 
  std::string m_TargetName;
115
 
  
116
 
  /**
117
 
   * The name of the source list into which the files needed for the package
118
 
   * will be placed.
119
 
   */
120
 
  std::string m_SourceListName;
121
 
  
122
 
  /**
123
 
   * The set of classes to be wrapped in the package.  This is also implicitly
124
 
   * added to the makefile as another set.
125
 
   */
126
 
  cmCableClassSet* m_CableClassSet;
127
 
 
128
 
  ///! The dependency generator.
129
 
  cmMakeDepend* m_MakeDepend;
130
 
};
131
 
 
132
 
#endif