fson  1.0.2
A comment-preserving C++ library for FSON — a human-friendly superset of JSON / JSON5
fedem::fson::Comment Class Referencefinal

#include <Comment.hh>

+ Collaboration diagram for fedem::fson::Comment:

Public Types

enum class  Kind { SingleLine , MultiLine }
 

Public Member Functions

 Comment (Kind kind, std::string text)
 
Kind getKind () const noexcept
 
std::string const & getText () const noexcept
 
void setText (std::string text)
 

Private Attributes

Kind kind
 
std::string text
 

Member Enumeration Documentation

◆ Kind

Enumerator
SingleLine 
MultiLine 

Constructor & Destructor Documentation

◆ Comment()

fedem::fson::Comment::Comment ( Kind  kind,
std::string  text 
)
inline

Member Function Documentation

◆ getKind()

Comment::Kind fedem::fson::Comment::getKind ( ) const
inlinenoexcept

References kind.

Referenced by fedem::fson::FsonWriter::writeComment(), and fedem::fson::FsonWriter::writeTrailingComment().

+ Here is the caller graph for this function:

◆ getText()

std::string const & fedem::fson::Comment::getText ( ) const
inlinenoexcept

References text.

Referenced by fedem::fson::FsonWriter::writeComment(), and fedem::fson::FsonWriter::writeTrailingComment().

+ Here is the caller graph for this function:

◆ setText()

void fedem::fson::Comment::setText ( std::string  text)
inline

References text.

Member Data Documentation

◆ kind

Kind fedem::fson::Comment::kind
private

Referenced by getKind().

◆ text

std::string fedem::fson::Comment::text
private

Referenced by getText(), and setText().


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