-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDocEnumerator.h
52 lines (46 loc) · 1.93 KB
/
DocEnumerator.h
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
/////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2005-2011 Association Homecinema Francophone. All rights reserved.
/////////////////////////////////////////////////////////////////////////////
//
// This file is subject to the terms of the GNU General Public License as
// published by the Free Software Foundation. A copy of this license is
// included with this software distribution in the file COPYING.htm. If you
// do not have a copy, you may obtain a copy by writing to the Free
// Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
//
// This software is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details
/////////////////////////////////////////////////////////////////////////////
// Author(s):
// François-Xavier CHABOUD
/////////////////////////////////////////////////////////////////////////////
// DocEnumerator.h: interface for the CDocEnumerator class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_DOCENUMERATOR_H__FF909DB2_F211_4B7E_86E0_46E4DC5FACCE__INCLUDED_)
#define AFX_DOCENUMERATOR_H__FF909DB2_F211_4B7E_86E0_46E4DC5FACCE__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// CDocEnumerator: Enumerates all the documents in an MFC application.
// To use:
//
// CDocEnumerator it;
// CDocument* pdoc;
// while ((pdoc=it.Next())!=NULL) {
// // do something
// }
//
class CDocEnumerator
{
private:
CPtrArray m_doclist; // array of all docs
int m_iPos; // current position in array
public:
CDocEnumerator();
CDocument* Next();
void Reset() { m_iPos=-1; }
};
#endif // !defined(AFX_DOCENUMERATOR_H__FF909DB2_F211_4B7E_86E0_46E4DC5FACCE__INCLUDED_)