---
name: "kdb_tools_Backend"
section: "3elektra"
platform: "linux"
package: "elektra-doc"
version: "0.8.7-4"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/kdb_tools_Backend"
---

# kdb\_tools\_Backend(3elektra)

A representation of the backend (= set of plugins) that can be mounted.

## NAME

kdb::tools::Backend -

A representation of the backend (= set of plugins) that can be mounted.

## SYNOPSIS

`#include <backend.hpp>`

### Public Member Functions

**Backend** (std::string name='', std::string mountpoint='')\
 void **addPlugin** (std::string name)\
 void **checkFile** (std::string file)\
 bool **validated** ()\
 void **serialise** (**kdb::Key** &rootKey, **kdb::KeySet** &ret)\

## Detailed Description

A representation of the backend (= set of plugins) that can be mounted.

## Constructor & Destructor Documentation

### kdb::tools::Backend::Backend (std::stringname = `''`, std::stringmountpoint = `''`)

Creates a new backend with a given name and mountpoint. Parameters are needed for serialisation only, so you can keep them empty if you do not want to serialise.

## Member Function Documentation

### void kdb::tools::Backend::addPlugin (std::stringpluginName)

Add a plugin that can be loaded, meets all constraints.

**Note:**

that this does not mean that the backend validates after it is added. It only means that the situation is not getting worse.

**Exceptions:**

*PluginCheckException* or its subclasses if it was not possible to load the plugin

For validation

**See also:**

**validated()**.

### void kdb::tools::Backend::checkFile (std::stringfile)

**Precondition:**

: resolver needs to be loaded first Will check the filename.

**Exceptions:**

*FileNotValidException* if filename is not valid

### void kdb::tools::Backend::serialise (kdb::Key &rootKey, kdb::KeySet &ret)

**Precondition:**

name and mountpoint set Write plugin into keyset ret below rootKey.

### bool kdb::tools::Backend::validated ()

**Returns:**

true if backend is validated

false if more plugins are needed to be valided

## Author

Generated automatically by Doxygen for Elektra from the source code.
