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

« back to all changes in this revision

Viewing changes to Source/cmWriteFileCommand.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:   CMake - Cross-Platform Makefile Generator
 
4
  Module:    $RCSfile: cmWriteFileCommand.h,v $
 
5
  Language:  C++
 
6
  Date:      $Date: 2004/04/18 18:41:46 $
 
7
  Version:   $Revision: 1.7 $
 
8
 
 
9
  Copyright (c) 2002 Kitware, Inc., Insight Consortium.  All rights reserved.
 
10
  See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
 
11
 
 
12
     This software is distributed WITHOUT ANY WARRANTY; without even 
 
13
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
 
14
     PURPOSE.  See the above copyright notices for more information.
 
15
 
 
16
=========================================================================*/
 
17
#ifndef cmWriteFileCommand_h
 
18
#define cmWriteFileCommand_h
 
19
 
 
20
#include "cmCommand.h"
 
21
 
 
22
/** \class cmWriteFileCommand
 
23
 * \brief Writes a message to a file
 
24
 *
 
25
 */
 
26
class cmWriteFileCommand : public cmCommand
 
27
{
 
28
public:
 
29
  /**
 
30
   * This is a virtual constructor for the command.
 
31
   */
 
32
  virtual cmCommand* Clone() 
 
33
    {
 
34
    return new cmWriteFileCommand;
 
35
    }
 
36
 
 
37
  /**
 
38
   * This is called when the command is first encountered in
 
39
   * the CMakeLists.txt file.
 
40
   */
 
41
  virtual bool InitialPass(std::vector<std::string> const& args);
 
42
 
 
43
  /**
 
44
   * This determines if the command is invoked when in script mode.
 
45
   */
 
46
  virtual bool IsScriptable() { return true; }
 
47
 
 
48
  /**
 
49
   * The name of the command as specified in CMakeList.txt.
 
50
   */
 
51
  virtual const char* GetName() { return "WRITE_FILE";}
 
52
 
 
53
  /**
 
54
   * Succinct documentation.
 
55
   */
 
56
  virtual const char* GetTerseDocumentation() 
 
57
    {
 
58
    return "Write a message to a file.";
 
59
    }
 
60
  
 
61
  /**
 
62
   * More documentation.
 
63
   */
 
64
  virtual const char* GetFullDocumentation()
 
65
    {
 
66
    return
 
67
      "  WRITE_FILE(filename \"message to write\"... [APPEND])\n"
 
68
      "The first argument is the file name, the rest of the arguments are "
 
69
      "messages to write. If the argument APPEND is specified, then "
 
70
      "the message will be appended.\n"
 
71
      "NOTE 1: FILE WRITE and FILE APPEND do exactly the same as this one "
 
72
      "but add some more functionality.\n"
 
73
      "NOTE 2: When using WRITE_FILE the produced file cannot be used as an "
 
74
      "input to CMake (CONFIGURE_FILE, source file ...) because it will "
 
75
      "lead to infinite loop. Use CONFIGURE_FILE if you want to generate "
 
76
      "input files to CMake.";
 
77
    }
 
78
  
 
79
  cmTypeMacro(cmWriteFileCommand, cmCommand);
 
80
};
 
81
 
 
82
 
 
83
#endif