[LAD] need some C++ help

From: Dave Phillips <dlphillips@email-addr-hidden>
Date: Sat Jul 26 2008 - 20:20:26 EEST

Greetings,

I'm compiling a program called kodisein, an open-source VJ tool. I'm
hitting the wall here:

g++ -c -w -I /usr/include/stlport -I ../lib/handler -I ../lib/tools -I
../lib/types -I ../lib/values -I ../lib/widgets -I ../lib/windows -I
../src -I ../src/connectors -I ../src/handles -I ../src/objects -I
../src/modules -I ../src/modules/attribute -I ../src/modules/matrix -I
../src/modules/object -I ../src/modules/value -I /usr/include/SDL -I
/usr/include/GL -o ../lib/handler/KEventHandler.o
../lib/handler/KEventHandler.cpp
../lib/handler/KKeyActionHandler.h:42: error: expected initializer
before ‘<’ token
../lib/handler/KKeyActionHandler.h:51: error: ‘KeyActionHash’ does not
name a type
make: *** [../lib/handler/KEventHandler.o] Error 1

The file in question is short enough to include at the end of this
message (line 42 is at the typedef). I have minimal skill debugging C++
and have no idea how to fix this problem. Any suggestions from the C++
masters here ?

TIA,

dp

/*
* KKeyActionHandler.h
* kodisein
*/

#ifndef __KKeyActionHandler
#define __KKeyActionHandler

#include "KKeyHandler.h"
#include "KConsole.h"

#include <ext/hash_map>

using namespace std;

//
--------------------------------------------------------------------------------------------------------
class KKeyAction : public KNotificationObject
{
protected:

string key_name;

public:

KKeyAction ( const string & keyName )
: KNotificationObject ()
{ key_name = keyName; }
virtual ~KKeyAction () {}

virtual const string & getKeyName () const { return key_name; }
};

//
--------------------------------------------------------------------------------------------------------
struct eqstr
{
bool operator()(const char* s1, const char* s2) const
{
return strcmp(s1, s2) == 0;
}
};

typedef hash_map <const char*, KKeyAction *, hash <const char*>, eqstr>
KeyActionHash;

//
--------------------------------------------------------------------------------------------------------
class KKeyActionHandler : public KKeyHandler
{
INTROSPECTION

protected:

KeyActionHash key_handlers;
string last_key;

public:

KKeyActionHandler () : KKeyHandler () {}
virtual ~KKeyActionHandler ();

KKeyAction * getActionForSequence ( const string &, bool = false );
bool addSequenceCallback ( const string, KObject *, KCallbackPtr );
bool setSequenceCallback ( const string, KObject *, KCallbackPtr );
void removeSequenceCallback ( const string, KObject *, KCallbackPtr );

bool isSaveSequenceCallback ( const string & );

bool handleKey ( const KKey & );
};

#endif

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
Received on Sun Jul 27 00:15:02 2008

This archive was generated by hypermail 2.1.8 : Sun Jul 27 2008 - 00:15:03 EEST