SheafSystem  0.0.0.0
sheaf::index_scope Class Reference

Default id map for objects of type scoped_index. A convenient and safe mechanism for managing scoped_index::default_scope(). More...

#include <index_scope.h>

Public Member Functions

 index_scope (const immutable_id_map *xmap)
 Sets scoped_index::default_map() to xmap. More...
 
 ~index_scope ()
 Destructor; restores scoped_index::default_scope() to old_scope(). Not virtual; this class can not be used as a base class. More...
 
const immutable_id_map * scope () const
 The current scope. More...
 
void put_scope (const immutable_id_map *xmap)
 Sets scoped_index::default_scope() to xmap. More...
 
const immutable_id_map * old_scope () const
 The scope before this was created. More...
 

Protected Attributes

const immutable_id_map * _old_scope
 The scope before this was created. More...
 

Detailed Description

Default id map for objects of type scoped_index. A convenient and safe mechanism for managing scoped_index::default_scope().

Definition at line 42 of file index_scope.h.

Constructor & Destructor Documentation

◆ index_scope()

sheaf::index_scope::index_scope ( const immutable_id_map *  xmap)

Sets scoped_index::default_map() to xmap.

Postcondition

Definition at line 32 of file index_scope.cc.

References _old_scope, old_scope(), scope(), and ~index_scope().

◆ ~index_scope()

sheaf::index_scope::~index_scope ( )

Destructor; restores scoped_index::default_scope() to old_scope(). Not virtual; this class can not be used as a base class.

Postcondition

Definition at line 59 of file index_scope.cc.

References _old_scope, old_scope(), and scope().

Referenced by index_scope().

Member Function Documentation

◆ old_scope()

const sheaf::immutable_id_map * sheaf::index_scope::old_scope ( ) const

The scope before this was created.

Definition at line 130 of file index_scope.cc.

References _old_scope.

Referenced by index_scope(), put_scope(), and ~index_scope().

◆ put_scope()

void sheaf::index_scope::put_scope ( const immutable_id_map *  xmap)

Sets scoped_index::default_scope() to xmap.

Postcondition

Definition at line 104 of file index_scope.cc.

References _old_scope, old_scope(), and scope().

Referenced by scope().

◆ scope()

const sheaf::immutable_id_map * sheaf::index_scope::scope ( ) const

The current scope.

Postcondition
  • result == scoped_index::default_map()

Definition at line 82 of file index_scope.cc.

References put_scope().

Referenced by index_scope(), put_scope(), and ~index_scope().

Member Data Documentation

◆ _old_scope

const immutable_id_map* sheaf::index_scope::_old_scope
protected

The scope before this was created.

Definition at line 82 of file index_scope.h.

Referenced by index_scope(), old_scope(), put_scope(), and ~index_scope().


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