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

#ifndef RAWSCOPESTEREO_H
#define RAWSCOPESTEREO_H

#include "common.h"

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

namespace Arts {
class RawScopeStereo;

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

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

	inline RawScopeStereo_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 buffer() = 0;
	virtual void buffer(long newValue) = 0;
	virtual std::vector<float> * scopeLeft() = 0;
	virtual std::vector<float> * scopeRight() = 0;
};

class RawScopeStereo_stub : virtual public RawScopeStereo_base, virtual public Arts::StereoEffect_stub {
protected:
	RawScopeStereo_stub();

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

	long buffer();
	void buffer(long newValue);
	std::vector<float> * scopeLeft();
	std::vector<float> * scopeRight();
};

class RawScopeStereo_skel : virtual public RawScopeStereo_base, virtual public Arts::StereoEffect_skel {
protected:
	// emitters for change notifications
	inline void buffer_changed(long newValue) {
		_emit_changed("buffer_changed",newValue);
	}

public:
	RawScopeStereo_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 RawScopeStereo : public Arts::Object {
private:
	static Arts::Object_base* _Creator();
	RawScopeStereo_base *_cache;
	inline RawScopeStereo_base *_method_call() {
		_pool->checkcreate();
		if(_pool->base) {
			_cache=(RawScopeStereo_base *)_pool->base->_cast(RawScopeStereo_base::_IID);
			assert(_cache);
		}
		return _cache;
	}

protected:
	inline RawScopeStereo(RawScopeStereo_base* b) : Arts::Object(b), _cache(0) {}


public:
	typedef RawScopeStereo_base _base_class;

	inline RawScopeStereo() : Arts::Object(_Creator), _cache(0) {}
	inline RawScopeStereo(const Arts::SubClass& s) :
		Arts::Object(RawScopeStereo_base::_create(s.string())), _cache(0) {}
	inline RawScopeStereo(const Arts::Reference &r) :
		Arts::Object(r.isString()?(RawScopeStereo_base::_fromString(r.string())):(RawScopeStereo_base::_fromReference(r.reference(),true))), _cache(0) {}
	inline RawScopeStereo(const Arts::DynamicCast& c) : Arts::Object(RawScopeStereo_base::_fromString(c.object().toString())), _cache(0) {}
	inline RawScopeStereo(const RawScopeStereo& target) : Arts::Object(target._pool), _cache(target._cache) {}
	inline RawScopeStereo(Arts::Object::Pool& p) : Arts::Object(p), _cache(0) {}
	inline static RawScopeStereo null() {return RawScopeStereo((RawScopeStereo_base*)0);}
	inline static RawScopeStereo _from_base(RawScopeStereo_base* b) {return RawScopeStereo(b);}
	inline RawScopeStereo& operator=(const RawScopeStereo& 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 RawScopeStereo_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 buffer();
	inline void buffer(long _newValue);
	inline std::vector<float> * scopeLeft();
	inline std::vector<float> * scopeRight();
};

// Forward wrapper calls to _base classes:

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

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

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

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

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

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

inline long Arts::RawScopeStereo::buffer()
{
	return _cache?static_cast<Arts::RawScopeStereo_base*>(_cache)->buffer():static_cast<Arts::RawScopeStereo_base*>(_method_call())->buffer();
}

inline void Arts::RawScopeStereo::buffer(long _newValue)
{
	 _cache?static_cast<Arts::RawScopeStereo_base*>(_cache)->buffer(_newValue):static_cast<Arts::RawScopeStereo_base*>(_method_call())->buffer(_newValue);
}

inline std::vector<float> * Arts::RawScopeStereo::scopeLeft()
{
	return _cache?static_cast<Arts::RawScopeStereo_base*>(_cache)->scopeLeft():static_cast<Arts::RawScopeStereo_base*>(_method_call())->scopeLeft();
}

inline std::vector<float> * Arts::RawScopeStereo::scopeRight()
{
	return _cache?static_cast<Arts::RawScopeStereo_base*>(_cache)->scopeRight():static_cast<Arts::RawScopeStereo_base*>(_method_call())->scopeRight();
}

};
#endif /* RAWSCOPESTEREO_H */
