Ejemplo n.º 1
0
void Bitmap::ensureNonMega() const
{
	if (isDisposed())
		return;

	GUARD_MEGA;
}
Ejemplo n.º 2
0
World::~World()
{

	if (!isDisposed())
	{
		dispose();
	}
}
Ejemplo n.º 3
0
bool World::_renameObject(Object* object, const String& name)
{
	if (isDisposed()) return false;

	// Nothing to do yet

	return true;
}
Ejemplo n.º 4
0
bool World::_attachObject(Object* object)
{
	if (isDisposed()) return false;

	_attached.insert(object);

	return true;
}
Ejemplo n.º 5
0
bool World::_detachObject(Object* object)
{
	if (isDisposed()) return false;

	ObjectSet::iterator itr = _attached.find(object);

	_attached.erase(itr);

	return true;
}
Ejemplo n.º 6
0
void Bitmap::flush() const
{
	if (isDisposed())
		return;

	if (p->megaSurface)
		return;

	p->flushPoints();
}
Ejemplo n.º 7
0
static void
tr_core_dispose( GObject * obj )
{
    TrCore * core = TR_CORE( obj );

    if( !isDisposed( core ) )
    {
        GObjectClass * parent;

        core->priv = NULL;

        parent = g_type_class_peek( g_type_parent( TR_CORE_TYPE ) );
        parent->dispose( obj );
    }
}
Ejemplo n.º 8
0
bool World::dispose()
{
	if (isDisposed()) return true;

	_status = GWS_DISPOSING;

	for (ObjectSet::iterator itr = _attached.begin(), end = _attached.end(); itr != end; ++itr)
	{
		Object* obj = *itr;
		obj->_disposeByWorld();
	}

	_attached.clear();

	_status = GWS_DISPOSED;

	return true;
}
Ejemplo n.º 9
0
Object* World::attach(const String& name, Object* obj)
{
	if (isDisposed()) return NULL;

	if (obj == NULL)
	{
		LOG(0, "*** Cannot attach '%s' : object is null\n", name.c_str());
		return NULL;
	}

	if (obj->isReactivating() || obj->isEditing())
	{
		LOG(0, "*** Cannot attach '%s' : object is now busy\n", name.c_str());
		return NULL;
	}

	if (obj->_world == this)
		return obj;

	if (obj->_world)
	{
		LOG(0, "*** Cannot attach '%s' : already attached to '%s'\n", name.c_str(), obj->_world->getName().c_str());
		return NULL;
	}

	Ref<RefCounted> safe = obj;

	obj->_name = name;

	bool ok = _attachObject(obj);

	if (!ok) return NULL;

	obj->_world = this;
	g_Session->removeIsolated(obj);

	obj->_reactivateAll();

	obj->onAttach();

	return obj;
}
Ejemplo n.º 10
0
D3DSampler::~D3DSampler(){
	if (!isDisposed())Dispose();
}