NeoN
A framework for CFD software
Loading...
Searching...
No Matches
NeoN::finiteVolume::cellCentred::OldTimeCollection Class Reference

#include <oldTimeCollection.hpp>

Inheritance diagram for NeoN::finiteVolume::cellCentred::OldTimeCollection:
NeoN::CollectionMixin< OldTimeDocument >

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 VectorType>
VectorType & getOrInsert (std::string idOfNextVector)
template<typename VectorType>
const VectorType & get (std::string idOfNextVector) const
Public Member Functions inherited from NeoN::CollectionMixin< OldTimeDocument >
 CollectionMixin (NeoN::Database &db, std::string name)
 Constructs a CollectionMixin with the given database and collection name.
CollectionMixin & operator= (const CollectionMixin &)=delete
Document & doc (const std::string &id)
 Retrieves a document by its ID.
std::vector< std::string > find (const std::function< bool(const Document &)> &predicate) const
 Finds documents that match a given predicate.
sizeType size () const
 Gets the number of documents in the collection.
const NeoN::Database & db () const
 Gets a const 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 (VectorCollection &fieldCollection)
static const OldTimeCollection & instance (const VectorCollection &fieldCollection)

Additional Inherited Members

Protected Attributes inherited from NeoN::CollectionMixin< OldTimeDocument >
std::unordered_map< std::string, OldTimeDocument > docs_
 The map of document IDs to documents.
NeoN::Database & db_
 The reference to the database.
std::string name_
 The name of the collection.

Detailed Description

Definition at line 65 of file oldTimeCollection.hpp.

Constructor & Destructor Documentation

◆ OldTimeCollection()

NeoN::finiteVolume::cellCentred::OldTimeCollection::OldTimeCollection ( Database & db,
std::string name,
std::string fieldCollectionName )

Member Function Documentation

◆ contains()

bool NeoN::finiteVolume::cellCentred::OldTimeCollection::contains ( const std::string & id) const

◆ findNextTime()

std::string NeoN::finiteVolume::cellCentred::OldTimeCollection::findNextTime ( std::string id) const

◆ findPreviousTime()

std::string NeoN::finiteVolume::cellCentred::OldTimeCollection::findPreviousTime ( std::string id) const

◆ get()

template<typename VectorType>
const VectorType & NeoN::finiteVolume::cellCentred::OldTimeCollection::get ( std::string idOfNextVector) const
inline

Definition at line 112 of file oldTimeCollection.hpp.

◆ getOrInsert()

template<typename VectorType>
VectorType & NeoN::finiteVolume::cellCentred::OldTimeCollection::getOrInsert ( std::string idOfNextVector)
inline

Definition at line 84 of file oldTimeCollection.hpp.

◆ insert()

bool NeoN::finiteVolume::cellCentred::OldTimeCollection::insert ( const OldTimeDocument & cc)

◆ instance() [1/4]

const OldTimeCollection & NeoN::finiteVolume::cellCentred::OldTimeCollection::instance ( const Database & db,
std::string name )
static

◆ instance() [2/4]

const OldTimeCollection & NeoN::finiteVolume::cellCentred::OldTimeCollection::instance ( const VectorCollection & fieldCollection)
static

◆ instance() [3/4]

OldTimeCollection & NeoN::finiteVolume::cellCentred::OldTimeCollection::instance ( Database & db,
std::string name,
std::string fieldCollectionName )
static

◆ instance() [4/4]

OldTimeCollection & NeoN::finiteVolume::cellCentred::OldTimeCollection::instance ( VectorCollection & fieldCollection)
static

◆ oldTimeDoc() [1/2]

OldTimeDocument & NeoN::finiteVolume::cellCentred::OldTimeCollection::oldTimeDoc ( const std::string & id)

◆ oldTimeDoc() [2/2]

const OldTimeDocument & NeoN::finiteVolume::cellCentred::OldTimeCollection::oldTimeDoc ( const std::string & id) const

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