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


C++ PropertyList::push_back方法代码示例

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


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

示例1: loadProperties

void WaitZarInstance::loadProperties()
{
    //Add our properties to a proplist
    PropertyList proplist;
    proplist.push_back (_waitzar_encoding_prop);
    proplist.push_back (_waitzar_encoding_unicode_prop);
    proplist.push_back (_waitzar_encoding_zawgyi_prop);
    proplist.push_back (_waitzar_encoding_wininnwa_prop);

    //Now, register these properties
    register_properties(proplist);

    //Set tooltips
    _waitzar_encoding_prop.set_tip (_("The encoding of the text WaitZar outputs. Change this only if you know what you're doing."));
    _waitzar_encoding_unicode_prop.set_tip (_("The encoding as defined in Unicode 5.1 and later. The default & recommended option."));
    update_property (_waitzar_encoding_unicode_prop);
    _waitzar_encoding_zawgyi_prop.set_tip (_("The encoding used by the Zawgyi-One font, a popular font on the web which conflicts with Unicode."));
    update_property (_waitzar_encoding_zawgyi_prop);
    _waitzar_encoding_wininnwa_prop.set_tip (_("The encoding used by the Win Innwa font family (inc. Win Kalaw), a popular legacy font which conflicts with ASCII."));
    update_property (_waitzar_encoding_wininnwa_prop);

    //Finally, double-check the label... although this really shouldn't change.
    String newLbl = "";
    int encoding = model->getOutputEncoding();
    if (encoding == ENCODING_UNICODE)
	    newLbl = "UNI";
    else if (encoding == ENCODING_ZAWGYI)
	newLbl = "ZG";
    else if (encoding == ENCODING_WININNWA)
	newLbl = "WI";
    else
	newLbl = "??";
    _waitzar_encoding_prop.set_label (newLbl);
    update_property (_waitzar_encoding_prop);
}
开发者ID:kokoye2007,项目名称:scim-waitzar,代码行数:35,代码来源:scim_waitzar_imengine.cpp

示例2: if

PyObject *
PyIMEngine::py_register_properties (PyIMEngineObject *self, PyObject *args)
{
	PyObject *props = NULL;
	PropertyList proplist;
	int i;

	if (!PyArg_ParseTuple (args, "O:register_properties", &props))
		return NULL;

	if (PyList_Check (props)) {
		for (i = 0; i < PyList_Size (props); i++) {
			PyObject *prop = PyList_GetItem (props, i);
			proplist.push_back (PyProperty_AsProperty (prop));
		}
	}
	else if (PyTuple_Check (props)) {
		for (i = 0; i < PyTuple_Size (props); i++) {
			PyObject *prop = PyTuple_GetItem (props, i);
			proplist.push_back (PyProperty_AsProperty (prop));
		}

	}
	else {
		PyErr_SetString (PyExc_TypeError, "the argument must be a list or a tuple that contains propertys");
		return NULL;
	}

	self->engine.register_properties (proplist);

	Py_INCREF (Py_None);
	return Py_None;
}
开发者ID:Alwnikrotikz,项目名称:scim-python,代码行数:33,代码来源:scim-python-engine.cpp

示例3: GetPropertyList

PropertyList CUnitDiskUIHandler::GetPropertyList(CDiskObjectPtr obj) const
{
	PropertyList propList;
	PropertyListItem propItem;
	WTL::CString strBuffer;
	CUnitDiskObjectPtr unitDisk = 
		boost::dynamic_pointer_cast<CUnitDiskObject>(obj);
	CUnitDiskInfoHandlerPtr handler = unitDisk->GetInfoHandler();
	CHDDDiskInfoHandler *pHDDHandler = 
		dynamic_cast<CHDDDiskInfoHandler*>(handler.get());
	if ( pHDDHandler != NULL )
	{
		// TODO : String resources
		propItem.strName.LoadString( IDS_UIHANDLER_PROPERTY_MODEL );
		propItem.strValue = pHDDHandler->GetModelName();
		propItem.strToolTip.LoadString( IDS_UIHANDLER_PROPERTY_MODEL_TOOLTIP );
		propList.push_back( propItem );

		propItem.strName.LoadString( IDS_UIHANDLER_PROPERTY_SERIALNO );
		propItem.strValue = pHDDHandler->GetSerialNo();
		propItem.strToolTip.LoadString( IDS_UIHANDLER_PROPERTY_SERIALNO_TOOLTIP );
		propList.push_back( propItem );
	}
	return propList;
}
开发者ID:yzx65,项目名称:ndas4windows,代码行数:25,代码来源:nbuihandler.cpp

