当前位置: 首页>>代码示例>>C++>>正文


C++ CEvent::getFlags方法代码示例

本文整理汇总了C++中CEvent::getFlags方法的典型用法代码示例。如果您正苦于以下问题:C++ CEvent::getFlags方法的具体用法?C++ CEvent::getFlags怎么用?C++ CEvent::getFlags使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CEvent的用法示例。


在下文中一共展示了CEvent::getFlags方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: lock

void
CEventQueue::addEvent(const CEvent& event)
{
	// discard bogus event types
	switch (event.getType()) {
	case CEvent::kUnknown:
	case CEvent::kSystem:
	case CEvent::kTimer:
		return;

	default:
		break;
	}
	
	if ((event.getFlags() & CEvent::kDeliverImmediately) != 0) {
		dispatchEvent(event);
		CEvent::deleteData(event);
	}
	else {
		CArchMutexLock lock(m_mutex);
		
		// store the event's data locally
		UInt32 eventID = saveEvent(event);
		
		// add it
		if (!m_buffer->addEvent(eventID)) {
			// failed to send event
			removeEvent(eventID);
			CEvent::deleteData(event);
		}
	}
}
开发者ID:rakete,项目名称:synergy-foss,代码行数:32,代码来源:CEventQueue.cpp

示例2: evt

void
CInputFilter::handleEvent(const CEvent& event, void* arg)
{
	// get a modifiable copy of this event.
	// set target to us, set kDontFreeData and kDeliverImmediately because the
	// original event will be destroyed after this method exits.
	CEvent evt(event.getType(), this, event.getData(),
								event.getFlags() | CEvent::kDontFreeData |
								CEvent::kDeliverImmediately);

	// clear dirty flag
	m_dirtyFlag = kNotDirty;

	EActionMode	actionMode = kModePass;
	// match event against filter rules and perform actions
	for (CRuleList::iterator rule  = m_ruleList.begin();
							 rule != m_ruleList.end(); ++rule) {
		EFilterStatus conditionStatus;
		EFilterStatus actionStatus;
		conditionStatus = rule->first->match(evt, arg, actionMode);
		if (conditionStatus == kDiscard) {
			return;
		}
		else if (conditionStatus == kNoMatch) {
			continue;
		}

		actionStatus = rule->second->perform(evt, arg, actionMode);
		if (actionStatus == kDiscard) {
			// discard event
			return;
		}
		else if (actionStatus == kNotHandled) {
			continue;
		}
		else if (actionStatus == kUpdateModifiers) {
			updateModifiers();
			return;
		}

		// if we got here then the rule has matched and action returned
		// kHandled, so send the event.
		break;
	}

	sendEvent(evt);
}
开发者ID:svn2github,项目名称:synergy-plus,代码行数:47,代码来源:CInputFilter.cpp

示例3:

void
CEvent::deleteData(const CEvent& event)
{
	switch (event.getType()) {
	case kUnknown:
	case kQuit:
	case kSystem:
	case kTimer:
		break;

	default:
		if ((event.getFlags() & kDontFreeData) == 0) {
			free(event.getData());
			delete event.getDataObject();
		}
		break;
	}
}
开发者ID:BogdanLivadariu,项目名称:synergy,代码行数:18,代码来源:Event.cpp

示例4: myEvent

void
CInputFilter::handleEvent(const CEvent& event, void*)
{
	// copy event and adjust target
	CEvent myEvent(event.getType(), this, event.getData(),
								event.getFlags() | CEvent::kDontFreeData |
								CEvent::kDeliverImmediately);

	// let each rule try to match the event until one does
	for (CRuleList::iterator rule  = m_ruleList.begin();
							 rule != m_ruleList.end(); ++rule) {
		if (rule->handleEvent(myEvent)) {
			// handled
			return;
		}
	}

	// not handled so pass through
	EVENTQUEUE->addEvent(myEvent);
}
开发者ID:ali1234,项目名称:synergy-old,代码行数:20,代码来源:CInputFilter.cpp

示例5: cacheKey


//.........这里部分代码省略.........
            case 43: // ID44
                if (!pQuery.value(iJ_EventCount).toString().isEmpty()) {
                    vRRule = event->extractSubStrings(pQuery.value(iJ_EventCount).toString().toStdString(), EXCLAMATION);
                    pRec->setRrule(vRRule);
                }
                break;

            case 44: // ID45
                if (!pQuery.value(iJ_EventCount).toString().isEmpty()) {
                    vRdate = event->extractSubStrings(pQuery.value(iJ_EventCount).toString().toStdString(), SEMI_COLON);
                    pRec->setRDays(vRdate);
                }
                break;

            case 45: // ID46
                if (!pQuery.value(iJ_EventCount).toString().isEmpty()) {
                    vEdate = event->extractSubStrings(pQuery.value(iJ_EventCount).toString().toStdString(), SEMI_COLON);
                    pRec->setEDays(vEdate);
                }
                break;

            case 46: // ID47
                if (!pQuery.value(iJ_EventCount).toString().isEmpty()) {
                    vERule = event->extractSubStrings(pQuery.value(iJ_EventCount).toString().toStdString(), EXCLAMATION);
                    pRec->setErule(vERule);
                }
                break;

            case 47: // ID48
                if (!pQuery.value(iJ_EventCount).toString().isEmpty())
                    pRec->setRecurId(pQuery.value(iJ_EventCount).toInt());
                break;

            case 48: // ID49
                if (!pQuery.value(iJ_EventCount).toString().isEmpty())
                    pRec->setRtype(pQuery.value(iJ_EventCount).toInt());
                break;
            }
        }

        if ((event->getFlags() == HAS_RECURRENCE) ||
            (event->getFlags() == HAS_RECURRENCE_ALARM)) {
            event->setRecurrence(pRec);
        }
        delete pRec;
        pRec = 0;

        if ((event->getFlags() == HAS_ALARM) ||
            (event->getFlags() == HAS_RECURRENCE_ALARM)) {
            event->setAlarm(pAlarm);
        }
        delete pAlarm;
        pAlarm = 0;

        std::vector<CAttendee *> listAttendee;

        listAttendee = event->retrieveAttendeeDetails();
        COrganizer *pOrg = 0;

        pOrg = event->retrieveOrganizerDetails();
        if (listAttendee.size())
            event->setAttendees(listAttendee);

        std::vector<CAttendee *>::iterator listAttendeeIterator;
        for (listAttendeeIterator = listAttendee.begin(); listAttendeeIterator != listAttendee.end(); ++listAttendeeIterator)
            delete *listAttendeeIterator;

        if (pOrg) {
            event->setOrganizer(pOrg);
            delete pOrg;
            pOrg = 0;
        }

        /*retrieve xprop */
        std::vector<CProperties *> vPropList;
        vPropList = event->retrieveXPropertyDetails();
        event->setXProperties(vPropList);

        std::vector<CProperties *>::iterator vPropListIterator;
        for (vPropListIterator = vPropList.begin(); vPropListIterator != vPropList.end(); ++vPropListIterator)
            delete *vPropListIterator;

        /*retrieve params */
        std::map<std::string, std::vector<CParameters *> > paramMap;
        paramMap = event->retrieveParameterDetails();

        event->setHashMap(paramMap);
        paramMap.clear();

        /* push the event in to the list */
        listEvent.push_back(event);

        ++iI_EventCount;
    }

    // put to cache
    m_dbCache->insertEventVector(cacheKey, listEvent);

    return listEvent;
}
开发者ID:Esclapion,项目名称:qt-mobility,代码行数:101,代码来源:qorganizercaldbaccess.cpp


注:本文中的CEvent::getFlags方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。