#include <comment.hxx>

Public Member Functions

 ~Comment ()
 

Static Public Member Functions

static OstreamBuild (Ostream &os, const String &message, int level=0, const String extent="normal")
 
static WriterBuild (Writer &writer, const String &message, int level=0, const String extent="normal")
 

Private Member Functions

 Comment (Ostream &os)
 
Comment operator= (Comment &)
 
bool Write (const String &message, int level, const String &extent)
 

Static Private Member Functions

static bool Write (Writer &writer, const String &message, int level, const String &extent)
 

Private Attributes

std::unique_ptr< Streamstream
 
std::unique_ptr< Writerwriter
 

Detailed Description

parameter.

Definition at line 30 of file comment.hxx.

Constructor & Destructor Documentation

SHA_Logger::Comment::~Comment ( )
inline

Definition at line 34 of file comment.hxx.

34 { assert(this->writer->IsComplete()); }
std::unique_ptr< Writer > writer
Definition: comment.hxx:89
SHA_Logger::Comment::Comment ( Ostream os)
inlineprivate

Definition at line 65 of file comment.hxx.

65  : stream(std::unique_ptr<Stream>(new Stream(os))),
66  writer(std::unique_ptr<Writer>(new Writer(*this->stream))) {}
std::unique_ptr< Writer > writer
Definition: comment.hxx:89
rapidjson::OStreamWrapper Stream
Definition: typedef.hxx:32
std::unique_ptr< Stream > stream
Definition: comment.hxx:88
rapidjson::PrettyWriter< Stream > Writer
Definition: typedef.hxx:33

Member Function Documentation

static Ostream& SHA_Logger::Comment::Build ( Ostream os,
const String message,
int  level = 0,
const String  extent = "normal" 
)
inlinestatic

Instantiate a new json writer using the stream passed as argument and write value information.

Returns
stream reference filled up with Comment object information, error information in case of failure.
Note
todo pass extent as an enumered type.

Definition at line 43 of file comment.hxx.

45  {
46  std::unique_ptr<Comment> builder = std::unique_ptr<Comment>(new Comment(os));
47  builder->Write(message, level, extent);
48 
49  return os;
50  }
Comment(Ostream &os)
Definition: comment.hxx:65
static Writer& SHA_Logger::Comment::Build ( Writer writer,
const String message,
int  level = 0,
const String  extent = "normal" 
)
inlinestatic

Use json writer passed as parameter to write iterator information.

Returns
stream reference filled up with Comment object information, error information in case of failure.

Definition at line 56 of file comment.hxx.

58  {
59  Write(writer, message, level, extent);
60 
61  return writer;
62  }
std::unique_ptr< Writer > writer
Definition: comment.hxx:89
bool Write(const String &message, int level, const String &extent)
Definition: comment.hxx:69
Comment SHA_Logger::Comment::operator= ( Comment )
inlineprivate

Definition at line 67 of file comment.hxx.

67 {} // Not Implemented
bool SHA_Logger::Comment::Write ( const String message,
int  level,
const String extent 
)
inlineprivate

Definition at line 69 of file comment.hxx.

70  { return Write(*this->writer, message, level, extent); }
std::unique_ptr< Writer > writer
Definition: comment.hxx:89
bool Write(const String &message, int level, const String &extent)
Definition: comment.hxx:69
static bool SHA_Logger::Comment::Write ( Writer writer,
const String message,
int  level,
const String extent 
)
inlinestaticprivate

Definition at line 72 of file comment.hxx.

73  {
74  writer.StartObject();
75  writer.Key("type");
76  writer.String("comment");
77  writer.Key("message");
78  writer.String(message);
79  writer.Key("level");
80  writer.Int(level);
81  writer.Key("extent");
82  writer.String(extent);
83  writer.EndObject();
84 
85  return true;
86  }
std::unique_ptr< Writer > writer
Definition: comment.hxx:89

Member Data Documentation

std::unique_ptr<Stream> SHA_Logger::Comment::stream
private

Definition at line 88 of file comment.hxx.

std::unique_ptr<Writer> SHA_Logger::Comment::writer
private

Definition at line 89 of file comment.hxx.


The documentation for this class was generated from the following file: