Octopus
namespace_oct_m Module Reference

Data Types

interface  namespace_t
 

Functions/Subroutines

recursive type(namespace_t) function namespace_constructor (name, parent, delimiter)
 Create namespace from name. If parent is present, the new namespace will be a child of it. It is also possible to create a namespace with several ancestors on the fly by providing a dot separated list of names. A different delimiter can be specified with the delimiter optional argument. More...
 
recursive character(len=max_namespace_len) function namespace_get (this, delimiter)
 get full name, including parents More...
 
pure recursive integer function namespace_len (this)
 
elemental logical function namespace_equal (lhs, rhs)
 
logical function namespace_contains (this, namespace)
 
logical function namespace_is_contained_in (this, name, delimiter)
 
integer(int64) function namespace_get_hash32 (this)
 FNV-1a 32-bit hash of a namespace string (ASCII/byte-wise). More...
 

Variables

integer, parameter, public max_namespace_len = 128
 
type(namespace_t), public global_namespace
 

Function/Subroutine Documentation

◆ namespace_constructor()

recursive type(namespace_t) function namespace_oct_m::namespace_constructor ( character(len=*), intent(in)  name,
type(namespace_t), intent(in), optional, target  parent,
character(len=1), intent(in), optional  delimiter 
)
private

Create namespace from name. If parent is present, the new namespace will be a child of it. It is also possible to create a namespace with several ancestors on the fly by providing a dot separated list of names. A different delimiter can be specified with the delimiter optional argument.

Definition at line 144 of file namespace.F90.

◆ namespace_get()

recursive character(len=max_namespace_len) function namespace_oct_m::namespace_get ( class(namespace_t), intent(in)  this,
character(len=1), intent(in), optional  delimiter 
)
private

get full name, including parents

Definition at line 197 of file namespace.F90.

◆ namespace_len()

pure recursive integer function namespace_oct_m::namespace_len ( class(namespace_t), intent(in)  this)
private

Definition at line 220 of file namespace.F90.

◆ namespace_equal()

elemental logical function namespace_oct_m::namespace_equal ( class(namespace_t), intent(in)  lhs,
class(namespace_t), intent(in)  rhs 
)
private

Definition at line 237 of file namespace.F90.

◆ namespace_contains()

logical function namespace_oct_m::namespace_contains ( class(namespace_t), intent(in), target  this,
type(namespace_t), intent(in), target  namespace 
)
private

Definition at line 246 of file namespace.F90.

◆ namespace_is_contained_in()

logical function namespace_oct_m::namespace_is_contained_in ( class(namespace_t), intent(in), target  this,
character(len=*), intent(in)  name,
character(len=1), intent(in), optional  delimiter 
)
private

Definition at line 280 of file namespace.F90.

◆ namespace_get_hash32()

integer(int64) function namespace_oct_m::namespace_get_hash32 ( class(namespace_t), intent(in)  this)
private

FNV-1a 32-bit hash of a namespace string (ASCII/byte-wise).

For details of the algorithm, see https:

Note
we need int64 arithmetic for the 32 bit algorithm, as this relies on a well defined overflow behaviour. This, however, is not guaranteed by the Fortran standard, and we enforce it by using 64 bit integers and explicit bit truncation to 32 bit.

Definition at line 330 of file namespace.F90.

Variable Documentation

◆ max_namespace_len

integer, parameter, public namespace_oct_m::max_namespace_len = 128

Definition at line 115 of file namespace.F90.

◆ global_namespace

type(namespace_t), public namespace_oct_m::global_namespace

Definition at line 135 of file namespace.F90.