module CWellSurveyData
    use CWellSurveyDataVariables
    implicit none    
    public    
    contains
        ! integer function SetSurveyData(count, array)
        ! !DEC$ ATTRIBUTES DLLEXPORT::SetSurveyData
        ! !DEC$ ATTRIBUTES ALIAS: 'SetSurveyData' :: SetSurveyData
        !     implicit none
        !     integer, intent(in) :: count
        !     integer :: i
        !     type(CSurveyDataItem), intent(inout), target :: array(count)            
		! 	type(CSurveyDataItem), pointer :: item
        !     WellSurveyData%Count = count
        !     if(size(WellSurveyData%Items) > 0) then
        !         deallocate(WellSurveyData%Items)
        !     end if
        !     if(count > 0) then
        !         allocate(WellSurveyData%Items(count))
        !         do i = 1, count
		! 	        item => array(i)
        !             WellSurveyData%Items(i)%MeasuredDepth = item%MeasuredDepth  
        !             WellSurveyData%Items(i)%Inclination = item%Inclination
        !             WellSurveyData%Items(i)%Azimoth = item%Azimoth
        !             WellSurveyData%Items(i)%TotalVerticalDepth = item%TotalVerticalDepth 
        !             WellSurveyData%Items(i)%X = item%X
        !             WellSurveyData%Items(i)%Y = item%Y
        !             WellSurveyData%Items(i)%Z = item%Z
        !         end do  
        !     end if

        !     SetSurveyData = 0
        ! end function SetSurveyData
end module CWellSurveyData