示例4:

void
SunPyInstance::initialize_all_properties ()
{
    PropertyList proplist;

    proplist.push_back (_status_property);
    proplist.push_back (_letter_property);
    proplist.push_back (_punct_property);

    register_properties (proplist);
    refresh_all_properties ();
}
开发者ID:Abioy,项目名称:sunpinyin,代码行数:12,代码来源:sunpinyin_imengine.cpp

示例5: xmlFromWidgetBox

// Get XML for a new form from the widget box. Change objectName/geometry
// properties to be suitable for new forms
static QString xmlFromWidgetBox(const QDesignerFormEditorInterface *core, const QString &className, const QString &objectName)
{
    typedef QList<DomProperty*> PropertyList;

    QDesignerWidgetBoxInterface::Widget widget;
    const bool found = QDesignerWidgetBox::findWidget(core->widgetBox(), className, QString(), &widget);
    if (!found)
        return QString();
    QScopedPointer<DomUI> domUI(QDesignerWidgetBox::xmlToUi(className, widget.domXml(), false));
    if (domUI.isNull())
        return QString();
    domUI->setAttributeVersion(QLatin1String("4.0"));
    DomWidget *domWidget = domUI->elementWidget();
    if (!domWidget)
        return QString();
    // Properties: Remove the "objectName" property in favour of the name attribute and check geometry.
    domWidget->setAttributeName(objectName);
    const QString geometryProperty = QLatin1String("geometry");
    const QString objectNameProperty  = QLatin1String("objectName");
    PropertyList properties = domWidget->elementProperty();
    for (PropertyList::iterator it = properties.begin(); it != properties.end(); ) {
        DomProperty *property = *it;
        if (property->attributeName() == objectNameProperty) { // remove  "objectName"
            it = properties.erase(it);
            delete property;
        } else {
            if (property->attributeName() == geometryProperty) { // Make sure form is at least 400, 300
                if (DomRect *geom = property->elementRect()) {
                    if (geom->elementWidth() < NewFormWidth)
                        geom->setElementWidth(NewFormWidth);
                    if (geom->elementHeight() < NewFormHeight)
                        geom->setElementHeight(NewFormHeight);
                }
            }
            ++it;
        }
    }
    // Add a window title property
    DomString *windowTitleString = new DomString;
    windowTitleString->setText(objectName);
    DomProperty *windowTitleProperty = new DomProperty;
    windowTitleProperty->setAttributeName(QLatin1String("windowTitle"));
    windowTitleProperty->setElementString(windowTitleString);
    properties.push_back(windowTitleProperty);
    // ------
    domWidget->setElementProperty(properties);
    // Embed in in DomUI and get string. Omit the version number.
    domUI->setElementClass(objectName);

    QString rc;
    { // Serialize domUI
        QXmlStreamWriter writer(&rc);
        writer.setAutoFormatting(true);
        writer.setAutoFormattingIndent(1);
        writer.writeStartDocument();
        domUI->write(writer);
        writer.writeEndDocument();
    }
    return rc;
}
开发者ID:fluxer,项目名称:katie,代码行数:62,代码来源:widgetdatabase.cpp

示例6: supported

PropertyList OpenCvLuxPlugin::supported()
{
	PropertyList props;
	props.push_back(VehicleProperty::ExteriorBrightness);
	
	return props;
}
开发者ID:timkoma,项目名称:automotive-message-broker,代码行数:7,代码来源:opencvluxplugin.cpp

