//..............................................................................
//
// Ninja log - main log engine api
//

import "ui_Icon.jnc"
import "log_Writer.jnc"
import "log_Converter.jnc"
import "log_Filter.jnc"
import "log_Listener.jnc"
import "log_RangeProcessor.jnc"

namespace log {

//! \addtogroup api-log
//! @{

//..............................................................................

opaque class Log
{
	size_t property m_leafLineCountLimit;
	size_t property m_cacheUpdateScrollRateLimit;

	ui.Icon* property m_iconTable(size_t i);

	Writer* readonly m_writer;
	uint64_t const property m_syncId; // -1 if last record is not StdRecordCode.Sync
	uint64_t autoget property m_baseTimestamp;
	char const* const property m_recordFileName;

	destruct();

	void suspend();
	void resume();
	void rebuild();

	void addConverter(
		Converter* converter,
		std.Guid const* auxClassGuidArray,
		size_t auxClassCount
		);

	void addConverter(
		Converter* converter,
		std.Guid const* auxClassGuid
		)
	{
		addConverter(converter, auxClassGuid, 1);
	}

	void addConverter(Converter* converter)
	{
		addConverter(converter, null, 0);
	}

	void removeAllConverters();

	void addFilter(Filter* filter);
	void removeAllFilters();

	void addFoldingFilter(FoldingFilter* filter);
	void removeAllFoldingFilters();

	void addListener(ListenerFunc* listenerFunc);
	void removeAllListeners();

	void addSelectionProcessor(RangeProcessorFactoryFunc* factoryFunc);
	void removeAllSelectionProcessors();
}

//..............................................................................

//! @}

} // namespace log
