2011年6月20日月曜日

DoxyComment

DoxyCommentで訪れる方が多いため、
ごめんなさいしないといけません。
大した情報がないです。
さらに、VisualStudio2008に移行した時に動作しなくなり、
それ以来使っていないです。
今は、下のような粗雑なマクロしか使っていなかったりします。

Dim author = "hoge"

Sub PutFileHeader()
 Dim str As String
 Dim today As Date = Date.Now.Date()

 str = DTE.ActiveDocument.Name().ToUpper()
 str = str.Replace(".", "_")
 str = "INC_" + str + "__"

 DTE.ActiveDocument.Selection.Text = "#ifndef " + str
 DTE.ActiveDocument.Selection.NewLine()
 DTE.ActiveDocument.Selection.Text = "#define " + str
 DTE.ActiveDocument.Selection.NewLine()

 Dim name As String
 name = DTE.ActiveDocument.Name()
 DTE.ActiveDocument.Selection.Text = "/**"
 DTE.ActiveDocument.Selection.NewLine()
 DTE.ActiveDocument.Selection.Text = "@file " + name
 DTE.ActiveDocument.Selection.NewLine()
 DTE.ActiveDocument.Selection.Text = "@author " + author

 DTE.ActiveDocument.Selection.NewLine()
 DTE.ActiveDocument.Selection.Text = "@date " + today + " create"
 DTE.ActiveDocument.Selection.NewLine()
 DTE.ActiveDocument.Selection.Text = "*/"

 DTE.ActiveDocument.Selection.NewLine()
 DTE.ActiveDocument.Selection.Text = "#endif //" + str
 DTE.ActiveDocument.Selection.NewLine()
End Sub


ここから、DoxyCommentとは関係なし。
自戒をこめて。
ドキュメントやサンプルを読まない人がいる。
誰も触れたことのない新技術のライブラリなら、
しっかりと読むべきだろうと。
趣味ならいくらでも自分で悩めばいいが。

0 件のコメント:

コメントを投稿