/[ascend]/trunk/pygtk/interface/library.cpp
ViewVC logotype

Diff of /trunk/pygtk/interface/library.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 190 by johnpye, Mon Jan 16 08:53:30 2006 UTC revision 213 by johnpye, Tue Jan 24 23:25:56 2006 UTC
# Line 227  Library::getModuleTypes(const Module &m) Line 227  Library::getModuleTypes(const Module &m)
227  /**  /**
228      This function is kinda fighting against the Table implementation of the external function library. What we really need is some kind of iterator on the Table struct, but it doesn't seem to be implemented. Instead there is a C-style equivalent of the STL 'bind1st' function which we can use, but it's not exported from the current extfunc.h so we need to add it.      This function is kinda fighting against the Table implementation of the external function library. What we really need is some kind of iterator on the Table struct, but it doesn't seem to be implemented. Instead there is a C-style equivalent of the STL 'bind1st' function which we can use, but it's not exported from the current extfunc.h so we need to add it.
229  */  */
230  vector<ExtFn>  vector<ExtMethod>
231  Library::getExtFns(){  Library::getExtMethods(){
232      // Clear the vector      // Clear the vector
233      extfn_vector = vector<ExtFn>();      extmethod_vector = vector<ExtMethod>();
234    
235      // Traverse the vector      // Traverse the vector
236      TraverseExtFuncLibrary(Library::extFuncTraverse, (void *)this);      TraverseExtFuncLibrary(Library::extMethodTraverse, (void *)this);
237    
238      return extfn_vector;      return extmethod_vector;
239  }  }
240    
241  /**  /**
# Line 245  Library::getExtFns(){ Line 245  Library::getExtFns(){
245      @NOTE there might be issues with C/C++ linking here?      @NOTE there might be issues with C/C++ linking here?
246  */  */
247  void  void
248  Library::extFuncTraverse(void *a1, void *a2){  Library::extMethodTraverse(void *a1, void *a2){
249      Library *self = (Library *)a2;      Library *self = (Library *)a2;
250      self->appendToExtFnVector(a1);      self->appendToExtMethodVector(a1);
251  }  }
252    
253  void  void
254  Library::appendToExtFnVector(void *a1){  Library::appendToExtMethodVector(void *a1){
255      struct ExternalFunc *e = (struct ExternalFunc *)a1;      struct ExternalFunc *e = (struct ExternalFunc *)a1;
256      extfn_vector.push_back(ExtFn(e));      extmethod_vector.push_back(ExtMethod(e));
257  }  }
258    
259  /**  /**

Legend:
Removed from v.190  
changed lines
  Added in v.213

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22