7 int main(int argc, char **argv) {
9 // test filter set/get/exception
11 std::cout << "\nTRY" << "\n";
14 filter.name("filter1");
15 std::cout << "filter: " << filter.name() << "\n";
17 filter.name() = "filter1 rename";
18 std::cout << "filter: " << filter.name() << "\n";
20 throw yp2::Filter_Exception("finished");
22 catch (std::exception &e) {
23 std::cout << e.what() << "\n";
28 std::cout << "\nTRY" << "\n";
31 filter1.name("filter1");
34 filter2.name() = "filter2";
36 std::cout << "filter1 filter2" << "\n";
39 router1.rule(filter1);
40 std::cout << "router1.rule(filter1)" << "\n";
43 router2.rule(filter2);
44 std::cout << "router2.rule(filter2)" << "\n";
47 pack_in.data(7).router(router1);
48 std::cout << "pack_in.data(7).router(router1)" << "\n";
51 std::cout << "pack_in.move()" << "\n";
53 pack_in.router(router2);
54 std::cout << "pack_in.router(router2)" << "\n";
57 std::cout << "pack_in.move()" << "\n";
59 throw yp2::Router_Exception("finished");
62 catch (std::exception &e) {
63 std::cout << e.what() << "\n";