File: gxSystemTools.h

package info (click to toggle)
gccxml 0.9.0%2Bcvs20100501-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 79,132 kB
  • ctags: 73,371
  • sloc: ansic: 751,436; cpp: 34,175; asm: 26,833; sh: 5,077; makefile: 4,696; lex: 589; awk: 566; perl: 334; yacc: 271; pascal: 86; python: 29
file content (54 lines) | stat: -rw-r--r-- 1,658 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*=========================================================================

  Program:   GCC-XML
  Module:    $RCSfile: gxSystemTools.h,v $
  Language:  C++
  Date:      $Date: 2009-02-05 14:10:57 $
  Version:   $Revision: 1.16 $

  Copyright (c) 2002 Kitware, Inc., Insight Consortium.  All rights reserved.
  See Copyright.txt for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/
#ifndef _gxSystemTools_h
#define _gxSystemTools_h

#include "gxConfigure.h"

#include <gxsys/SystemTools.hxx>

#if defined(_MSC_VER)
#pragma warning (disable: 4786)
#endif

#include <iostream>
#include <fstream>
#include <string>

/** Utility methods to hide platform differences.  */
class gxSystemTools: public gxsys::SystemTools
{
public:
  /** Run the given command and get back the output and the result value.  */
  static bool RunCommand(const char* command, std::string& output,
                         int &retVal);

  /** Copy a file named by "source" to the file named by
      "destination". */
  static bool FileCopy(const char* source, const char* destination);

  /** Given a path to a directory, convert it to a full path.  This
   * collapses away relative paths.  The full path is returned.  */
  static std::string CollapseDirectory(const char* in_dir);

  /**
   * Read a registry value from the 32-bit registry view.
   */
  static bool ReadRegistryValue(const char *key, std::string &value);
};

#endif