Utopia 2
Framework for studying models of complex & adaptive systems.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Utopia::OutOfSpace Class Reference

An exception class for invalid positions in Utopia::Space. More...

#include <exceptions.hh>

Inheritance diagram for Utopia::OutOfSpace:
Inheritance graph
[legend]
Collaboration diagram for Utopia::OutOfSpace:
Collaboration graph
[legend]

Public Member Functions

template<class VecT , class Space >
 OutOfSpace (const VecT &invalid_pos, const std::shared_ptr< Space > &space, const std::string prefix={})
 Construct the exception with the invalid position and the space given.
 
- Public Member Functions inherited from Utopia::Exception
 Exception (const std::string &what_arg, const int exit_code_arg=1)
 Construct an Utopia-specific exception.
 
 Exception (const char *what_arg, const int exit_code_arg=1)
 Construct an Utopia-specific exception.
 

Additional Inherited Members

- Public Attributes inherited from Utopia::Exception
const int exit_code
 The exit code to use when exiting due to this exception.
 

Detailed Description

An exception class for invalid positions in Utopia::Space.

Constructor & Destructor Documentation

◆ OutOfSpace()

template<class VecT , class Space >
Utopia::OutOfSpace::OutOfSpace ( const VecT invalid_pos,
const std::shared_ptr< Space > &  space,
const std::string  prefix = {} 
)
inline

Construct the exception with the invalid position and the space given.

119 {})
120 :
121 Exception([&](){
122 std::stringstream emsg;
123 if (prefix.length() > 0) {
124 emsg << prefix << " ";
125 }
126 emsg << "The given position " << std::endl << invalid_pos
127 << "is not within the non-periodic space with extent"
128 << std::endl << space->extent;
129 return emsg.str();
130 }())
131 {}
Exception(const std::string &what_arg, const int exit_code_arg=1)
Construct an Utopia-specific exception.
Definition exceptions.hh:26
Container select_entities(const Manager &mngr, const DataIO::Config &sel_cfg)
Select entities according to parameters specified in a configuration.
Definition select.hh:213

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