#include <Rcpp.h>
class Foo ;
RCPP_EXPOSED_CLASS(Foo)

using namespace Rcpp ;

class Foo{
    public:
        enum Bla{ FOO, BAR } ;
        
        Foo( double x_, double y_) : x(x_), y(y_){}
        
        Foo* clone(){
            return new Foo( x, y) ;    
        }
        
        double x, y ;
        
        void bla(const Foo& other){
            Rprintf( "efez\n" ) ;   
        }
        
} ;
Foo make_foo(){ return Foo(3, 4) ; }

RCPP_MODULE(Mod){
    
    class_<Foo>("Foo" )
        .constructor<double,double>() 
        .method( "clone", &Foo::clone )
        
        .field( "x", &Foo::x )
        .field( "y", &Foo::y )
        
        .method( "bla", &Foo::bla )
    ;
    function( "make_foo", &make_foo ) ;
    
}