1 //===-- MIUtilSystemOsx.cpp -------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #if defined(__APPLE__)
13 #include "MIUtilSystemOsx.h"
14 #include "MICmnResources.h"
16 //++ ------------------------------------------------------------------------------------
17 // Details: CMIUtilSystemOsx constructor.
23 CMIUtilSystemOsx::CMIUtilSystemOsx(void)
27 //++ ------------------------------------------------------------------------------------
28 // Details: CMIUtilSystemOsx destructor.
34 CMIUtilSystemOsx::~CMIUtilSystemOsx(void)
38 //++ ------------------------------------------------------------------------------------
39 // Details: Retrieve the OS system error message for the given system error code.
41 // Args: vError - (R) OS error code value.
42 // vrwErrorMsg - (W) The error message.
43 // Return: MIstatus::success - Functional succeeded.
44 // MIstatus::failure - Functional failed.
48 CMIUtilSystemOsx::GetOSErrorMsg(const MIint vError, CMIUtilString &vrwErrorMsg) const
53 bool bOk = MIstatus::failure;
55 // ToDo: Implement LINUX version
60 //++ ------------------------------------------------------------------------------------
61 // Details: Retrieve if possible the OS last error description.
64 // Return: CMIUtilString - Error description.
68 CMIUtilSystemOsx::GetOSLastError(void) const
70 CMIUtilString errorMsg("Error fn not implemented");
72 // ToDo: Implement LINUX version
77 //++ ------------------------------------------------------------------------------------
78 // Details: Retrieves the fully qualified path for the this application. If the function
79 // fails the string is filled with the error message.
81 // Args: vrwFileNamePath - (W) The executable's name and path or last error description.
82 // Return: MIstatus::success - Functional succeeded.
83 // MIstatus::failure - Functional failed.
87 CMIUtilSystemOsx::GetExecutablesPath(CMIUtilString &vrwFileNamePath) const
89 vrwFileNamePath = CMIUtilString(".");
90 return MIstatus::success;
93 //++ ------------------------------------------------------------------------------------
94 // Details: Retrieves the fully qualified path for the Log file for this application.
95 // If the function fails the string is filled with the error message.
96 // Append a dummy file name on the end of the path. This will be stripped off
97 // later and the real log file name replaces it.
99 // Args: vrwFileNamePath - (W) The Log file's name and path or last error description.
100 // Return: MIstatus::success - Functional succeeded.
101 // MIstatus::failure - Functional failed.
105 CMIUtilSystemOsx::GetLogFilesPath(CMIUtilString &vrwFileNamePath) const
107 vrwFileNamePath = CMIUtilString(".");
108 return MIstatus::success;
111 #endif // #if defined( __APPLE__ )