#ifndef _DECL_waitqd_H_
#define _DECL_waitqd_H_
#include "charm++.h"
#include "CkFutures.decl.h"

/* DECLS: readonly CkChareID waitqd_qdhandle;
 */

/* DECLS: message ckGroupIDMsg;
 */
class ckGroupIDMsg;
class CMessage_ckGroupIDMsg:public CkArrayMessage{
  public:
    static int __idx;
    void* operator new(size_t, const int);
    void* operator new(size_t);
    void operator delete(void *p){CkFreeMsg(p);}
    void* operator new(size_t, void*p) {return p;}
    void* operator new(size_t, int*, const int);
    void* operator new(size_t, int*);
    static void*alloc(int,size_t,int*,int);
    CMessage_ckGroupIDMsg() {};
    static void *pack(ckGroupIDMsg *p);
    static ckGroupIDMsg* unpack(void* p);
    static void __register(const char *s, size_t size, CkPackFnPtr pack, CkUnpackFnPtr unpack) {
      __idx = CkRegisterMsg(s, pack, unpack, 0, size);
    }
};

/* DECLS: message ckGroupCreateMsg;
 */
class ckGroupCreateMsg;
class CMessage_ckGroupCreateMsg:public CkArrayMessage{
  public:
    static int __idx;
    void* operator new(size_t, const int);
    void* operator new(size_t);
    void operator delete(void *p){CkFreeMsg(p);}
    void* operator new(size_t, void*p) {return p;}
    void* operator new(size_t, int*, const int);
    void* operator new(size_t, int*);
    static void*alloc(int,size_t,int*,int);
    CMessage_ckGroupCreateMsg() {};
    static void *pack(ckGroupCreateMsg *p);
    static ckGroupCreateMsg* unpack(void* p);
    static void __register(const char *s, size_t size, CkPackFnPtr pack, CkUnpackFnPtr unpack) {
      __idx = CkRegisterMsg(s, pack, unpack, 0, size);
    }
};

/* DECLS: mainchare waitqd_QDChare{
waitqd_QDChare();
threaded sync void waitQD(void);
void onQD(CkQdMsg*);
};
 */
class waitqd_QDChare;
class CProxy_waitqd_QDChare: public virtual _CK_CID{
  public:
    static int __idx;
    static void __register(const char *s, size_t size);
    CProxy_waitqd_QDChare(CkChareID __cid) { ckSetChareId(__cid); }
    CkChareID ckGetChareId(void) { return _ck_cid; }
    void ckSetChareId(CkChareID __cid) {_CHECK_CID(__cid,__idx);_ck_cid=__cid;}
/* DECLS: waitqd_QDChare();
 */
    static void ckNew(int onPE=CK_PE_ANY);
    static void ckNew(CkChareID* pcid, int onPE=CK_PE_ANY);
    CProxy_waitqd_QDChare(int onPE=CK_PE_ANY);
    static int  __idx_waitqd_QDChare;
    static int  ckIdx_waitqd_QDChare() { return __idx_waitqd_QDChare; }
    static void _call_waitqd_QDChare(CkArgMsg* msg, waitqd_QDChare* obj);

/* DECLS: threaded sync void waitQD(void);
 */
    void waitQD(void);
     void waitQD(CkFutureID*);
    static int  __idx_waitQD_void;
    static int  ckIdx_waitQD(void) { return __idx_waitQD_void; }
    static void _call_waitQD_void(void* msg, waitqd_QDChare* obj);
    static void _callthr_waitQD_void(CkThrCallArg *);

/* DECLS: void onQD(CkQdMsg*);
 */
    void onQD(CkQdMsg*msg);
    static int  __idx_onQD_CkQdMsg;
    static int  ckIdx_onQD(CkQdMsg*msg) { return __idx_onQD_CkQdMsg; }
    static void _call_onQD_CkQdMsg(void* msg, waitqd_QDChare* obj);
};

/* DECLS: chare waitGC_chare{
waitGC_chare(void);
void recvGroupID(ckGroupIDMsg*);
sync ckGroupIDMsg* createGroup(ckGroupCreateMsg*);
sync ckGroupIDMsg* createNodeGroup(ckGroupCreateMsg*);
};
 */
class waitGC_chare;
class CProxy_waitGC_chare: public virtual _CK_CID{
  public:
    static int __idx;
    static void __register(const char *s, size_t size);
    CProxy_waitGC_chare(CkChareID __cid) { ckSetChareId(__cid); }
    CkChareID ckGetChareId(void) { return _ck_cid; }
    void ckSetChareId(CkChareID __cid) {_CHECK_CID(__cid,__idx);_ck_cid=__cid;}
/* DECLS: waitGC_chare(void);
 */
    static void ckNew(int onPE=CK_PE_ANY);
    static void ckNew(CkChareID* pcid, int onPE=CK_PE_ANY);
    CProxy_waitGC_chare(int onPE=CK_PE_ANY);
    static int  __idx_waitGC_chare_void;
    static int  ckIdx_waitGC_chare(void) { return __idx_waitGC_chare_void; }
    static void _call_waitGC_chare_void(void* msg, waitGC_chare* obj);

/* DECLS: void recvGroupID(ckGroupIDMsg*);
 */
    void recvGroupID(ckGroupIDMsg*msg);
    static int  __idx_recvGroupID_ckGroupIDMsg;
    static int  ckIdx_recvGroupID(ckGroupIDMsg*msg) { return __idx_recvGroupID_ckGroupIDMsg; }
    static void _call_recvGroupID_ckGroupIDMsg(void* msg, waitGC_chare* obj);

/* DECLS: sync ckGroupIDMsg* createGroup(ckGroupCreateMsg*);
 */
    ckGroupIDMsg* createGroup(ckGroupCreateMsg*msg);
     void createGroup(ckGroupCreateMsg*msg, CkFutureID*);
    static int  __idx_createGroup_ckGroupCreateMsg;
    static int  ckIdx_createGroup(ckGroupCreateMsg*msg) { return __idx_createGroup_ckGroupCreateMsg; }
    static void _call_createGroup_ckGroupCreateMsg(void* msg, waitGC_chare* obj);

/* DECLS: sync ckGroupIDMsg* createNodeGroup(ckGroupCreateMsg*);
 */
    ckGroupIDMsg* createNodeGroup(ckGroupCreateMsg*msg);
     void createNodeGroup(ckGroupCreateMsg*msg, CkFutureID*);
    static int  __idx_createNodeGroup_ckGroupCreateMsg;
    static int  ckIdx_createNodeGroup(ckGroupCreateMsg*msg) { return __idx_createNodeGroup_ckGroupCreateMsg; }
    static void _call_createNodeGroup_ckGroupCreateMsg(void* msg, waitGC_chare* obj);
};

extern void _registerwaitqd(void);
#endif
