1 // VersionFilter.h: interface for the CVersionFilter class.
3 //////////////////////////////////////////////////////////////////////
5 #if !defined(AFX_VERSIONFILTER_H__66CEFF72_78D5_4F75_A69C_FCEC324CF8FD__INCLUDED_)
6 #define AFX_VERSIONFILTER_H__66CEFF72_78D5_4F75_A69C_FCEC324CF8FD__INCLUDED_
10 #endif // _MSC_VER > 1000
12 #include <SSPhysLib\SSObject.h>
13 #include <SSPhysLib\SSVersionObject.h>
18 virtual ~CVersionFilter () {}
19 virtual bool Filter (SSObject
* pObject
) const = 0;
22 class CVersionRangeFilter
: public CVersionFilter
25 CVersionRangeFilter (int lower
, int upper
)
26 : m_Lower (lower
), m_Upper (upper
)
30 virtual bool Filter (SSObject
* pObject
) const
32 SSVersionObject
* pAction
= dynamic_cast<SSVersionObject
*> (pObject
);
35 if (pAction
->GetVersionNumber() >= m_Lower
&& pAction
->GetVersionNumber() <= m_Upper
)
45 class CVersionSingleFilter
: public CVersionRangeFilter
48 CVersionSingleFilter (int version
)
49 : CVersionRangeFilter (version
, version
)
54 #endif // !defined(AFX_VERSIONFILTER_H__66CEFF72_78D5_4F75_A69C_FCEC324CF8FD__INCLUDED_)