summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1999-01-06 04:45:22 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1999-01-06 04:45:22 +0000
commitf4898ebbfd6d0b88054de64a8ce486f2e888d174 (patch)
treed7cc07e9cf64ce86c736527a7968f59ebd1c4978
parent3fd3dbc5a9a6c1fd021f59b61adb9501ee09cfc4 (diff)
downloadATCD-f4898ebbfd6d0b88054de64a8ce486f2e888d174.tar.gz
.
-rw-r--r--ace/Read_Buffer.h26
1 files changed, 16 insertions, 10 deletions
diff --git a/ace/Read_Buffer.h b/ace/Read_Buffer.h
index 83c5f84bccf..23524cd7c58 100644
--- a/ace/Read_Buffer.h
+++ b/ace/Read_Buffer.h
@@ -41,31 +41,37 @@ class ACE_Export ACE_Read_Buffer
// efficiently.
public:
// = Initialization and termination methods.
- ACE_Read_Buffer (FILE *fp, int close_on_delete = 0, ACE_Allocator * = 0);
+ ACE_Read_Buffer (FILE *fp,
+ int close_on_delete = 0,
+ ACE_Allocator * = 0);
// Read from a FILE *.
- ACE_Read_Buffer (ACE_HANDLE handle, int close_on_delete = 0, ACE_Allocator * = 0);
+ ACE_Read_Buffer (ACE_HANDLE handle,
+ int close_on_delete = 0,
+ ACE_Allocator * = 0);
// Read from an open HANDLE.
~ACE_Read_Buffer (void);
// Closes the FILE *.
- // Returns a dynamically allocated pointer to n+1 bytes of data from
- // the input stream up to (and including) the <terminator>. If
- // <search> is >= 0 then all occurrences of the <search> value are
- // substituted with the <replace> value. The last of the n+1 bytes
- // of data is a 0, so that if data is test, strlen () can be used on
- // it.
char *read (int terminator = EOF,
int search = '\n',
int replace = '\0');
+ // Returns a pointer dynamically allocated with
+ // <ACE_Allocator::malloc> to data from the input stream up to (and
+ // including) the <terminator>. If <search> is >= 0 then all
+ // occurrences of the <search> value are substituted with the
+ // <replace> value. The last of the byte of data is a 0, so that
+ // <strlen> can be used on it. The caller is responsible for
+ // freeing the pointer returned from this method using the
+ // <ACE_Allocator::free>.
size_t replaced (void) const;
// Returns the number of characters replaced during a <read>.
size_t size (void) const;
- // Returns the size of the allocated buffer obtained during a <read>,
- // not including the null terminator.
+ // Returns the size of the allocated buffer obtained during a
+ // <read>, not including the null terminator.
ACE_Allocator *alloc (void) const;
// Returns a pointer to its allocator.