ENH: keep cleaning up Tcl/Tk modules
[cmake.git] / Source / cmInstallCommandArguments.h
blobd3a658647023d99f270a4e90c84ef12026b731e2
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmInstallCommandArguments.h,v $
5 Language: C++
6 Date: $Date: 2007-08-31 20:52:32 $
7 Version: $Revision: 1.3 $
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.
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.
16 =========================================================================*/
18 #ifndef cmInstallCommandArguments_h
19 #define cmInstallCommandArguments_h
21 #include "cmStandardIncludes.h"
22 #include "cmCommandArgumentsHelper.h"
24 class cmInstallCommandArguments
26 public:
27 cmInstallCommandArguments();
28 void SetGenericArguments(cmInstallCommandArguments* args)
29 {this->GenericArguments = args;}
30 void Parse(const std::vector<std::string>* args,
31 std::vector<std::string>* unconsumedArgs);
33 // Compute destination path.and check permissions
34 bool Finalize();
36 const std::string& GetDestination() const;
37 const std::string& GetComponent() const;
38 const std::string& GetRename() const;
39 const std::string& GetPermissions() const;
40 const std::vector<std::string>& GetConfigurations() const;
41 bool GetOptional() const;
43 // once HandleDirectoryMode() is also switched to using
44 // cmInstallCommandArguments then these two functions can become non-static
45 // private member functions without arguments
46 static void ComputeDestination(const std::string& inDest,
47 std::string& absDest);
48 static bool CheckPermissions(const std::string& onePerm,
49 std::string& perm);
50 cmCommandArgumentsHelper Parser;
51 cmCommandArgumentGroup ArgumentGroup;
52 private:
53 cmCAString Destination;
54 cmCAString Component;
55 cmCAString Rename;
56 cmCAStringVector Permissions;
57 cmCAStringVector Configurations;
58 cmCAEnabler Optional;
60 std::string AbsDestination;
61 std::string PermissionsString;
63 cmInstallCommandArguments* GenericArguments;
64 static const char* PermissionsTable[];
65 static const std::string EmptyString;
66 bool CheckPermissions();
69 #endif