Imported Upstream version 2.8.9
[platform/upstream/cmake.git] / Source / cmCallVisualStudioMacro.h
1 /*============================================================================
2   CMake - Cross Platform Makefile Generator
3   Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
4
5   Distributed under the OSI-approved BSD License (the "License");
6   see accompanying file Copyright.txt for details.
7
8   This software is distributed WITHOUT ANY WARRANTY; without even the
9   implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10   See the License for more information.
11 ============================================================================*/
12 #ifndef cmCallVisualStudioMacro_h
13 #define cmCallVisualStudioMacro_h
14
15 #include "cmStandardIncludes.h"
16
17 /** \class cmCallVisualStudioMacro
18  * \brief Control class for communicating with CMake's Visual Studio macros
19  *
20  * Find running instances of Visual Studio by full path solution name.
21  * Call a Visual Studio IDE macro in any of those instances.
22  */
23 class cmCallVisualStudioMacro
24 {
25 public:
26   ///! Call the named macro in instances of Visual Studio with the
27   ///! given solution file open. Pass "ALL" for slnFile to call the
28   ///! macro in each Visual Studio instance.
29   static int CallMacro(const std::string& slnFile,
30                        const std::string& macro,
31                        const std::string& args,
32                        const bool logErrorsAsMessages);
33
34   ///! Count the number of running instances of Visual Studio with the
35   ///! given solution file open. Pass "ALL" for slnFile to count all
36   ///! running Visual Studio instances.
37   static int GetNumberOfRunningVisualStudioInstances(
38     const std::string& slnFile);
39
40 protected:
41
42 private:
43 };
44
45 #endif