Sane C++ Libraries
C++ Platform Abstraction Libraries
Loading...
Searching...
No Matches
SC::PluginDefinition Struct Reference

Plugin description, category, dependencies, files and directory location. More...

#include <Plugin.h>

Public Member Functions

PluginFile & getMainPluginFile ()
 Get main plugin file, holding plugin definition.
 
const PluginFile & getMainPluginFile () const
 Get main plugin file, holding plugin definition.
 
ResultPlugin getDynamicLibraryAbsolutePath (StringPath &fullDynamicPath) const
 Gets absolute path of where compiled dynamic library will exist after plugin is compiled.
 
ResultPlugin getDynamicLibraryPDBAbsolutePath (StringPath &fullDynamicPath) const
 Gets absolute path of where compiled Program Database File will exist after plugin is compiled.
 

Static Public Member Functions

static bool find (StringSpan text, StringSpan &extracted)
 Extracts the plugin definition (SC_BEGIN_PLUGIN / SC_END_PLUGIN) comment from a .cpp file.
 
static ResultPlugin parse (StringSpan text, PluginDefinition &pluginDefinition, bool &parsed)
 Parses an extracted plugin definition text.
 
static bool parse (StringSpan text, PluginDefinition &pluginDefinition)
 Compatibility helper that returns false for either normal absence or a parsing storage failure.
 

Public Attributes

PluginIdentity identity
 Uniquely identifier a plugin.
 
FixedString< 256 > description
 Long description of plugin.
 
FixedString< 64 > category
 Category where plugin belongs to.
 
StringPath directory
 Path to the directory holding the plugin.
 
FixedVector< PluginIdentifier, 8 > dependencies
 Dependencies necessary to load this plugin.
 
FixedVector< PluginBuildOption, 8 > build
 Build options.
 
FixedVector< PluginFile, 10 > files
 Source files that compose this plugin.
 

Friends

struct PluginScanner
 

Detailed Description

Plugin description, category, dependencies, files and directory location.

Member Function Documentation

◆ find()

static bool SC::PluginDefinition::find ( StringSpan text,
StringSpan & extracted )
staticnodiscard

Extracts the plugin definition (SC_BEGIN_PLUGIN / SC_END_PLUGIN) comment from a .cpp file.

Parameters
[in]textContent of .cpp file where to look for plugin definition
[out]extractedExtracted comment block out of text
Returns
true if a comment block has been found successfully

◆ getDynamicLibraryAbsolutePath()

ResultPlugin SC::PluginDefinition::getDynamicLibraryAbsolutePath ( StringPath & fullDynamicPath) const

Gets absolute path of where compiled dynamic library will exist after plugin is compiled.

Parameters
fullDynamicPathabsolute path of where compiled dynamic library from plugin
Returns
Valid result if string can be allocated successfully

◆ getDynamicLibraryPDBAbsolutePath()

ResultPlugin SC::PluginDefinition::getDynamicLibraryPDBAbsolutePath ( StringPath & fullDynamicPath) const

Gets absolute path of where compiled Program Database File will exist after plugin is compiled.

Parameters
fullDynamicPathabsolute path of where compiled Program Database File from plugin
Returns
Valid result if string can be allocated successfully

◆ getMainPluginFile() [1/2]

PluginFile & SC::PluginDefinition::getMainPluginFile ( )
inline

Get main plugin file, holding plugin definition.

Returns
File holding main plugin definition

◆ getMainPluginFile() [2/2]

const PluginFile & SC::PluginDefinition::getMainPluginFile ( ) const
inline

Get main plugin file, holding plugin definition.

Returns
PluginFile holding main plugin definition

◆ parse() [1/2]

static bool SC::PluginDefinition::parse ( StringSpan text,
PluginDefinition & pluginDefinition )
staticnodiscard

Compatibility helper that returns false for either normal absence or a parsing storage failure.

◆ parse() [2/2]

static ResultPlugin SC::PluginDefinition::parse ( StringSpan text,
PluginDefinition & pluginDefinition,
bool & parsed )
staticnodiscard

Parses an extracted plugin definition text.

Parameters
[in]textAn extracted plugin definition text (extracted of PluginDefinition::find)
[out]pluginDefinitionA valid PluginDefinition parsed from the given text
[out]parsedtrue when text contains a complete valid definition.
Returns
A Plugin error when metadata is malformed or bounded storage cannot hold the definition.

Member Data Documentation

◆ build

FixedVector<PluginBuildOption, 8> SC::PluginDefinition::build

Build options.

◆ category

FixedString<64> SC::PluginDefinition::category

Category where plugin belongs to.

◆ dependencies

FixedVector<PluginIdentifier, 8> SC::PluginDefinition::dependencies

Dependencies necessary to load this plugin.

◆ description

FixedString<256> SC::PluginDefinition::description

Long description of plugin.

◆ directory

StringPath SC::PluginDefinition::directory

Path to the directory holding the plugin.

◆ files

FixedVector<PluginFile, 10> SC::PluginDefinition::files

Source files that compose this plugin.

◆ identity

PluginIdentity SC::PluginDefinition::identity

Uniquely identifier a plugin.


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