Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

CNSCLStringListBuffer Class Reference

#include <CNSCLStringListBuffer.h>

Inheritance diagram for CNSCLStringListBuffer:

CNSCLOutputBuffer CNSCLDocumentationBuffer CRunVariableBuffer CStateVariableBuffer List of all members.

Public Methods

 CNSCLStringListBuffer (unsigned nWords=4096)
 Default constructor.

 ~CNSCLStringListBuffer ()
 Destructor.

bool PutEntityString (const string &rString)

Private Methods

CNSCLStringListBuffer & operator= (const CNSCLStringListBuffer &rhs)
 Assignment.

int operator== (const CNSCLStringListBuffer &rhs) const
 Comparison for equality.

int operator!= (const CNSCLStringListBuffer &rhs) const
 CNSCLStringListBuffer (const CNSCLStringListBuffer &rhs)
 Copy constructor.


Detailed Description

Encapsulates the formatting of any of a number of buffers which consist of lists of strings. String list buffer bodies contain sequences of null terminated strings. Each string begins on a word boundary and, if necessary, a pad blank is added to ensure this, all strings are null terminated.

Definition at line 302 of file CNSCLStringListBuffer.h.


Constructor & Destructor Documentation

CNSCLStringListBuffer::CNSCLStringListBuffer unsigned    nWords = 4096
 

Default constructor.

Default constructor. This is called when declarations of the form e.g.:

  • CNSCLStringListBuffer object; are performed.

Definition at line 289 of file CNSCLStringListBuffer.cpp.

References CNSCLOutputBuffer::getBuffer(), and CNSCLOutputBuffer::m_ControlTag.

CNSCLStringListBuffer::~CNSCLStringListBuffer   [inline]
 

Destructor.

Definition at line 310 of file CNSCLStringListBuffer.h.

CNSCLStringListBuffer::CNSCLStringListBuffer const CNSCLStringListBuffer &    rhs [private]
 

Copy constructor.


Member Function Documentation

int CNSCLStringListBuffer::operator!= const CNSCLStringListBuffer &    rhs const [inline, private]
 

Definition at line 315 of file CNSCLStringListBuffer.h.

References operator==().

CNSCLStringListBuffer& CNSCLStringListBuffer::operator= const CNSCLStringListBuffer &    rhs [private]
 

Assignment.

int CNSCLStringListBuffer::operator== const CNSCLStringListBuffer &    rhs const [private]
 

Comparison for equality.

Referenced by operator!=().

bool CNSCLStringListBuffer::PutEntityString const string &    rString
 

Inserts a string into the string list buffer, if it fits, else returns false. The string is made to be an even number of characters with its null teminator:

  • If the string contains an odd number of characters it is placed null terminated in the buffer.
  • If the string consists of an even number of characters, a blank is appended, and the modified string is placed null terminated in the buffer
A string is considered an entity, so once it is determined the string will fit, the actual insertion is bracketed by StartEntity() and EndEntity() calls.
Parameters:
rString  - The string to insert.
Note:
- We use a bit of a trick: The PutString base class member is exactly what we need, but it works off the internal buffer cursor rather than the buffer pointer we get from StartEntity, so when we close the entity off, we just hand EndEntity the current buffer pointer.

Definition at line 323 of file CNSCLStringListBuffer.cpp.

References CNSCLOutputBuffer::EndEntity(), CNSCLOutputBuffer::EntityFits(), CNSCLOutputBuffer::getBufferPtr(), CNSCLOutputBuffer::PutString(), and CNSCLOutputBuffer::StartEntity().

Referenced by CExperiment::EmitDocBuffer(), CExperiment::EmitRunVariableBuffer(), and CExperiment::EmitStateVariableBuffer().


The documentation for this class was generated from the following files:
Generated on Fri Nov 8 13:37:19 2002 for Event Readout system. by doxygen1.2.16