/*
    PIP - Platform Independent Primitives
    Code model generator
    Copyright (C) 2015  Ivan Pelipenko peri4ko@gmail.com

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#include "pitimer.h"
#include "test.h"

void event(void * , int d) {
	piCout << "tick" << d;
}

PITimer tm;

int main(int argc, char * argv[]) {
	//tm.setSlot(event);
	//tm.start(200);
	/*execFunction(&tm, "setSlot", PIVariant::fromValue<TimerEvent>(event));
	execFunction(&tm, "start", 200);
	piMSleep(1000);
	execFunction(&tm, "addDelimiter", 2);
	piMSleep(1000);
	execFunction(&tm, "stop");
	execFunction(&tm, "stop_");
	piMSleep(1000);*/
	typedef PIMap<PIString, PICodeInfo::ClassInfo* >::value_type mpair;
	piForeachC (mpair & i, *(PICodeInfo::classesInfo))
		piCout << *i.second;
	piCout << "\n\n";
	typedef PIMap<PIString, PICodeInfo::EnumInfo * >::value_type epair;
	piForeachC (epair & i, *(PICodeInfo::enumsInfo))
		piCout << *i.second;
	return 0;
};
