added: winix function 'man'
displaying all winix functions and ezc templates functions git-svn-id: svn://ttmath.org/publicrep/winix/trunk@787 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
89
templates/man.cpp
Executable file
89
templates/man.cpp
Executable file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* 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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user