Sane C++ Libraries
C++ Platform Abstraction Libraries
SC::PluginDefinition Struct Reference

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

#include <Plugin.h>

Public Member Functions

PluginFilegetMainPluginFile ()
 Get main plugin file, holding plugin definition. More...
 
const PluginFilegetMainPluginFile () const
 Get main plugin file, holding plugin definition. More...
 
Result getDynamicLibraryAbsolutePath (String &fullDynamicPath) const
 Gets absolute path of where compiled dynamic library will exist after plugin is compiled. More...
 
Result getDynamicLibraryPDBAbsolutePath (String &fullDynamicPath) const
 Gets absolute path of where compiled Program Database File will exist after plugin is compiled. More...
 

Static Public Member Functions

static bool find (const StringView text, StringView &extracted)
 Extracts the plugin definition (SC_BEGIN_PLUGIN / SC_END_PLUGIN) comment from a .cpp file. More...
 
static bool parse (StringView text, PluginDefinition &pluginDefinition)
 Parses an extracted plugin definition text. More...
 

Public Attributes

PluginIdentity identity
 Uniquely identifier a plugin. More...
 
SmallString< 255 > description
 Long description of plugin. More...
 
SmallString< 10 > category
 Category where plugin belongs to. More...
 
SmallString< 255 > directory
 Path to the directory holding the plugin. More...
 
SmallVector< PluginIdentifier, 8 > dependencies
 Dependencies necessary to load this plugin. More...
 
SmallVector< SmallString< 10 >, 8 > build
 Build options. More...
 
SmallVector< PluginFile, 10 > files
 Source files that compose this plugin. More...
 

Friends

struct PluginScanner
 

Detailed Description

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

Member Function Documentation

◆ find()

static bool SC::PluginDefinition::find ( const StringView  text,
StringView extracted 
)
static

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()

Result SC::PluginDefinition::getDynamicLibraryAbsolutePath ( String 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()

Result SC::PluginDefinition::getDynamicLibraryPDBAbsolutePath ( String 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()

static bool SC::PluginDefinition::parse ( StringView  text,
PluginDefinition pluginDefinition 
)
static

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
Returns
true if the plugin definition can be parsed successfully

Member Data Documentation

◆ build

SmallVector<SmallString<10>, 8> SC::PluginDefinition::build

Build options.

◆ category

SmallString<10> SC::PluginDefinition::category

Category where plugin belongs to.

◆ dependencies

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

Dependencies necessary to load this plugin.

◆ description

SmallString<255> SC::PluginDefinition::description

Long description of plugin.

◆ directory

SmallString<255> SC::PluginDefinition::directory

Path to the directory holding the plugin.

◆ files

SmallVector<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: