• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ registerType函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中registerType函数的典型用法代码示例。如果您正苦于以下问题:C++ registerType函数的具体用法?C++ registerType怎么用?C++ registerType使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: plugin

 JobManager::JobManager (LV2Plugin& p)
     : plugin (p), forge (p.get_uris(), p.get_urid_map(), p.get_urid_unmap()),
       workForge (p.get_uris(), p.get_urid_map(), p.get_urid_unmap())
 {
     registerType (new ObjectDisposalJobType ());
     registerType (new MediaLoaderJobType ());
 }
开发者ID:kushview,项目名称:ksp1,代码行数:7,代码来源:Jobs.cpp


示例2: Plugin

WeatherPlugin::WeatherPlugin(unsigned base, bool bInit, Buffer *config)
        : Plugin(base)
{
    load_data(weatherData, &data, config);
    BarWeather = registerType();
    CmdWeather = registerType();
    EventWeather = registerType();
    m_icons = getIcons()->addIconSet("icons/weather.jisp", true);
    Event eBar(EventToolbarCreate, (void*)BarWeather);
    eBar.process();
    Command cmd;
    cmd->id = CmdWeather;
    cmd->text = I18N_NOOP("Not connected");
    cmd->icon = "weather";
    cmd->bar_id = BarWeather;
    cmd->bar_grp = 0x1000;
    cmd->flags = BTN_PICT | BTN_DIV;
    Event eCmd(EventCommandCreate, cmd);
    eCmd.process();
    m_bar = NULL;
    if (!bInit){
        showBar();
        if (m_bar)
            m_bar->show();
    }
}
开发者ID:BackupTheBerlios,项目名称:sim-im-svn,代码行数:26,代码来源:weather.cpp


示例3: Plugin

MSNPlugin::MSNPlugin(unsigned base)
        : Plugin(base)
{
    MSNPacket = registerType();
    EventAddOk   = registerType();
    EventAddFail = registerType();
    MSNInitMail  = registerType();
    MSNNewMail   = registerType();

    getContacts()->addPacketType(MSNPacket, msn_descr.text, true);

    m_protocol = new MSNProtocol(this);
}
开发者ID:BackupTheBerlios,项目名称:sim-im-svn,代码行数:13,代码来源:msn.cpp


示例4: Plugin

ActionPlugin::ActionPlugin(unsigned base)
        : Plugin(base), EventReceiver(HighPriority)
{
    plugin = this;

    action_data_id = getContacts()->registerUserData(info.title, actionUserData);
    CmdAction = registerType();

    Command cmd;
    cmd->id		 = action_data_id + 1;
    cmd->text	 = I18N_NOOP("&Action");
    cmd->icon	 = "run";
    cmd->param	 = (void*)getActionSetup;
    Event e(EventAddPreferences, cmd);
    e.process();

    cmd->id		 = CmdAction;
    cmd->text	 = "_";
    cmd->icon	 = NULL;
    cmd->flags	 = COMMAND_CHECK_STATE;
    cmd->menu_id = MenuContact;
    cmd->menu_grp = 0xC000;
    cmd->param	 = NULL;
    Event eCmd(EventCommandCreate, cmd);
    eCmd.process();

    Event ePlugin(EventGetPluginInfo, (void*)"_core");
    pluginInfo *info = (pluginInfo*)(ePlugin.process());
    core = static_cast<CorePlugin*>(info->plugin);
}
开发者ID:BackupTheBerlios,项目名称:sim-im-svn,代码行数:30,代码来源:action.cpp


示例5: registComponentType

void BaseGameFeatureUnit::registComponentType()
{
	FeatureUnit::registComponentType();

	auto objfactory = ObjectFactory::getInstance();
	objfactory->registerType(CREATE_CLASS_COMPONENT_INFO(AttributeComponent));
}
开发者ID:WestwoodForever,项目名称:LionFramework,代码行数:7,代码来源:BaseGameFeatureUnit.cpp


示例6: registerType

CoreROIFactory::CoreROIFactory() {
    registerType(new ROICube());
    registerType(new ROICylinder());
    registerType(new ROISphere());
    registerType(new ROIRaster());
    registerType(new ROIUnion());
    registerType(new ROISubstract());
    registerType(new ROIGraph());
}
开发者ID:MKLab-ITI,项目名称:gnorasi,代码行数:9,代码来源:coreroifactory.cpp


示例7: registerType

void Engine::setAutoCast(int target, QList< int > origin, TypeCast castfunc, int prio)
{
	if(castfunc==0)return;
	if(prio<0)return;
	registerType(target);
	Private::CastFunc_s cf(prio);
	cf.cfunc=castfunc;
	cf.origin=origin;
	cf.target=target;
	d->casts.append(cf);
}
开发者ID:JesseTG,项目名称:elam,代码行数:11,代码来源:elamengine.cpp


示例8: RsClassType

RsClassType& TypeSystem::getClassType(const std::string& name, size_t sz /*= 0*/, bool uniontype /*= false*/)
{
  RsClassType& entry = classMap[name];

  if (entry.invalid())
  {
    entry = RsClassType(name, sz, uniontype);
    registerType(entry);
  }

  return entry;
}
开发者ID:8l,项目名称:rose,代码行数:12,代码来源:TypeSystem.cpp


示例9: to

/*
This method is "over generalized" to allow us to (potentially) register more types of things in
the future without adding exported symbols.
*/
int QQmlPrivate::qmlregister(RegistrationType type, void *data)
{
    if (type == TypeRegistration) {
        return registerType(*reinterpret_cast<RegisterType *>(data));
    } else if (type == InterfaceRegistration) {
        return registerInterface(*reinterpret_cast<RegisterInterface *>(data));
    } else if (type == AutoParentRegistration) {
        return registerAutoParentFunction(*reinterpret_cast<RegisterAutoParent *>(data));
    } else if (type == SingletonRegistration) {
        return registerSingletonType(*reinterpret_cast<RegisterSingletonType *>(data));
    }
    return -1;
}
开发者ID:ghjinlei,项目名称:qt5,代码行数:17,代码来源:qqmlmetatype.cpp


示例10: _fPrototypeCreate

OSG_USING_NAMESPACE

/*-------------------------------------------------------------------------*/
/*                            Constructors                                 */

/*! Constructor for a new field container type.
*
*/
FieldContainerType::FieldContainerType(
    const Char8                *szName,
    const Char8                *szParentName,
    const Char8                *szGroupName,
    const UInt32                uiNameSpace,
          PrototypeCreateF      fPrototypeCreate,
          InitContainerF        fInitMethod,
          ExitContainerF        fExitMethod,
          InitalInsertDescFunc  descInsertFunc,
          bool                  bDescsAddable,
          BitVector             bvUnmarkedOnCreate,
          std::string           fcdXML,
          std::string           typeDoc) :

     Inherited       (szName,
                      szParentName,
                      szGroupName,
                      uiNameSpace,
                      descInsertFunc,
                      bDescsAddable,
                      bvUnmarkedOnCreate),


    _baseType        (IsFieldContainer  ),
    _pPrototype      (NULL              ),
    _fPrototypeCreate(fPrototypeCreate  ),
    _fInitMethod     (fInitMethod       ),
    _fExitMethod     (fExitMethod       ),
    _fcdXML          (fcdXML            ),
    _typeDoc         (typeDoc           )
{
    registerType();

    if(fInitMethod != NULL)
        fInitMethod(Static);
}
开发者ID:baibaiwei,项目名称:OpenSGDevMaster,代码行数:44,代码来源:OSGFieldContainerType.cpp


示例11: Plugin

SMSPlugin::SMSPlugin(unsigned base)
        : Plugin(base)
{
    SerialPacket = registerType();
    getContacts()->addPacketType(SerialPacket, "Serial port", true);

    Command cmd;
    cmd->id			 = MessagePhoneCall;
    cmd->text		 = I18N_NOOP("Phone call");
    cmd->icon		 = "phone";
    cmd->flags		 = COMMAND_DEFAULT;
    cmd->param		 = &defPhoneCall;

    Event eMsg(EventCreateMessageType, cmd);
    eMsg.process();

    m_protocol = new SMSProtocol(this);

    qApp->installEventFilter(this);
    setPhoneCol();
}
开发者ID:BackupTheBerlios,项目名称:sim-im-svn,代码行数:21,代码来源:sms.cpp


示例12: parseID

 QuantLib::Calendar Create<QuantLib::Calendar>::operator()(const std::string &id) {
     idOriginal = id;
     // Is this an ID for a Calendar or a JointCalendar?
     if (testID()) {
         // It's a JointCalendar.  Parse the ID.
         parseID();
         // Does the requested JointCalendar already exist?
         if (checkType(idFull)) {
             // It does - return it.
             return *(static_cast<QuantLib::Calendar*>(this->getType(idFull)));
         } else {
             // It doesn't - create it, add it to the registry, and return it.
             QuantLib::Calendar *jointCalendar = makeJointCalendar(calendarIDs.size());
             registerType(idFull, jointCalendar);
             return *jointCalendar;
         }
     } else {
         // the ID is for a Calendar - return it
         return *(static_cast<QuantLib::Calendar*>(this->getType(id)));
     }
 }
开发者ID:AAthresh,项目名称:quantlib,代码行数:21,代码来源:calendarfactory.cpp


示例13: main

int main(int argc, char *argv[])
{
   c_bool isTransient, isPersistent;
   c_bool isClosed = FALSE;
   unsigned long i, j;
   os_time os_delay2000 = { 2, 0 };

   DDS_sequence_DurabilityData_Msg* DurabilityData_Msg_Seq = DDS_sequence_DurabilityData_Msg__alloc();
   DDS_SampleInfoSeq* DurabilityData_infoSeq = DDS_SampleInfoSeq__alloc();

   if( argc < 2 )
   {
      usage();
   }

   isTransient = (strcmp(argv[1], "transient") == 0) ? TRUE : FALSE;
   isPersistent = (strcmp(argv[1], "persistent") == 0) ? TRUE : FALSE;
   if( ! (isTransient || isPersistent) )
   {
      usage();
   }

   g_durability_kind = (char*) argv[1];

   // Create DDS DomainParticipant
   createParticipant("Durability example");

   // Register the Topic's type in the DDS Domain.
   g_MsgTypeSupport = DurabilityData_MsgTypeSupport__alloc();
   checkHandle(g_MsgTypeSupport, "DurabilityData_MsgTypeSupport__alloc");
   registerType(g_MsgTypeSupport);
   // Create the Topic's in the DDS Domain.
   g_MsgTypeName = (char*) DurabilityData_MsgTypeSupport_get_type_name(g_MsgTypeSupport);
   createTopic("DurabilityData_Msg", g_MsgTypeName);
   DDS_free(g_MsgTypeName);
   DDS_free(g_MsgTypeSupport);

   // Create the Subscriber's in the DDS Domain.
   createSubscriber();

   // Request a Reader from the the Subscriber.
   createReader();

   printf("=== [Subscriber] Ready ...");

   // Added a max iteration threshold in order to avoid looping infinitely.
   // This is in the case of "persistent" + auto_dispose == TRUE,
   // if the user tries to use persistence feature, it won't succeed:
   // with this setting value, the Instance is still deleted upon the delete of the Writer,
   // even though the persistent setting has been passed on both processes.
   i = 0;
   do
   {
      g_status = DurabilityData_MsgDataReader_take(
          g_DataReader,
          DurabilityData_Msg_Seq,
          DurabilityData_infoSeq,
          DDS_LENGTH_UNLIMITED,
          DDS_ANY_SAMPLE_STATE,
          DDS_ANY_VIEW_STATE,
          DDS_ANY_INSTANCE_STATE );

      checkStatus(g_status, "DurabilityData_MsgDataReader_take");

      if( DurabilityData_Msg_Seq->_length > 0 )
      {
         j = 0;
         do
         {
            if( DurabilityData_infoSeq->_buffer[j].valid_data )
            {
               printf("\n%s", DurabilityData_Msg_Seq->_buffer[j].content);
               if( strcmp(DurabilityData_Msg_Seq->_buffer[j].content, "9") == 0 )
               {
                  isClosed = TRUE;
               }
            }
         }
         while( ++j < DurabilityData_Msg_Seq->_length );

         DurabilityData_MsgDataReader_return_loan (g_DataReader, DurabilityData_Msg_Seq, DurabilityData_infoSeq);
      }
      os_nanoSleep(os_delay2000);
   }
   while( isClosed == FALSE && i++ < 5);

   // Cleanup DDS from the created Entities.
   deleteDataReader();
   deleteSubscriber();
   deleteTopic();
   deleteParticipant();

   // Cleanup C allocations, recursively freeing the allocated structures and sequences using the OpenSplice API.
   DDS_free(DurabilityData_Msg_Seq);
   DDS_free(DurabilityData_infoSeq);

   // Print out an empty line, just to let behind a clean new line for the shell..
   printf("\n");
   return 0;
}
开发者ID:xrl,项目名称:opensplice_dds,代码行数:100,代码来源:DurabilityDataSubscriber.c


