IgANet
IgANets - Isogeometric Analysis Networks
Loading...
Searching...
No Matches
iganet::webapp::Session< T > Struct Template Reference

Session. More...

Public Member Functions

 Session (std::string hash)
 Default constructor.
 
void access ()
 Updates the access time stamp.
 
bool checkHash (std::string hash) const
 Returns true if the provided hash coincides with the session's hash.
 
std::chrono::system_clock::time_point getAccessTime () const
 Returns the access time.
 
std::chrono::system_clock::time_point getCreationTime () const
 Returns the creation time.
 
std::shared_ptr< Model< iganet::real_t > > getModel (int64_t id)
 Returns the requested model or throws an exception.
 
autogetModels ()
 Returns a non-constant reference to the list of models.
 
const autogetModels () const
 Returns a constant reference to the list of models.
 
const std::string & getUUID () const
 Returns the UUID.
 
bool hasHash () const
 Returns true if the session has a non-zero hash.
 
std::shared_ptr< Model< iganet::real_t > > removeModel (int64_t id)
 Returns the model and removes it from the list of models.
 

Public Attributes

std::map< int64_t, std::shared_ptr< Model< iganet::real_t > > > models
 List of models.
 

Private Attributes

std::chrono::system_clock::time_point access_time_
 Access time stamp.
 
std::chrono::system_clock::time_point creation_time_
 Creation time stamp.
 
const std::string hash_
 Hashed password.
 
const std::string uuid_
 Session UUID.
 

Detailed Description

template<typename T>
struct iganet::webapp::Session< T >

Session.

Constructor & Destructor Documentation

◆ Session()

template<typename T >
iganet::webapp::Session< T >::Session ( std::string  hash)
inline

Default constructor.

Member Function Documentation

◆ access()

template<typename T >
void iganet::webapp::Session< T >::access ( )
inline

Updates the access time stamp.

◆ checkHash()

template<typename T >
bool iganet::webapp::Session< T >::checkHash ( std::string  hash) const
inline

Returns true if the provided hash coincides with the session's hash.

◆ getAccessTime()

template<typename T >
std::chrono::system_clock::time_point iganet::webapp::Session< T >::getAccessTime ( ) const
inline

Returns the access time.

◆ getCreationTime()

template<typename T >
std::chrono::system_clock::time_point iganet::webapp::Session< T >::getCreationTime ( ) const
inline

Returns the creation time.

◆ getModel()

template<typename T >
std::shared_ptr< Model< iganet::real_t > > iganet::webapp::Session< T >::getModel ( int64_t  id)
inline

Returns the requested model or throws an exception.

◆ getModels() [1/2]

template<typename T >
auto & iganet::webapp::Session< T >::getModels ( )
inline

Returns a non-constant reference to the list of models.

◆ getModels() [2/2]

template<typename T >
const auto & iganet::webapp::Session< T >::getModels ( ) const
inline

Returns a constant reference to the list of models.

◆ getUUID()

template<typename T >
const std::string & iganet::webapp::Session< T >::getUUID ( ) const
inline

Returns the UUID.

◆ hasHash()

template<typename T >
bool iganet::webapp::Session< T >::hasHash ( ) const
inline

Returns true if the session has a non-zero hash.

◆ removeModel()

template<typename T >
std::shared_ptr< Model< iganet::real_t > > iganet::webapp::Session< T >::removeModel ( int64_t  id)
inline

Returns the model and removes it from the list of models.

Member Data Documentation

◆ access_time_

template<typename T >
std::chrono::system_clock::time_point iganet::webapp::Session< T >::access_time_
private

Access time stamp.

◆ creation_time_

template<typename T >
std::chrono::system_clock::time_point iganet::webapp::Session< T >::creation_time_
private

Creation time stamp.

◆ hash_

template<typename T >
const std::string iganet::webapp::Session< T >::hash_
private

Hashed password.

◆ models

template<typename T >
std::map<int64_t, std::shared_ptr<Model<iganet::real_t> > > iganet::webapp::Session< T >::models

List of models.

◆ uuid_

template<typename T >
const std::string iganet::webapp::Session< T >::uuid_
private

Session UUID.


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