Feel++ 0.111.0-preview.14
Finite Element Embedded Library in C++
Feel::JournalWatcher Class Reference
+ Inheritance diagram for Feel::JournalWatcher:
+ Collaboration diagram for Feel::JournalWatcher:

Public Types

using function_update_information_type = std::function< void(nl::json &)>
 
using notify_type = nl::json
 
 JournalWatcher (std::string const &category="", std::string const &name="", bool connect=JournalManager::journalAutoMode())
 Constructors. More...
 
 JournalWatcher (std::string const &category, bool useDefaultName, bool connect=JournalManager::journalAutoMode())
 
 JournalWatcher (function_update_information_type const &func, std::string const &category="", std::string const &name="", bool useDefaultNameIfEmpty=true, bool connect=JournalManager::journalAutoMode())
 
 JournalWatcher (JournalWatcher const &jw)
 Copy constructor.
 
virtual ~JournalWatcher ()
 Default destructor. The (inherited) object is always disconnected from the journal during the destruction.
 
bool journalIsConnected () const
 GettersCheck if the object is connected to the journal. More...
 
std::string const & journalWatcherInstanceName () const
 Return the full instance name for this watched object. The name is composed with the base name and a suffix index corresponding to the nth call. More...
 
nl::json::json_pointer journalSection () const
 Return the section into the journal as json_pointer.
 
nl::json const & informationObject () const
 Return the information into property tree.
 
void journalConnect ()
 Setters. More...
 
void journalDisconnect ()
 Disconnect the derived object from the simulation info manager. The disconnection is safe.
 
virtual void updateInformationObject (nl::json &p) const
 update information object into p More...
 
void setInformationObject (nl::json const &informationObject)
 set information object
 
void putInformationObject (nl::json const &informationObject)
 put information object
 
void addInformationObject (nl::json const &informationObject)
 add information object
 
void journalFinalize ()
 finalize journal publication
 
void applyUpdateInformationObject ()
 Protected Methods.
 

Constructor & Destructor Documentation

◆ JournalWatcher()

Feel::JournalWatcher::JournalWatcher ( std::string const &  category = "",
std::string const &  name = "",
bool  connect = JournalManager::journalAutoMode() 
)
explicit

Constructors.

Default constructor.

Parameters
forceForce the connection to the journal.

When this constructor is called by a child class, the new child observer is automatically connected (in "auto" mode) to the journal system. A slot is created and is connected to a JournalManager.

See also
JournalManager

Referenced by Feel::TimerTable::TimerTable().

Member Function Documentation

◆ journalConnect()

void Feel::JournalWatcher::journalConnect ( )

Setters.

Misc Connect the derived object to the simulation info manager

References Feel::JournalManager::journalEnabled(), journalIsConnected(), and journalWatcherInstanceName().

Referenced by JournalWatcher().

◆ journalIsConnected()

bool Feel::JournalWatcher::journalIsConnected ( ) const

GettersCheck if the object is connected to the journal.

Returns
true

Referenced by journalConnect(), journalDisconnect(), journalFinalize(), and JournalWatcher().

◆ journalWatcherInstanceName()

std::string const & Feel::JournalWatcher::journalWatcherInstanceName ( ) const

Return the full instance name for this watched object. The name is composed with the base name and a suffix index corresponding to the nth call.

Parameters
isautoIf true, the instance name is suffixed by the call number

Referenced by journalConnect(), and journalDisconnect().

◆ updateInformationObject()

virtual void Feel::JournalWatcher::updateInformationObject ( nl::json &  p) const
virtual

update information object into p

Reimplemented in Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >.