Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
nlohmann::detail::json_ref< BasicJsonType > Class Template Reference

#include <json.hpp>

Public Types

using value_type = BasicJsonType
 

Public Member Functions

 json_ref (value_type &&value)
 
 json_ref (const value_type &value)
 
 json_ref (std::initializer_list< json_ref > init)
 
template<class... Args, enable_if_t< std::is_constructible< value_type, Args... >::value, int > = 0>
 json_ref (Args &&...args)
 
 json_ref (json_ref &&)=default
 
 json_ref (const json_ref &)=delete
 
json_refoperator= (const json_ref &)=delete
 
json_refoperator= (json_ref &&)=delete
 
 ~json_ref ()=default
 
value_type moved_or_copied () const
 
value_type const & operator* () const
 
value_type const * operator-> () const
 

Private Attributes

value_type owned_value = nullptr
 
value_typevalue_ref = nullptr
 
const bool is_rvalue
 

Detailed Description

template<typename BasicJsonType>
class nlohmann::detail::json_ref< BasicJsonType >

Definition at line 11519 of file json.hpp.

Member Typedef Documentation

template<typename BasicJsonType>
using nlohmann::detail::json_ref< BasicJsonType >::value_type = BasicJsonType

Definition at line 11522 of file json.hpp.

Constructor & Destructor Documentation

template<typename BasicJsonType>
nlohmann::detail::json_ref< BasicJsonType >::json_ref ( value_type &&  value)
inline

Definition at line 11524 of file json.hpp.

11525  : owned_value(std::move(value)), value_ref(&owned_value), is_rvalue(true)
11526  {}
value_type * value_ref
Definition: json.hpp:11571
auto value(T const &val) -> Generator< T >
Definition: catch.hpp:3177
template<typename BasicJsonType>
nlohmann::detail::json_ref< BasicJsonType >::json_ref ( const value_type value)
inline

Definition at line 11528 of file json.hpp.

11529  : value_ref(const_cast<value_type*>(&value)), is_rvalue(false)
11530  {}
value_type * value_ref
Definition: json.hpp:11571
auto value(T const &val) -> Generator< T >
Definition: catch.hpp:3177
template<typename BasicJsonType>
nlohmann::detail::json_ref< BasicJsonType >::json_ref ( std::initializer_list< json_ref< BasicJsonType > >  init)
inline

Definition at line 11532 of file json.hpp.

References Catch::Generators::value().

11533  : owned_value(init), value_ref(&owned_value), is_rvalue(true)
11534  {}
value_type * value_ref
Definition: json.hpp:11571
template<typename BasicJsonType>
template<class... Args, enable_if_t< std::is_constructible< value_type, Args... >::value, int > = 0>
nlohmann::detail::json_ref< BasicJsonType >::json_ref ( Args &&...  args)
inline

Definition at line 11539 of file json.hpp.

11540  : owned_value(std::forward<Args>(args)...), value_ref(&owned_value),
11541  is_rvalue(true) {}
value_type * value_ref
Definition: json.hpp:11571
template<typename BasicJsonType>
nlohmann::detail::json_ref< BasicJsonType >::json_ref ( json_ref< BasicJsonType > &&  )
default
template<typename BasicJsonType>
nlohmann::detail::json_ref< BasicJsonType >::json_ref ( const json_ref< BasicJsonType > &  )
delete
template<typename BasicJsonType>
nlohmann::detail::json_ref< BasicJsonType >::~json_ref ( )
default

Member Function Documentation

template<typename BasicJsonType>
value_type nlohmann::detail::json_ref< BasicJsonType >::moved_or_copied ( ) const
inline

Definition at line 11550 of file json.hpp.

11551  {
11552  if (is_rvalue)
11553  {
11554  return std::move(*value_ref);
11555  }
11556  return *value_ref;
11557  }
value_type * value_ref
Definition: json.hpp:11571
template<typename BasicJsonType>
value_type const& nlohmann::detail::json_ref< BasicJsonType >::operator* ( ) const
inline

Definition at line 11559 of file json.hpp.

11560  {
11561  return *static_cast<value_type const*>(value_ref);
11562  }
value_type * value_ref
Definition: json.hpp:11571
BasicJsonType value_type
Definition: json.hpp:11522
template<typename BasicJsonType>
value_type const* nlohmann::detail::json_ref< BasicJsonType >::operator-> ( ) const
inline

Definition at line 11564 of file json.hpp.

11565  {
11566  return static_cast<value_type const*>(value_ref);
11567  }
value_type * value_ref
Definition: json.hpp:11571
BasicJsonType value_type
Definition: json.hpp:11522
template<typename BasicJsonType>
json_ref& nlohmann::detail::json_ref< BasicJsonType >::operator= ( const json_ref< BasicJsonType > &  )
delete
template<typename BasicJsonType>
json_ref& nlohmann::detail::json_ref< BasicJsonType >::operator= ( json_ref< BasicJsonType > &&  )
delete

Member Data Documentation

template<typename BasicJsonType>
const bool nlohmann::detail::json_ref< BasicJsonType >::is_rvalue
private

Definition at line 11572 of file json.hpp.

template<typename BasicJsonType>
value_type nlohmann::detail::json_ref< BasicJsonType >::owned_value = nullptr
mutableprivate

Definition at line 11570 of file json.hpp.

template<typename BasicJsonType>
value_type* nlohmann::detail::json_ref< BasicJsonType >::value_ref = nullptr
private

Definition at line 11571 of file json.hpp.


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