11#ifndef INKSCAPE_EXTENSION_DEPENDENCY_H__
12#define INKSCAPE_EXTENSION_DEPENDENCY_H__
14#include <glibmm/ustring.h>
50 static constexpr const char *
UNCHECKED =
"---unchecked---";
A class to represent a dependency for an extension.
bool check()
Check if the dependency passes.
Inkscape::XML::Node * _repr
The XML representation of the dependency.
Dependency(Inkscape::XML::Node *in_repr, const Extension *extension, type_t type=TYPE_FILE)
Create a dependency using an XML definition.
virtual ~Dependency()
This dependency is not longer needed.
const gchar * _description
The description of the dependency for the users.
const Extension * _extension
Reference to the extension requesting this dependency.
const gchar * _string
The string that is in the XML tags pulled out.
static constexpr const char * UNCHECKED
static gchar const * _type_str[TYPE_CNT]
Strings to represent the different enum values in type_t in the XML.
const gchar * get_name()
Accessor to the name attribute.
std::string get_path()
Path of this dependency.
std::string _absolute_location
The absolute path to the dependency file determined while checking this dependency.
location_t _location
The location to look for this particular dependency.
type_t _type
Storing the type of this particular dependency.
Glib::ustring info_string()
Print out a dependency to a string.
static gchar const * _location_str[LOCATION_CNT]
Strings to represent the different enum values in location_t in the XML.
location_t
All of the possible locations to look for the dependency.
@ LOCATION_CNT
Number of locations to look.
@ LOCATION_EXTENSIONS
Look in the extensions directory (note: this can be in both, user and system locations!...
@ LOCATION_ABSOLUTE
This dependency is already defined in absolute terms.
@ LOCATION_INX
Look relative to the inx file's location.
@ LOCATION_PATH
Look in the PATH for this dependency - historically this is the default (it's a bit odd for interpret...
type_t
All the possible types of dependencies.
@ TYPE_CNT
Number of types.
@ TYPE_EXTENSION
Make sure a specific extension is loaded and functional.
@ TYPE_FILE
Look to make sure a file exists.
@ TYPE_EXECUTABLE
Look for an executable.
The object that is the basis for the Extension system.
Interface for refcounted XML nodes.