-------------------------------------------------------------------------------
function Entity:__tostring()
	local str = 'Entity \n'..
				'   Name: '..self:getName()..'\n'..
				'   Respondable: '..tostring(self:isRespondable())..'\n'..
				'   Active: '..tostring(self:isActive())..'\n'..
				'   Order: '..self:getOrder()

	local parent = self:getParent()
	if (parent) then
	str = str.. '   ParentName: \''..parent:getName()..'\'\n';
	end
	return str
end

-------------------------------------------------------------------------------
function RenderedObject:__tostring()
	local str = 'RenderedObject \n'..
				'   Name: '..self:getName()..'\n'..
				'   Respondable: '..tostring(self:isRespondable())..'\n'..
				'   Visible: '..tostring(self:isVisible())..'\n'..
				'   Active: '..tostring(self:isActive())..'\n'..
				'   Opacity: '..tostring(self:getOpacity())..'\n'..
				'   X: '..self:getX()..' (ScrX: '.. self:getScrX()..')\n'..
				'   Y: '..self:getY()..' (ScrY: '.. self:getScrY()..')\n'..
				'   ScaleX: '..self:getScale().x..' (ScaleScrX: '.. self:getScrScale().x..')\n'..
				'   ScaleY: '..self:getScale().y..' (ScaleScrY: '.. self:getScrScale().y..')\n'..
				'   HotSpot: ('..self:getHotSpot().x..' , '.. self:getHotSpot().y..')\n'..
				'   Order: '..self:getOrder()..'\n'

	local parent = self:getParent()
	if (parent) then
	str = str.. '   ParentName: \''..parent:getName()..'\'\n';
	end
	str = str.. '   Color: ('..self:getColor():getR()..', '..self:getColor():getG()..', '..self:getColor():getB()..', '..self:getColor():getA()..') '
	return str
end
-------------------------------------------------------------------------------
function ControlEntity:__tostring()
	local str = 'ControlEntity \n'..
				'   Name: '..self:getName()..'\n'..
				'   Respondable: '..tostring(self:isRespondable())..'\n'..
				'   Active: '..tostring(self:isActive())..'\n'..
				'   Opacity: '..tostring(self:getOpacity())..'\n'..
				'   X: '..self:getX()..' (ScrX: '.. self:getScrX()..')\n'..
				'   Y: '..self:getY()..' (ScrY: '.. self:getScrY()..')\n'..
				'   ScaleX: '..self:getScale().x..' (ScaleScrX: '.. self:getScrScale().x..')\n'..
				'   ScaleY: '..self:getScale().y..' (ScaleScrY: '.. self:getScrScale().y..')\n'..
				'   Order: '..self:getOrder()..'\n'

	local parent = self:getParent()
	if (parent) then
	str = str.. '   ParentName: \''..parent:getName()..'\'\n';
	end
	str = str.. '   Color: ('..self:getColor():getR()..', '..self:getColor():getG()..', '..self:getColor():getB()..', '..self:getColor():getA()..') '
	return str
end
-------------------------------------------------------------------------------
function WindowEntity:__tostring()
	local str = 'WindowEntity \n'..
				'   Name: '..self:getName()..'\n'..
				'   Respondable: '..tostring(self:isRespondable())..'\n'..
				'   Active: '..tostring(self:isActive())..'\n'..
				'   Opacity: '..tostring(self:getOpacity())..'\n'..
				'   X: '..self:getX()..' (ScrX: '.. self:getScrX()..')\n'..
				'   Y: '..self:getY()..' (ScrY: '.. self:getScrY()..')\n'..
				'   ScaleX: '..self:getScale().x..' (ScaleScrX: '.. self:getScrScale().x..')\n'..
				'   ScaleY: '..self:getScale().y..' (ScaleScrY: '.. self:getScrScale().y..')\n'..
				'   Order: '..self:getOrder()..'\n'

	local parent = self:getParent()
	if (parent) then
	str = str.. '   ParentName: \''..parent:getName()..'\'\n';
	end
	str = str.. '   Color: ('..self:getColor():getR()..', '..self:getColor():getG()..', '..self:getColor():getB()..', '..self:getColor():getA()..') '
	return str
end
-------------------------------------------------------------------------------
function TextEntity:__tostring()
	local str = 'TextEntity \n'..
				'   Name: '..self:getName()..'\n'..
				'   Text: '..self:getText()..'\n'..
				'   Respondable: '..tostring(self:isRespondable())..'\n'..
				'   Active: '..tostring(self:isActive())..'\n'..
				'   Opacity: '..tostring(self:getOpacity())..'\n'..
				'   X: '..self:getX()..' (ScrX: '.. self:getScrX()..')\n'..
				'   Y: '..self:getY()..' (ScrY: '.. self:getScrY()..')\n'..
				'   ScaleX: '..self:getScale().x..' (ScaleScrX: '.. self:getScrScale().x..')\n'..
				'   ScaleY: '..self:getScale().y..' (ScaleScrY: '.. self:getScrScale().y..')\n'..
				'   Order: '..self:getOrder()..'\n'

	local parent = self:getParent()
	if (parent) then
	str = str.. '   ParentName: \''..parent:getName()..'\'\n';
	end
	str = str.. '   Color: ('..self:getColor():getR()..', '..self:getColor():getG()..', '..self:getColor():getB()..', '..self:getColor():getA()..') '
	return str
