virtual_library.h File Reference

#include <basis/definitions.h>
#include "opsysdll.h"

Include dependency graph for virtual_library.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  library_plugins

Classes

class  library_plugins::vl_data_pack
 helps to make construction parameter passing more generic. More...
class  library_plugins::virtual_library

Defines

#define DEFINE_VIRTUAL_LIBRARY(library_class_name)
 this must be used in one and only one file in the virtual library's code.
#define STATIC_CREATE_INSTANCE_NAME   "static_create_instance"
 string form of the static method defined above in the macro.


Define Documentation

#define DEFINE_VIRTUAL_LIBRARY ( library_class_name   ) 

Value:

extern "C" { \
      virtual_library HOOPLE_DLL_EXPORT_FUNCTION *static_create_instance \
          (vl_data_pack &parameters) \
      { library_class_name blank; return blank.create_instance(parameters); } \
    }
this must be used in one and only one file in the virtual library's code.

it installs the instance creator into static scope; this is needed for our lookup process. the use of the macro is quite simple; if the root class of your virtual library is called SpongeCake, then the macro should be:

      DEFINE_VIRTUAL_LIBRARY(SpongeCake); 
the SpongeCake class must provide the virtual create_instance() function above in order to be a proper virtual_library. it must also have a blank constructor in order to work with this macro.

Definition at line 56 of file virtual_library.h.

#define STATIC_CREATE_INSTANCE_NAME   "static_create_instance"

string form of the static method defined above in the macro.

this is provided so that we don't need to hard-code the name all over the place.

Definition at line 66 of file virtual_library.h.

Referenced by library_plugins::dynamic_library_loader::create().


Generated on Sat Aug 30 04:32:52 2008 for HOOPLE Libraries by  doxygen 1.5.1