1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2000-2012 Kitware, Inc., Insight Software Consortium
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
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 cmVisualStudioWCEPlatformParser_h
13 #define cmVisualStudioWCEPlatformParser_h
14 #include "cmStandardIncludes.h"
16 #include "cmXMLParser.h"
18 // This class is used to parse XML with configuration
19 // of installed SDKs in system
20 class cmVisualStudioWCEPlatformParser : public cmXMLParser
23 cmVisualStudioWCEPlatformParser(const char* name = NULL)
25 , FoundRequiredName(false)
29 int ParseVersion(const char* version);
31 bool Found() const {return this->FoundRequiredName;}
32 const char* GetArchitectureFamily() const;
33 std::string GetOSVersion() const;
34 std::string GetIncludeDirectories() const {
35 return this->FixPaths(this->Include); }
36 std::string GetLibraryDirectories() const {
37 return this->FixPaths(this->Library); }
38 std::string GetPathDirectories() const {
39 return this->FixPaths(this->Path); }
40 const std::vector<std::string>& GetAvailablePlatforms() const {
41 return this->AvailablePlatforms; }
44 virtual void StartElement(const char* name, const char** attributes);
45 void EndElement(const char* name);
46 void CharacterDataHandler(const char* data, int length);
49 std::string FixPaths(const std::string& paths) const;
51 std::string CharacterData;
56 std::string PlatformName;
57 std::string OSMajorVersion;
58 std::string OSMinorVersion;
59 std::map<std::string, std::string> Macros;
60 std::vector<std::string> AvailablePlatforms;
62 const char* RequiredName;
63 bool FoundRequiredName;
64 std::string VcInstallDir;
65 std::string VsInstallDir;