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

#include <Include.hh>

+ Collaboration diagram for fedem::fson::Include:

Public Member Functions

 Include (std::string path, std::optional< std::string > alias=std::nullopt, bool disabled=false)
 
 Include (Include &&other) noexcept=default
 
Includeoperator= (Include &&other) noexcept=default
 
Include clone () const
 
std::string const & getPath () const noexcept
 
void setPath (std::string path)
 
bool hasAlias () const noexcept
 
std::optional< std::string > const & getAlias () const noexcept
 
void setAlias (std::optional< std::string > alias)
 
bool isDisabled () const noexcept
 
void setDisabled (bool disabled) noexcept
 
CommentListgetLeadingComments () noexcept
 
CommentList const & getLeadingComments () const noexcept
 
std::optional< Comment > & getTrailingComment () noexcept
 
std::optional< Comment > const & getTrailingComment () const noexcept
 

Private Member Functions

 Include (Include const &)=delete
 
Includeoperator= (Include const &)=delete
 

Private Attributes

std::string path
 
std::optional< std::string > alias
 
bool disabled
 
CommentList leading
 
std::optional< Commenttrailing
 

Constructor & Destructor Documentation

◆ Include() [1/3]

fedem::fson::Include::Include ( std::string  path,
std::optional< std::string >  alias = std::nullopt,
bool  disabled = false 
)
inlineexplicit

◆ Include() [2/3]

fedem::fson::Include::Include ( Include &&  other)
defaultnoexcept

◆ Include() [3/3]

fedem::fson::Include::Include ( Include const &  )
privatedelete

Member Function Documentation

◆ operator=() [1/2]

Include& fedem::fson::Include::operator= ( Include &&  other)
defaultnoexcept

◆ clone()

Include fedem::fson::Include::clone ( ) const
inline

References alias, disabled, leading, path, and trailing.

◆ getPath()

std::string const & fedem::fson::Include::getPath ( ) const
inlinenoexcept

References path.

Referenced by fedem::fson::FsonWriter::writeObject().

+ Here is the caller graph for this function:

◆ setPath()

void fedem::fson::Include::setPath ( std::string  path)
inline

References path.

◆ hasAlias()

bool fedem::fson::Include::hasAlias ( ) const
inlinenoexcept

References alias.

Referenced by fedem::fson::FsonWriter::writeObject().

+ Here is the caller graph for this function:

◆ getAlias()

std::optional< std::string > const & fedem::fson::Include::getAlias ( ) const
inlinenoexcept

References alias.

Referenced by fedem::fson::FsonWriter::writeObject().

+ Here is the caller graph for this function:

◆ setAlias()

void fedem::fson::Include::setAlias ( std::optional< std::string >  alias)
inline

References alias.

◆ isDisabled()

bool fedem::fson::Include::isDisabled ( ) const
inlinenoexcept

References disabled.

Referenced by fedem::fson::FsonWriter::writeObject().

+ Here is the caller graph for this function:

◆ setDisabled()

void fedem::fson::Include::setDisabled ( bool  disabled)
inlinenoexcept

References disabled.

◆ getLeadingComments() [1/2]

CommentList & fedem::fson::Include::getLeadingComments ( )
inlinenoexcept

References leading.

Referenced by fedem::fson::FsonParser::parseInclude(), and fedem::fson::FsonWriter::writeObject().

+ Here is the caller graph for this function:

◆ getLeadingComments() [2/2]

CommentList const & fedem::fson::Include::getLeadingComments ( ) const
inlinenoexcept

References leading.

◆ getTrailingComment() [1/2]

std::optional< Comment > & fedem::fson::Include::getTrailingComment ( )
inlinenoexcept

References trailing.

Referenced by fedem::fson::FsonParser::parseObjectBody(), and fedem::fson::FsonWriter::writeObject().

+ Here is the caller graph for this function:

◆ getTrailingComment() [2/2]

std::optional< Comment > const & fedem::fson::Include::getTrailingComment ( ) const
inlinenoexcept

References trailing.

◆ operator=() [2/2]

Include& fedem::fson::Include::operator= ( Include const &  )
privatedelete

Member Data Documentation

◆ path

std::string fedem::fson::Include::path
private

Referenced by clone(), getPath(), and setPath().

◆ alias

std::optional< std::string > fedem::fson::Include::alias
private

Referenced by clone(), getAlias(), hasAlias(), and setAlias().

◆ disabled

bool fedem::fson::Include::disabled
private

Referenced by clone(), isDisabled(), and setDisabled().

◆ leading

CommentList fedem::fson::Include::leading
private

Referenced by clone(), and getLeadingComments().

◆ trailing

std::optional< Comment > fedem::fson::Include::trailing
private

Referenced by clone(), and getTrailingComment().


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