/* this file was generated by the MCOP idl compiler - DO NOT EDIT */

#ifndef STEREOEFFECTSTACK_NOATUN_H
#define STEREOEFFECTSTACK_NOATUN_H

#include "common.h"

// includes of other idl definitions
#include "artsflow.h"

namespace Arts {
class StereoEffectStack_Noatun;

class StereoEffectStack_Noatun_base : virtual public Arts::StereoEffect_base {
public:
	static unsigned long _IID; // interface ID

	static StereoEffectStack_Noatun_base *_create(const std::string& subClass = "Arts::StereoEffectStack_Noatun");
	static StereoEffectStack_Noatun_base *_fromString(std::string objectref);
	static StereoEffectStack_Noatun_base *_fromReference(Arts::ObjectReference ref, bool needcopy);

	inline StereoEffectStack_Noatun_base *_copy() {
		assert(_refCnt > 0);
		_refCnt++;
		return this;
	}

	virtual std::vector<std::string> _defaultPortsIn() const;
	virtual std::vector<std::string> _defaultPortsOut() const;

	void *_cast(unsigned long iid);

	virtual long insertAfter(long after, Arts::StereoEffect effect, const std::string& name) = 0;
	virtual void move(long after, long item) = 0;
	virtual std::vector<long> * effectList() = 0;
	virtual long insertTop(Arts::StereoEffect effect, const std::string& name) = 0;
	virtual long insertBottom(Arts::StereoEffect effect, const std::string& name) = 0;
	virtual void remove(long ID) = 0;
};

class StereoEffectStack_Noatun_stub : virtual public StereoEffectStack_Noatun_base, virtual public Arts::StereoEffect_stub {
protected:
	StereoEffectStack_Noatun_stub();

public:
	StereoEffectStack_Noatun_stub(Arts::Connection *connection, long objectID);

	long insertAfter(long after, Arts::StereoEffect effect, const std::string& name);
	void move(long after, long item);
	std::vector<long> * effectList();
	long insertTop(Arts::StereoEffect effect, const std::string& name);
	long insertBottom(Arts::StereoEffect effect, const std::string& name);
	void remove(long ID);
};

class StereoEffectStack_Noatun_skel : virtual public StereoEffectStack_Noatun_base, virtual public Arts::StereoEffect_skel {
public:
	StereoEffectStack_Noatun_skel();

	static std::string _interfaceNameSkel();
	std::string _interfaceName();
	bool _isCompatibleWith(const std::string& interfacename);
	void _buildMethodTable();
	void dispatch(Arts::Buffer *request, Arts::Buffer *result,long methodID);
};

};
#include "reference.h"
namespace Arts {
class StereoEffectStack_Noatun : public Arts::Object {
private:
	static Arts::Object_base* _Creator();
	StereoEffectStack_Noatun_base *_cache;
	inline StereoEffectStack_Noatun_base *_method_call() {
		_pool->checkcreate();
		if(_pool->base) {
			_cache=(StereoEffectStack_Noatun_base *)_pool->base->_cast(StereoEffectStack_Noatun_base::_IID);
			assert(_cache);
		}
		return _cache;
	}

protected:
	inline StereoEffectStack_Noatun(StereoEffectStack_Noatun_base* b) : Arts::Object(b), _cache(0) {}


public:
	typedef StereoEffectStack_Noatun_base _base_class;

	inline StereoEffectStack_Noatun() : Arts::Object(_Creator), _cache(0) {}
	inline StereoEffectStack_Noatun(const Arts::SubClass& s) :
		Arts::Object(StereoEffectStack_Noatun_base::_create(s.string())), _cache(0) {}
	inline StereoEffectStack_Noatun(const Arts::Reference &r) :
		Arts::Object(r.isString()?(StereoEffectStack_Noatun_base::_fromString(r.string())):(StereoEffectStack_Noatun_base::_fromReference(r.reference(),true))), _cache(0) {}
	inline StereoEffectStack_Noatun(const Arts::DynamicCast& c) : Arts::Object(StereoEffectStack_Noatun_base::_fromString(c.object().toString())), _cache(0) {}
	inline StereoEffectStack_Noatun(const StereoEffectStack_Noatun& target) : Arts::Object(target._pool), _cache(target._cache) {}
	inline StereoEffectStack_Noatun(Arts::Object::Pool& p) : Arts::Object(p), _cache(0) {}
	inline static StereoEffectStack_Noatun null() {return StereoEffectStack_Noatun((StereoEffectStack_Noatun_base*)0);}
	inline static StereoEffectStack_Noatun _from_base(StereoEffectStack_Noatun_base* b) {return StereoEffectStack_Noatun(b);}
	inline StereoEffectStack_Noatun& operator=(const StereoEffectStack_Noatun& target) {
		if (_pool == target._pool) return *this;
		_pool->Dec();
		_pool = target._pool;
		_cache = target._cache;
		_pool->Inc();
		return *this;
	}
	inline operator Arts::StereoEffect() const { return Arts::StereoEffect(*_pool); }
	inline operator Arts::SynthModule() const { return Arts::SynthModule(*_pool); }
	inline StereoEffectStack_Noatun_base* _base() {return _cache?_cache:_method_call();}

