aboutsummaryrefslogtreecommitdiff
path: root/Plugins/argument-passing.cpp
blob: 0247b5f647abe4c8e16d4a162ca65fe37c93c403 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "plugin.h"
#include "pixels.h"

//
INFO("example of parsing arguments in a plugin using the arguments-class")
// (defined in pixels.h)
//

void perform_effect(_frame f, _args a)
{
	arguments ar(a.s);

	//
	// ar.count()	return the number of arguments
	// ar[i]	return i'th argument, starting from zero
	//

	for(int i=0; i<ar.count(); i++)
		printf("argument %d: %s\n", i, ar[i]);
}