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:
parent
cd04d29584
commit
30865b6ef9
10 changed files with 27 additions and 1 deletions
|
@ -26,6 +26,9 @@
|
|||
|
||||
VALUE globalSoundRecorderClass;
|
||||
|
||||
/* External classes */
|
||||
extern VALUE globalNonCopyableModule;
|
||||
|
||||
class rbSoundRecorder : public sf::SoundRecorder
|
||||
{
|
||||
public:
|
||||
|
@ -244,6 +247,7 @@ void Init_SoundRecorder( void )
|
|||
* end
|
||||
*/
|
||||
globalSoundRecorderClass = rb_define_class_under( sfml, "SoundRecorder", rb_cObject );
|
||||
rb_include_module( globalSoundRecorderClass, globalNonCopyableModule );
|
||||
|
||||
// Class methods
|
||||
rb_define_singleton_method( globalSoundRecorderClass, "new", SoundRecorder_New, -1 );
|
||||
|
|
|
@ -28,6 +28,7 @@ VALUE globalSoundStreamClass;
|
|||
|
||||
/* External classes */
|
||||
extern VALUE globalSoundSourceClass;
|
||||
extern VALUE globalNonCopyableModule;
|
||||
|
||||
class rbSoundStream : public sf::SoundStream
|
||||
{
|
||||
|
@ -357,6 +358,7 @@ void Init_SoundStream( void )
|
|||
* stream.play
|
||||
*/
|
||||
globalSoundStreamClass = rb_define_class_under( sfml, "SoundStream", globalSoundSourceClass );
|
||||
rb_include_module( globalSoundStreamClass, globalNonCopyableModule );
|
||||
|
||||
// Class methods
|
||||
rb_define_singleton_method( globalSoundStreamClass, "new", SoundStream_New, -1 );
|
||||
|
|
|
@ -27,6 +27,7 @@ VALUE globalSFMLNamespace;
|
|||
/* External classes */
|
||||
VALUE globalVector2Class;
|
||||
VALUE globalVector3Class;
|
||||
VALUE globalNonCopyableModule;
|
||||
|
||||
static bool CheckDependencies( void )
|
||||
{
|
||||
|
@ -48,5 +49,6 @@ void Init_audio( void )
|
|||
}
|
||||
globalVector2Class = RetrieveSFMLClass( "Vector2" );
|
||||
globalVector3Class = RetrieveSFMLClass( "Vector3" );
|
||||
globalNonCopyableModule = RetrieveSFMLClass( "NonCopyable" );
|
||||
rb_define_const(globalSFMLNamespace, "AudioLoaded", Qtrue);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue