XdmfSystemUtils.hpp 2.93 KB
Newer Older
Kenneth Leiter's avatar
Kenneth Leiter committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
/*****************************************************************************/
/*                                    XDMF                                   */
/*                       eXtensible Data Model and Format                    */
/*                                                                           */
/*  Id : XdmfSystemUtils.hpp                                                 */
/*                                                                           */
/*  Author:                                                                  */
/*     Kenneth Leiter                                                        */
/*     kenneth.leiter@arl.army.mil                                           */
/*     US Army Research Laboratory                                           */
/*     Aberdeen Proving Ground, MD                                           */
/*                                                                           */
/*     Copyright @ 2011 US Army Research Laboratory                          */
/*     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 notice             */
/*     for more information.                                                 */
/*                                                                           */
/*****************************************************************************/

24 25 26
#ifndef XDMFSYSTEMUTILS_HPP_
#define XDMFSYSTEMUTILS_HPP_

27 28 29 30 31
// C Compatible Includes
#include "XdmfCore.hpp"

#ifdef __cplusplus

32 33 34 35
// Includes
#include <string>

/**
36
 * @brief System specific functions.
37
 *
38
 * Collects all system specific functions needed by Xdmf.
39
 */
40
class XDMFCORE_EXPORT XdmfSystemUtils {
41

42
 public:
43

44
  /**
45 46
   * Converts a filesystem path to an absolute real path (absolute
   * path with no symlinks)
47
   *
48 49 50 51
   * Example of use:
   *
   * C++
   *
52
   * @dontinclude ExampleXdmfSystemUtils.cpp
53 54
   * @skipline //#getRealPath
   * @until //#getRealPath
55 56 57
   *
   * Python
   *
58
   * @dontinclude XdmfExampleSystemUtils.py
59 60
   * @skipline #//getRealPath
   * @until #//getRealPath
61
   *
62 63 64 65 66
   * @param path a string containing the path to convert.
   *
   * @return the equivalent real path.
   */
  static std::string getRealPath(const std::string & path);
67

68
 protected:
69

70 71
  XdmfSystemUtils();
  ~XdmfSystemUtils();
72

73
 private:
74

75 76
  XdmfSystemUtils(const XdmfSystemUtils &);  // Not implemented.
  void operator=(const XdmfSystemUtils &);  // Not implemented.
77 78 79

};

80 81 82 83 84 85 86 87 88 89 90 91 92
#endif

#ifdef __cplusplus
extern "C" {
#endif

XDMFCORE_EXPORT char * XdmfSystemUtilsGetRealPath(char * path);

#ifdef __cplusplus
}
#endif


93
#endif /* XDMFSYSTEMUTILS_HPP_ */