本文整理汇总了C++中EventType类的典型用法代码示例。如果您正苦于以下问题:C++ EventType类的具体用法?C++ EventType怎么用?C++ EventType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了EventType类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onClickLinkNoFollow
////////////////////////////////////////////////////////////////////////////////
// virtual
void LLMediaImplLLMozLib::onClickLinkNoFollow( const EventType& eventIn )
{
LLMediaEvent event( this, eventIn.getStringValue() );
mEventEmitter.update( &LLMediaObserver::onClickLinkNoFollow, event );
}
示例2: Name
void
dmz::NetModulePacketCodecBasic::_discover_codec (const Plugin *PluginPtr) {
const String Name (PluginPtr ? PluginPtr->get_plugin_name () : "");
NetExtPacketCodecObject *objCodec (NetExtPacketCodecObject::cast (PluginPtr));
NetExtPacketCodecEvent *eventCodec (NetExtPacketCodecEvent::cast (PluginPtr));
if (Name && (objCodec || eventCodec)) {
PacketStruct *hs (_packetTable.lookup (Name));
if (hs) {
DecodeStruct *ds (0);
if (objCodec) { ds = new DecodeStruct (hs->PacketID, *objCodec); }
else if (eventCodec) { ds = new DecodeStruct (hs->PacketID, *eventCodec); }
if (ds && _decodeTable.store (hs->PacketID, ds)) {
if (objCodec && hs->objects.get_count ()) {
EncodeObjectStruct *eos (
new EncodeObjectStruct (hs->PacketID, *objCodec));
if (eos && _objEncodeTable.store (hs->PacketID, eos)) {
ObjectTypeIterator it;
ObjectType type;
Boolean found (hs->objects.get_first (it, type));
while (found) {
_objTypeTable.store (type.get_handle (), eos);
found = hs->objects.get_next (it, type);
}
}
else if (eos) { delete eos; eos = 0; }
}
else if (eventCodec && hs->events.get_count ()) {
EncodeEventStruct *ees (
new EncodeEventStruct (hs->PacketID, *eventCodec));
if (ees && _eventEncodeTable.store (hs->PacketID, ees)) {
EventTypeIterator it;
EventType type;
Boolean found (hs->events.get_first (it, type));
while (found) {
_eventTypeTable.store (type.get_handle (), ees);
found = hs->events.get_next (it, type);
}
}
else if (ees) { delete ees; ees = 0; }
}
}
else if (ds) {
delete ds; ds = 0;
}
}
}
}
示例3: foreach
void GlobalConfig::saveOptions()
{
// color options
ConfigGroup* colorConfig = ConfigStorage::group("CostColors");
int count = 1;
foreach(ConfigColorSetting* cs, _colors) {
if ( !cs->_automatic ) {
colorConfig->setValue( QString("Name%1").arg(count),
cs->_name);
colorConfig->setValue( QString("Color%1").arg(count),
cs->_color);
count++;
}
}
colorConfig->setValue("Count", count-1);
delete colorConfig;
// source options
ConfigGroup* sourceConfig = ConfigStorage::group("Source");
sourceConfig->setValue("Dirs", _generalSourceDirs);
QHashIterator<QString,QStringList> it( _objectSourceDirs );
count = 1;
while( it.hasNext() ) {
it.next();
sourceConfig->setValue( QString("Object%1").arg(count),
it.key() );
sourceConfig->setValue( QString("Dirs%1").arg(count),
it.value() );
count++;
}
sourceConfig->setValue("Count", count-1);
delete sourceConfig;
// general options
ConfigGroup* generalConfig = ConfigStorage::group("GeneralSettings");
generalConfig->setValue("ShowPercentage", _showPercentage,
DEFAULT_SHOWPERCENTAGE);
generalConfig->setValue("ShowExpanded", _showExpanded,
DEFAULT_SHOWEXPANDED);
generalConfig->setValue("ShowCycles", _showCycles,
DEFAULT_SHOWCYCLES);
generalConfig->setValue("CycleCut", _cycleCut,
DEFAULT_CYCLECUT);
generalConfig->setValue("PercentPrecision", _percentPrecision,
DEFAULT_PERCENTPRECISION);
generalConfig->setValue("MaxSymbolLength", _maxSymbolLength,
DEFAULT_MAXSYMBOLLENGTH);
generalConfig->setValue("MaxSymbolCount", _maxSymbolCount,
DEFAULT_MAXSYMBOLCOUNT);
generalConfig->setValue("MaxListCount", _maxListCount,
DEFAULT_MAXLISTCOUNT);
generalConfig->setValue("Context", _context,
DEFAULT_CONTEXT);
generalConfig->setValue("NoCostInside", _noCostInside,
DEFAULT_NOCOSTINSIDE);
generalConfig->setValue("HideTemplates", _hideTemplates,
DEFAULT_HIDETEMPLATES);
delete generalConfig;
// event types
ConfigGroup* etConfig = ConfigStorage::group("EventTypes");
int etCount = EventType::knownTypeCount();
etConfig->setValue( "Count", etCount);
for (int i=0; i<etCount; i++) {
EventType* t = EventType::knownType(i);
etConfig->setValue( QString("Name%1").arg(i+1), t->name());
etConfig->setValue( QString("Longname%1").arg(i+1),
t->longName(),
knownLongName(t->name()) );
etConfig->setValue( QString("Formula%1").arg(i+1),
t->formula(), knownFormula(t->name()) );
}
delete etConfig;
}
示例4: onWindowCloseRequested
////////////////////////////////////////////////////////////////////////////////
// virtual
void onWindowCloseRequested(const EventType& event)
{
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "close_request");
message.setValue("uuid", event.getStringValue());
sendMessage(message);
}
示例5: onClickLinkNoFollow
////////////////////////////////////////////////////////////////////////////////
// virtual
void onClickLinkNoFollow(const EventType& event)
{
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "click_nofollow");
message.setValue("uri", event.getEventUri());
sendMessage(message);
}
示例6: onReplyCommand
// Checked: 2009-05-17 (RLVa-0.2.0a)
BOOL RlvExtGetSet::onReplyCommand(const EventType& rlvEvent)
{
return processCommand(rlvEvent.getSenderID(), rlvEvent.getCommand());
}