NeoFOAM
WIP Prototype of a modern OpenFOAM core
|
#include <oldTimeCollection.hpp>
Public Member Functions | |
OldTimeCollection (Database &db, std::string name, std::string fieldCollectionName) | |
bool | contains (const std::string &id) const |
bool | insert (const OldTimeDocument &cc) |
std::string | findNextTime (std::string id) const |
std::string | findPreviousTime (std::string id) const |
OldTimeDocument & | oldTimeDoc (const std::string &id) |
const OldTimeDocument & | oldTimeDoc (const std::string &id) const |
template<typename FieldType > | |
FieldType & | getOrInsert (std::string idOfNextField) |
template<typename FieldType > | |
const FieldType & | get (std::string idOfNextField) const |
![]() | |
CollectionMixin (NeoFOAM::Database &db, std::string name) | |
Constructs a CollectionMixin with the given database and collection name. | |
CollectionMixin (const CollectionMixin &)=delete | |
CollectionMixin (CollectionMixin &&)=default | |
CollectionMixin & | operator= (const CollectionMixin &)=delete |
CollectionMixin & | operator= (CollectionMixin &&)=delete |
Document & | doc (const std::string &id) |
Retrieves a document by its ID. | |
const Document & | doc (const std::string &id) const |
Retrieves a document by its ID (const version). | |
std::vector< std::string > | find (const std::function< bool(const Document &)> &predicate) const |
Finds documents that match a given predicate. | |
std::size_t | size () const |
Gets the number of documents in the collection. | |
const NeoFOAM::Database & | db () const |
Gets a const reference to the database. | |
NeoFOAM::Database & | db () |
Gets a reference to the database. | |
const std::string & | name () const |
Gets the name of the collection. | |
std::string | type () const |
Gets the type name of the documents in the collection. | |
std::vector< std::string > | sortedKeys () const |
Gets the sorted keys of the documents in the collection. | |
Static Public Member Functions | |
static OldTimeCollection & | instance (Database &db, std::string name, std::string fieldCollectionName) |
static const OldTimeCollection & | instance (const Database &db, std::string name) |
static OldTimeCollection & | instance (FieldCollection &fieldCollection) |
static const OldTimeCollection & | instance (const FieldCollection &fieldCollection) |
Additional Inherited Members | |
![]() | |
std::unordered_map< std::string, OldTimeDocument > | docs_ |
The map of document IDs to documents. | |
NeoFOAM::Database & | db_ |
The reference to the database. | |
std::string | name_ |
The name of the collection. | |
Definition at line 56 of file oldTimeCollection.hpp.
NeoFOAM::finiteVolume::cellCentred::OldTimeCollection::OldTimeCollection | ( | Database & | db, |
std::string | name, | ||
std::string | fieldCollectionName | ||
) |
bool NeoFOAM::finiteVolume::cellCentred::OldTimeCollection::contains | ( | const std::string & | id | ) | const |
std::string NeoFOAM::finiteVolume::cellCentred::OldTimeCollection::findNextTime | ( | std::string | id | ) | const |
std::string NeoFOAM::finiteVolume::cellCentred::OldTimeCollection::findPreviousTime | ( | std::string | id | ) | const |
|
inline |
Definition at line 103 of file oldTimeCollection.hpp.
|
inline |
Definition at line 75 of file oldTimeCollection.hpp.
bool NeoFOAM::finiteVolume::cellCentred::OldTimeCollection::insert | ( | const OldTimeDocument & | cc | ) |
|
static |
|
static |
|
static |
|
static |
OldTimeDocument & NeoFOAM::finiteVolume::cellCentred::OldTimeCollection::oldTimeDoc | ( | const std::string & | id | ) |
const OldTimeDocument & NeoFOAM::finiteVolume::cellCentred::OldTimeCollection::oldTimeDoc | ( | const std::string & | id | ) | const |