8#ifndef INCLUDED_BALL_RECORDATTRIBUTES
9#define INCLUDED_BALL_RECORDATTRIBUTES
231#include <balscm_version.h>
246#include <bsl_ostream.h>
247#include <bsl_string.h>
281 k_RESET_MESSAGE_STREAM_CAPACITY = 256
298 bsl::ostream d_messageStream;
310 void resetMessageStreamState();
461 bsl::ostream&
print(bsl::ostream& stream,
463 int spacesPerLevel = 4)
const;
497void RecordAttributes::resetMessageStreamState()
503 d_messageStream.exceptions(bsl::ios_base::goodbit);
504 d_messageStream.clear();
505 d_messageStream.tie(0);
506 d_messageStream.flags(bsl::ios_base::dec | bsl::ios_base::skipws);
507 d_messageStream.fill(
' ');
508 d_messageStream.precision(6);
509 d_messageStream.width(0);
521 k_RESET_MESSAGE_STREAM_CAPACITY < d_messageStreamBuf.
capacity())) {
523 d_messageStreamBuf.
reset();
526 d_messageStreamBuf.pubseekpos(0);
528 resetMessageStreamState();
534 return d_messageStreamBuf;
540 return d_messageStream;
589 return d_category.
c_str();
595 return d_fileName.
c_str();
625 return d_messageStreamBuf;
631 return d_messageStream;
644bool ball::operator!=(
const RecordAttributes& lhs,
const RecordAttributes& rhs)
646 return !(lhs == rhs);
651 const RecordAttributes&
object)
653 return object.
print(stream, 0, -1);
Definition ball_recordattributes.h:274
void clearMessage()
Definition ball_recordattributes.h:514
bslstl::StringRef messageRef() const
RecordAttributes & operator=(const RecordAttributes &rhs)
BSLMF_NESTED_TRAIT_DECLARATION(RecordAttributes, bslma::UsesBslmaAllocator)
RecordAttributes(const RecordAttributes &original, bslma::Allocator *basicAllocator=0)
bsl::ostream & messageStream()
Definition ball_recordattributes.h:538
int lineNumber() const
Return the line number attribute of this record attributes object.
Definition ball_recordattributes.h:599
~RecordAttributes()=default
Destroy this object.
void setCategory(const char *category)
Definition ball_recordattributes.h:544
void setProcessID(int processID)
Definition ball_recordattributes.h:562
bdlsb::MemOutStreamBuf & messageStreamBuf()
Definition ball_recordattributes.h:532
void setTimestamp(const bdlt::Datetime ×tamp)
Definition ball_recordattributes.h:580
void setThreadID(bsls::Types::Uint64 threadID)
Definition ball_recordattributes.h:574
const bdlt::Datetime & timestamp() const
Return the timestamp attribute of this record attributes object.
Definition ball_recordattributes.h:635
bsls::Types::Uint64 threadID() const
Return the threadID attribute of this record attributes object.
Definition ball_recordattributes.h:617
void setLineNumber(int lineNumber)
Definition ball_recordattributes.h:556
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
const char * category() const
Return the category attribute of this record attributes object.
Definition ball_recordattributes.h:587
int processID() const
Return the processID attribute of this record attributes object.
Definition ball_recordattributes.h:605
friend bool operator==(const RecordAttributes &, const RecordAttributes &)
void setSeverity(int severity)
Definition ball_recordattributes.h:568
const char * message() const
const char * fileName() const
Return the filename attribute of this record attributes object.
Definition ball_recordattributes.h:593
int severity() const
Return the severity attribute of this record attributes object.
Definition ball_recordattributes.h:611
RecordAttributes(const bdlt::Datetime ×tamp, int processID, bsls::Types::Uint64 threadID, const char *fileName, int lineNumber, const char *category, int severity, const char *message, bslma::Allocator *basicAllocator=0)
void setFileName(const char *fileName)
Definition ball_recordattributes.h:550
RecordAttributes(bslma::Allocator *basicAllocator=0)
void setMessage(const char *message)
Definition bdlsb_memoutstreambuf.h:212
bsl::size_t capacity() const
Definition bdlsb_memoutstreambuf.h:388
void reset()
Definition bdlsb_memoutstreambuf.h:380
Definition bdlt_datetime.h:331
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
Definition bslstl_string.h:1281
const CHAR_TYPE * c_str() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_string.h:6705
Definition bslma_allocator.h:457
Definition bslstl_stringref.h:372
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition ball_administration.h:214
bsl::ostream & operator<<(bsl::ostream &output, const Attribute &attribute)
bool operator!=(const Attribute &lhs, const Attribute &rhs)
Definition bslma_usesbslmaallocator.h:343
unsigned long long Uint64
Definition bsls_types.h:137