本文整理汇总了C++中BLooper::Run方法的典型用法代码示例。如果您正苦于以下问题:C++ BLooper::Run方法的具体用法?C++ BLooper::Run怎么用?C++ BLooper::Run使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BLooper
的用法示例。
在下文中一共展示了BLooper::Run方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void
TQuitTest::QuitTest2()
{
BLooper* looper = new BLooper;
looper->Run();
BMessage reply;
BMessenger(looper).SendMessage(B_QUIT_REQUESTED, &reply);
}
示例2: IsTargetLocal
/*
bool IsTargetLocal() const
@case 2 this is initialized to local target with preferred handler
@results should return true.
*/
void TargetTester::IsTargetLocalTest2()
{
status_t result = B_OK;
BLooper *looper = new BLooper;
looper->Run();
LooperQuitter quitter(looper);
BMessenger messenger(NULL, looper, &result);
CHK(messenger.IsTargetLocal() == true);
}
示例3: quitter
/*
BHandler *Target(BLooper **looper) const
@case 2 this is initialized to local target with preferred handler,
looper is NULL
@results should return NULL.
*/
void TargetTester::TargetTest2()
{
status_t result = B_OK;
BLooper *looper = new BLooper;
looper->Run();
LooperQuitter quitter(looper);
BMessenger messenger(NULL, looper, &result);
CHK(messenger.Target(NULL) == NULL);
}
示例4: quitter
/*
bool operator==(const BMessenger &other) const
bool operator!=(const BMessenger &a, const BMessenger &b)
@case 1 this (a) is initialized, other (b) is uninitialized,
and vice versa
@results should return false/true.
*/
void MessengerComparissonTester::ComparissonTest2()
{
// create looper
BLooper *looper = new BLooper;
looper->Run();
LooperQuitter quitter(looper);
// create messenger
BMessenger a(NULL, looper);
BMessenger b;
CHK(a != b);
CHK(b != a);
CHK(!(a == b));
CHK(!(b == a));
}