// monitor to current cache void monitorCache(LINK l) { int cachelength = getCount(l); int i = 1; printf("length:%d\n",cachelength); printf("<<<<<<<<<Cache>>>>>>>>>\n"); for(i; i<=cachelength; i++) printf("key:%s\tindex:%d\tSize:%u\n",getByIndex(l,i).key,i,getByIndex(l,i).size); printf("<<<<<<<<cache_end>>>>>>>\n"); }
char * language_c::getLangName(int id) { if ((id < Count) && (id >= 0)) { languagefile_c * file = (languagefile_c*)getByIndex(id); return file->getLabel(); } else { return NULL; } }
class_type push( unsigned long int idVal, class_type newVal ){ LinkedListEntry<class_type>* currentNode = getByIndex( length()-1 ); if( !currentNode ){ return ( this->setRoot( new LinkedListEntry<class_type>(idVal, newVal) ) )->getVal(); } else { return currentNode->setNext( newVal, idVal ); } }
bool JSInt16Array::getOwnPropertySlot(ExecState* exec, unsigned propertyName, PropertySlot& slot) { if (propertyName < static_cast<Int16Array*>(impl())->length()) { slot.setValue(getByIndex(exec, propertyName)); return true; } return getOwnPropertySlot(exec, Identifier::from(exec, propertyName), slot); }
bool JSFloat32Array::getOwnPropertySlot(ExecState* exec, unsigned propertyName, PropertySlot& slot) { ASSERT_GC_OBJECT_INHERITS(this, &s_info); if (propertyName < static_cast<Float32Array*>(impl())->length()) { slot.setValue(getByIndex(exec, propertyName)); return true; } return getOwnPropertySlot(exec, Identifier::from(exec, propertyName), slot); }
PartContainer::PartContainer(const Json::Value& value, ObjectFactory& factory): Container(value, factory) { int attachToIndex = 0; for(auto indexesOfAttachedParts : value["attachments"]) { Part* attachTo = getByIndex(attachToIndex); for(auto attachedPartIndex : indexesOfAttachedParts) { Part* attachedPart = getByIndex(attachedPartIndex.asInt()); attachments[attachTo].push_back(attachedPart); } attachToIndex++; } }
bool JSInt16Array::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) { bool ok; unsigned index = propertyName.toUInt32(ok); if (ok && index < static_cast<Int16Array*>(impl())->length()) { descriptor.setDescriptor(getByIndex(exec, index), DontDelete); return true; } return getStaticValueDescriptor<JSInt16Array, Base>(exec, getJSInt16ArrayTable(exec), this, propertyName, descriptor); }
bool JSInt16Array::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) { bool ok; unsigned index = propertyName.toUInt32(ok); if (ok && index < static_cast<Int16Array*>(impl())->length()) { slot.setValue(getByIndex(exec, index)); return true; } return getStaticValueSlot<JSInt16Array, Base>(exec, getJSInt16ArrayTable(exec), this, propertyName, slot); }
char * language_c::setCurrentByLabel(char * aLabel) { languagefile_c * file; for (int i=0; i<Count;i++) { file = (languagefile_c*)getByIndex(i); if (strcmp(file->getLabel(),aLabel) == 0) { current = i; // setup->setLang(file->id); } } return aLabel; }
bool JSFloat32Array::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) { ASSERT_GC_OBJECT_INHERITS(this, &s_info); bool ok; unsigned index = propertyName.toUInt32(ok); if (ok && index < static_cast<Float32Array*>(impl())->length()) { slot.setValue(getByIndex(exec, index)); return true; } return getStaticValueSlot<JSFloat32Array, Base>(exec, getJSFloat32ArrayTable(exec), this, propertyName, slot); }
char * language_c::getCurLang() { if (current != -1) { languagefile_c * file = (languagefile_c *)getByIndex(current); return file->getId(); } else { char * temp = new char[2]; temp[0] = 0; temp[1] = 0; return temp; } }
int language_c::getLangID(int lang) { int id = -1; languagefile_c * file; int i=0; while ((i<Count) & (id == -1)) { file = (languagefile_c*)getByIndex(i); if (lang == hexToInt(file->getId())) {id = i;} i = i + 1; } return id; }
class_type pop(){ LinkedListEntry<class_type>* currentNode = getByIndex( length()-1 ); class_type retval; if( currentNode ) retval = currentNode->getVal(); if( currentNode && currentNode->hasPrevious() ){ ( currentNode->getPrevious() )->clearNext(); } else if ( currentNode ){ //delete [] currentNode; currentNode = root = NULL; } return retval; };
string FieldSet::toString() { string s; for (int index = 0; index < count(); index++) { if (Field* f = getByIndex(index)) { s += f->getName(); if (index < (count() - 1)) s += ", "; } } return s; }
string FieldSet::getDefinition() { string s; for (int index = 0; index < count(); index++) { if (Field* f = getByIndex(index)) { s += f->getDefinition(); if (index < (count() - 1)) s += ", "; } } return s; }
void WindowManager::childRemoved(unsigned int start, unsigned int numChildren) { for (unsigned int i = start; i < start+numChildren; i++) { Window* window = getByIndex(i); if(!window) continue; if(_remove(window)) { window->_index = 0; window->unmanaged(this); } } // Update Window's index for(Iterator w = begin(); w != end(); w++) { if(w->get()->_index >= start) w->get()->_index -= numChildren; } }
char * language_c::getLangText(int id) { languagefile_c * file = (languagefile_c*)getByIndex(current); return file->getText(id); }