Ace_OS 命名空間記錄

This namespace defines an OS independent programming API that shields developers from nonportable aspects of writing efficient system programs on Win32, POSIX and other versions of UNIX, and various real-time operating systems.

This class is a wrapper for the XTI/TLI operations.

This namespace encapsulates the differences between various OS platforms. When porting ACE to a new platform, this class is the place to focus on. Once this file is ported to a new platform, pretty much everything else comes for "free." See <www.cs.wustl.edu/~schmidt/ACE_wrappers/etc/ACE-porting.html> for instructions on porting ACE. Please see the README file in this directory for complete information on the meaning of the various macros. 
說得很厲害一樣,就是實現了跨平臺功能,才用ACE_OS 這個命名空間來封裝。

頭文件 "ace/OS_NS_fcntl.h" 下的函數:
    1 ACE_HANDLE open (const char *filename,
                   int mode,
                   mode_t perms = ACE_DEFAULT_OPEN_PERMS,
                   LPSECURITY_ATTRIBUTES sa = 0);//打開一個文件;
    2    int fcntl (ACE_HANDLE handle,
             int cmd,
             long arg = 0);
頭文件  "ace/OS_NS_stdio.h"下的函數:
   1 int sprintf (char *buf, const char *format, ...);
   2 int vasprintf (char **bufp, const char *format, va_list argptr);

頭文件 “ace/OS_NS_stdlib.h” 下的函數://相當於c 語言中的 stdlib.h,包括內存的申請和釋放
   1 int atoi (const char *s);
   2 long atol (const char *s);
   3 void free (void *);
   4 int setenv(const char *envname, const char *envval, int overwrite); 等函數。

頭文件 “ace/OS_NS_pwd.h” 下的函數:
   1 struct passwd *getpwnam (const char *user);

頭文件 “ace/OS_NS_unistd.h” 下的函數:
   1 int access (const char *path, int amode);
   2 int argv_to_string (ACE_TCHAR **argv,
                      ACE_TCHAR *&buf,
                      bool substitute_env_args = true,
                      bool quote_args = false);
   3 int rmdir (const char *path);
   4 pid_t fork (void); 等函數
   5 int sleep (u_int seconds);

頭文件 "ace/OS_NS_string.h"下的函數://字符串操作
   1 char *strcpy (char *s, const char *t);
   2 int strcmp (const ACE_WCHAR_T *s, const ACE_WCHAR_T *t);
   3 void *memset (void *s, int c, size_t len);

頭文件  "ace/os_include/os_netdb.h" 包含 MAXHOSTNAMELEN 的定義。

發佈了19 篇原創文章 · 獲贊 16 · 訪問量 5萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章