Made the classes that is non-copyable in the C++ library also non-copyable in rbSFML.

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1738 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
groogy 2010-12-03 14:12:16 +00:00
parent cd04d29584
commit 30865b6ef9
10 changed files with 27 additions and 1 deletions

View file

@ -37,6 +37,7 @@ extern VALUE globalRectClass;
extern VALUE globalDrawableModule;
extern VALUE globalShaderClass;
extern VALUE globalViewClass;
extern VALUE globalNonCopyableModule;
static VALUE View_Free( sf::View *anObject )
{
@ -323,7 +324,8 @@ void Init_RenderTarget( void )
* classes that inherits from sf::RenderTarget(sf::RenderWindow, sf::RenderImage) and you will only use it as the
* first argument in the SFML::Drawable#render method.
*/
globalRenderTargetModule = rb_define_module_under( sfml, "RenderTarget" );
globalRenderTargetModule = rb_define_module_under( sfml, "RenderTarget" );
rb_include_module( globalRenderTargetModule, globalNonCopyableModule );
globalRenderTargetInstanceClass = rb_define_class_under( globalRenderTargetModule, "Instance", rb_cObject );
rb_include_module( globalRenderTargetInstanceClass, globalRenderTargetModule );

View file

@ -32,6 +32,7 @@ VALUE globalRendererClass;
extern VALUE globalColorClass;
extern VALUE globalImageClass;
extern VALUE globalShaderClass;
extern VALUE globalNonCopyableModule;
/* call-seq:
* renderer.saveGLStates()
@ -336,6 +337,7 @@ void Init_Renderer( void )
* SFML::Drawable class that uses raw geometry in its Render function.
*/
globalRendererClass = rb_define_class_under( sfml, "Renderer", rb_cObject );
rb_include_module( globalRendererClass, globalNonCopyableModule );
DefinePrimitiveTypesEnum();
// Instance methods

View file

@ -46,6 +46,7 @@ VALUE globalBlendNamespace;
VALUE globalVector2Class;
VALUE globalVector3Class;
VALUE globalWindowClass;
VALUE globalNonCopyableModule;
static bool CheckDependencies( void )
{
@ -78,6 +79,7 @@ void Init_graphics( void )
globalVector2Class = RetrieveSFMLClass( "Vector2" );
globalVector3Class = RetrieveSFMLClass( "Vector3" );
globalWindowClass = RetrieveSFMLClass( "Window" );
globalNonCopyableModule = RetrieveSFMLClass( "NonCopyable" );
rb_define_const(globalSFMLNamespace, "GraphicsLoaded", Qtrue);
CreateBlendEnum();