source: castxml/trunk/fuentes/src/Utils.h @ 6513

Last change on this file since 6513 was 6513, checked in by mabarracus, 2 years ago

Initial port to lliurex from ubuntu

File size: 1.7 KB
Line 
1/*
2  Copyright Kitware, Inc.
3
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7
8      http://www.apache.org/licenses/LICENSE-2.0
9
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15*/
16#ifndef CASTXML_UTILS_H
17#define CASTXML_UTILS_H
18
19#include <cxsys/Configure.h>
20#include <string>
21
22/// findResources - Call from main() to find resources
23/// relative to the executable.  On success returns true.
24/// On failure returns false and stores a message in the stream.
25bool findResourceDir(const char* argv0, std::ostream& error);
26
27/// getResourceDir - Get resource directory found at startup
28std::string getResourceDir();
29
30/// getClangResourceDir - Get Clang resource directory found at startup
31std::string getClangResourceDir();
32
33/// getVersionString - Get the CastXML version string
34std::string getVersionString();
35
36/// getVersionValue - Get CastXML version encoded as %d%03d%03d
37unsigned int getVersionValue();
38
39/// runCommand - Run a given command line and capture the output.
40bool runCommand(int argc, const char* const* argv,
41                int& ret, std::string& out, std::string& err,
42                std::string& msg);
43
44/// suppressInteractiveErrors - Disable Windows error dialog popups
45void suppressInteractiveErrors();
46
47/// encodeXML - Convert character string to XML representation
48std::string encodeXML(std::string const& in, bool cdata = false);
49
50#endif // CASTXML_UTILS_H
Note: See TracBrowser for help on using the repository browser.