示例7: BuildPropertyList

void PropertyHolder::BuildPropertyList(PropertyList& output, const IRI& iri) const
{
    if ( iri.IsEmpty() )
        return;
    
    for ( auto& i : _properties )
    {
        if ( i->PropertyIdentifier() == iri || i->HasExtensionWithIdentifier(iri) )
            output.push_back(i);
    }
}
开发者ID:datalogics-bhaugen,项目名称:SDKLauncher-Windows,代码行数:11,代码来源:property_holder.cpp

示例8:

void
ArrayInstance::initialize_properties ()
{
    PropertyList proplist;

    proplist.push_back(m_factory->m_status_property);
    proplist.push_back(m_factory->m_letter_property);

    register_properties (proplist);

    refresh_status_property();
    refresh_letter_property();
}
开发者ID:tzhuan,项目名称:scim-array,代码行数:13,代码来源:scim_array_imengine.cpp

示例9:

PropertyList CRAID4DiskUIHandler::GetPropertyList(CDiskObjectPtr obj) const
{
	PropertyList propList;
	PropertyListItem propItem;
	WTL::CString strBuffer;

	//propItem[0] = _T("Binding type");
	propItem.strName.LoadString( IDS_UIHANDLER_PROPERTY_NUM_BOUND_DISK );
	strBuffer.Format( _T("%d"), obj->GetDiskCountInBind() );
	propItem.strValue = strBuffer;
	propItem.strToolTip.LoadString( IDS_UIHANDLER_PROPERTY_NUM_BOUND_DISK_TOOLTIP );
	propList.push_back( propItem );
	return propList;	
}
开发者ID:yzx65,项目名称:ndas4windows,代码行数:14,代码来源:nbuihandler.cpp

示例10: getHistory

