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

#include <Object.hh>

+ Collaboration diagram for fedem::fson::Key:

Public Types

enum class  Form { Quoted , Bare }
 

Public Member Functions

 Key (Form form, std::string name)
 
Form getForm () const noexcept
 
std::string const & getName () const noexcept
 

Static Public Member Functions

static Key quoted (std::string name)
 
static Key bare (std::string name)
 
static bool isValidName (std::string const &text) noexcept
 

Private Attributes

Form form
 
std::string name
 

Member Enumeration Documentation

◆ Form

Enumerator
Quoted 
Bare 

Constructor & Destructor Documentation

◆ Key()

fedem::fson::Key::Key ( Form  form,
std::string  name 
)

References Bare, form, and isValidName().

Referenced by bare(), and quoted().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Function Documentation

◆ quoted()

Key fedem::fson::Key::quoted ( std::string  name)
static

References Key(), name, and Quoted.

Referenced by fedem::fson::Object::set().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bare()

Key fedem::fson::Key::bare ( std::string  name)
static

References Key(), Bare, and name.

Referenced by fedem::fson::Object::set().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isValidName()

bool fedem::fson::Key::isValidName ( std::string const &  text)
staticnoexcept

References index.

Referenced by Key(), fedem::fson::Object::set(), and fedem::fson::FsonWriter::writeKey().

+ Here is the caller graph for this function:

◆ getForm()

Key::Form fedem::fson::Key::getForm ( ) const
inlinenoexcept

References form.

◆ getName()

std::string const & fedem::fson::Key::getName ( ) const
inlinenoexcept

References name.

Referenced by fedem::fson::Object::provenanceMap(), fedem::fson::IncludeResolver::resolveObject(), and fedem::fson::FsonWriter::writeObject().

+ Here is the caller graph for this function:

Member Data Documentation

◆ form

Form fedem::fson::Key::form
private

Referenced by Key(), and getForm().

◆ name

std::string fedem::fson::Key::name
private

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