Show page source of ClassStructure #79483

[[PageNavi(NavigationList)]]

=== クラス構成(概念的なもの) ===
Log4cppのクラス構成(概念的なもの)です。正確には若干違いますが、Log4cppを理解し、使用するためであれば、これで十分だと思います。[[BR]]
また、Log4cppには内部的なクラスがありますが、Log4cppを理解し、使用するためだけれあれば、それらは知る必要はありませんからここでは触れていません。[[BR]]

[[Thumb(classStructure.jpg, size=large, caption=クラス構成)]]

=== 各クラスの概要 ===
{{{ html
<span style="float:right">
}}}

{{{ GoogleAdsense
<script type="text/javascript"><!--
google_ad_client = "ca-pub-0702888637712330";
/* 20120131 */
google_ad_slot = "8641490082";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
}}}

{{{ html
</span>
}}}

 * [http://log4cpp-jp.sourceforge.jp/api/classlog4cpp_1_1Category.html Category(カテゴリ)][[BR]]
 Log4cppのCategoryクラスはLog4cppの中心的なクラスです。[[BR]]
 (注:Log4j 1.2では、Categoryクラスは非推奨となっています。代わりにLoggerクラスにとって変えられています。)[[BR]]
 また、このクラスはログ出力用のメソッドを持ちます。上のクラス図ではlogメソッドのみ記載していますが、実際には[http://log4cpp-jp.sourceforge.jp/api/classlog4cpp_1_1Category.html#aafa1ca0c9d57f9f87eae8628e89c5950 debug],[http://log4cpp-jp.sourceforge.jp/api/classlog4cpp_1_1Category.html#ad218a5e279fc9b15a076bf62503f37b4 info],[http://log4cpp-jp.sourceforge.jp/api/classlog4cpp_1_1Category.html#a5a4ba8063d108e275affa4aca5aec4ef notice],[http://log4cpp-jp.sourceforge.jp/api/classlog4cpp_1_1Category.html#a9c372f41858234fe5ab0cfe94cfdb94a warn],[http://log4cpp-jp.sourceforge.jp/api/classlog4cpp_1_1Category.html#a90d7771a3113219532878f1fea554afe error],[http://log4cpp-jp.sourceforge.jp/api/classlog4cpp_1_1Category.html#acf854aca1676ede517914bf5185fc36d crit],[http://log4cpp-jp.sourceforge.jp/api/classlog4cpp_1_1Category.html#aca8a704d6397ac3a4300966a6142460c alert],[http://log4cpp-jp.sourceforge.jp/api/classlog4cpp_1_1Category.html#a3663faf2ad6873c3da8cdfef5780277a emerg],[http://log4cpp-jp.sourceforge.jp/api/classlog4cpp_1_1Category.html#a249d46ce876a4af55a25226255e626fa fatal]といった優先度に応じたメソッドもあります。[[BR]]
 * [http://log4cpp-jp.sourceforge.jp/api/classlog4cpp_1_1Priority.html Priority(優先度)][[BR]]
 ログ出力時の優先度を表します。[[BR]]
 * [http://log4cpp-jp.sourceforge.jp/api/classlog4cpp_1_1Appender.html Appender(アペンダー)][[BR]]
 出力先です。サブクラスとして[http://log4cpp-jp.sourceforge.jp/api/classlog4cpp_1_1RollingFileAppender.html RollingFileAppender]、[http://log4cpp-jp.sourceforge.jp/api/classlog4cpp_1_1SyslogAppender.html SyslogAppender]などがあります。[[BR]]
 * [http://log4cpp-jp.sourceforge.jp/api/classlog4cpp_1_1Filter.html Filter(フィルター)][[BR]]
 ログ出力する・しないを判断します。
 * [http://log4cpp-jp.sourceforge.jp/api/classlog4cpp_1_1Layout.html Layout(レイアウト)][[BR]]
 出力をフォーマット(整形)します。[http://log4cpp-jp.sourceforge.jp/api/classlog4cpp_1_1PatternLayout.html PatternLayout]を使用するとフォーマットを自由に定義できます。
 * [http://log4cpp-jp.sourceforge.jp/api/classlog4cpp_1_1NDC.html NDC(ネスト化診断コンテキスト)][[BR]]
 [NDC NDCとは]を参照してください。

=== 各クラスの関連についての説明 ===
==== UMLについて補足 ====
UML2.0をあまり知らない方のために、補足します。

関連(正確には関連端)は、属性とほぼ同じ意味です(関連端と属性を総称してプロパティと呼びます)。
例えば、
[[Thumb(assEnd.jpg, size=large, caption=関連端で表記)]]
は、
[[Thumb(att.jpg, size=large, caption=属性で表記)]]
と同じ意味ですので、関連って何?意味分からん!という人は頭で置き換えてください。[[BR]]
※注意:正確には関連端と属性は完全に同じものではありません。例えば、関連では双方向関連や限定子を表記できますが、属性ではできません。ですが、ここではそこまで意識しなくて良いです。

関連端名の近くにある数字、例えば「0..1」とか「0..*」は多重度です。ぶっちゃけ、何個持つかということです。「1」なら常に1。「0..*」なら0個以上です。[[BR]]
表記方法ですが角カッコ([])の中に数値が入っていて一般的なプログラミング言語(C言語など)の配列の表記法と似ていると思った方、賢いです。その意味で考えてOKです。

それから、objBの前にある「-」は可視性という物です(ちなみに、「-」はprivateです)。が、ここでは意識しなくて良いです。

==== Category(カテゴリ) ====
Categoryクラスから他のクラスへの関連の関連端を属性に直すと以下のようになります。
[[Thumb(category.jpg, size=large, caption=Categoryクラス 関連端を属性で表記)]]

==== Appender(アペンダー) ====
[[PageNavi(NavigationList)]]