void BluemonkeySink::getHistory(QStringList properties, QDateTime begin, QDateTime end, QScriptValue cbFunction)
{
	double b = (double)begin.toMSecsSinceEpoch() / 1000.0;
	double e = (double)end.toMSecsSinceEpoch() / 1000.0;
	AsyncRangePropertyRequest request;
	request.timeBegin = b;
	request.timeEnd = e;

	PropertyList reqlist;

	foreach(QString prop, properties)
	{
		reqlist.push_back(prop.toStdString());
	}
开发者ID:asokang,项目名称:automotive-message-broker,代码行数:14,代码来源:bluemonkey.cpp

示例11:

void
HangulInstance::register_all_properties()
{
    PropertyList proplist;

    if (use_ascii_mode()) {
	if (m_hangul_mode) {
	    hangul_mode.set_label("한");
	} else {
	    hangul_mode.set_label("A");
	}
	proplist.push_back(hangul_mode);
    }

    if (m_factory->m_hanja_mode) {
	hanja_mode.set_icon(SCIM_HANGUL_ICON_ON);
    } else {
	hanja_mode.set_icon(SCIM_HANGUL_ICON_OFF);
    }
    hanja_mode.set_label(_("Hanja Lock"));
    proplist.push_back(hanja_mode);

    register_properties(proplist);
}
开发者ID:tzhuan,项目名称:scim-hangul,代码行数:24,代码来源:scim_hangul_imengine.cpp

示例12: if

void
HangulInstance::register_all_properties()
{
    PropertyList proplist;

    const char* layout_label;
    if (m_factory->m_keyboard_layout == "2") {
	layout_label = _("2bul");
    } else if (m_factory->m_keyboard_layout == "32") {
	layout_label = _("3bul 2bul-shifted");
    } else if (m_factory->m_keyboard_layout == "3f") {
	layout_label = _("3bul Final");
    } else if (m_factory->m_keyboard_layout == "39") {
	layout_label = _("3bul 390");
    } else if (m_factory->m_keyboard_layout == "3s") {
	layout_label = _("3bul No-Shift");
    } else if (m_factory->m_keyboard_layout == "3y") {
	layout_label = _("3bul Yetgeul");
    }
    keyboard_layout.set_label(layout_label);
    proplist.push_back(keyboard_layout);
    proplist.push_back(keyboard_layout_2);
    proplist.push_back(keyboard_layout_32);
    proplist.push_back(keyboard_layout_3f);
    proplist.push_back(keyboard_layout_39);
    proplist.push_back(keyboard_layout_3s);
    proplist.push_back(keyboard_layout_3y);

    if (use_ascii_mode()) {
	if (m_hangul_mode) {
	    hangul_mode.set_label("한");
	} else {
	    hangul_mode.set_label("A");
	}
	proplist.push_back(hangul_mode);
    }

    if (is_hanja_mode()) {
	hanja_mode.set_label("漢");
    } else {
	hanja_mode.set_label("韓");
    }
    proplist.push_back(hanja_mode);

    register_properties(proplist);
}
开发者ID:wwood,项目名称:scim,代码行数:46,代码来源:scim_hangul_imengine.cpp

示例13: testCoreUpdateSupported

bool TestPlugin::testCoreUpdateSupported()
{
	bool success = false;

	PropertyList toAdd;
	toAdd.push_back(VehicleProperty::ClutchStatus);

	routingEngine->updateSupported(toAdd,PropertyList());

	PropertyList supported = routingEngine->supported();

	success = ListPlusPlus<VehicleProperty::Property>(&supported).contains(VehicleProperty::ClutchStatus);

	PropertyList toRemove = toAdd;

	routingEngine->updateSupported(PropertyList(),toRemove);

	supported = routingEngine->supported();

	success &= !ListPlusPlus<VehicleProperty::Property>(&supported).contains(VehicleProperty::ClutchStatus);

	return success;
}
开发者ID:timkoma,项目名称:automotive-message-broker,代码行数:23,代码来源:testplugin.cpp

示例14: ReadTag

      /// <summary>Reads the entire tag and advances the iterator</summary>
      /// <param name="pos">position of opening bracket</param>
      /// <returns></returns>
      /// <exception cref="Logic::Language::AlgorithmException">Unable to read tag</exception>
      /// <exception cref="Logic::Language::RichTextException">Closing tag doesn't match currently open tag</exception>
      /// <remarks>Advances the iterator to the last character of the tag, so Parse() loop advances correctly to the next character</remarks>
      RichStringParser::RichTag  RichStringParser::ReadTag(CharIterator& pos)
      {
         wsmatch matches;

         // BASIC: Open/Close Tag without properties
         if (regex_search(pos, Input.cend(), matches, IsBasicTag))
         {
            // Identify open/close
            bool opening = (pos[1] != '/');
            wstring name = matches[1].str();
            
            // Identify type
            switch (TagType type = IdentifyTag(name))
            {
            // Title: Return title
            case TagType::Author:
            case TagType::Select:
            case TagType::Title:
               // Match [title](text)[/title]
               if (!regex_search(pos, Input.cend(), matches, type == TagType::Title  ? IsTitleDefinition
                                                           : type == TagType::Author ? IsAuthorDefinition
                                                                                     : IsButtonDefinition)) 
                  throw RichTextException(HERE, VString(L"Invalid [%s] tag", ::GetString(type).c_str()));

               // Advance iterator.  Return title text
               pos += matches[0].length()-1;
               return RichTag(type, matches[1].str());

            // Default: Advance iterator to ']' + return
            default:
               pos += matches[0].length()-1;
               return RichTag(type, opening);
            }
         }
         // COMPLEX: Open tag with properties
         else if (regex_search(pos, Input.cend(), matches, IsOpeningTag))  // Match tag name, identify start/end of properties
         {
            PropertyList props;

            // Match properties
            for (wsregex_iterator it(pos+matches[1].length(), pos+matches[0].length(), IsTagProperty), eof; it != eof; ++it)
               // Extract {name,value} from 2st/3rd match
               props.push_back( Property(it->str(1), it->str(2)) );
            
            // Advance Iterator + create tag
            pos += matches[0].length()-1;
            auto tag = RichTag(IdentifyTag(matches[1].str()), props);

            // Button: Extract text
            if (tag.Type == TagType::Select)
            {
               if (!regex_search(pos, Input.cend(), matches, IsButtonText))
                  throw RichTextException(HERE, GuiString(L"Invalid [select] tag"));

               // Extract text + Advance Iterator
               tag.Text = matches[1].str();
               pos += matches[0].length()-1;
            }

            // Return tag
            return tag;
         }

         // Error: No match
         throw AlgorithmException(HERE, L"Cannot read previously matched opening tag");
      }
开发者ID:CyberSys,项目名称:X-Studio-2,代码行数:72,代码来源:RichStringParser.cpp

示例15: main

int main(int argc, char* argv[])
{
    String config_name("simple");
    String display_name;
    bool daemon = false;
    bool should_resident = true;

    //parse command options
    int i = 1;
    while (i < argc) {
        if (String("-l") == argv[i] || String("--list") == argv[i]) {
            std::cout << "\n";
            std::cout << "Available Config module:\n";
            // get config module list
            std::vector<String> config_list;
            scim_get_config_module_list(config_list);
            config_list.push_back("dummy");
            std::vector<String>::iterator it = config_list.begin();
            for (; it != config_list.end(); ++it) {
                std::cout << "    " << *it << "\n";
            }
            return 0;
        }
        else if (String("-c") == argv[i] || String("--config") == argv[i]) {
            if (++i >= argc) {
                std::cerr << "no argument for option " << argv[i-1] << "\n";
                return -1;
            }
            config_name = argv[i];
        }
        else if (String("-h") == argv[i] || String("--help") == argv[i]) {
            std::cout << "Usage: " << argv [0] << " [option]...\n\n"
                      << "The options are: \n"
                      << "  --display DISPLAY    Run on display DISPLAY.\n"
                      << "  -l, --list           List all of available config modules.\n"
                      << "  -c, --config NAME    Uses specified Config module.\n"
                      << "  -d, --daemon         Run " << argv [0] << " as a daemon.\n"
                      << "  -ns, --no-stay       Quit if no connected client.\n"
                      << "  -h, --help           Show this help message.\n";
            return 0;
        }
        else if (String("-d") == argv[i] || String("--daemon") == argv[i]) {
            daemon = true;
        }
        else if (String("-ns") == argv[i] || String("--no-stay") == argv[i]) {
            should_resident = false;
        }
        else if (String("--display") == argv[i]) {
            if (++i >= argc) {
                std::cerr << "No argument for option " << argv[i-1] << "\n";
                return -1;
            }
            display_name = argv[i];
        }
        else {
            std::cerr << "Invalid command line option: " << argv[i] << "\n";
            return -1;
        }
        ++i;
    }

    // Make up DISPLAY env.
    if (display_name.length()) {
        setenv("DISPLAY", display_name.c_str(), 1);
    }

    if (config_name == "dummy") {
        _config = new DummyConfig();
    }
    else {
        _config_module = new ConfigModule(config_name);
        if (!_config_module || !_config_module->valid()) {
            std::cerr << "Can not load " << config_name << " Config module.\n";
            return -1;
        }
        _config = _config_module->create_config();
    }

    if (_config.null()) {
        std::cerr << "Failed to create instance from " << config_name << " Config module.\n";
        return -1;
    }


    signal(SIGTERM, niam);
    signal(SIGINT, niam);

    if (!initialize_panel_agent(config_name, display_name, should_resident)) {
        std::cerr << "Failed to initialize PanelAgent.\n";
        return -1;
    }

    if (daemon)
        scim_daemon();

    if (!run_panel_agent()) {
        std::cerr << "Failed to run Socket Server!\n";
        return -1;
    }

//.........这里部分代码省略.........
开发者ID:KDE,项目名称:kimtoy,代码行数:101,代码来源:scim_panel_impanel.cpp


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