MONC
Private Member Functions | List of all members
collections_mod::c_push_integer Interface Reference

Pushes an integer element onto the stack or queue. More...

Private Member Functions

subroutine stack_push_int (specificstack, int_data)
 Pushes an element onto the stack (LIFO) More...
 
subroutine queue_push_int (specificqueue, int_data)
 Adds an element to the end of the queue (FIFO) More...
 

Detailed Description

Pushes an integer element onto the stack or queue.

This has a time complexity of O(1)

Parameters
collectionThe specific stack or queue involved
dataInteger data to push onto the collection

Definition at line 122 of file collections.F90.

Member Function/Subroutine Documentation

◆ queue_push_int()

subroutine collections_mod::c_push_integer::queue_push_int ( type(queue_type), intent(inout)  specificqueue,
integer, intent(in)  int_data 
)
private

Adds an element to the end of the queue (FIFO)

Do not call directly from external module, this is called via the appropriate interface

Parameters
specificqueueThe specific queue involved
dataInteger data to add to the queue

Definition at line 2485 of file collections.F90.

2486  type(queue_type), intent(inout) :: specificqueue
2487  integer, intent(in) :: int_data
2488 
2489  class(*), pointer :: generic
2490 
2491  generic=>conv_to_generic(int_data, .true.)
2492  call queue_push_generic(specificqueue, generic, .true.)

◆ stack_push_int()

subroutine collections_mod::c_push_integer::stack_push_int ( type(stack_type), intent(inout)  specificstack,
integer, intent(in)  int_data 
)
private

Pushes an element onto the stack (LIFO)

Do not call directly from external module, this is called via the appropriate interface

Parameters
specificstackThe specific stack involved
dataInteger data to push onto the stack

Definition at line 2189 of file collections.F90.

2190  type(stack_type), intent(inout) :: specificstack
2191  integer, intent(in) :: int_data
2192 
2193  class(*), pointer :: generic
2194 
2195  generic=>conv_to_generic(int_data, .true.)
2196  call stack_push_generic(specificstack, generic, .true.)

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