[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Adonthell-commits] CVS: adonthell/src/base callback.cc, 1.1.1.1, 1.2 ca
From: |
Alexandre Courbot <address@hidden> |
Subject: |
[Adonthell-commits] CVS: adonthell/src/base callback.cc, 1.1.1.1, 1.2 callback.h, 1.1.1.1, 1.2 paths.cc, 1.1.1.1, 1.2 |
Date: |
Thu, 24 Jul 2003 08:58:01 -0400 |
Update of /cvsroot/adonthell/adonthell/src/base
In directory subversions:/tmp/cvs-serv8178/src/base
Modified Files:
callback.cc callback.h paths.cc
Log Message:
Applied Fabien's changes and extended them to all the source
(changing using namespace's into real namespace enclosing and fixed some
consts)
Index: callback.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/base/callback.cc,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** callback.cc 18 Jul 2003 15:16:09 -0000 1.1.1.1
--- callback.cc 24 Jul 2003 12:57:58 -0000 1.2
***************
*** 25,27 ****
#include "callback.h"
! using namespace base;
--- 25,63 ----
#include "callback.h"
! namespace base
! {
! functor_base::functor_base()
! : func(0), callee(0)
! {
! }
!
! functor_base::functor_base(void* c, PFunc f, const void* mf, size_t sz)
! : func(0), callee(c)
! {
! if(callee)
! {
! memcpy(memFunc, mf, sz);
! if(sz < MEM_FUNC_SIZE)
! {
! memset(memFunc+sz, 0, MEM_FUNC_SIZE-sz);
! }
! }
! else
! {
! func = f;
! }
! }
!
! functor_0::functor_0(Thunk t, void * c,PFunc f, const void * mf,size_t sz)
! : functor_base(c,f,mf,sz), thunk(t)
! {
! }
!
! functor_0::functor_0()
! {
! }
!
! functor_0::~functor_0()
! {
! }
! }
Index: callback.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/base/callback.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** callback.h 18 Jul 2003 15:16:09 -0000 1.1.1.1
--- callback.h 24 Jul 2003 12:57:58 -0000 1.2
***************
*** 48,62 ****
};
void *callee;
! functor_base():func(0),callee(0){}
! functor_base(const void *c,PFunc f, const void *mf,size_t
sz):callee((void *)c)
! {
! if(c)
! {
! memcpy(memFunc,mf,sz);
! if(sz<MEM_FUNC_SIZE)
! memset(memFunc+sz,0,MEM_FUNC_SIZE-sz);
! }
! else func = f;
! }
public:
--- 48,53 ----
};
void *callee;
! functor_base();
! functor_base(void *c, PFunc func, const void *memFunc, size_t sz);
public:
***************
*** 82,89 ****
Thunk thunk;
protected:
! functor_0(Thunk t,const void *c,PFunc f,const void *mf,size_t
sz):functor_base(c,f,mf,sz),thunk(t){}
public:
! functor_0(){}
! virtual ~functor_0() {}
void operator()()const
{
--- 73,80 ----
Thunk thunk;
protected:
! functor_0(Thunk t, void * c,PFunc f, const void * mf,size_t sz);
public:
! functor_0();
! virtual ~functor_0();
void operator()()const
{
***************
*** 174,178 ****
protected:
typedef RT (*Thunk)(const functor_base &);
! functor_0ret(Thunk t,const void *c,PFunc f,const void *mf,size_t sz):
functor_base(c,f,mf,sz),thunk(t){}
private:
--- 165,169 ----
protected:
typedef RT (*Thunk)(const functor_base &);
! functor_0ret(Thunk t,void *c,PFunc f,const void *mf,size_t sz):
functor_base(c,f,mf,sz),thunk(t){}
private:
***************
*** 303,307 ****
protected:
typedef void (*Thunk) (const functor_base &, P1);
! functor_1 (Thunk t, const void *c, PFunc f, const void *mf, size_t sz)
: functor_base (c, f, mf, sz), thunk (t) { }
private:
--- 294,298 ----
protected:
typedef void (*Thunk) (const functor_base &, P1);
! functor_1 (Thunk t, void *c, PFunc f, const void *mf, size_t sz)
: functor_base (c, f, mf, sz), thunk (t) { }
private:
***************
*** 445,449 ****
protected:
typedef RT (*Thunk)(const functor_base &,P1);
! functor_1ret(Thunk t,const void *c,PFunc f,const void *mf,size_t sz):
functor_base(c,f,mf,sz),thunk(t){}
--- 436,440 ----
protected:
typedef RT (*Thunk)(const functor_base &,P1);
! functor_1ret(Thunk t,void *c,PFunc f,const void *mf,size_t sz):
functor_base(c,f,mf,sz),thunk(t){}
Index: paths.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/base/paths.cc,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** paths.cc 18 Jul 2003 15:16:09 -0000 1.1.1.1
--- paths.cc 24 Jul 2003 12:57:58 -0000 1.2
***************
*** 29,54 ****
#define MODULES_ENV "ADONTHELL_MODULES_PATH"
! lt_dlhandle base::get_module(const std::string & modname)
! {
! lt_dlhandle ret;
!
! /* Try the MODULES_ENV variable first */
! const char * mod_env_str = getenv(MODULES_ENV);
! std::string mod_env = (mod_env_str ? mod_env_str : "");
! if (!mod_env.empty())
{
! mod_env += modname;
ret = lt_dlopenext(mod_env.c_str());
if (ret) return ret;
! }
!
! /* Try the hard-coded path then */
! mod_env = PKGLIBDIR + modname;
! ret = lt_dlopenext(mod_env.c_str());
! if (ret) return ret;
!
! std::cerr << "Failed to load module " << modname << ": " << lt_dlerror()
<< std::endl;
!
! return NULL;
}
--- 29,60 ----
#define MODULES_ENV "ADONTHELL_MODULES_PATH"
! using namespace std;
! namespace base
! {
!
! lt_dlhandle get_module(const string & modname)
{
! lt_dlhandle ret;
!
! /* Try the MODULES_ENV variable first */
! const char * mod_env_str = getenv(MODULES_ENV);
! string mod_env = (mod_env_str ? mod_env_str : "");
!
! if (!mod_env.empty())
! {
! mod_env += modname;
! ret = lt_dlopenext(mod_env.c_str());
! if (ret) return ret;
! }
!
! /* Try the hard-coded path then */
! mod_env = PKGLIBDIR + modname;
ret = lt_dlopenext(mod_env.c_str());
if (ret) return ret;
!
! cerr << "Failed to load module " << modname << ": " << lt_dlerror()
<< endl;
!
! return NULL;
! }
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Adonthell-commits] CVS: adonthell/src/base callback.cc, 1.1.1.1, 1.2 callback.h, 1.1.1.1, 1.2 paths.cc, 1.1.1.1, 1.2,
Alexandre Courbot <address@hidden> <=
- Prev by Date:
[Adonthell-commits] CVS: adonthell/src/input control_event.cc, 1.1.1.1, 1.2 control_event.h, 1.1.1.1, 1.2 event.cc, 1.1.1.1, 1.2 input.cc, 1.1.1.1, 1.2 joystick_event.cc, 1.1.1.1, 1.2 joystick_event.h, 1.1.1.1, 1.2 keyboard_event.cc, 1.1.1.1, 1.2 keyboard_event.h, 1.1.1.1, 1.2 listener.cc, 1.1.1.1, 1.2 listener.h, 1.1.1.1, 1.2 manager.cc, 1.1.1.1, 1.2 mouse_event.cc, 1.1.1.1, 1.2 mouse_event.h, 1.1.1.1, 1.2
- Next by Date:
[Adonthell-commits] CVS: adonthell/src/gfx drawing_area.cc,1.2,1.3
- Previous by thread:
[Adonthell-commits] CVS: adonthell/src/input control_event.cc, 1.1.1.1, 1.2 control_event.h, 1.1.1.1, 1.2 event.cc, 1.1.1.1, 1.2 input.cc, 1.1.1.1, 1.2 joystick_event.cc, 1.1.1.1, 1.2 joystick_event.h, 1.1.1.1, 1.2 keyboard_event.cc, 1.1.1.1, 1.2 keyboard_event.h, 1.1.1.1, 1.2 listener.cc, 1.1.1.1, 1.2 listener.h, 1.1.1.1, 1.2 manager.cc, 1.1.1.1, 1.2 mouse_event.cc, 1.1.1.1, 1.2 mouse_event.h, 1.1.1.1, 1.2
- Next by thread:
[Adonthell-commits] CVS: adonthell/src/gfx drawing_area.cc,1.2,1.3
- Index(es):