IT翻訳 Nobuyuki の仕事部屋

ボランティアでソフトウエアーローカライズのために翻訳をしている。

XPCOM Component Reuseを草稿にする-07

2005-05-17 21:43:18 | InTranslated
さて、この草稿作成も本日が最後になります。内容的に私にとっては、かなり難しいものでしたが根性で訳しぬいた?(^_^ゞ感じですね。結構きついです。にもかかわらず、翻訳を続けるのはひとえに翻訳って面白いとういう理由です。また、翻訳しならが IT について勉強させてもらっています。(^_^) Mozilla Org. には翻訳が待たれる文書が沢山ありますので、まだまだ、色々な文書を翻訳して行きたいですね。ただし、出来れば自分なりの得意分野を絞ってその周辺から翻訳を続けるような方法がいいと思います。このあたりが、 Mozilla Org.のために翻訳するよいところですね。

さて、本日は有終の美を飾れますか。(-_-;

/*翻訳作業につきましては、本日の作業対象部分のみを以下に表示しておりますが、全体の原文と翻訳文(翻訳作業が完了している部分まで)は、直下のリンクをご参照ください。*/

原題: XPCOM Component Reuse
訳題: XPCOM コンポーネントの再使用

原文:  青色表示
訳文:  黒色表示
*注記/コメント: 赤色表示

Dynamic Loading

The glue library (xpcomglue.lib) provides stubs to the public frozen functions that XPCOM provides. The library will dynamically load the public symbols from the XPCOM library, producing two important results. First, the component or application will not have to link with XPCOM for any symbol. In fact having to link to any Gecko library after this dynamic loading happens is an immediate indication that something is wrong. Second, if the glue code can load XPCOM, the same glue code can also unload XPCOM. So an embedding application will able to shut down Gecko when it is not needed and to restart it at will.


動的ローディング

glue ライブラリ (xpcomglue.lib) は、XPCOM が供給する凍結された public な関数にスタッブを提供します。ライブラリは XPCOM ライブラリから public な記号を動的にロードし、2 つの重要な結果をもたらします。一つ目としては、記号を得ようと、部品やアプリケーションが XPCOM とリンクする必要がないことです。事実、動的ローディングの発生後に、Gecko ライブラリにリンクしなければいけないとすると、それは、間違いがあることを直ちに示すことになります。二つ目は、glue コードが XPCOM をロードできるなら、同じ glue コードは XPCOM をアンロードもできます。すると、埋め込みアプリケーションは、Gecko を不要な時に閉じ、欲しい時再起動できることになります。


To use this library, you need to initalize the library with the path to the xpcom library proper. If you don't have this path, you can use the default location by passing nsnull:
extern "C"
nsresult NS_COM XPCOMGlueStartup(const char* xpcomFile);

extern "C"
nsresult NS_COM XPCOMGlueShutdown();


このライブラリを使うのには、xpcom ライブラリ本体へのパスでライブラリを初期化する必要があります。このパスがなければ、nsnull を渡すことでデフォルトのロケーションを使用できます:
extern "C"
nsresult NS_COM XPCOMGlueStartup(const char* xpcomFile);

extern "C"
nsresult NS_COM XPCOMGlueShutdown();


The first function sets up these stub functions. If you do not call this function, any call to a public xpcom function will fail. If you do not want this functionaltiy, you can rebuild this library with the flag "XPCOM_GLUE_NO_DYNAMIC_LOADING".

最初の関数はこれらのスタッブ関数を設定します。この関数を呼び出さなければ、public な xpcom 関数の呼び出しは失敗します。この機能を必要としないならば、フラグ "XPCOM_GLUE_NO_DYNAMIC_LOADING" によってこのライブラリを再構築できます。

\(^o^)/

さてそれでは、草稿が完成しましたので、草稿の公開をします。
草稿: XPCOM コンポーネントの再使用