// InsertEventAtIndex inserts the given event into the events slice at the given index.
InsertEventAtIndex inserts the given event into the events slice at the given index.
// InsertEventAtIndex inserts the given event into the events slice at the given index .
func (event_dispatcher *EventDispatcher_struct) InsertEventAtIndex( event Event_struct, index uint ) ( return_report error_report.ErrorReport_struct ){
	var preceding_events []Event_struct;
	var following_events []Event_struct;
	event_dispatcher.mutex.Lock();
	if( event_dispatcher.add_times == true ){
		event.data["submission_time"] = time.Now();
	}
	if( int(index) >= len(event_dispatcher.events_slice) ){
		event_dispatcher.events_slice = append(event_dispatcher.events_slice,event);
	} else{
		preceding_events = event_dispatcher.events_slice[:index];
		following_events = event_dispatcher.events_slice[(index+1):];
		event_dispatcher.events_slice = append(preceding_events,event);
		event_dispatcher.events_slice = append(event_dispatcher.events_slice,following_events...);
	}
	return_report = error_report.New( 0, map[string]interface{}{ "events_slice_length": len(event_dispatcher.events_slice) }, nil );
	event_dispatcher.mutex.Unlock();
	return return_report;
}
func ( event_dispatcher * EventDispatcher_struct ) InsertEventAtIndex ( event Event_struct , index uint ) ( return_report error_report . ErrorReport_struct ) { var preceding_events [ ] Event_struct ; var following_events [ ] Event_struct ; event_dispatcher . mutex . Lock ( ) ; if ( event_dispatcher . add_times == true ) { event . data [ " " ] = time . Now ( ) ; } if ( int ( index ) >= len ( event_dispatcher . events_slice ) ) { event_dispatcher . events_slice = append ( event_dispatcher . events_slice , event ) ; } else { preceding_events = event_dispatcher . events_slice [ : index ] ; following_events = event_dispatcher . events_slice [ ( index + 1 ) : ] ; event_dispatcher . events_slice = append ( preceding_events , event ) ; event_dispatcher . events_slice = append ( event_dispatcher . events_slice , following_events ... ) ; } return_report = error_report . New ( 0 , map [ string ] interface { } { " " : len ( event_dispatcher . events_slice ) } , nil ) ; event_dispatcher . mutex . Unlock ( ) ; return return_report ; }
InsertEventAtIndex inserts the given event into the events slice at the given index.
InsertEventAtIndex inserts the given event into the events slice at the given index .
//Variables //Parametres //Function //Return