library/src/utility/BP-StringFormattingSessions.cc
// Simply destroys the data within the non_colorized_final_ouptut and colorized_final_output data
// stored in each individual string entry.  This is mainly a utility routine and probably shouldn't
// be used directly.
Simply destroys the data within the non_colorized_final_ouptut and colorized_final_output data
stored in each individual string entry.  This is mainly a utility routine and probably shouldn't
be used directly.
Simply destroys the data within the non_colorized_final_ouptut and colorized_final_output data stored in each individual string entry . This is mainly a utility routine and probably shouldn ' t be used directly .
BP_ERROR_T BP_DestroyAllStringEntryColumnizedDataSFSession(P_BP_SF_SESSION session)
{
	if(!session)
		return ERR_FAILURE;
	if(!session->tq)
		return ERR_FAILURE;
	size_t n = 0;
	size_t row_group_n    = 0;
	size_t row_n          = 0;
	size_t column_group_n = 0;
	size_t column_n       = 0;
	size_t string_entry_n = 0;
	P_BP_SFS_STRING_ENTRY current_entry = NULL;
	for(row_group_n = 0;    row_group_n    < session->row_group_n; row_group_n++)
	for(row_n = 0;          row_n          < session->row_groups[row_group_n]->row_n; row_n++)
	for(column_group_n = 0; column_group_n < session->row_groups[row_group_n]->rows[row_n]->col_group_n; column_group_n++)
	for(column_n = 0;       column_n       < session->row_groups[row_group_n]->rows[row_n]->col_groups[column_group_n]->columns_n; column_n++)
	for
	(
			string_entry_n = 0;
			string_entry_n < session->row_groups[row_group_n]->rows[row_n]->col_groups[column_group_n]->columns[column_n]->entries;
			string_entry_n++
	)
	{
		current_entry = session->row_groups[row_group_n]->rows[row_n]->col_groups[column_group_n]->columns[column_n]->col_data[string_entry_n];
		if(!current_entry)
			continue;
		if(!current_entry->final_columnization)
			continue;
		if(current_entry->final_columnization)
			BP_DestroyGenericColumnization(current_entry->final_columnization, BP_TRUE);
		if(current_entry->final_columnization_colorized)
			BP_DestroyGenericColumnization(current_entry->final_columnization_colorized, BP_TRUE);
		current_entry->final_columnization           = NULL;
		current_entry->final_columnization_colorized = NULL;
	}
	return ERR_SUCCESS;
}
BP_ERROR_T BP_DestroyAllStringEntryColumnizedDataSFSession ( P_BP_SF_SESSION session ) { if ( ! session ) return ERR_FAILURE ; if ( ! session -> tq ) return ERR_FAILURE ; size_t n = 0 ; size_t row_group_n = 0 ; size_t row_n = 0 ; size_t column_group_n = 0 ; size_t column_n = 0 ; size_t string_entry_n = 0 ; P_BP_SFS_STRING_ENTRY current_entry = NULL ; for ( row_group_n = 0 ; row_group_n < session -> row_group_n ; row_group_n ++ ) for ( row_n = 0 ; row_n < session -> row_groups [ row_group_n ] -> row_n ; row_n ++ ) for ( column_group_n = 0 ; column_group_n < session -> row_groups [ row_group_n ] -> rows [ row_n ] -> col_group_n ; column_group_n ++ ) for ( column_n = 0 ; column_n < session -> row_groups [ row_group_n ] -> rows [ row_n ] -> col_groups [ column_group_n ] -> columns_n ; column_n ++ ) for ( string_entry_n = 0 ; string_entry_n < session -> row_groups [ row_group_n ] -> rows [ row_n ] -> col_groups [ column_group_n ] -> columns [ column_n ] -> entries ; string_entry_n ++ ) { current_entry = session -> row_groups [ row_group_n ] -> rows [ row_n ] -> col_groups [ column_group_n ] -> columns [ column_n ] -> col_data [ string_entry_n ] ; if ( ! current_entry ) continue ; if ( ! current_entry -> final_columnization ) continue ; if ( current_entry -> final_columnization ) BP_DestroyGenericColumnization ( current_entry -> final_columnization , BP_TRUE ) ; if ( current_entry -> final_columnization_colorized ) BP_DestroyGenericColumnization ( current_entry -> final_columnization_colorized , BP_TRUE ) ; current_entry -> final_columnization = NULL ; current_entry -> final_columnization_colorized = NULL ; } return ERR_SUCCESS ; }
Simply destroys the data within the non_colorized_final_ouptut and colorized_final_output data
stored in each individual string entry.
Simply destroys the data within the non_colorized_final_ouptut and colorized_final_output data stored in each individual string entry .
// ensure we have a session and a tailqueue // this is a generic iterator used for moving through individual // lines in the colorized/noncolorized string entry members. // declare item iterators // this is used as a placehoder for the current entry // this seemingly complex logic simply iterates through each string entry recursively.  It's // not as complex as it looks, it's just self-indexing recursion. // destroy columnizations // nullify pointers // return indicating success