Ardour  9.0-pre0-582-g084a23a80d
ARDOUR::ElementImportHandler Class Referenceabstract

Virtual interface class for element import handlers. More...

#include <element_import_handler.h>

Inheritance diagram for ARDOUR::ElementImportHandler:
[legend]

Public Types

typedef std::shared_ptr< ElementImporterElementPtr
 
typedef std::list< ElementPtrElementList
 

Public Member Functions

 ElementImportHandler (XMLTree const &source, ARDOUR::Session &session)
 
virtual ~ElementImportHandler ()
 
virtual std::string get_info () const =0
 
bool check_name (const std::string &name) const
 
void add_name (std::string name)
 Adds name to the list of used names. More...
 
void remove_name (const std::string &name)
 Removes name from the list of used names. More...
 

Static Public Member Functions

static bool dirty ()
 Checks wheter or not all elements can be imported cleanly. More...
 
static void set_dirty ()
 Sets handler dirty. More...
 
static bool errors ()
 Checks wheter or not all elements were imported cleanly. More...
 
static void set_errors ()
 Sets handler dirty. More...
 

Public Attributes

ElementList elements
 Elements this handler handles. More...
 

Protected Attributes

XMLTree const & source
 Source session XML tree. More...
 
ARDOUR::Sessionsession
 Destination session. More...
 

Static Protected Attributes

static bool _dirty
 Session XML readability. More...
 
static bool _errors
 Errors post initialization. More...
 

Private Attributes

std::set< std::string > names
 Set of names for duplicate checking. More...
 

Detailed Description

Virtual interface class for element import handlers.

Definition at line 38 of file element_import_handler.h.

Member Typedef Documentation

◆ ElementList

Definition at line 42 of file element_import_handler.h.

◆ ElementPtr

Definition at line 41 of file element_import_handler.h.

Constructor & Destructor Documentation

◆ ElementImportHandler()

ARDOUR::ElementImportHandler::ElementImportHandler ( XMLTree const &  source,
ARDOUR::Session session 
)
inline

ElementImportHandler constructor The constructor should find everything from the XML Tree it can handle and create respective Elements stored in elements.

Parameters
sourceXML tree to be parsed
sessionThe Session
See also
elements

Definition at line 52 of file element_import_handler.h.

◆ ~ElementImportHandler()

virtual ARDOUR::ElementImportHandler::~ElementImportHandler ( )
virtual

Member Function Documentation

◆ add_name()

void ARDOUR::ElementImportHandler::add_name ( std::string  name)

Adds name to the list of used names.

◆ check_name()

bool ARDOUR::ElementImportHandler::check_name ( const std::string &  name) const

Checks whether or not an element with some name is queued or not

Parameters
namename to check
Returns
true if name is not used

◆ dirty()

static bool ARDOUR::ElementImportHandler::dirty ( )
inlinestatic

Checks wheter or not all elements can be imported cleanly.

Definition at line 80 of file element_import_handler.h.

◆ errors()

static bool ARDOUR::ElementImportHandler::errors ( )
inlinestatic

Checks wheter or not all elements were imported cleanly.

Definition at line 86 of file element_import_handler.h.

◆ get_info()

virtual std::string ARDOUR::ElementImportHandler::get_info ( ) const
pure virtual

◆ remove_name()

void ARDOUR::ElementImportHandler::remove_name ( const std::string &  name)

Removes name from the list of used names.

◆ set_dirty()

static void ARDOUR::ElementImportHandler::set_dirty ( )
inlinestatic

Sets handler dirty.

Definition at line 83 of file element_import_handler.h.

◆ set_errors()

static void ARDOUR::ElementImportHandler::set_errors ( )
inlinestatic

Sets handler dirty.

Definition at line 89 of file element_import_handler.h.

Member Data Documentation

◆ _dirty

bool ARDOUR::ElementImportHandler::_dirty
staticprotected

Session XML readability.

Definition at line 99 of file element_import_handler.h.

◆ _errors

bool ARDOUR::ElementImportHandler::_errors
staticprotected

Errors post initialization.

Definition at line 102 of file element_import_handler.h.

◆ elements

ElementList ARDOUR::ElementImportHandler::elements

Elements this handler handles.

Definition at line 63 of file element_import_handler.h.

◆ names

std::set<std::string> ARDOUR::ElementImportHandler::names
private

Set of names for duplicate checking.

Definition at line 106 of file element_import_handler.h.

◆ session

ARDOUR::Session& ARDOUR::ElementImportHandler::session
protected

Destination session.

Definition at line 96 of file element_import_handler.h.

◆ source

XMLTree const& ARDOUR::ElementImportHandler::source
protected

Source session XML tree.

Definition at line 93 of file element_import_handler.h.


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