XDGKit v0.1.0-1
XDG Utilities for C++
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
XDGKit Class Reference

Core class. More...

#include <XDGKit.h>

Public Member Functions

 XDGKit () noexcept
 Creates a new instance of XDGKit.
 
XDGIconThemeManagericonThemeManager () noexcept
 Provides access to functionality related to icon themes.
 
const std::filesystem::path & homeDir () const noexcept
 Retrieves the current user's home directory as an absolute path.
 
const std::vector< std::filesystem::path > & dataDirs () const noexcept
 Retrieves valid absolute paths found in XDG_DATA_DIRS.
 
const char * getString (const std::string &string) const noexcept
 Retrieves the pointer of the given string in the string pool.
 

Static Public Member Functions

static std::shared_ptr< XDGKitMake () noexcept
 Creates a new instance of XDGKit.
 

Detailed Description

Core class.

When destroyed, all references to themes and icons are invalidated.

Constructor & Destructor Documentation

◆ XDGKit()

XDGKit ( )
noexcept

Creates a new instance of XDGKit.

Member Function Documentation

◆ Make()

std::shared_ptr< XDGKit > Make ( )
staticnoexcept

Creates a new instance of XDGKit.

Returns
A shared pointer to the newly created XDGKit instance.

◆ iconThemeManager()

XDGIconThemeManager & iconThemeManager ( )
inlinenoexcept

Provides access to functionality related to icon themes.

Returns
A reference to the icon theme manager.

◆ homeDir()

const std::filesystem::path & homeDir ( ) const
inlinenoexcept

Retrieves the current user's home directory as an absolute path.

Returns
A constant reference to the user's home directory path.

◆ dataDirs()

const std::vector< std::filesystem::path > & dataDirs ( ) const
inlinenoexcept

Retrieves valid absolute paths found in XDG_DATA_DIRS.

Returns
A constant reference to a vector containing the data directory paths.

◆ getString()

const char * getString ( const std::string &  string) const
inlinenoexcept

Retrieves the pointer of the given string in the string pool.

Parameters
stringString to query.
Returns
the pointer of the string or nullptr if not found.