int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QMainWindow::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: newFile(); break;
        case 1: openFile(); break;
        case 2: loadFile((*reinterpret_cast< QString(*)>(_a[1]))); break;
        case 3: openRecentFile(); break;
        case 4: showOptions(); break;
        case 5: updateTime(); break;
        case 6: lookupAGS_ID(); break;
        case 7: lookupPCC_ID(); break;
        case 8: lookupPCC_ID((*reinterpret_cast< QString(*)>(_a[1]))); break;
        case 9: setEventType((*reinterpret_cast< QString(*)>(_a[1]))); break;
        case 10: setEventID((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 11: setEventTypeID((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break;
        case 12: boo(); break;
        case 13: showError((*reinterpret_cast< QString(*)>(_a[1]))); break;
        case 14: login(); break;
        case 15: logout(); break;
        default: ;
        }
        _id -= 16;
    }
    return _id;
}
예제 #2
0
void test_bind_non_const() {
  boost::mutex m;

  Boo boo(20);

  int res_bind = boost::with_lock_guard(
      m,
      boost::bind(&Boo::func, boo, 7, 3)
  );
  BOOST_TEST(res_bind == 24);

  int a = 0;
  int res_bind_ref = boost::with_lock_guard(
      m,
      boost::bind(&Boo::func_ref, boo, boost::ref(a))
  );
  BOOST_TEST(res_bind_ref == 23);
  BOOST_TEST(a == 598);

  a = 0;
  int b = 0;
  int c = 0;
  Boo foo(67);
  boost::with_lock_guard(
      m, boost::bind(&Boo::func_ref, foo, boost::ref(a), boost::ref(b), &c)
  );
  BOOST_TEST(a == 111);
  BOOST_TEST(b == 222);
  BOOST_TEST(c == 333);
}
예제 #3
0
void test_bind() {
  boost::mutex m;

  Foo foo(2);

  int res_bind = boost::with_lock_guard(
      m,
      boost::bind(&Foo::func, foo, 1, 31)
  );
  BOOST_TEST(res_bind == 34);

  int a = 0;
  int res_bind_ref = boost::with_lock_guard(
      m,
      boost::bind(&Foo::func_ref, foo, boost::ref(a))
  );
  BOOST_TEST(res_bind_ref == 36);
  BOOST_TEST(a == 133);

  a = 0;
  int b = 0;
  int c = 0;
  Foo boo(3);
  boost::with_lock_guard(
      m, boost::bind(&Foo::func_ref, boo, boost::ref(a), boost::ref(b), &c)
  );
  BOOST_TEST(a == 567);
  BOOST_TEST(b == 897);
  BOOST_TEST(c == 345);
}
예제 #4
0
void foo( PODS __near & np
        , PODS __far  & fp
        , NONPODS __near & nn
        , NONPODS __far & fn )
{
    np = np;
    fp = fp;
    np = fp;
    fp = np;

    nn = nn;
    fn = fn;
    nn = fn;
    fn = nn;

    np.~PODS();
    fp.~PODS();

    nn.~NONPODS();
    fn.~NONPODS();

    PODS pa = np;
    PODS pb = fp;

    NONPODS na = nn;
    NONPODS nb = fn;

    poo( nn );
    poo( fn );

    poo( np );
    poo( fp );

    goo( nn );
    goo( fn );

    goo( np );
    goo( fp );

    boo( nn );
    boo( fn );

    boo( np );
    boo( fp );
}
예제 #5
0
파일: test_obj.c 프로젝트: enadam/arf
static void main_baz()
{
	nop();
	nop();
	boo();
	((void (*)(void))dlsym(dlopen("./dso.so", RTLD_GLOBAL | RTLD_LAZY), "dso_baz"))();
	nop();
	nop();
}
예제 #6
0
파일: test0.c 프로젝트: NeilBryant/sulong
int main() {
  int *a = (int *)malloc(8);
  int *b = (int *)malloc(8);
  *a = 5;
  *b = 4;

  return boo(a) + boo(a) + boo(b) + boo(b) + boo(a) + boo(b);
}
예제 #7
0
파일: lab10_3.c 프로젝트: teffyhart/inf1018
int main (void) {
  struct X x[3] = {{1,0}, {2,0}, {3,0}};
  int i;

  printf("Antes: ");
  for (i=0; i < 3; i++)
    printf("{%d,%d} ",x[i].val1, x[i].val2);
  boo(x,3,2);
  printf("\nDepois: ");
  for (i=0; i < 3; i++)
    printf("{%d,%d} ",x[i].val1, x[i].val2);
  printf("\n");
  return 0;
}
예제 #8
0
파일: delay-slot-1.c 프로젝트: 0day-ci/gcc
void direct2indirect(void)
{
    struct item_head *p_le_ih;
    struct item_head ind_ih;
    unsigned int unfm_ptr;

    if (__builtin_expect(32, 0)) __asm__ ("break");

    set_le_ih_k_type (&ind_ih);

    if (__builtin_constant_p(p_le_ih) ? 1 : 2) {
        (__builtin_constant_p(__builtin_constant_p(1) == 1));
      boo(&ind_ih, (char *)&unfm_ptr);
    }
}
예제 #9
0
int main()
{
    int x = 
			aoo()
		|	boo()
		|	coo()
		|	doo()
		|	foo()
		|	groo()
		|	qoo()
		|	yoo()
		;
	printf("test02 foo()=%d\n", x);
    return 0;
}
예제 #10
0
파일: pr69270-3.c 프로젝트: JamesLinus/gcc
unsigned char
propagate_with_phi ()
{
  gimple use_stmt;
  unsigned char phi_inserted;
  phi_inserted = 0;
  for (; !end_imm_use_stmt_p (); next_imm_use_stmt ())
    {
      if (!(arf () == 10 && boo () == 20))
        continue;
      if (!phi_inserted)
        phi_inserted = 1;
      else
        update_stmt ();
    }
}
int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QMainWindow::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: eventChanged((*reinterpret_cast< AGSEventType(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break;
        case 1: newFile(); break;
        case 2: openFile(); break;
        case 3: closeFile(); break;
        case 4: exportFile(); break;
        case 5: importToDatabase(); break;
        case 6: loadFile((*reinterpret_cast< QString(*)>(_a[1]))); break;
        case 7: openRecentFile(); break;
        case 8: showOptions(); break;
        case 9: updateTime(); break;
        case 10: lookupAGS_ID(); break;
        case 11: lookupPCC_ID(); break;
        case 12: lookupPCC_ID((*reinterpret_cast< QString(*)>(_a[1]))); break;
        case 13: setEventTypeID((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break;
        case 14: setEvent((*reinterpret_cast< AGSEventType(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break;
        case 15: setLogoutTime(); break;
        case 16: setLogoutTime((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 17: setTShirtCalc((*reinterpret_cast< double(*)>(_a[1])),(*reinterpret_cast< bool(*)>(_a[2]))); break;
        case 18: setTimer((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2])),(*reinterpret_cast< int(*)>(_a[3]))); break;
        case 19: setTimer((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break;
        case 20: boo(); break;
        case 21: showError((*reinterpret_cast< QString(*)>(_a[1]))); break;
        case 22: login(); break;
        case 23: logout(); break;
        case 24: about(); break;
        case 25: tutorial(); break;
        case 26: reportABug(); break;
        case 27: testConnection(); break;
        case 28: { QString _r = generateHeader();
            if (_a[0]) *reinterpret_cast< QString*>(_a[0]) = _r; }  break;
        case 29: rewriteHeader(); break;
        default: ;
        }
        _id -= 30;
    }
    return _id;
}
예제 #12
0
파일: Result.cpp 프로젝트: Kionage/OpenCFU
void Result::applyGuiFilter(const cv::Mat& valid){
    if (valid.empty()){
        DEV_INFOS("Empty filter!");
        return;
    }

    std::vector<bool> boo(valid.rows);

    m_n_valid = 0;
    unsigned int nrow = (unsigned)valid.rows;
    for(unsigned int i = 0; i < nrow; i++){
        signed char val = valid.at<signed char>(i,0);
        v[i].setGUIValid(val);
        boo[i] = true;
    }

    applyFilter(boo);

}
예제 #13
0
파일: test_prg.c 프로젝트: enadam/arf
static void main_foo(int alpha, int beta)
{
	float f = 33.44;
	double d = 55.66;
	long long ll = 77;
	static char const *str = "susu";
	char const fourbytes[] = { 0x10, 0x20, 0xef, 0xff };
	char const (*binaryp)[] = &fourbytes;

	void main_foo_foo(void)
	{
		BARF();
	}

	nop();
	nop();
	main_foo_foo();
	boo();
	alpha *= 2; beta *= 3; f *= 4; d *= 5; ll *= 6;
//	return;
	lib_foo();
	nop();
	nop();
}
예제 #14
0
void testInts()
{
	cout << "Testing with a simple data type: integers" << endl;
	cout << "First, we'll test the constructors:" << endl;

	cout << "Testing the default constructor, row and column should = 0)" << endl;
	Array2D<int> blob;
	cout << "Rows: " << blob.getRow() << " Columns: " << blob.getColumn() << endl << endl;

	cout << "Testing the constructor with both rows and columns defined at initialization: " << endl;
	Array2D<int> boo(3, 5);
	cout << "Rows: " << boo.getRow() << " Columns: " << boo.getColumn() << endl << endl;

	cout << "Testing subscript operators with valid input: " << endl;
	initializeArrayInts(boo);
	printArray(boo);

	cout << "Testing copy constructor: " << endl;
	Array2D<int> bo(boo);
	cout << "Rows: " << bo.getRow() << " Columns: " << bo.getColumn() << endl << endl;
	printArray(bo);

	cout << "Testing the assignment operator: " << endl;
	blob = bo;
	cout << "Rows: " << blob.getRow() << " Columns: " << blob.getColumn() << endl << endl;
	printArray(blob);

	cout << "Now testing mutator functions for both rows and columns: " << endl << endl;
	cout << "First with adding rows: " << endl;
	boo.setRow(6);
	cout << "Rows: " << boo.getRow() << " Columns: " << boo.getColumn() << endl << endl;
	initializeArrayInts(boo);
	printArray(boo);

	cout << "Now deleting rows: " << endl;
	boo.setRow(3);
	cout << "Rows: " << boo.getRow() << " Columns: " << boo.getColumn() << endl << endl;
	printArray(boo);

	cout << "Now passing an invalid row length: " << endl;
	try
	{
		boo.setRow(-1);
	}
	catch (Exception &except)
	{
		cout << except << endl << endl;
	}

	cout << "Now adding columns (maintains data position in current rows/columns): " << endl;
	boo.setColumn(7);
	cout << "Rows: " << boo.getRow() << " Columns: " << boo.getColumn() << endl << endl;
	printArray(boo);

	cout << "Now deleting columns (maintains data position in current rows/columns which are being kept): " << endl;
	boo.setColumn(5);
	cout << "Rows: " << boo.getRow() << " Columns: " << boo.getColumn() << endl << endl;
	printArray(boo);

	cout << "Now passing invalid value for column: " << endl;
	try
	{
		boo.setColumn(-1);
	}
	catch (Exception &except)
	{
		cout << except << endl << endl;
	}
	cout << "Rows: " << boo.getRow() << " Columns: " << boo.getColumn() << endl << endl;
	printArray(boo);

	cout << "Testing subscipt operator access on a const object: " << endl;
	const Array2D<int> const_boo(boo);
	printArray(const_boo);

}
예제 #15
0
int main() {
	int x = 2;
	int y = 3;
	int z = 4;
	return foo(boo(doo(x), y),z);
}
예제 #16
0
int foo(int m, int n) {
	return boo(m, n);
}
예제 #17
0
int main() {
  std::cout << "Boo say:" << std::endl;
  boo();
}
예제 #18
0
void qoo() {
  foo();                  // CHECK: macro_function();
  boo(foo());             // CHECK: boo(macro_function());
  moo();
  boo(moo());
}
예제 #19
0
int far(const int& x);
int moved(int&& x);

// Test self-references within initializers which are guaranteed to be
// uninitialized.
int a = a; // no-warning: used to signal intended lack of initialization.
int b = b + 1; // expected-warning {{variable 'b' is uninitialized when used within its own initialization}}
int c = (c + c); // expected-warning 2 {{variable 'c' is uninitialized when used within its own initialization}}
int e = static_cast<long>(e) + 1; // expected-warning {{variable 'e' is uninitialized when used within its own initialization}}
int f = foo(f); // expected-warning {{variable 'f' is uninitialized when used within its own initialization}}

// Thes don't warn as they don't require the value.
int g = sizeof(g);
void* ptr = &ptr;
int h = bar(&h);
int i = boo(i);
int j = far(j);
int k = __alignof__(k);

int l = k ? l : l;  // expected-warning 2{{variable 'l' is uninitialized when used within its own initialization}}
int m = 1 + (k ? m : m);  // expected-warning 2{{variable 'm' is uninitialized when used within its own initialization}}
int n = -n;  // expected-warning {{variable 'n' is uninitialized when used within its own initialization}}
int o = std::move(o); // expected-warning {{variable 'o' is uninitialized when used within its own initialization}}
const int p = std::move(p); // expected-warning {{variable 'p' is uninitialized when used within its own initialization}}
int q = moved(std::move(q)); // expected-warning {{variable 'q' is uninitialized when used within its own initialization}}
int r = std::move((p ? q : (18, r))); // expected-warning {{variable 'r' is uninitialized when used within its own initialization}}
int s = r ?: s; // expected-warning {{variable 's' is uninitialized when used within its own initialization}}
int t = t ?: s; // expected-warning {{variable 't' is uninitialized when used within its own initialization}}

void test_stuff () {
  int a = a; // no-warning: used to signal intended lack of initialization.
예제 #20
0
TEST(argument_type, index_version)
{
    boo(std::string{"String"}, true, 100);
}
예제 #21
0
void foo()
{
	printf(kFooCalledMessage);
	boo();
}