示例14: registerField

DocumentTypeManager::DocumentTypeManager () {
	registerField ("title", _("Title"), false);
	registerField ("author", _("Authors"), false);
	registerField ("journal", _("Journal"), false);
	registerField ("year", _("Year"), true);

	registerField ("volume", _("Volume"), true);
	registerField ("number", _("Issue"), true);
	registerField ("pages", _("Pages"), true);
	registerField ("month", _("Month"), true);
	registerField ("note", _("Note"), false);
	registerField ("key", _("Key"), true);

	registerField ("editor", _("Editor"), false);
	registerField ("publisher", _("Publisher"), false);
	registerField ("series", _("Series"), false);
	registerField ("address", _("Address"), false);
	registerField ("edition", _("Edition"), false);

	registerField ("booktitle", _("Book title"), false);
	registerField ("organisation", _("Organisation"), false);

	registerField ("howpublished", _("How published"), false);

	registerField ("school", _("School"), false);
	registerField ("institution", _("Institution"), false);
	registerField ("chapter", _("Chapter"), false);
	registerField ("type", _("Type"), false);
	registerField ("doi", _("DOI"), false);


	DocumentType article ("article", _("Article"));
	addField (article, "title", true);
	addField (article, "journal", true);
	addField (article, "year", true);
	addField (article, "author", true);
	addField (article, "volume", false);
	addField (article, "number", false);
	addField (article, "pages", false);
	addField (article, "doi", false);
	// Fields John thinks are silly
	/*
	addField (article, "month", false);
	addField (article, "note", false);
	addField (article, "key", false);
	*/
	registerType (article);

	DocumentType book ("book", _("Book"));
	addField (book, "author", true);
	addField (book, "editor", true);
	addField (book, "title", true);
	addField (book, "publisher", true);
	addField (book, "year", true);
	addField (book, "volume", false);
	addField (book, "series", false);
	addField (book, "address", false);
	addField (book, "edition", false);
	addField (book, "doi", false);
	// Fields John thinks are silly
	/*
	addField (book, "month", false);
	addField (book, "note", false);
	addField (book, "key", false);
	*/
	registerType (book);

	DocumentType inproceedings ("inproceedings", _("In Proceedings"));
	addField (inproceedings, "author", true);
	addField (inproceedings, "title", true);
	addField (inproceedings, "booktitle", true);
	addField (inproceedings, "year", true);
	addField (inproceedings, "editor", false);
	addField (inproceedings, "pages", false);
	addField (inproceedings, "organisation", false);
	addField (inproceedings, "publisher", false);
	addField (inproceedings, "address", false);
	addField (inproceedings, "doi", false);
	/*
	addField (inproceedings, "month", false);
	addField (inproceedings, "note", false);
	addField (inproceedings, "key", false);
	*/
	registerType (inproceedings);

	DocumentType misc ("misc", _("Misc"));
	addField (misc, "author", false);
	addField (misc, "title", false);
	addField (misc, "howpublished", false);
	addField (misc, "month", false);
	addField (misc, "year", false);
	addField (misc, "note", false);
	addField (misc, "key", false);
	addField (misc, "doi", false);
	registerType (misc);
	
	DocumentType unpublished ("unpublished", _("Unpublished"));
	addField (unpublished, "author", true);
	addField (unpublished, "title", true);
	addField (unpublished, "note", true);
//.........这里部分代码省略.........
开发者ID:egroeper,项目名称:referencer,代码行数:101,代码来源:DocumentTypes.C



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ register_all_packages函数代码示例发布时间:2022-05-30
下一篇:
C++ registerStream函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap