コード例 #1
0
ファイル: myProxy2.c プロジェクト: kwonyoungjae/ProxyServer
// 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");
}
コード例 #2
0
ファイル: language.cpp プロジェクト: fholler0371/fhs-utils
char * language_c::getLangName(int id) {
  if ((id < Count) && (id >= 0)) {
    languagefile_c * file = (languagefile_c*)getByIndex(id);
    return file->getLabel();
  } else {
    return NULL;
  }
}
コード例 #3
0
 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 );
   }
 }
コード例 #4
0
ファイル: JSInt16Array.cpp プロジェクト: 13W/phantomjs
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);
}
コード例 #5
0
ファイル: JSFloat32Array.cpp プロジェクト: Xertz/EAWebKit
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);
}
コード例 #6
0
ファイル: partcontainer.cpp プロジェクト: ruisleipa/kp2
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++;
	}
}
コード例 #7
0
ファイル: JSInt16Array.cpp プロジェクト: 13W/phantomjs
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);
}
コード例 #8
0
ファイル: JSInt16Array.cpp プロジェクト: 13W/phantomjs
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);
}
コード例 #9
0
ファイル: language.cpp プロジェクト: fholler0371/fhs-utils
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;
}
コード例 #10
0
ファイル: JSFloat32Array.cpp プロジェクト: Xertz/EAWebKit
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);
}
コード例 #11
0
ファイル: language.cpp プロジェクト: fholler0371/fhs-utils
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;
  }
}
コード例 #12
0
ファイル: language.cpp プロジェクト: fholler0371/fhs-utils
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;
}
コード例 #13
0
      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;
      };
コード例 #14
0
ファイル: SqlFieldSet.cpp プロジェクト: carriercomm/wwdedup
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;
}
コード例 #15
0
ファイル: SqlFieldSet.cpp プロジェクト: carriercomm/wwdedup
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;
}
コード例 #16
0
ファイル: WindowManager.cpp プロジェクト: yueying/osg
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;
    }

}
コード例 #17
0
ファイル: language.cpp プロジェクト: fholler0371/fhs-utils
char * language_c::getLangText(int id) {
  languagefile_c * file = (languagefile_c*)getByIndex(current);
  return file->getText(id);
}