Source: arts/artsmikmod.h


Annotated List
Files
Globals
Hierarchy
Index
/* this file was generated by the MCOP idl compiler - DO NOT EDIT */

#ifndef ARTSMIKMOD_H
#define ARTSMIKMOD_H

#include "common.h"

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

class MikModPlayObject;

class MikModPlayObject_base : virtual public Arts::PlayObject_base {
public:
	static unsigned long _IID; // interface ID

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

	inline MikModPlayObject_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);

};

class MikModPlayObject_stub : virtual public MikModPlayObject_base, virtual public Arts::PlayObject_stub {
protected:
	MikModPlayObject_stub();

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

};

class MikModPlayObject_skel : virtual public MikModPlayObject_base, virtual public Arts::PlayObject_skel {
public:
	MikModPlayObject_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"
class MikModPlayObject : public Arts::Object {
private:
	static Arts::Object_base* _Creator();
	MikModPlayObject_base *_cache;
	inline MikModPlayObject_base *_method_call() {
		_pool->checkcreate();
		if(_pool->base) {
			_cache=(MikModPlayObject_base *)_pool->base->_cast(MikModPlayObject_base::_IID);
			assert(_cache);
		}
		return _cache;
	}

protected:
	inline MikModPlayObject(MikModPlayObject_base* b) : Arts::Object(b), _cache(0) {}


public:
	typedef MikModPlayObject_base _base_class;

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

	inline std::string description();
	inline Arts::poTime currentTime();
	inline Arts::poTime overallTime();
	inline Arts::poCapabilities capabilities();
	inline std::string mediaName();
	inline Arts::poState state();
	inline void play();
	inline void seek(const Arts::poTime& newTime);
	inline void pause();
	inline void halt();
	inline bool loadMedia(const std::string& filename);
};

// Forward wrapper calls to _base classes:

inline std::string MikModPlayObject::description()
{
	return _cache?static_cast<Arts::PlayObject_base*>(_cache)->description():static_cast<Arts::PlayObject_base*>(_method_call())->description();
}

inline Arts::poTime MikModPlayObject::currentTime()
{
	return _cache?static_cast<Arts::PlayObject_base*>(_cache)->currentTime():static_cast<Arts::PlayObject_base*>(_method_call())->currentTime();
}

inline Arts::poTime MikModPlayObject::overallTime()
{
	return _cache?static_cast<Arts::PlayObject_base*>(_cache)->overallTime():static_cast<Arts::PlayObject_base*>(_method_call())->overallTime();
}

inline Arts::poCapabilities MikModPlayObject::capabilities()
{
	return _cache?static_cast<Arts::PlayObject_base*>(_cache)->capabilities():static_cast<Arts::PlayObject_base*>(_method_call())->capabilities();
}

inline std::string MikModPlayObject::mediaName()
{
	return _cache?static_cast<Arts::PlayObject_base*>(_cache)->mediaName():static_cast<Arts::PlayObject_base*>(_method_call())->mediaName();
}

inline Arts::poState MikModPlayObject::state()
{
	return _cache?static_cast<Arts::PlayObject_base*>(_cache)->state():static_cast<Arts::PlayObject_base*>(_method_call())->state();
}

inline void MikModPlayObject::play()
{
	 _cache?static_cast<Arts::PlayObject_base*>(_cache)->play():static_cast<Arts::PlayObject_base*>(_method_call())->play();
}

inline void MikModPlayObject::seek(const Arts::poTime& newTime)
{
	 _cache?static_cast<Arts::PlayObject_base*>(_cache)->seek(newTime):static_cast<Arts::PlayObject_base*>(_method_call())->seek(newTime);
}

inline void MikModPlayObject::pause()
{
	 _cache?static_cast<Arts::PlayObject_base*>(_cache)->pause():static_cast<Arts::PlayObject_base*>(_method_call())->pause();
}

inline void MikModPlayObject::halt()
{
	 _cache?static_cast<Arts::PlayObject_base*>(_cache)->halt():static_cast<Arts::PlayObject_base*>(_method_call())->halt();
}

inline bool MikModPlayObject::loadMedia(const std::string& filename)
{
	return _cache?static_cast<Arts::PlayObject_private_base*>(_cache)->loadMedia(filename):static_cast<Arts::PlayObject_private_base*>(_method_call())->loadMedia(filename);
}

#endif /* ARTSMIKMOD_H */

Generated by: stefan@stefan on Sat Feb 24 19:11:23 2001, using kdoc 2.0a47.