[sword-cvs] sword/src/utilfuns swbuf.cpp,1.7,1.8

sword@www.crosswire.org sword@www.crosswire.org
Thu, 27 Feb 2003 16:57:57 -0700


Update of /usr/local/cvsroot/sword/src/utilfuns
In directory www:/tmp/cvs-serv19025/src/utilfuns

Modified Files:
	swbuf.cpp 
Log Message:
docs re-added and refined


Index: swbuf.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/utilfuns/swbuf.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** swbuf.cpp	27 Feb 2003 23:34:22 -0000	1.7
--- swbuf.cpp	27 Feb 2003 23:57:55 -0000	1.8
***************
*** 32,35 ****
--- 32,40 ----
  char SWBuf::junkBuf[JUNKBUFSIZE];
  
+ /******************************************************************************
+ * SWBuf Constructor - Creates an empty SWBuf object or an SWBuf initialized
+ * 		to a value from a const char *
+ *
+ */
  SWBuf::SWBuf(const char *initVal) {
  	if (initVal) {
***************
*** 48,52 ****
  }
  
! 
  SWBuf::SWBuf(const SWBuf &other) {
  	allocSize = other.length()+1;
--- 53,61 ----
  }
  
! /******************************************************************************
! * SWBuf Constructor - Creates an SWBuf initialized
! * 		to a value from another SWBuf
! *
! */
  SWBuf::SWBuf(const SWBuf &other) {
  	allocSize = other.length()+1;
***************
*** 58,62 ****
  }
  
! 
  SWBuf::SWBuf(char initVal) {
  	allocSize = 15;
--- 67,75 ----
  }
  
! /******************************************************************************
! * SWBuf Constructor - Creates an SWBuf initialized
! * 		to a value from a char
! *
! */
  SWBuf::SWBuf(char initVal) {
  	allocSize = 15;
***************
*** 71,78 ****
--- 84,97 ----
  }
  
+ /******************************************************************************
+ * SWBuf Destructor - Cleans up instance of SWBuf
+ */
  SWBuf::~SWBuf() {
  	free(buf);
  }
  
+ /******************************************************************************
+ * SWBuf::set - sets this buf to a new value
+ */
  void SWBuf::set(const char *newVal) {
  	unsigned int len = strlen(newVal) + 1;
***************
*** 83,86 ****
--- 102,108 ----
  
  
+ /******************************************************************************
+ * SWBuf::set - sets this buf to a new value
+ */
  void SWBuf::set(const SWBuf &newVal) {
  	unsigned int len = newVal.length() + 1;
***************
*** 90,94 ****
  }
  
! 
  void SWBuf::append(const char *str) {
  	unsigned int len = strlen(str) + 1;
--- 112,118 ----
  }
  
! /******************************************************************************
! * SWBuf::append - appends a value to the current value of this SWBuf
! */
  void SWBuf::append(const char *str) {
  	unsigned int len = strlen(str) + 1;
***************
*** 98,101 ****
--- 122,128 ----
  }
  
+ /******************************************************************************
+ * SWBuf::append - appends a value to the current value of this SWBuf
+ */
  void SWBuf::append(const SWBuf &str) {
  	unsigned int len = str.length() + 1;
***************
*** 105,108 ****
--- 132,138 ----
  }
  
+ /******************************************************************************
+ * SWBuf::setSize - Size this buffer to a specific length
+ */
  void SWBuf::setSize(unsigned int len) {
  	assureSize(len+1);
***************
*** 113,118 ****
  }
  
! // WARNING: This function can only write at most
! // JUNKBUFSIZE to the string per call.
  void SWBuf::appendFormatted(const char *format, ...) {
  	va_list argptr;
--- 143,151 ----
  }
  
! /******************************************************************************
! * SWBuf::appendFormatted - appends formatted strings to the current value of this SWBuf
! * WARNING: This function can only write at most
! * JUNKBUFSIZE to the string per call.
! */
  void SWBuf::appendFormatted(const char *format, ...) {
  	va_list argptr;