Ember
Loading...
Searching...
No Matches
EmberCore::ParserProfile Class Reference

A named parser configuration profile with metadata. More...

#include <ParserProfile.h>

Public Member Functions

 ParserProfile ()
 ParserProfile (const String &name, const String &description="")
 ~ParserProfile ()=default
String GetName () const
void SetName (const String &name)
String GetDescription () const
void SetDescription (const String &description)
String GetVersion () const
void SetVersion (const String &version)
String GetAuthor () const
void SetAuthor (const String &author)
int64_t GetCreatedTimestamp () const
int64_t GetModifiedTimestamp () const
void UpdateModifiedTimestamp ()
ParserConfigGetConfig ()
const ParserConfigGetConfig () const
void SetConfig (const ParserConfig &config)
bool Validate (std::vector< String > &errors) const
nlohmann::json ToJson () const
void FromJson (const nlohmann::json &json)
bool SaveToFile (const String &filepath) const
bool LoadFromFile (const String &filepath)
std::shared_ptr< ParserProfileClone (const String &new_name="") const

Static Public Member Functions

static std::shared_ptr< ParserProfileCreateDefaultProfile ()
static std::shared_ptr< ParserProfileCreateGenericProfile ()

Static Private Member Functions

static int64_t GetCurrentTimestamp ()

Private Attributes

String name_
String description_
String version_
String author_
int64_t created_timestamp_
int64_t modified_timestamp_
ParserConfig config_

Detailed Description

A named parser configuration profile with metadata.

This class wraps a ParserConfig with additional metadata like name, description, version, and timestamps for profile management.

Definition at line 16 of file ParserProfile.h.

Constructor & Destructor Documentation

◆ ParserProfile() [1/2]

EmberCore::ParserProfile::ParserProfile ( )

Definition at line 9 of file ParserProfile.cpp.

◆ ParserProfile() [2/2]

EmberCore::ParserProfile::ParserProfile ( const String & name,
const String & description = "" )
explicit

Definition at line 13 of file ParserProfile.cpp.

◆ ~ParserProfile()

EmberCore::ParserProfile::~ParserProfile ( )
default

Member Function Documentation

◆ Clone()

std::shared_ptr< ParserProfile > EmberCore::ParserProfile::Clone ( const String & new_name = "") const

Definition at line 152 of file ParserProfile.cpp.

◆ CreateDefaultProfile()

std::shared_ptr< ParserProfile > EmberCore::ParserProfile::CreateDefaultProfile ( )
static

Definition at line 166 of file ParserProfile.cpp.

◆ CreateGenericProfile()

std::shared_ptr< ParserProfile > EmberCore::ParserProfile::CreateGenericProfile ( )
static

Definition at line 178 of file ParserProfile.cpp.

◆ FromJson()

void EmberCore::ParserProfile::FromJson ( const nlohmann::json & json)

Definition at line 59 of file ParserProfile.cpp.

◆ GetAuthor()

String EmberCore::ParserProfile::GetAuthor ( ) const
inline

Definition at line 32 of file ParserProfile.h.

◆ GetConfig() [1/2]

ParserConfig & EmberCore::ParserProfile::GetConfig ( )
inline

Definition at line 40 of file ParserProfile.h.

◆ GetConfig() [2/2]

const ParserConfig & EmberCore::ParserProfile::GetConfig ( ) const
inline

Definition at line 41 of file ParserProfile.h.

◆ GetCreatedTimestamp()

int64_t EmberCore::ParserProfile::GetCreatedTimestamp ( ) const
inline

Definition at line 35 of file ParserProfile.h.

◆ GetCurrentTimestamp()

int64_t EmberCore::ParserProfile::GetCurrentTimestamp ( )
staticprivate

Definition at line 190 of file ParserProfile.cpp.

◆ GetDescription()

String EmberCore::ParserProfile::GetDescription ( ) const
inline

Definition at line 26 of file ParserProfile.h.

◆ GetModifiedTimestamp()

int64_t EmberCore::ParserProfile::GetModifiedTimestamp ( ) const
inline

Definition at line 36 of file ParserProfile.h.

◆ GetName()

String EmberCore::ParserProfile::GetName ( ) const
inline

Definition at line 23 of file ParserProfile.h.

◆ GetVersion()

String EmberCore::ParserProfile::GetVersion ( ) const
inline

Definition at line 29 of file ParserProfile.h.

◆ LoadFromFile()

bool EmberCore::ParserProfile::LoadFromFile ( const String & filepath)

Definition at line 129 of file ParserProfile.cpp.

◆ SaveToFile()

bool EmberCore::ParserProfile::SaveToFile ( const String & filepath) const

Definition at line 107 of file ParserProfile.cpp.

◆ SetAuthor()

void EmberCore::ParserProfile::SetAuthor ( const String & author)
inline

Definition at line 33 of file ParserProfile.h.

◆ SetConfig()

void EmberCore::ParserProfile::SetConfig ( const ParserConfig & config)

Definition at line 19 of file ParserProfile.cpp.

◆ SetDescription()

void EmberCore::ParserProfile::SetDescription ( const String & description)
inline

Definition at line 27 of file ParserProfile.h.

◆ SetName()

void EmberCore::ParserProfile::SetName ( const String & name)
inline

Definition at line 24 of file ParserProfile.h.

◆ SetVersion()

void EmberCore::ParserProfile::SetVersion ( const String & version)
inline

Definition at line 30 of file ParserProfile.h.

◆ ToJson()

nlohmann::json EmberCore::ParserProfile::ToJson ( ) const

Definition at line 45 of file ParserProfile.cpp.

◆ UpdateModifiedTimestamp()

void EmberCore::ParserProfile::UpdateModifiedTimestamp ( )

Definition at line 17 of file ParserProfile.cpp.

◆ Validate()

bool EmberCore::ParserProfile::Validate ( std::vector< String > & errors) const

Definition at line 24 of file ParserProfile.cpp.

Member Data Documentation

◆ author_

String EmberCore::ParserProfile::author_
private

Definition at line 66 of file ParserProfile.h.

◆ config_

ParserConfig EmberCore::ParserProfile::config_
private

Definition at line 69 of file ParserProfile.h.

◆ created_timestamp_

int64_t EmberCore::ParserProfile::created_timestamp_
private

Definition at line 67 of file ParserProfile.h.

◆ description_

String EmberCore::ParserProfile::description_
private

Definition at line 64 of file ParserProfile.h.

◆ modified_timestamp_

int64_t EmberCore::ParserProfile::modified_timestamp_
private

Definition at line 68 of file ParserProfile.h.

◆ name_

String EmberCore::ParserProfile::name_
private

Definition at line 63 of file ParserProfile.h.

◆ version_

String EmberCore::ParserProfile::version_
private

Definition at line 65 of file ParserProfile.h.


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