#ifndef VCZH_COLLECTIONS_OPERATIONENUMERABLE
#define VCZH_COLLECTIONS_OPERATIONENUMERABLE
#include "List.h"
#include "../Pointer.h"
namespace
{
namespace
{
template
<
typename
>
class
:
public
,
public
<
>
{
private
:
class
:
public
,
public
virtual
<
>
{
<
>*
()
const
override
{
return
new
;
}
const
&
()
const
override
{
CHECK_FAIL(L"EmptyEnumerable<T>::Enumerator::Current()#This collection is empty.");
do
{
throw
(
L"EmptyEnumerable<T>::Enumerator::Current()#This collection is empty."
);}
while
(
0
);
}
()
const
override
{
return
-
1
;
}
bool
()
override
{
return
false
;
}
void
()
override
{
}
bool
()
const
override
{
return
true
;
}
};
public
:
<
>*
()
const
{
return
new
;
}
};
template
<
typename
>
class
:
public
,
public
virtual
<
>
{
protected
:
;
;
;
public
:
(
,
,
)
:start(
)
,count(
)
,current(
)
{
}
(
,
)
:start(
)
,count(
)
,current(
-
1
)
{
}
<
>*
()
const
override
{
return
new
(
,
,
);
}
const
&
()
const
override
{
return
;
}
()
const
override
{
return
-
;
}
bool
()
override
{
if
(
-
1
<=
&&
<
+
-
1
)
{
++;
return
true
;
}
else
{
return
false
;
}
}
void
()
override
{
=
-
1
;
}
bool
()
const
override
{
return
true
;
}
};
template
<
typename
,
typename
>
class
:
public
,
public
virtual
<
>
{
private
:
<
>
;
;
public
:
(
<
>
,
=-
1
)
{
;
=
;
}
<
>*
()
const
override
{
return
new
(
,
);
}
const
&
()
const
override
{
return
Get(
);
}
()
const
override
{
return
;
}
bool
()
override
{
++;
return
>=
0
&&
<
Count();
}
void
()
override
{
=-
1
;
}
bool
()
const
override
{
return
true
;
}
};
template
<
typename
,
typename
>
(
const
<
>&
,
const
<
>&
)
{
<
<
>>
=
.
();
<
<
>>
=
.
();
while
(
true
)
{
bool
=
ator
();
bool
=
btor
();
if
(
a
&& !
b
)
return
1
;
if
(!
a
&&
b
)
return
-
1
;
if
(!
a
&& !
b
)
break
;
const
&
=
ator
();
const
&
=
btor
();
if
(
ac
<
bc
)
{
return
-
1
;
}
else
if
(
ac
>
bc
)
{
return
1
;
}
}
return
0
;
}
template
<
typename
>
struct
{
static
bool
(
const
<
>&
,
const
&
)
{
return
.
(
);
}
};
template
<
typename
>
struct
<
<
>>
{
static
bool
(
const
<
<
>>&
,
const
<
>&
)
{
return
.
(
.
());
}
};
}
}
#endif