end
-------------------------------------------------------------------------------
function SpriteEntity:__tostring()
	local str = 'SpriteEntity \n'..
				'   Name: '..self:getName()..'\n'..
				'   Respondable: '..tostring(self:isRespondable())..'\n'..
				'   Visible: '..tostring(self:isVisible())..'\n'..
				'   Active: '..tostring(self:isActive())..'\n'..
				'   Opacity: '..tostring(self:getOpacity())..'\n'..
				'   X: '..self:getX()..' (ScrX: '.. self:getScrX()..')\n'..
				'   Y: '..self:getY()..' (ScrY: '.. self:getScrY()..')\n'..
				'   ScaleX: '..self:getScale().x..' (ScaleScrX: '.. self:getScrScale().x..')\n'..
				'   ScaleY: '..self:getScale().y..' (ScaleScrY: '.. self:getScrScale().y..')\n'..
				'   Order: '..self:getOrder()..'\n'

	local parent = self:getParent()
	if (parent) then
	str = str.. '   ParentName: \''..parent:getName()..'\'\n';
	end
	str = str.. '   Color: ('..self:getColor():getR()..', '..self:getColor():getG()..', '..self:getColor():getB()..', '..self:getColor():getA()..') '
	return str
end
-------------------------------------------------------------------------------
function ButtonEntity:__tostring()
	local str = 'ButtonEntity \n'..
				'   Name: '..self:getName()..'\n'..
				'   Respondable: '..tostring(self:isRespondable())..'\n'..
				'   Active: '..tostring(self:isActive())..'\n'..
				'   Opacity: '..tostring(self:getOpacity())..'\n'..
				'   X: '..self:getX()..' (ScrX: '.. self:getScrX()..')\n'..
				'   Y: '..self:getY()..' (ScrY: '.. self:getScrY()..')\n'..
				'   ScaleX: '..self:getScale().x..' (ScaleScrX: '.. self:getScrScale().x..')\n'..
				'   ScaleY: '..self:getScale().y..' (ScaleScrY: '.. self:getScrScale().y..')\n'..
				'   Order: '..self:getOrder()..'\n'

	local parent = self:getParent()
	if (parent) then
	str = str.. '   ParentName: \''..parent:getName()..'\'\n';
	end
	str = str.. '   Color: ('..self:getColor():getR()..', '..self:getColor():getG()..', '..self:getColor():getB()..', '..self:getColor():getA()..') '
	return str
end
-------------------------------------------------------------------------------
function vector_entity:__tostring()
	local str = 'const std::vector<Entity *> \n'
	
	local size = self:size()
	if size > 10 then
		size = 10
	end

	for i = 0, size - 1 do
		str = str..i..") "..self:get(i):getName()..'\n '
	end

	return str
end
-------------------------------------------------------------------------------
function Vector2f:__tostring()
	local str = 'Vector2f ('..self.x..', '..self.y..')'
	return str
end
-------------------------------------------------------------------------------
function Rectanglef:__tostring()
	local str = 'Rectanglef \n'..
				' Width: '..self:getWidth()..' Height: '..self:getHeight()
	return str
end
-------------------------------------------------------------------------------
function Colorf:__tostring()
	local str = '   Color: ('..self:getR()..', '..self:getG()..', '..self:getB()..', '..self:getA()..') '
	return str
end
-------------------------------------------------------------------------------
function Profile:__tostring()
	local str = 'Profile \n'..
				'   Name: '..self.name..'\n'..
				'   Sound Volume: '..self:getPreferences():getSoundVolume()..'\n'..
				'   Voice Volume: '..self:getPreferences():getVoiceVolume()..'\n'..
				'   Music Volume: '..self:getPreferences():getMusicVolume()
	return str
end
-------------------------------------------------------------------------------
function Preferences:__tostring()
	local str = 'Preferences \n'..
				'   Sound Volume: '..self:getSoundVolume()..'\n'..
				'   Voice Volume: '..self:getVoiceVolume()..'\n'..
				'   Music Volume: '..self:getMusicVolume()..'\n'..
				'   Full Screen: '..tostring(self:isFullScreen())..'\n'..
				'   Wide Screen: '..tostring(self:isWidescreen())..'\n'..
				'   CustomCursor: '..tostring(self:isShowCustomCursor())
	return str
end
-------------------------------------------------------------------------------
function ScreenFocus:__tostring()
	local str = 'ScreenFocusInfo \n'..
				'   x: '..self:getScrX()..'   y: '..self:getScrY()..'\n'
				--'   getPointedResponder: '..self:getPointedResponder()
	return str
end

-------------------------------------------------------------------------------
