添付ファイルの情報



[添付ファイル一覧] [全ページの添付ファイル一覧]

filefunclistarray_p2.diff
格納ファイル名:attach/446576656C6F702F31_66756E636C69737461727261795F70322E64696666
ページ:Develop/1
格納ファイル名:attach/446576656C6F702F31_66756E636C69737461727261795F70322E64696666
MD5ハッシュ値:cce4d465cd7493c45c98b29cd35bdae6
サイズ:16.1KB (16516 bytes)
Content-type:application/octet-stream
登録日時:2006/10/30 09:16:28
アクセス数:204
MD5ハッシュ値:cce4d465cd7493c45c98b29cd35bdae6
filefunclistarray_p2.diff
  0
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
Index: sakura_core/CDlgFuncList.cpp
===================================================================
--- sakura_core/CDlgFuncList.cpp	(revision 1011)
+++ sakura_core/CDlgFuncList.cpp	(working copy)
@@ -100,6 +100,7 @@
 }
 
 CDlgFuncList::CDlgFuncList()
+	: m_nCurLineCRLF( 0 )
 {
 	m_pcFuncInfoArr = NULL;		/* 関数情報配列 */
 	m_nCurLine = 0;				/* 現在行 */
@@ -173,6 +174,17 @@
 	hwndList = ::GetDlgItem( m_hWnd, IDC_LIST1 );
 	hwndTree = ::GetDlgItem( m_hWnd, IDC_TREE1 );
 
+	//	From Here Oct. 29, 2006 genta
+	CLayoutMgr* pcLayoutMgr = &(((CEditView*)m_lParam)->m_pcEditDoc->m_cLayoutMgr);
+	{
+		//	現在の論理行に対応する物理行を取得(現在位置判定に使う)
+		int phx, phy;
+		
+		pcLayoutMgr->CaretPos_Log2Phys( 0, m_nCurLine - 1, &phx, &phy );
+		m_nCurLineCRLF = phy + 1;	// 1〜
+	}
+	//	To Here Oct. 29, 2006 genta
+
 	//2002.02.08 hor 隠しといてアイテム削除→あとで表示
 	::ShowWindow( hwndList, SW_HIDE );
 	::ShowWindow( hwndTree, SW_HIDE );
@@ -251,7 +263,7 @@
 		// Jul 10, 2003  little YOSHI   処理が長くなったので独立
 		m_nViewType = 0;
 		/* リストビューコントロールの初期化:Visual Basic アウトライン */
-		SetListVB();
+		SetListVB( pcLayoutMgr );
 		::SetWindowText( m_hWnd, "Visual Basic アウトライン" );
 	}else{
 		m_nViewType = 0;
@@ -296,16 +308,16 @@
 		for( i = 0; i < m_pcFuncInfoArr->GetNum(); ++i ){
 			pcFuncInfo = m_pcFuncInfoArr->GetAt( i );
 			if( !bSelected ){
-				if( i == 0 && m_nCurLine < pcFuncInfo->m_nFuncLineLAYOUT ){
+				if( i == 0 && m_nCurLineCRLF < pcFuncInfo->m_nFuncLineCRLF ){
 					bSelected = TRUE;
 					nSelectedLine = i;
 				}else
-				if( i > 0 && nFuncLineOld <= m_nCurLine && m_nCurLine < pcFuncInfo->m_nFuncLineLAYOUT ){
+				if( i > 0 && nFuncLineOld <= m_nCurLineCRLF && m_nCurLineCRLF < pcFuncInfo->m_nFuncLineCRLF ){
 					bSelected = TRUE;
 					nSelectedLine = i - 1;
 				}
 			}
-			nFuncLineOld = pcFuncInfo->m_nFuncLineLAYOUT;
+			nFuncLineOld = pcFuncInfo->m_nFuncLineCRLF;
 		}
 		if( 0 < m_pcFuncInfoArr->GetNum() && !bSelected ){
 			bSelected = TRUE;
@@ -320,7 +332,10 @@
 			if(m_bLineNumIsCRLF ){
 				wsprintf( szText, "%d", pcFuncInfo->m_nFuncLineCRLF );
 			}else{
-				wsprintf( szText, "%d", pcFuncInfo->m_nFuncLineLAYOUT );
+				//	2006.10.29 genta 物理行番号からその都度変換
+				int layx, layy;
+				pcLayoutMgr->CaretPos_Phys2Log( 0, pcFuncInfo->m_nFuncLineCRLF - 1, &layx, &layy );
+				wsprintf( szText, "%d", layy + 1 );
 			}
 			item.mask = LVIF_TEXT | LVIF_PARAM;
 			item.pszText = szText;
@@ -654,18 +669,18 @@
 		}
 		/* 現在カーソル位置のメソッドかどうか調べる */
 		if( !bSelected ){
-			if( i == 0 && m_nCurLine < pcFuncInfo->m_nFuncLineLAYOUT ){
+			if( i == 0 && m_nCurLineCRLF < pcFuncInfo->m_nFuncLineCRLF ){
 				bSelected = TRUE;
 				nSelectedLine = i;
 				htiSelected = htiItem;
 			}else
-			if( i > 0 && nFuncLineOld <= m_nCurLine && m_nCurLine < pcFuncInfo->m_nFuncLineLAYOUT ){
+			if( i > 0 && nFuncLineOld <= m_nCurLineCRLF && m_nCurLineCRLF < pcFuncInfo->m_nFuncLineCRLF ){
 				bSelected = TRUE;
 				nSelectedLine = i - 1;
 				htiSelected = htiItemOld;
 			}
 		}
-		nFuncLineOld = pcFuncInfo->m_nFuncLineLAYOUT;
+		nFuncLineOld = pcFuncInfo->m_nFuncLineCRLF;
 
 		if( NULL != pClassName ){
 			delete [] pClassName;
@@ -952,18 +967,18 @@
 
 		/* 現在カーソル位置のメソッドかどうか調べる */
 		if( !bSelected ){
-			if( i == 0 && m_nCurLine < pcFuncInfo->m_nFuncLineLAYOUT ){
+			if( i == 0 && m_nCurLineCRLF < pcFuncInfo->m_nFuncLineCRLF ){
 				bSelected = TRUE;
 				nSelectedLine = i;
 				htiSelected = htiItem;
 			}else
-			if( i > 0 && nFuncLineOld <= m_nCurLine && m_nCurLine < pcFuncInfo->m_nFuncLineLAYOUT ){
+			if( i > 0 && nFuncLineOld <= m_nCurLineCRLF && m_nCurLineCRLF < pcFuncInfo->m_nFuncLineCRLF ){
 				bSelected = TRUE;
 				nSelectedLine = i - 1;
 				htiSelected = htiItemOld;
 			}
 		}
-		nFuncLineOld = pcFuncInfo->m_nFuncLineLAYOUT;
+		nFuncLineOld = pcFuncInfo->m_nFuncLineCRLF;
 		htiItemOld = htiItem;
 		//	Jan. 04, 2001 genta
 		//	deleteはその都度行うのでここでは不要
@@ -995,7 +1010,7 @@
 
   @date Jul 10, 2003  little YOSHI
 */
-void CDlgFuncList::SetListVB (void)
+void CDlgFuncList::SetListVB ( CLayoutMgr* pcLayoutMgr )
 {
 	int				i;
 	char			szText[2048], szType[128], szOption[256];
@@ -1016,16 +1031,16 @@
 	for( i = 0; i < m_pcFuncInfoArr->GetNum(); ++i ){
 		pcFuncInfo = m_pcFuncInfoArr->GetAt( i );
 		if( !bSelected ){
-			if( i == 0 && m_nCurLine < pcFuncInfo->m_nFuncLineLAYOUT ){
+			if( i == 0 && m_nCurLineCRLF < pcFuncInfo->m_nFuncLineCRLF ){
 				bSelected = TRUE;
 				nSelectedLine = i;
 			}else
-			if( i > 0 && nFuncLineOld <= m_nCurLine && m_nCurLine < pcFuncInfo->m_nFuncLineLAYOUT ){
+			if( i > 0 && nFuncLineOld <= m_nCurLineCRLF && m_nCurLineCRLF < pcFuncInfo->m_nFuncLineCRLF ){
 				bSelected = TRUE;
 				nSelectedLine = i - 1;
 			}
 		}
-		nFuncLineOld = pcFuncInfo->m_nFuncLineLAYOUT;
+		nFuncLineOld = pcFuncInfo->m_nFuncLineCRLF;
 	}
 	if( 0 < m_pcFuncInfoArr->GetNum() && !bSelected ){
 		bSelected = TRUE;
@@ -1040,7 +1055,11 @@
 		if(m_bLineNumIsCRLF ){
 			wsprintf( szText, "%d", pcFuncInfo->m_nFuncLineCRLF );
 		}else{
-			wsprintf( szText, "%d", pcFuncInfo->m_nFuncLineLAYOUT );
+			//	2006.10.29 genta 物理行番号からその都度変換
+			//	現在の論理行に対応する物理行を取得
+			int layx, layy;
+			pcLayoutMgr->CaretPos_Phys2Log( 0, pcFuncInfo->m_nFuncLineCRLF - 1, &layx, &layy );
+			wsprintf( szText, "%d", layy + 1 );
 		}
 		item.mask = LVIF_TEXT | LVIF_PARAM;
 		item.pszText = szText;
@@ -1274,7 +1293,7 @@
 
 		/*	pcFuncInfoに登録されている行数を確認して、選択するアイテムを考える
 		*/
-		if ( pcFuncInfo->m_nFuncLineLAYOUT <= m_nCurLine ){
+		if ( pcFuncInfo->m_nFuncLineCRLF <= m_nCurLineCRLF ){
 			hItemSelected = hItem;
 		}
 
@@ -1378,22 +1397,22 @@
 		m_cmemClipText.AppendSz( (const char *)"\r\n" );	/* クリップボードコピー用テキスト */
 
 		/* 現在カーソル位置のメソッドかどうか調べる */
-		if( nBgn == 0 && m_nCurLine < pcFuncInfo->m_nFuncLineLAYOUT ){
+		if( nBgn == 0 && m_nCurLineCRLF < pcFuncInfo->m_nFuncLineCRLF ){
 			/* 現在カーソル位置のメソッドを選択状態にする */
 //			TreeView_SelectItem( hwndTree, htiItem );
 			*phtiItemSelected = htiItem;
 		}else{
 			if( nBgn + 1 < m_pcFuncInfoArr->GetNum() ){
 				pcFuncInfoNext = m_pcFuncInfoArr->GetAt( nBgn + 1 );
-				if( m_nCurLine >= pcFuncInfo->m_nFuncLineLAYOUT &&
-					m_nCurLine < pcFuncInfoNext->m_nFuncLineLAYOUT
+				if( m_nCurLineCRLF >= pcFuncInfo->m_nFuncLineCRLF &&
+					m_nCurLineCRLF < pcFuncInfoNext->m_nFuncLineCRLF
 				){
 					/* 現在カーソル位置のメソッドを選択状態にする */
 //					TreeView_SelectItem( hwndTree, htiItem );
 					*phtiItemSelected = htiItem;
 				}
 			}else{
-				if( m_nCurLine >= pcFuncInfo->m_nFuncLineLAYOUT ){
+				if( m_nCurLineCRLF >= pcFuncInfo->m_nFuncLineCRLF ){
 					/* 現在カーソル位置のメソッドを選択状態にする */
 //					TreeView_SelectItem( hwndTree, htiItem );
 					*phtiItemSelected = htiItem;
Index: sakura_core/CDlgFuncList.h
===================================================================
--- sakura_core/CDlgFuncList.h	(revision 1011)
+++ sakura_core/CDlgFuncList.h	(working copy)
@@ -25,6 +25,7 @@
 #include <windows.h>
 #include "CDialog.h"
 class CFuncInfoArr; // 2002/2/10 aroka
+class CLayoutMgr;	//	2006.10.29 genta
 
 
 //!	アウトライン解析ダイアログボックス
@@ -47,7 +48,8 @@
 	void Redraw( int nOutLineType, CFuncInfoArr*, int nCurLine );
 
 	CFuncInfoArr*	m_pcFuncInfoArr;	/* 関数情報配列 */
-	int				m_nCurLine;			/* 現在行 */
+	int				m_nCurLine;			/*!< 現在行 (レイアウト行)*/
+	int				m_nCurLineCRLF;		/*!< 現在行(物理行: 1~) 2006.10.29 genta */
 	int				m_nSortCol;			/* ソートする列番号 */
 	int				m_nListType;		/* 一覧の種類 */
 	CMemory			m_cmemClipText;		/* クリップボードコピー用テキスト */
@@ -69,7 +71,7 @@
 	void SetTreeCpp( HWND );	/* ツリーコントロールの初期化:C++メソッドツリー */
 	void SetTreeJava( HWND, BOOL );	/* ツリーコントロールの初期化:Javaメソッドツリー */
 	void SetTree();					/* ツリーコントロールの初期化:汎用品 */
-	void SetListVB( void );			/* リストビューコントロールの初期化:VisualBasic */		// Jul 10, 2003  little YOSHI
+	void SetListVB( CLayoutMgr* pcLayoutMgr );			/* リストビューコントロールの初期化:VisualBasic */		// Jul 10, 2003  little YOSHI
 
 	// 2002/11/1 frozen 
 	void SortTree(HWND hWndTree,HTREEITEM htiParent);//!< ツリービューの項目をソートする(ソート基準はm_nSortTypeを使用)
Index: sakura_core/CDlgJump.cpp
===================================================================
--- sakura_core/CDlgJump.cpp	(revision 1011)
+++ sakura_core/CDlgJump.cpp	(working copy)
@@ -202,7 +202,7 @@
 void CDlgJump::SetData( void )
 {
 	CEditDoc*		pCEditDoc = (CEditDoc*)m_lParam;
-	CFuncInfoArr	cFuncInfoArr;
+	CFuncInfoArr	cFuncInfoArr( pCEditDoc );
 	int				i;
 	HWND			hwndCtrl;
 	char			szText[1024];
Index: sakura_core/CDocLineMgr.cpp
===================================================================
--- sakura_core/CDocLineMgr.cpp	(revision 1011)
+++ sakura_core/CDocLineMgr.cpp	(working copy)
@@ -2505,5 +2505,33 @@
 
 }
 
+//--------------------------------------------------------
+//	Iterator for CDocLine
+//--------------------------------------------------------
+/*!
+	increment position ++ite
+*/
+CDocLineMgr::iterator CDocLineMgr::iterator::operator++()
+{
+	if( m_current == NULL ){
+		return *this;	//	end + 1 = end
+	}
 
+	m_current = m_current->m_pNext;
+	return *this;
+}
+
+/*!
+	increment position ite++
+*/
+CDocLineMgr::iterator CDocLineMgr::iterator::operator++(int)
+{
+	if( m_current == NULL ){
+		return *this;	//	end + 1 = end
+	}
+	iterator t( *this );
+	m_current = m_current->m_pNext;
+	return t;
+}
+
 /*[EOF]*/
Index: sakura_core/CDocLineMgr.h
===================================================================
--- sakura_core/CDocLineMgr.h	(revision 1011)
+++ sakura_core/CDocLineMgr.h	(working copy)
@@ -12,6 +12,7 @@
 	Copyright (C) 2001, hor, genta
 	Copyright (C) 2002, aroka, MIK, hor
 	Copyright (C) 2003, Moca, ryoji
+	Copyright (C) 2006, genta
 
 	This source code is designed for sakura editor.
 	Please contact the copyright holder to use this code for other purpose.
@@ -23,6 +24,7 @@
 #define _CDOCLINEMGR_H_
 
 #include <windows.h>
+#include <iterator>	// 2006.10.28 genta
 #include "global.h" // 2002/2/10 aroka
 #include "CEol.h" // 2002/2/10 aroka
 class CDocLine; // 2002/2/10 aroka
@@ -188,7 +190,7 @@
 	*/
 	CDocLine*	m_pDocLineTop;
 	CDocLine*	m_pDocLineBot;
-	CDocLine*	m_pDocLineCurrent;	/* 順アクセス時の現在位置 */
+	mutable CDocLine*	m_pDocLineCurrent;	/* 順アクセス時の現在位置 */
 	int			m_nLines;		/* 全行数 */
 	int			m_nPrevReferLine;
 	CDocLine*	m_pCodePrevRefer;
@@ -200,8 +202,47 @@
 	*/
 protected:
 
+	//	Oct. 28, 2006 genta : iterator追加
+public:
+	/*!
+		CDocLineMgrの保持するデータをCDocLineMgr::m_pDocLineCurrentに
+		影響を与えることなく効率的にスキャンする.
 
+		主としてアウトライン解析(全てのデータを読む)での利用を想定.
+		そのためunidirectionalとしてある.(戻ることは出来ない)
 
+		@note データが編集されると値は無効となる.
+		無効な値に対する操作結果は保証されない.
+		(不正なアドレスにアクセスする可能性がある)
+		
+		@date 2006.10.28 genta 新規作成
+		@author genta
+	*/
+	class iterator : public std::iterator<std::forward_iterator_tag, CDocLine>{
+	public:
+		//	operator
+		iterator operator++();
+		iterator operator++(int);
+		bool operator==(const iterator& rhs)
+			{ return m_current == rhs.m_current && m_pcDocLineMgr == rhs.m_pcDocLineMgr; }
+		bool operator!=(const iterator& rhs) { return ! ( *this == rhs ); }
+		
+		//	constructor
+		iterator ( CDocLineMgr* m, CDocLine* p ) :
+			m_pcDocLineMgr( m ), m_current( p ){}
+		iterator( const iterator& c )
+			: m_pcDocLineMgr( c.m_pcDocLineMgr ), m_current( c.m_current ){}
+
+	protected:
+		CDocLineMgr* m_pcDocLineMgr;
+		CDocLine*	 m_current;
+		
+	};
+
+	friend iterator;
+	iterator begin() { return iterator( this, GetDocLineTop() ); }
+	iterator end(){ return iterator( this, 0 ); }
+	iterator beginat(int l){ return iterator( this, GetLineInfo( l ) ); }
 };
 
 
Index: sakura_core/CEditView_Command.cpp
===================================================================
--- sakura_core/CEditView_Command.cpp	(revision 1011)
+++ sakura_core/CEditView_Command.cpp	(working copy)
@@ -4711,7 +4711,8 @@
 //		return TRUE;
 //	}
 
-	static CFuncInfoArr	cFuncInfoArr;
+	//	Oct. 28, 2006 genta
+	static CFuncInfoArr	cFuncInfoArr( m_pcEditDoc );
 //	int		nLine;
 //	int		nListType;
 
Index: sakura_core/CFuncInfoArr.cpp
===================================================================
--- sakura_core/CFuncInfoArr.cpp	(revision 1011)
+++ sakura_core/CFuncInfoArr.cpp	(working copy)
@@ -16,20 +16,20 @@
 #include <stdlib.h>
 #include <malloc.h>
 #include "CFuncInfoArr.h"
+#include "CEditDoc.h"	//	2006.10.28 genta
+#include "CDocLine.h"	//	2006.10.28 genta
 #include "debug.h"// 2002/2/10 aroka
 
 
-/* CFuncInfoArrクラス構築 */
-CFuncInfoArr::CFuncInfoArr()
+/*! CFuncInfoArrクラス構築
+
+	@date 2006.10.18 genta 引数追加 CEditDoc
+*/
+CFuncInfoArr::CFuncInfoArr(CEditDoc* doc)
+	: m_pcEditDoc( doc ), m_nFuncInfoArrNum( 0 ), m_ppcFuncInfoArr( NULL )
 {
-	m_nFuncInfoArrNum = 0;	/* 配列要素数 */
-	m_ppcFuncInfoArr = NULL;	/* 配列 */
-	return;
 }
 
-
-
-
 /* CFuncInfoArrクラス消滅 */
 CFuncInfoArr::~CFuncInfoArr()
 {
@@ -107,7 +107,8 @@
 	for( i = 0; i < m_nFuncInfoArrNum; i++ ){
 		MYTRACE( "[%d]------------------\n", i );
 		MYTRACE( "m_nFuncLineCRLF	=%d\n", m_ppcFuncInfoArr[i]->m_nFuncLineCRLF );
-		MYTRACE( "m_nFuncLineLAYOUT	=%d\n", m_ppcFuncInfoArr[i]->m_nFuncLineLAYOUT );
+		//	2006.10.28 genta m_nFuncLineLAYOUTは使わない方向で
+		//MYTRACE( "m_nFuncLineLAYOUT	=%d\n", m_ppcFuncInfoArr[i]->m_nFuncLineLAYOUT );
 		MYTRACE( "m_cmemFuncName	=[%s]\n", m_ppcFuncInfoArr[i]->m_cmemFuncName.GetPtr() );
 		MYTRACE( "m_nInfo			=%d\n", m_ppcFuncInfoArr[i]->m_nInfo );
 	}
@@ -115,5 +116,25 @@
 #endif
 }
 
+//----------------------------------------------------------
+//	Document Iterator class methods
+//----------------------------------------------------------
 
+/*!
+	Get an iterator that points the head of document data
+*/
+CFuncInfoArr::CDocIterator CFuncInfoArr::begin_data()
+{
+	return CFuncInfoArr::CDocIterator( m_pcEditDoc->m_cDocLineMgr.begin(), 1 );
+}
+
+CDocLineMgr::iterator CFuncInfoArr::end_data()
+{
+	return m_pcEditDoc->m_cDocLineMgr.end();
+}
+
+const char* CFuncInfoArr::CDocIterator::c_str()
+{
+	return m_current->m_pLine->GetPtr();
+}
 /*[EOF]*/
Index: sakura_core/CFuncInfoArr.h
===================================================================
--- sakura_core/CFuncInfoArr.h	(revision 1011)
+++ sakura_core/CFuncInfoArr.h	(working copy)
@@ -18,11 +18,14 @@
 #define _CFUNCINFOARR_H_
 
 #include "CFuncInfo.h"
+#include "CDocLineMgr.h"
 
+class CEditDoc;
+
 //! アウトライン解析 データ配列
 class CFuncInfoArr {
 	public:
-		CFuncInfoArr();	/* CFuncInfoArrクラス構築 */
+		CFuncInfoArr(CEditDoc*);	/* CFuncInfoArrクラス構築 */
 		~CFuncInfoArr();	/* CFuncInfoArrクラス消滅 */
 		CFuncInfo* GetAt( int );	/* 0<=の指定番号のデータを返す */
 		void AppendData( CFuncInfo* );	/* 配列の最後にデータを追加する */
@@ -37,6 +40,47 @@
 	private:
 		int			m_nFuncInfoArrNum;	/*!< 配列要素数 */
 		CFuncInfo**	m_ppcFuncInfoArr;	/*!< 配列 */
+		
+		CEditDoc*	m_pcEditDoc;	//!< Oct. 28, 2006 genta
+	
+	public:
+		/*!
+			アウトライン解析に特化したデータ読み出しiterator
+			
+			operator++で行番号のカウントも行う.
+			
+			@date 2006.10.28 genta 新規作成
+			@author genta
+		*/
+		class CDocIterator : public CDocLineMgr::iterator {
+		public:
+			typedef CDocLineMgr::iterator super;
+
+			/*!
+				次の行への移動と行番号のカウントアップ
+				
+				@note iteratorが最後の要素の末尾 end_data() を指しているときに
+				++を行ってはいけない.行うと行番号だけがカウントアップされてしまう.
+			*/
+			CDocIterator operator++() { super::operator++(); ++m_linenum; return *this; } ;
+			CDocIterator operator++(int) { CDocIterator t(*this); this->operator++(); return t; }
+
+			//	constructor
+			CDocIterator( CDocIterator& );
+			
+			CDocIterator( const CDocLineMgr::iterator& it, int num )
+				: CDocLineMgr::iterator( it ), m_linenum( num ){}
+
+			int get_line() const { return m_linenum; }
+			void reset_flag();
+			const char* c_str();
+		private:
+			int m_linenum;	//!< 現在の行番号(1〜)
+		};
+		
+		CDocIterator begin_data();
+		CDocLineMgr::iterator end_data();
+		void AppendData( CDocLineMgr::iterator&, const char*, int, int nDepth = 0 );
 };
 
 




    


    ホーム 一覧 単語検索 最終更新 バックアップ リンク元   ヘルプ   最終更新のRSS