DynObj_0.56
所属分类:Windows编程
开发工具:Visual C++
文件大小:825KB
下载次数:26
上传日期:2008-05-14 15:02:20
上 传 者:
张红zhhh
说明: vc++实现动态插件机制的源程序,基于D
文件列表:
doc (0, 2007-12-16)
doc\doxygen (0, 2007-12-16)
doc\doxygen\annotated.html (7984, 2007-12-16)
doc\doxygen\classDoModuleC-members.html (7312, 2007-12-16)
doc\doxygen\classDoModuleC.html (8176, 2007-12-16)
doc\doxygen\classDoModuleC__inherit__graph.map (286, 2007-12-16)
doc\doxygen\classDoModuleC__inherit__graph.md5 (32, 2007-12-16)
doc\doxygen\classDoModuleC__inherit__graph.png (3868, 2007-12-16)
doc\doxygen\classDoRunTimeC-members.html (19424, 2007-12-16)
doc\doxygen\classDoRunTimeC.html (38776, 2007-12-16)
doc\doxygen\classDoRunTimeC__inherit__graph.map (660, 2007-12-16)
doc\doxygen\classDoRunTimeC__inherit__graph.md5 (32, 2007-12-16)
doc\doxygen\classDoRunTimeC__inherit__graph.png (8651, 2007-12-16)
doc\doxygen\classDoRunTimeI-members.html (10320, 2007-12-16)
doc\doxygen\classDoRunTimeI.html (13831, 2007-12-16)
doc\doxygen\classDoRunTimeI__inherit__graph.map (407, 2007-12-16)
doc\doxygen\classDoRunTimeI__inherit__graph.md5 (32, 2007-12-16)
doc\doxygen\classDoRunTimeI__inherit__graph.png (5418, 2007-12-16)
doc\doxygen\classdoUserTypeDecl-members.html (1639, 2007-12-16)
doc\doxygen\classdoUserTypeDecl.html (2388, 2007-12-16)
doc\doxygen\classDynData-members.html (7597, 2007-12-16)
doc\doxygen\classDynData.html (12848, 2007-12-16)
doc\doxygen\classDynData__inherit__graph.map (286, 2007-12-16)
doc\doxygen\classDynData__inherit__graph.md5 (32, 2007-12-16)
doc\doxygen\classDynData__inherit__graph.png (3486, 2007-12-16)
doc\doxygen\classDynI-members.html (5912, 2007-12-16)
doc\doxygen\classDynI.html (22983, 2007-12-16)
doc\doxygen\classDynI__inherit__graph.map (1710, 2007-12-16)
doc\doxygen\classDynI__inherit__graph.md5 (32, 2007-12-16)
doc\doxygen\classDynI__inherit__graph.png (23963, 2007-12-16)
doc\doxygen\classDynObj-members.html (6556, 2007-12-16)
doc\doxygen\classDynObj.html (11182, 2007-12-16)
doc\doxygen\classDynObjLib-members.html (13292, 2007-12-16)
doc\doxygen\classDynObjLib.html (43542, 2007-12-16)
doc\doxygen\classDynObj__inherit__graph.map (1030, 2007-12-16)
doc\doxygen\classDynObj__inherit__graph.md5 (32, 2007-12-16)
doc\doxygen\classDynObj__inherit__graph.png (14283, 2007-12-16)
doc\doxygen\classDynSharedC-members.html (7489, 2007-12-16)
doc\doxygen\classDynSharedC.html (9651, 2007-12-16)
doc\doxygen\classDynSharedC__inherit__graph.map (574, 2007-12-16)
... ...
DynObj - 0.56
-------------
The library provides supports for run-time loaded plugin classes in C++.
The compiler used to build the plugin can be different than the compiler
used for the main application.
It provides object instantiation and run-time casts that work across compiler
and DLL/SO boundaries (do_new and do_cast).
The library is written in portable C++ to 99%. The remaining 1% is a
minimalistic platform specific layer, to handle dynamic libraries, some
threading issues and synchronization.
The releationship between an application and a plugin is a loose one,
defined by one or several interface classes (ordinary C++ header files).
The end result is plugin class libraries that are binary reusable between
different applications and compilers on the platform they're built for.
If the plugin in itself is portable, it can be recompiled and used on another
platform.
Building:
---------
- src/dynobj/makefile
A cross-platform GNU makefile is provided in the src/dynobj folder
(works for Unix/Linux and MinGW/G++ on Windows).
- src/dynobj/msdev/DynObj-Samples.sln
For Windows, a Visual C++ solution file is in the src/dynobj/msdev
folder.
Requirements, Compiler:
-----------------------
The library has two levels:
A - The bare C/C++ level (very limited C++ template usage)
B - C++ level that relies on well implemented templates from the
compiler.
Most C++ compiler should do the A-level (which is enough to use
plugins in a basic way).
For B, the tested compilers are:
- G++ 3.4.5 (MinGW, Win32)
- G++ 4.2.x (MinGW, Win32)
- G++ 4.1.y (x86 Linux)
- Microsoft C++ 8.0 (Win32, Visula Studio Express 2005)
The files pi/platform.h and pi/compiler.h contain compiler specific
settings.
There are plentiful of options in the file dynobj/DoSetup.h that
enables/disables features and can work around some compiler issues.
Requirements, Plugins:
----------------------
For plugins to be used from code produced by another compiler, the
basic requirement is that they should use the same VTable layout.
That includes:
- Size per VTable entry (known 32-bit compilers use one 32-bit word).
- Order of VTable entries
- A shared calling convention (stack/register use in function calls).
Most modern compilers are compatible to a high degree here.
Information about the compiler generating the plugin (and the VTable
layout) is stored in the plugin, so a mismatch can be detected at
plugin load time.
To test how a compiler handles VTables, there is a small diagnostic
utility 'vtblt' that investigates and tests how the compiler is using
the VTables and prints compatibility information.
Documentation:
--------------
doc/DynObj-intro.html An article that describes the background of the
problem and how DynObj implements a solution.
doc/doxygen/index.html Class documentation generated by Doxygen. The
"Modules" page provides the best starting point.
Licensing:
----------
The license is LGPL like, for details see the file DynObj-license.txt.
It is asked that users of the library follow a few guidlelines when
using the library and making binary plugins.
Author:
-------
The author can be contacted at arst@users.sourceforge.net.
近期下载者:
相关文件:
收藏者: