<commit_before>
Rem
	bbdoc: User Input interface
End Rem
Type mxUserInput

	Rem
		bbdoc:Command Line Interface
	End Rem
	Const c_cli:Byte = 0
	
	Rem
		bbdoc:Graphical User Interface
	End Rem
	Const c_gui:Byte = 1

	Field m_driver:mxUserInputDriver
	
	Rem
		bbdoc: Factory for initializing mxUserInput object
		about: interface can be either c_cli of c_gui
	End Rem
	Function factory:mxUserInput(interface:Byte)
		Local ui:mxUserInput = New mxUserInput
		Select interface
			Case c_cli
				ui.m_driver = New mxUserInputDriverCLI
			Case c_gui
				RuntimeError("GUI driver not yet supported!")
		End Select
		Return ui
	End Function
	
	Rem
		bbdoc: Ask user to confirm an action
		returns: True or False
	End Rem
	Method Confirm:Byte(question:String)
		Return Self.m_driver.Confirm(question)
	End Method

End Type

Rem
	bbdoc: User Input Driver interface
End Rem
Type mxUserInputDriver Abstract
	
	Rem
		bbdoc: Ask user to confirm an action
		returns: True or False
	End Rem
	Method Confirm:Byte(question:String) Abstract
	
End Type

	
Rem
	bbdoc: UserInpitDriver for Command Line Interface
End Rem
Type mxUserInputDriverCLI Extends mxUserInputDriver
	
	Rem
		bbdoc: Ask user to confirm an action
		returns: True or False
	End Rem
	Method Confirm:Byte(question:String)
		Local resp:String = Input(question + " ").ToLower()
		If resp = "y" Or resp = "yes"
			Return True
		Else
			Return False
		End If
	End Method

End Type
<commit_msg>mxUserInputDriverGUI<commit_after>
Rem
	bbdoc: User Input interface
End Rem
Type mxUserInput

	Rem
		bbdoc:Command Line Interface
	End Rem
	Const c_cli:Byte = 0
	
	Rem
		bbdoc:Graphical User Interface
	End Rem
	Const c_gui:Byte = 1

	Field m_driver:mxUserInputDriver
	
	Rem
		bbdoc: Factory for initializing mxUserInput object
		about: interface can be either c_cli of c_gui
	End Rem
	Function factory:mxUserInput(interface:Byte)
		Local ui:mxUserInput = New mxUserInput
		Select interface
			Case c_cli
				ui.m_driver = New mxUserInputDriverCLI
			Case c_gui
				ui.m_driver = New mxUserInputDriverGUI
		End Select
		Return ui
	End Function
	
	Rem
		bbdoc: Ask user to confirm an action
		returns: True or False
	End Rem
	Method Confirm:Byte(question:String)
		Return Self.m_driver.Confirm(question)
	End Method

End Type

Rem
	bbdoc: User Input Driver interface
End Rem
Type mxUserInputDriver Abstract
	
	Rem
		bbdoc: Ask user to confirm an action
		returns: True or False
	End Rem
	Method Confirm:Byte(question:String) Abstract
	
End Type

	
Rem
	bbdoc: UserInpitDriver for Command Line Interface
End Rem
Type mxUserInputDriverCLI Extends mxUserInputDriver
	
	Rem
		bbdoc: Ask user to confirm an action
		returns: True or False
	End Rem
	Method Confirm:Byte(question:String)
		Local resp:String = Input(question + " ").ToLower()
		If resp = "y" Or resp = "yes"
			Return True
		Else
			Return False
		End If
	End Method

End Type

Type mxUserInputDriverGUI Extends mxUserInputDriver
	Rem
		bbdoc:Ask user to confirm an action
	End Rem
	Method Confirm:Byte(question:String)
		Return Confirm(question)
	End Method

End Type
{'fraction_non_alphanumeric': 0.044458973520758414, 'fraction_numerical': 0.0013076168682576005, 'mean_word_length': 3.99184339314845, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5241385', 'n_tokens_mistral': 1079, 'n_tokens_neox': 984, 'n_words': 369}