Ejemplo n.º 1
0
//------------------------------------------------------------------------------
//!
DFDrawCircleNode::DFDrawCircleNode():
   _color( 1.0f ),
   _center( 0.0f ),
   _radius( 16.0f )
{
   _output.delegate( makeDelegate( this, &DFDrawCircleNode::process ) );
}
Ejemplo n.º 2
0
//------------------------------------------------------------------------------
//!
DFDrawRectNode::DFDrawRectNode():
   _color( 1.0f ),
   _center( 0.0f ),
   _size( 16.0f )
{
   _output.delegate( makeDelegate( this, &DFDrawRectNode::process ) );
}
Ejemplo n.º 3
0
//------------------------------------------------------------------------------
//!
void ComboBox::init( VMState* vm )
{
   VM::get( vm, 1, "itemId", _itemId );
   VM::get( vm, 1, "onItemChanged", _onItemChangedRef );
   VM::get( vm, 1, "menuOffset", _offset );
   VM::get( vm, 1, "menuAbove", _menuAbove );

   // Get menu.
   RCP<Widget> menu;
   VM::getWidget( vm, 1, "menu", menu );
   _menu = static_cast<Menu*>( menu.ptr() );

   _menu->addOnItemSelect( makeDelegate( this, &ComboBox::itemSelected ) );
   _menu->addOnPopup( makeDelegate( this, &ComboBox::popupped ) );
   _item = _menu->findWidget( _itemId );

   // Base class init.
   Widget::init( vm );
}
Ejemplo n.º 4
0
	void disconnect( Y * obj, void (X::*func)( Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8 ) const )
	{
		_Delegate& eq = makeDelegate( obj, func );
		for (DelegateIterator it = delegateList.begin(); it != delegateList.end(); ++it)
			if( *it == eq )
			{
				delegateList.erase( it );
				return;
			}
	}
Ejemplo n.º 5
0
	void disconnect( Y * obj, void (X::*func)() const )
	{
		_Delegate& eq = makeDelegate( obj, func );
                for (DelegateList::iterator it = delegateList.begin(); it != delegateList.end(); ++it)
			if( *it == eq )
			{
				delegateList.erase( it );
				return;
			}
	}
Ejemplo n.º 6
0
ConsoleUpdater::ConsoleUpdater(int argc, char* argv[]) :
	_d( new Impl )
{
  _d->options.reset( argc, argv );
  _d->controller.reset( new UpdateController( *this, vfs::Path( argv[0] ), _d->options ) );
  _d->done = false;
  _d->abortSignalHandler = makeDelegate( this, &ConsoleUpdater::onAbort);
  _d->outcome = ConsoleUpdater::None;

  _initAbortSignalHandler();
}
Ejemplo n.º 7
0
void PostponeEvent::_exec(Game& game, unsigned int)
{
  Logger::warning( "Start event name=" + _name + " type=" + _type );

  Impl::Worker workers[3] = { makeDelegate( _d.data(), &Impl::executeRequest ),
                              makeDelegate( _d.data(), &Impl::executeEvent ),
                              makeDelegate( _d.data(), &Impl::executeCityService ) };

  for( int i=0; i < 3; i++ )
  {
    bool execOk;
    workers[i]( game, _type, execOk );
    if( execOk )
    {
      _executeIncludeEvents();
      return;
    }
  }

  _d->mayDelete = true;
}
Ejemplo n.º 8
0
void UpdateController::StartOrContinue()
{
	assert(_synchronizer == NULL); // debug builds take this seriously

	if( _synchronizer.isNull() )
	{
		ExceptionSafeThreadPtr p( new ExceptionSafeThread( makeDelegate( this, &UpdateController::run )) );
		p->SetThreadType( ThreadTypeIntervalDriven );
		p->drop();
		_synchronizer = p;
	}
}
Ejemplo n.º 9
0
	void connect( Y * obj, void (X::*func)( Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8 ) const )
	{
		delegateList.push_back( makeDelegate( obj, func ) );
	}
Ejemplo n.º 10
0
	void connect( Y * obj, void (X::*func)() const )
	{
		delegateList.push_back( makeDelegate( obj, func ) );
	}
Ejemplo n.º 11
0
	void connect( Y * obj, void (X::*func)( Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5 ) )
	{
		delegateList.push_back( makeDelegate( obj, func ) );
	}
Ejemplo n.º 12
0
	void connect( Y * obj, void (X::*func)( Param1 p1 ) )
	{
		delegateList.push_back( makeDelegate( obj, func ) );
	}
Ejemplo n.º 13
0
//------------------------------------------------------------------------------
//!
DFImportImageNode::DFImportImageNode()
{
   _output.delegate( makeDelegate( this, &DFImportImageNode::process ) );
}
Ejemplo n.º 14
0
//------------------------------------------------------------------------------
//!
DFMappingNode::DFMappingNode():
   _input(this), _scale(1.0f), _offset(0.0f)
{
   _output.delegate( makeDelegate( this, &DFMappingNode::process ) );
}
Ejemplo n.º 15
0
//------------------------------------------------------------------------------
//!
DFFillColorNode::DFFillColorNode():
   _color( 0.0f )
{
   _output.delegate( makeDelegate( this, &DFFillColorNode::process ) );
}
Ejemplo n.º 16
0
//------------------------------------------------------------------------------
//!
DFMaterialIDNode::DFMaterialIDNode():
   _input(this), _matID(0)
{
   _output.delegate( makeDelegate( this, &DFMaterialIDNode::process ) );
}
Ejemplo n.º 17
0
//------------------------------------------------------------------------------
//!
DFPolygonNode::DFPolygonNode()
{
   _output.delegate( makeDelegate( this, &DFPolygonNode::process ) );
   _polygon = new DFPolygon();
}
Ejemplo n.º 18
0
 void setDrawFunction( Y* obj, void (X::*func)( Tile& ) )
 {
   drawTileFunction = makeDelegate( obj, func );
 }
Ejemplo n.º 19
0
//------------------------------------------------------------------------------
//!
DFNoiseImageNode::DFNoiseImageNode():
   _type( TYPE_CELL )
{
   setDefaults();
   _output.delegate( makeDelegate( this, &DFNoiseImageNode::process ) );
}