#include <stdio.h>
#include "slot.h"
#include "storage.h"

class Test
{
	public:
            
		DECLARE_SLOT(Test, print);
		DECLARE_SLOT(Test, print_number);
		
	private:
	public:
		Test() : INIT_SLOT(Test, this, print), INIT_SLOT(Test, this, print_number)
		{
                }
		virtual ~Test(){};
};
DEFINE_SLOT(Test, print_number)
{
        printf("%d\n", (int)args->string_args.at(0).length());
	return true;
}
DEFINE_SLOT(Test, print)
{
        printf ( "%s\n", args->string_args.at(0).c_str() );
	return true;
};

int main()
{
	Test a;
	SlotArgs z;
	z.string_args.push_back ( "Hello Worldfftrp" );
        a.print._invoke ( &z );
	
	SlotArgs z1;
	z1.string_args.push_back( "Hello World" );
	a.print_number._invoke( &z1 );
}
