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

Sessions structure. More...

Public Member Functions

std::shared_ptr< Session< T > > createSession (std::string hash)
 Returns a new session.
 
std::shared_ptr< Session< T > > getSession (std::string uuid)
 Returns the requested session or throws an exception.
 
std::shared_ptr< Session< T > > removeSession (std::string uuid)
 Returns the session and removes it from the list of sessions.
 

Static Public Member Functions

static void addModelPath (const std::string &path)
 Add path to model path.
 
static void addModelPath (const std::vector< std::string > &path)
 Add list of paths to model path.
 
static autogetModels ()
 Returns a non-constant reference to the list of models.
 
static autogetSessions ()
 Returns a non-constant reference to the list of sessions.
 

Static Private Attributes

static ModelManager models_
 List of models.
 
static std::map< std::string, std::shared_ptr< Session< T > > > sessions_
 List of sessions shared between all sockets.
 

Detailed Description

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

Sessions structure.

Member Function Documentation

◆ addModelPath() [1/2]

template<typename T >
static void iganet::webapp::Sessions< T >::addModelPath ( const std::string &  path)
inlinestatic

Add path to model path.

◆ addModelPath() [2/2]

template<typename T >
static void iganet::webapp::Sessions< T >::addModelPath ( const std::vector< std::string > &  path)
inlinestatic

Add list of paths to model path.

◆ createSession()

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

Returns a new session.

◆ getModels()

template<typename T >
static auto & iganet::webapp::Sessions< T >::getModels ( )
inlinestatic

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

◆ getSession()

template<typename T >
std::shared_ptr< Session< T > > iganet::webapp::Sessions< T >::getSession ( std::string  uuid)
inline

Returns the requested session or throws an exception.

◆ getSessions()

template<typename T >
static auto & iganet::webapp::Sessions< T >::getSessions ( )
inlinestatic

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

◆ removeSession()

template<typename T >
std::shared_ptr< Session< T > > iganet::webapp::Sessions< T >::removeSession ( std::string  uuid)
inline

Returns the session and removes it from the list of sessions.

Member Data Documentation

◆ models_

template<typename T >
ModelManager iganet::webapp::Sessions< T >::models_
inlinestaticprivate
Initial value:
=
ModelManager(iganet::webapp::tokenize("webapps/models,models", ","))
std::vector< std::string > tokenize(std::string str, std::string separator="/")
Tokenize the input string.
Definition server.cxx:69

List of models.

◆ sessions_

template<typename T >
std::map<std::string, std::shared_ptr<Session<T> > > iganet::webapp::Sessions< T >::sessions_
inlinestaticprivate

List of sessions shared between all sockets.


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