	inline Arts::AutoSuspendState autoSuspend();
	inline void start();
	inline void stop();
	inline void streamInit();
	inline void streamStart();
	inline void streamEnd();
	inline long insertAfter(long after, Arts::StereoEffect effect, const std::string& name);
	inline void move(long after, long item);
	inline std::vector<long> * effectList();
	inline long insertTop(Arts::StereoEffect effect, const std::string& name);
	inline long insertBottom(Arts::StereoEffect effect, const std::string& name);
	inline void remove(long ID);
};

// Forward wrapper calls to _base classes:

inline Arts::AutoSuspendState Arts::StereoEffectStack_Noatun::autoSuspend()
{
	return _cache?static_cast<Arts::SynthModule_base*>(_cache)->autoSuspend():static_cast<Arts::SynthModule_base*>(_method_call())->autoSuspend();
}

inline void Arts::StereoEffectStack_Noatun::start()
{
	 _cache?static_cast<Arts::SynthModule_base*>(_cache)->start():static_cast<Arts::SynthModule_base*>(_method_call())->start();
}

inline void Arts::StereoEffectStack_Noatun::stop()
{
	 _cache?static_cast<Arts::SynthModule_base*>(_cache)->stop():static_cast<Arts::SynthModule_base*>(_method_call())->stop();
}

inline void Arts::StereoEffectStack_Noatun::streamInit()
{
	 _cache?static_cast<Arts::SynthModule_base*>(_cache)->streamInit():static_cast<Arts::SynthModule_base*>(_method_call())->streamInit();
}

inline void Arts::StereoEffectStack_Noatun::streamStart()
{
	 _cache?static_cast<Arts::SynthModule_base*>(_cache)->streamStart():static_cast<Arts::SynthModule_base*>(_method_call())->streamStart();
}

inline void Arts::StereoEffectStack_Noatun::streamEnd()
{
	 _cache?static_cast<Arts::SynthModule_base*>(_cache)->streamEnd():static_cast<Arts::SynthModule_base*>(_method_call())->streamEnd();
}

inline long Arts::StereoEffectStack_Noatun::insertAfter(long after, Arts::StereoEffect effect, const std::string& name)
{
	return _cache?static_cast<Arts::StereoEffectStack_Noatun_base*>(_cache)->insertAfter(after, effect, name):static_cast<Arts::StereoEffectStack_Noatun_base*>(_method_call())->insertAfter(after, effect, name);
}

inline void Arts::StereoEffectStack_Noatun::move(long after, long item)
{
	 _cache?static_cast<Arts::StereoEffectStack_Noatun_base*>(_cache)->move(after, item):static_cast<Arts::StereoEffectStack_Noatun_base*>(_method_call())->move(after, item);
}

inline std::vector<long> * Arts::StereoEffectStack_Noatun::effectList()
{
	return _cache?static_cast<Arts::StereoEffectStack_Noatun_base*>(_cache)->effectList():static_cast<Arts::StereoEffectStack_Noatun_base*>(_method_call())->effectList();
}

inline long Arts::StereoEffectStack_Noatun::insertTop(Arts::StereoEffect effect, const std::string& name)
{
	return _cache?static_cast<Arts::StereoEffectStack_Noatun_base*>(_cache)->insertTop(effect, name):static_cast<Arts::StereoEffectStack_Noatun_base*>(_method_call())->insertTop(effect, name);
}

inline long Arts::StereoEffectStack_Noatun::insertBottom(Arts::StereoEffect effect, const std::string& name)
{
	return _cache?static_cast<Arts::StereoEffectStack_Noatun_base*>(_cache)->insertBottom(effect, name):static_cast<Arts::StereoEffectStack_Noatun_base*>(_method_call())->insertBottom(effect, name);
}

inline void Arts::StereoEffectStack_Noatun::remove(long ID)
{
	 _cache?static_cast<Arts::StereoEffectStack_Noatun_base*>(_cache)->remove(ID):static_cast<Arts::StereoEffectStack_Noatun_base*>(_method_call())->remove(ID);
}

};
#endif /* STEREOEFFECTSTACK_NOATUN_H */
