X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Fvm%2Fsuck.hpp;h=ff7077387636fb569662d9639708ad8210335707;hb=4a6cefba48d8720b9e33f2e89823b8ed7fa0b78d;hp=0db6a577cfeb56846e7d4e429fa006fb7d95e07f;hpb=30d5908a20a9b83aab2c423ac4c17fec27e61088;p=cacao.git diff --git a/src/vm/suck.hpp b/src/vm/suck.hpp index 0db6a577c..ff7077387 100644 --- a/src/vm/suck.hpp +++ b/src/vm/suck.hpp @@ -28,14 +28,17 @@ #include "config.h" +#ifdef __cplusplus +#include +#endif + #include "vm/types.h" #include "threads/mutex.hpp" #include "toolbox/hashtable.h" -#include "toolbox/list.hpp" -#include "vm/class.h" +#include "vm/class.hpp" #include "vm/global.h" #include "vm/loader.hpp" @@ -47,9 +50,7 @@ enum { CLASSPATH_ARCHIVE }; -typedef struct list_classpath_entry list_classpath_entry; - -struct list_classpath_entry { +typedef struct list_classpath_entry { #if defined(ENABLE_THREADS) Mutex *mutex; /* mutex locking on zip/jar files */ #endif @@ -59,8 +60,28 @@ struct list_classpath_entry { #if defined(ENABLE_ZLIB) hashtable *htclasses; #endif +} list_classpath_entry; + + +#ifdef __cplusplus + +/** + * Classpath entries list. + */ +class SuckClasspath : protected std::list { +public: + void add(char *classpath); + void add_from_property(const char *key); + + // make iterator of std::list visible + using std::list::iterator; + + // make functions of std::list visible + using std::list::begin; + using std::list::end; }; +#endif /* macros to read LE and BE types from a buffer ******************************** @@ -148,25 +169,12 @@ struct list_classpath_entry { #define suck_s8(a) (s8) suck_u8((a)) -/* export variables ***********************************************************/ - -#ifdef __cplusplus -extern List* list_classpath_entries; -#else -extern List* list_classpath_entries; -#endif - /* function prototypes ********************************************************/ #ifdef __cplusplus extern "C" { #endif -bool suck_init(void); - -void suck_add(char *classpath); -void suck_add_from_property(const char *key); - bool suck_check_classbuffer_size(classbuffer *cb, s4 len); u1 suck_u1(classbuffer *cb);