xsi_utils.h
Go to the documentation of this file.
00001 //*****************************************************************************
00011 //*****************************************************************************
00012 
00013 #if (_MSC_VER > 1000) || defined(SGI_COMPILER)
00014 #pragma once
00015 #endif
00016 
00017 #ifndef __XSIUTIL_H__
00018 #define __XSIUTIL_H__
00019 
00020 //*****************************************************************************
00021 //
00022 // Defines
00023 //
00024 //*****************************************************************************
00025 
00026 //*****************************************************************************
00027 //
00028 // Includes
00029 //
00030 //*****************************************************************************
00031 #include "sicppsdk.h"
00032 #include "xsi_string.h"
00033 
00034 //*****************************************************************************
00035 //
00036 // Typedefs
00037 //
00038 //*****************************************************************************
00039 
00040 namespace XSI {
00041 
00042 //*****************************************************************************
00048 //*****************************************************************************
00049 
00050 
00051 class CValue;
00052 class CTime;
00053 
00054 class SICPPSDKDECL CUtils
00055 {
00056 public:
00057 
00062     static CString ResolvePath( const CString &in_Path );
00063 
00069     static LONG GetLocationType( const CString &in_strPath );
00070 
00074     static  bool Is64BitOS();
00075 
00079     static  bool IsLinuxOS();
00080 
00084     static  bool IsWindowsOS();
00085 
00092     static  bool IsFileSystemCaseSensitive();
00093 
00101     static  bool IsScriptingLanguageInstalled( const CString &in_strLangOrFile );
00102 
00166     static CString Translate( const CValue &in_ToTranslate, const CString &in_dictionary,
00167             const CString &in_string1 = CString(), const CString &in_string2 = CString(),
00168             const CString &in_string3 = CString());
00169 
00170 
00176     static CString Slash();
00177 
00199     static CString BuildPath
00200     (
00201         const CString &in_segment1,
00202         const CString &in_segment2,
00203         const CString &in_segment3 = CString(),
00204         const CString &in_segment4 = CString(),
00205         const CString &in_segment5 = CString(),
00206         const CString &in_segment6 = CString(),
00207         const CString &in_segment7 = CString(),
00208         const CString &in_segment8 = CString());
00209 
00221     static bool EnsureFolderExists( const CString &in_Path, const bool in_bHasFileName );
00222 
00245     static CString ResolveTokenString(
00246         const CString &in_TokenString,
00247         const CTime &in_Time,
00248         bool in_bVerbose,
00249         const CStringArray &in_TokenNames = CStringArray(),
00250         const CStringArray &in_TokenValues = CStringArray() );
00251 
00263     static bool IsAbsolutePath(
00264         const CString &in_strPath );
00265 
00266 private:
00267     CUtils(){};
00268 };
00269 
00270 };
00271 
00272 #endif // __XSIPRIMITIVE_H__