diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-11-01 22:17:39 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-11-01 22:17:39 +0000 |
commit | 53284e215e3d3351a7d7e9c4b68f14b427fb4377 (patch) | |
tree | 97236ece363cff48fd287c780db4290da39b02cb /ace/FILE.h | |
parent | 7b7c52ad2abd228138ba1a948d5e28bf6dc3b880 (diff) | |
download | ATCD-53284e215e3d3351a7d7e9c4b68f14b427fb4377.tar.gz |
ChangeLogTag:Wed Nov 1 14:11:48 2000 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'ace/FILE.h')
-rw-r--r-- | ace/FILE.h | 113 |
1 files changed, 60 insertions, 53 deletions
diff --git a/ace/FILE.h b/ace/FILE.h index 92f60ab7abb..a06351b86d3 100644 --- a/ace/FILE.h +++ b/ace/FILE.h @@ -1,18 +1,15 @@ /* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ace -// -// = FILENAME -// FILE.h -// -// = AUTHOR -// Gerhard Lenzer -// -// ============================================================================ + +//============================================================================= +/** + * @file FILE.h + * + * $Id$ + * + * @author Gerhard Lenzer + */ +//============================================================================= + #ifndef ACE_FILE_H #define ACE_FILE_H @@ -39,91 +36,101 @@ #define ACE_FILE_STREAM ACE_FILE_IO, ACE_FILE_Addr #endif /* ACE_TEMPLATE_TYPEDEFS */ +/** + * @class ACE_FILE_Info + * + * @brief Abstracts basic OS FILE information. + */ class ACE_Export ACE_FILE_Info { - // = TITLE - // Abstracts basic OS FILE information. public: + /// mode of file mode_t mode_; - // mode of file + /// no of links nlink_t nlink_; - // no of links + /// size of file off_t size_; - // size of file }; +/** + * @class ACE_FILE + * + * @brief Defines the core methods of the <ACE_FILE> abstraction. + */ class ACE_Export ACE_FILE : public ACE_IO_SAP { - // = TITLE - // Defines the core methods of the <ACE_FILE> abstraction. public: + /// Close the <ACE_FILE> handle without removing the <ACE_FILE> from + /// the file system. int close (void); - // Close the <ACE_FILE> handle without removing the <ACE_FILE> from - // the file system. - + + /// Close and remove the <ACE_FILE> from the file system. int remove (void); - // Close and remove the <ACE_FILE> from the file system. + /// Remove the <ACE_FILE> from the file system without closing the + /// <ACE_FILE> handle. int unlink (void); - // Remove the <ACE_FILE> from the file system without closing the - // <ACE_FILE> handle. + /// Get information on this <ACE_FILE>. int get_info (ACE_FILE_Info *finfo); - // Get information on this <ACE_FILE>. + /// Get information on this <ACE_FILE>. int get_info (ACE_FILE_Info &finfo); - // Get information on this <ACE_FILE>. + /// Set filesize to length byte. int truncate (off_t length); - // Set filesize to length byte. + /** + * Sets the file pointer as follows: + * o If <whence> is <SEEK_SET>, the pointer is set to <offset> + * bytes. + * + * o If <whence> is <SEEK_CUR>, the pointer is set to its + * current location plus <offset>. + * + * o If <whence> is <SEEK_END>, the pointer is set to the size + * of the file plus offset. + * Same as <seek>, but <position> is deprecated. + */ off_t seek (off_t offset, int whence = SEEK_CUR); - // Sets the file pointer as follows: - // o If <whence> is <SEEK_SET>, the pointer is set to <offset> - // bytes. - // - // o If <whence> is <SEEK_CUR>, the pointer is set to its - // current location plus <offset>. - // - // o If <whence> is <SEEK_END>, the pointer is set to the size - // of the file plus offset. off_t position (long offset, int startpos); - // Same as <seek>, but <position> is deprecated. + /// Return an offset for the file handle. off_t tell (void); - // Return an offset for the file handle. + /// Same as <tell>, but <position> is deprecated. off_t position (void); - // Same as <tell>, but <position> is deprecated. + /** + * Disable signal <signum> + * This is here to prevent Win32 from + * disabling SPIPE using socket calls + */ int disable (int signum) const ; - // Disable signal <signum> - // This is here to prevent Win32 from - // disabling SPIPE using socket calls + /// Return the local endpoint address in the referenced <ACE_Addr>. + /// Returns 0 if successful, else -1. int get_local_addr (ACE_Addr &) const; - // Return the local endpoint address in the referenced <ACE_Addr>. - // Returns 0 if successful, else -1. + /// Return the same thing as <get_local_addr>. int get_remote_addr (ACE_Addr &) const; - // Return the same thing as <get_local_addr>. + /// Dump the state of an object. void dump (void) const; - // Dump the state of an object. + /// Declare the dynamic allocation hooks. ACE_ALLOC_HOOK_DECLARE; - // Declare the dynamic allocation hooks. protected: + /// Ensure that this class is only created by the + /// <ACE_FILE_Connector>. ACE_FILE (void); - // Ensure that this class is only created by the - // <ACE_FILE_Connector>. + /// File we are "connected" with... ACE_FILE_Addr addr_; - // File we are "connected" with... }; #if !defined (ACE_LACKS_INLINE_FUNCTIONS) |