#ifndef VCZH_COLLECTIONS_OPERATIONSEQUENCE
#define VCZH_COLLECTIONS_OPERATIONSEQUENCE
#include "OperationEnumerable.h"
#include "OperationCopyFrom.h"
#include "List.h"
namespace
{
namespace
{
template
<
typename
>
class
:
public
virtual
<
>
{
protected
:
<
>*
;
;
public
:
(
<
>*
,
)
:enumerator(
)
,count(
)
{
}
()
{
delete
;
}
<
>*
()
const
override
{
return
new
(
->
(),
);
}
const
&
()
const
override
{
return
->
();
}
()
const
override
{
return
->
();
}
bool
()
override
{
if
(
->
()>=
-
1
)
return
false
;
return
->
();
}
void
()
override
{
->
();
}
bool
()
const
override
{
return
->
();
}
};
template
<
typename
>
class
:
public
virtual
<
>
{
protected
:
<
>*
;
;
bool
;
public
:
(
<
>*
,
,
bool
=
false
)
:enumerator(
)
,count(
)
,skipped(
)
{
}
()
{
delete
;
}
<
>*
()
const
override
{
return
new
(
->
(),
,
);
}
const
&
()
const
override
{
return
->
();
}
()
const
override
{
return
->
()-
;
}
bool
()
override
{
if
(!
)
{
=
true
;
for
(
=
0
;
i
<
;
i
++)
{
if
(!
->
())
{
return
false
;
}
}
}
return
->
();
}
void
()
override
{
->
();
=
false
;
}
bool
()
const
override
{
return
->
();
}
};
template
<
typename
>
class
:
public
virtual
<
>
{
protected
:
<
>*
;
;
;
;
public
:
(
<
>*
,
,
=-
1
,
=
0
)
:enumerator(
)
,count(
)
,index(
)
,repeatedCount(
)
{
}
()
{
delete
;
}
<
>*
()
const
override
{
return
new
(
->
(),
,
,
);
}
const
&
()
const
override
{
return
->
();
}
()
const
override
{
return
;
}
bool
()
override
{
while
(
<
)
{
if
(
->
())
{
++;
return
true
;
}
++;
->
();
}
return
false
;
}
void
()
override
{
->
();
=-
1
;
=
0
;
}
bool
()
const
override
{
return
->
();
}
};
template
<
typename
>
class
:
public
virtual
<
>
{
protected
:
<
>*
;
<
>
;
;
public
:
(
<
>*
)
:enumerator(
)
{
}
(
const
&
)
:lastValue(
.
)
{
=
.
->
();
(
,
.
);
}
()
{
delete
;
}
<
>*
()
const
override
{
return
new
(*
this
);
}
const
&
()
const
override
{
return
;
}
()
const
override
{
return
.
()-
1
;
}
bool
()
override
{
while
(
->
())
{
const
&
=
->
();
if
(!
<
>::
(
,
current
))
{
=
current
;
.
(
current
);
return
true
;
}
}
return
false
;
}
void
()
override
{
->
();
.
();
}
};
template
<
typename
>
class
:
public
virtual
<
>
{
protected
:
<
>
;
;
public
:
(
const
<
>&
)
:index(-
1
)
{
(
,
);
}
(
const
&
)
:index(
.
)
{
(
,
.
);
}
()
{
}
<
>*
()
const
override
{
return
new
(*
this
);
}
const
&
()
const
override
{
return
.
(
.
()-
1
-
);
}
()
const
override
{
return
;
}
bool
()
override
{
++;
return
<
.
();
}
void
()
override
{
=-
1
;
}
bool
()
const
override
{
return
true
;
}
};
template
<
typename
,
typename
>
class
:
public
,
public
<
>
{
private
:
class
:
public
,
public
<
>
{
private
:
;
;
;
public
:
(
,
,
)
:begin(
)
,end(
)
,current(
)
{
}
<
>*
()
const
override
{
return
new
(
,
,
);
}
const
&
()
const
override
{
return
*
;
}
()
const
override
{
return
-
;
}
bool
()
override
{
++;
return
<=
&&
<
;
}
void
()
override
{
=
-
1
;
}
bool
()
const
override
{
return
true
;
}
};
private
:
;
;
public
:
<
>*
()
const
{
return
new
(
,
,
-
1
);
}
(
,
)
:begin(
)
,end(
)
{
}
(
const
<
,
>&
)
:begin(
.
)
,end(
.
)
{
}
};
template
<
typename
>
class
{
public
:
template
<
typename
>
static
<
,
>
(
,
)
{
return
<
,
>(
,
);
}
};
template
<
typename
>
<
,
const
*>
(
const
*
,
const
*
)
{
return
<
,
const
*>(
,
);
}
template
<
typename
,
int
>
<
,
*>
(
(&
)[
])
{
return
<
,
*>(&
[
0
], &
[
]);
}
}
}
#endif