16#ifndef ROOT7_TDirectoryEntry
17#define ROOT7_TDirectoryEntry
26namespace Experimental {
32 using clock_t = std::chrono::system_clock;
38 std::shared_ptr<void>
fObj;
73 explicit operator bool()
const {
return !!
fObj; }
82 return std::shared_ptr<U>(
fObj,
static_cast<U *
>(ptr));
83 return std::shared_ptr<U>();
90 swap(fDate, other.fDate);
92 swap(fObj, other.fObj);
const time_point_t & GetDate() const
Get the last change date of the entry.
std::shared_ptr< U > CastPointer() const
const std::shared_ptr< void > & GetPointer() const
void SetChanged()
Inform the entry that it has been modified, and needs to update its last-changed time stamp.
TDirectoryEntry(const std::shared_ptr< T > &ptr)
std::shared_ptr< void > fObj
time_point_t fDate
Time of last change.
std::shared_ptr< void > & GetPointer()
Retrieve the shared_ptr of the referenced object.
TDirectoryEntry(std::nullptr_t)
std::chrono::time_point< clock_t > time_point_t
TClass * GetType() const
Get the object's type.
void swap(TDirectoryEntry &other) noexcept
const std::type_info & GetTypeInfo() const
Type of the object represented by this entry.
std::chrono::system_clock clock_t
The ROOT global object gROOT contains a list of all defined classes.
void * DynamicCast(const TClass *base, void *obj, Bool_t up=kTRUE)
Cast obj of this class type up to baseclass cl if up is true.
const std::type_info * GetTypeInfo() const
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
void swap(TDirectoryEntry &e1, TDirectoryEntry &e2) noexcept
Namespace for new ROOT classes and functions.
void swap(nlohmann::json &j1, nlohmann::json &j2) noexcept(is_nothrow_move_constructible< nlohmann::json >::value and is_nothrow_move_assignable< nlohmann::json >::value)
exchanges the values of two JSON objects