blob: c00ad8389545c5f813102e8893173ccd3b01bd8c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/vespalib/stllike/string.h>
#include "table.h"
namespace search::fef {
/**
* This is an interface for a factory used to create tables.
**/
class ITableFactory
{
public:
/**
* Convenience typedef for a shared pointer to this class.
**/
using SP = std::shared_ptr<ITableFactory>;
/**
* Creates a table with the given name.
* Table::SP(NULL) is returned if the table cannot be created.
**/
virtual Table::SP createTable(const vespalib::string & name) const = 0;
/**
* Virtual destructor to allow safe subclassing.
**/
virtual ~ITableFactory() = default;
};
}
|