Commit ac48b28d authored by Martin Mrovec's avatar Martin Mrovec
Browse files

ENH: Added header for connection container

parent 296713ea
......@@ -87,6 +87,39 @@ module connection_m
module procedure :: new_connection_3
end interface connection_t
!> Represents a container for a single connection_t pointer
type :: connection_container_t
private
class(connection_t), pointer:: content
contains
!> Getter for the private 'content' component
!! @return Pointer to the contained connection (type connection_t, pointer)
procedure :: get_content => get_content_connection_container_impl
!> Setter for the private 'content' component
!! @param[in] content Pointer to the connection (type connection_t, pointer)
procedure :: set_content => set_content_connection_container_impl
!> Scalar desctructor for single instances of the class connection_container_t
final :: destroy_connection_container
!> Array desctructor for arrays of instances of the class connection_container_t
final :: destroy_connection_container_array
end type connection_container_t
interface connection_container_t
!> Constructor of connection_container_t class
!! @return Instance of the class connection_container_t with nullified content
module procedure :: new_connection_container_empty
!> Constructor of connection_container_t class
!! @param[in] content_in connection to be contained (type connection_t, pointer)
!! @return Pointer to the instance of the class connection_t with assigned content
module procedure :: new_connection_container_assigned
end interface connection_container_t
!> Represents a connection between two neurons.
!! Able to pass a signal from an input neuron to
!! an output one.
......@@ -340,6 +373,24 @@ module connection_m
#endif
end subroutine pass_signal_impl
!------------------------------!
! class connection_container_t !
!------------------------------!
!--------------!------------------------------------------------------------------------
! Constructors !
!--------------!
!> Constructor of connection_container_t class
!! @return Instance of the class connection_container_t with nullified content
function new_connection_container_empty() result(new_obj)
type(connection_container_t), intent(out) :: new_obj
new_o
end function new_connection_container_empty
module procedure :: new_connection_container_empty
!-----------------------------!
! class interval_connection_t !
!-----------------------------!
......
......@@ -4,8 +4,8 @@ program connection_mem_leak_test
use normal_m
use data_kinds_4neuro_m
type(mock_neuron_t), pointer :: n1_p
type(mock_neuron_t), pointer :: n2_p
type(mock_neuron_t), pointer :: n1_p
type(mock_neuron_t), pointer :: n2_p
class(connection_t), pointer :: con1, con2
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment