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


C++ Entry类代码示例

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


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

示例1: new

Entry* Entry::create()
{
  Entry *entry = new (std::nothrow) Entry();
  if (entry && entry->init())
  {
    entry->autorelease();
    return entry;
  }
  CC_SAFE_DELETE(entry);
  return nullptr;
}
开发者ID:maldewar,项目名称:cal,代码行数:11,代码来源:Entry.cpp

示例2: set

  bool set(const Entry& entry, const UUID& uuid)
  {
    const Option<Entry>& option = entries.get(entry.name());

    if (option.isSome() && UUID::fromBytes(option.get().uuid()) != uuid) {
      return false;
    }

    entries.put(entry.name(), entry);
    return true;
  }
开发者ID:AbheekG,项目名称:mesos,代码行数:11,代码来源:in_memory.cpp

示例3: ce

void App::changeEntry()
{
    ChooseEntry ce(this, 0, true);
    Entry *entry;

    ce.fillList(entriesList);
#ifdef DESKTOP
    // FIXME: make this work for qpe as well
    ce.adjustSize();
#endif
    if (!ce.exec())
        return;

    if (ce.currentEntry() == -1)
        return;

    entry = entriesList->at(ce.currentEntry());

    DefineEntry de(this, 0, true);

    if (notes->isEntryUsed(entry->getName()))
    {
        QMessageBox::warning(this, tr("Warning"), tr("This entry is used in notes.\nChanges made to this entry will\naffect all nodes of this type."), 0, 0, 0);

        de.setIsUsed(true);
    }

    for (PropertyStruct *ps = entry->first(); ps; ps = entry->next())
    {
        de.addProperty(new PropertyBoxItem(ps));
    }

    // now part of setEditEntry: de.EntryName->setText(entry->getName());
    de.setEditEntry(entry);
#ifndef DESKTOP
    de.showMaximized();
#endif

#ifdef DEBUG
    qDebug("-- Change entry --");
#endif

    int r = de.exec();
    if (r && de.getIsUsed())
    {
        notes->deleteEntryProperties(entry->getName(), de.getDeletedProperties());
    }

    if (r && de.getIsUsed())
        notes->refreshCurrentItem();

    if (r)
        setModified(true);
}
开发者ID:BackupTheBerlios,项目名称:iqnotes-svn,代码行数:54,代码来源:app.cpp

示例4: poifs_unlink

/* menghapus file */
int poifs_unlink(const char *path) {
    Entry entry = Entry(0,0).getEntry(path);
    if(entry.getAttr() & 0x8){
        return -ENOENT;
    }
    else{
        filesystem.freeBlock(entry.getIndex());
        entry.makeEmpty();
    }
    return 0;
}
开发者ID:husnimun,项目名称:poifs,代码行数:12,代码来源:poi_fs.cpp

示例5: shallowKey

bool Entry::operator ==(const Entry &other) const
{
    if (value.latinKey) {
        if (other.value.latinKey)
            return shallowLatin1Key() == other.shallowLatin1Key();
        return shallowLatin1Key() == other.shallowKey();
    } else if (other.value.latinKey) {
        return shallowKey() == other.shallowLatin1Key();
    }
    return shallowKey() == other.shallowKey();
}
开发者ID:unix-admin,项目名称:ita_course,代码行数:11,代码来源:qjson.cpp

示例6:

XmlProfile::~XmlProfile() {
    if(xmlFile) free(xmlFile);
    for(int i=1;i<=rootElements->len();i++) {
        Entry *entry = rootElements->pick(i);
        if(entry) {
            XmlTag *element = (XmlTag *)entry->get_value();
            if(element) delete element;
        }
    }
    delete rootElements;
}
开发者ID:dyne,项目名称:MuSE,代码行数:11,代码来源:xmlprofile.cpp

示例7: String

Entry::Entry(const Entry& e)
{
    _chunk = new String();
    (*_chunk) = e.getChunk();
    _type = new String();
    (*_type) = e.getType();
    _name = new String();
    (*_name) = e.getName();
    _fields = new Vector<Bibliographic*>();
    (*_fields) = (*e._fields);
}
开发者ID:calekennedy,项目名称:CS2413,代码行数:11,代码来源:Entry.cpp

示例8: poifs_open

/* memeriksa apakah file ada atau tidak */
int poifs_open(const char* path, struct fuse_file_info* fi) {
    /* hanya mengecek apakah file ada atau tidak */

    Entry entry = Entry(0,0).getEntry(path);
    
    if(entry.isEmpty()) {
        return -ENOENT;
    }
    
    return 0;
}
开发者ID:husnimun,项目名称:poifs,代码行数:12,代码来源:poi_fs.cpp

示例9: while

Entry*
NameTree::findLongestPrefixMatch(const Entry& entry1, const EntrySelector& entrySelector) const
{
  Entry* entry = const_cast<Entry*>(&entry1);
  while (entry != nullptr) {
    if (entrySelector(*entry)) {
      return entry;
    }
    entry = entry->getParent();
  }
  return nullptr;
}
开发者ID:cawka,项目名称:NFD,代码行数:12,代码来源:name-tree.cpp

示例10: sel

/* selects ONLY ONE, deselects the others
   use Entry::sel() if you want to do multiple selects */
void Linklist::sel(int pos) {
  int c;
  Entry *ptr = last;

  if(pos>length) return;

  for(c=length;c>0;c--) {
    if(c==pos) ptr->sel(true);
    else ptr->sel(false);
    ptr = ptr->prev;
  }
}
开发者ID:dromer,项目名称:TBT,代码行数:14,代码来源:linklist.cpp

示例11: setAvailable

bool TestRegistry::setAvailable(const char* name, bool value)
{
    bool result = false;
    for (cu_List::iterator p = m_entries.begin(); p != m_entries.end(); ++p) {
        Entry* entry = (Entry*)*p;
        if (strcmp(entry->getName(), name) == 0) {
            result = true;
            entry->setAvailable(value);
        }
    }
    return result;
}
开发者ID:kaorun55,项目名称:CppUnitxHelper,代码行数:12,代码来源:TestRegistry.cpp

示例12: poifs_chmod

int poifs_chmod(const char *path, unsigned int mode) {
    Entry entry = Entry(0, 0).getEntry(path);

    if (entry.isEmpty()) {
        return -ENOENT;
    }

    entry.setAttr(mode);
    entry.write();

    return 0;
}
开发者ID:husnimun,项目名称:poifs,代码行数:12,代码来源:poi_fs.cpp

示例13: FREE_C_HEAP_ARRAY

CompactHashtableWriter::~CompactHashtableWriter() {
  for (int index = 0; index < _num_buckets; index++) {
    Entry* next = NULL;
    for (Entry* tent = _buckets[index]; tent; tent = next) {
      next = tent->next();
      delete tent;
    }
  }

  FREE_C_HEAP_ARRAY(juint, _bucket_sizes);
  FREE_C_HEAP_ARRAY(Entry*, _buckets);
}
开发者ID:benbenolson,项目名称:hotspot_9_mc,代码行数:12,代码来源:compactHashtable.cpp

示例14: while

/* 
 * main loop for the CarbonGui object
 */
void CARBON_GUI::run() {
    int i;
    int o = 0;
    //UInt32 finalTicks;
    while(!quit) {
        
        lock(); /* lock before iterating on channel array ... if all is sane
                 * nobody can modify the channel list while we are managing it */
        wait(); /* wait the tick signal from jmixer */
        /* now iterate an channels updating lcd and pos as necessary */
        for(i=0;i<MAX_CHANNELS;i++) {
            if(channel[i]) {
                if(new_pos[i]) {
                    int newPos = (int)(ch_pos[i]*1000);
                    channel[i]->setPos(newPos);
                    new_pos[i] = false;
                }
                if(new_lcd[i]) { 
                    channel[i]->setLCD(ch_lcd[i]);
                    new_lcd[i] = false;
                }
                channel[i]->run(); /* propagate tick on each channel */
                //QDFlushPortBuffer(GetWindowPort(channel[i]->window),NULL);
            }
        }
        if(playlistManager->isTouched()) 
            playlistManager->untouch(); /* reset playlistManager update flag */
        unlock();
        if(meterShown()) updateVumeters();
        if(statusText && msgList->len() > 0) {
            /*	
            statusLock();
            if(statusText && !quit) {
                err=TXNSetTypeAttributes(statusText,3,attributes,kTXNUseCurrentSelection,kTXNUseCurrentSelection);
                if(err!=noErr) msg->warning("Can't set status text attributes (%d)!!",err);
            }
            statusUnlock(); 
            */ 
            while(msgList->len() > 0) {
                Entry *msg = msgList->begin();
                char *txt = (char *)msg->get_value();
                if(txt) {
                    msgOut(txt);
                    free(txt);
                }
                delete msg;
            }
        }
    //	Delay(2,&finalTicks); /* XXX - DISABLED BEACAUSE NOW TICK IS SIGNALED BY JMIXER */
        if(IsWindowVisible(bufferInspector->window))
            bufferInspector->run();
    }
 }
开发者ID:dyne,项目名称:MuSE,代码行数:56,代码来源:carbon_gui.cpp

示例15: selectedEntry

void SBookWidget::menuFilePrintLabel2()
{
    Entry *ent = selectedEntry();

    if(ent){
    QString addr = ent->addressN(1);

    if(addr.length()){
        printLabel(addr);
    }
    }
}
开发者ID:dpp,项目名称:SBook5,代码行数:12,代码来源:main_menu.cpp


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