guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
Loading...
Searching...
No Matches
guillaume::Metadata Class Reference

The identity card of an application: its name, version, author and similar descriptive strings. More...

#include <headers/guillaume/metadata.hpp>

Public Member Functions

 Metadata (void)=default
 Create a record in which every string is empty.
 Metadata (const std::string &name, const std::string &version, const std::string &identifier, const std::string &creator, const std::string &copyright, const std::string &url, const std::string &type)
 Create a record with every string given.
void setName (const std::string &name)
 Replace the name shown to the user.
std::string & getName (void)
 Get the name shown to the user.
void setVersion (const std::string &version)
 Replace the version string.
std::string & getVersion (void)
 Get the version string.
void setIdentifier (const std::string &identifier)
 Replace the unique identifier of the application.
std::string & getIdentifier (void)
 Get the unique identifier of the application.
void setCreator (const std::string &creator)
 Replace the author or publisher.
std::string & getCreator (void)
 Get the author or publisher.
void setCopyright (const std::string &copyright)
 Replace the copyright notice.
std::string & getCopyright (void)
 Get the copyright notice.
void setUrl (const std::string &url)
 Replace the home page of the application.
std::string & getUrl (void)
 Get the home page of the application.
void setType (const std::string &type)
 Replace the kind of application.
std::string & getType (void)
 Get the kind of application.

Detailed Description

The identity card of an application: its name, version, author and similar descriptive strings.

A plain record of seven free-form strings, meant to be filled by the program and handed to whatever needs to show or report them (a window title, an about box, a platform layer). The class does not interpret or validate them, and the framework does not read them: Application holds no Metadata.

guillaume::Metadata metadata("Notes", "1.4.0", "com.example.notes",
"Example Corp", "Copyright (c) 2026 Example Corp",
"https://example.com/notes", "application");
metadata.setVersion("1.4.1");
The identity card of an application: its name, version, author and similar descriptive strings.
Definition metadata.hpp:52
Note
The getters return a mutable reference to the stored string, so they cannot be called on a const Metadata, and writing through the reference changes the record like the setter does.

Definition at line 51 of file metadata.hpp.

Constructor & Destructor Documentation

◆ Metadata()

guillaume::Metadata::Metadata ( const std::string & name,
const std::string & version,
const std::string & identifier,
const std::string & creator,
const std::string & copyright,
const std::string & url,
const std::string & type )

Create a record with every string given.

Parameters
nameThe name shown to the user.
versionThe version string, such as "1.4.0".
identifierA unique identifier, such as the reverse-domain name "com.example.notes".
creatorThe author or publisher.
copyrightThe copyright notice.
urlThe home page of the application.
typeThe kind of application; free-form.

Member Function Documentation

◆ getCopyright()

std::string & guillaume::Metadata::getCopyright ( void )

Get the copyright notice.

Returns
Mutable reference to the stored notice; empty when unset.

◆ getCreator()

std::string & guillaume::Metadata::getCreator ( void )

Get the author or publisher.

Returns
Mutable reference to the stored creator; empty when unset.

◆ getIdentifier()

std::string & guillaume::Metadata::getIdentifier ( void )

Get the unique identifier of the application.

Returns
Mutable reference to the stored identifier; empty when unset.

◆ getName()

std::string & guillaume::Metadata::getName ( void )

Get the name shown to the user.

Returns
Mutable reference to the stored name; empty when unset.

◆ getType()

std::string & guillaume::Metadata::getType ( void )

Get the kind of application.

Returns
Mutable reference to the stored kind; empty when unset.

◆ getUrl()

std::string & guillaume::Metadata::getUrl ( void )

Get the home page of the application.

Returns
Mutable reference to the stored address; empty when unset.

◆ getVersion()

std::string & guillaume::Metadata::getVersion ( void )

Get the version string.

Returns
Mutable reference to the stored version; empty when unset.

◆ setCopyright()

void guillaume::Metadata::setCopyright ( const std::string & copyright)

Replace the copyright notice.

Parameters
copyrightThe new notice, such as "Copyright (c) 2026 Example Corp".

◆ setCreator()

void guillaume::Metadata::setCreator ( const std::string & creator)

Replace the author or publisher.

Parameters
creatorThe new author or publisher name.

◆ setIdentifier()

void guillaume::Metadata::setIdentifier ( const std::string & identifier)

Replace the unique identifier of the application.

Parameters
identifierThe new identifier, such as the reverse-domain name "com.example.notes".

◆ setName()

void guillaume::Metadata::setName ( const std::string & name)

Replace the name shown to the user.

Parameters
nameThe new name.

◆ setType()

void guillaume::Metadata::setType ( const std::string & type)

Replace the kind of application.

Parameters
typeThe new kind; free-form, such as "application" or "game".

◆ setUrl()

void guillaume::Metadata::setUrl ( const std::string & url)

Replace the home page of the application.

Parameters
urlThe new address. It is stored as given, not checked.

◆ setVersion()

void guillaume::Metadata::setVersion ( const std::string & version)

Replace the version string.

Parameters
versionThe new version, such as "1.4.0". No format is imposed.

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