90 lines
1.2 KiB
C++
90 lines
1.2 KiB
C++
|
/*
|
||
|
* This file is a part of Winix
|
||
|
* and is not publicly distributed
|
||
|
*
|
||
|
* Copyright (c) 2012, Tomasz Sowa
|
||
|
* All rights reserved.
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
#include "templates.h"
|
||
|
#include "core/request.h"
|
||
|
#include "core/misc.h"
|
||
|
#include "functions/functions.h"
|
||
|
|
||
|
|
||
|
namespace TemplatesFunctions
|
||
|
{
|
||
|
|
||
|
static Functions::Iterator winixfun_iter;
|
||
|
static bool winixfun_iter_valid = false;
|
||
|
|
||
|
|
||
|
void man_winixfun_tab(Info & i)
|
||
|
{
|
||
|
if( i.iter == 0 )
|
||
|
winixfun_iter = functions->Begin();
|
||
|
else
|
||
|
if( winixfun_iter != functions->End() )
|
||
|
++winixfun_iter;
|
||
|
|
||
|
i.res = (winixfun_iter != functions->End());
|
||
|
winixfun_iter_valid = i.res;
|
||
|
}
|
||
|
|
||
|
|
||
|
void man_winixfun_tab_index(Info & i)
|
||
|
{
|
||
|
i.out << (i.iter+1);
|
||
|
}
|
||
|
|
||
|
|
||
|
void man_winixfun_tab_name(Info & i)
|
||
|
{
|
||
|
if( winixfun_iter_valid )
|
||
|
i.out << winixfun_iter->first;
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
static EzcFun::Iterator ezcfun_iter;
|
||
|
static bool ezcfun_valid = false;
|
||
|
|
||
|
|
||
|
|
||
|
void man_ezcfun_tab(Info & i)
|
||
|
{
|
||
|
if( i.iter == 0 )
|
||
|
ezcfun_iter = ezc_functions.Begin();
|
||
|
else
|
||
|
if( ezcfun_iter != ezc_functions.End() )
|
||
|
++ezcfun_iter;
|
||
|
|
||
|
i.res = (ezcfun_iter != ezc_functions.End());
|
||
|
ezcfun_valid = i.res;
|
||
|
}
|
||
|
|
||
|
|
||
|
void man_ezcfun_tab_index(Info & i)
|
||
|
{
|
||
|
i.out << (i.iter+1);
|
||
|
}
|
||
|
|
||
|
|
||
|
void man_ezcfun_tab_name(Info & i)
|
||
|
{
|
||
|
if( ezcfun_valid )
|
||
|
i.out << ezcfun_iter->first;
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
} // namespace TemplatesFunctions
|
||
|
|
||
|
|
||
|
|