Nebula
Loading...
Searching...
No Matches
dbfactory.h
Go to the documentation of this file.
1#pragma once
2#ifndef DB_DbFactory_H
3#define DB_DbFactory_H
4//------------------------------------------------------------------------------
14#include "core/refcounted.h"
15#include "core/singleton.h"
16
17//------------------------------------------------------------------------------
18namespace Db
19{
20class Database;
21class Command;
22class Table;
23class Dataset;
24class FilterSet;
25class Relation;
26class ValueTable;
27class Reader;
28class Writer;
29
31{
34public:
36 DbFactory();
38 virtual ~DbFactory();
40 virtual Ptr<Table> CreateTable() const;
42 virtual Ptr<Database> CreateDatabase() const;
44 virtual Ptr<Command> CreateCommand() const;
46 virtual Ptr<Relation> CreateRelation() const;
48 virtual Ptr<Reader> CreateReader() const;
50 virtual Ptr<Writer> CreateWriter() const;
51
52protected:
53 friend class Database;
54 friend class Table;
55 friend class Dataset;
56 friend class Writer;
57 friend class Reader;
58
60 virtual Ptr<Dataset> CreateDataset() const;
62 virtual Ptr<ValueTable> CreateValueTable() const;
64 virtual Ptr<FilterSet> CreateFilterSet() const;
65};
66
67} // namespace Db
68//------------------------------------------------------------------------------
69#endif
The common base class of Nebula.
Definition refcounted.h:38
Wraps an entire database into a C++ object.
Definition database.h:30
A dataset is an efficient in-memory-cache for rlational database data.
Definition dataset.h:43
DbFactory object for the Db subsystem.
Definition dbfactory.h:31
__DeclareSingleton(DbFactory)
DbFactory()
constructor
Definition dbfactory.cc:25
__DeclareClass(DbFactory)
virtual Ptr< Dataset > CreateDataset() const
create a dataset object
Definition dbfactory.cc:72
virtual Ptr< Table > CreateTable() const
create a table object
Definition dbfactory.cc:62
virtual Ptr< Command > CreateCommand() const
create a command object
Definition dbfactory.cc:52
virtual ~DbFactory()
destructor
Definition dbfactory.cc:33
virtual Ptr< FilterSet > CreateFilterSet() const
create a filter object
Definition dbfactory.cc:82
virtual Ptr< Reader > CreateReader() const
create a database reader
Definition dbfactory.cc:110
virtual Ptr< Database > CreateDatabase() const
create a database object
Definition dbfactory.cc:42
virtual Ptr< Writer > CreateWriter() const
create a database writer
Definition dbfactory.cc:119
virtual Ptr< Relation > CreateRelation() const
create a relation object
Definition dbfactory.cc:92
virtual Ptr< ValueTable > CreateValueTable() const
create a value table
Definition dbfactory.cc:101
Wrapper to bulk-read the contents of a database table.
Definition reader.h:25
Describes a table in a database, or more abstract, a set of typed columns grouped under a common name...
Definition table.h:34
A wrapper class to bulk-write data to the database in a simple way.
Definition writer.h:23
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
Definition column.cc:10