void FastWriter::writeValue( const Value &value ) { switch ( value.type() ) { case nullValue: document_ += "null"; break; case intValue: document_ += valueToString( value.asInt() ); break; case uintValue: document_ += valueToString( value.asUInt() ); break; case realValue: document_ += valueToString( value.asDouble() ); break; case stringValue: document_ += valueToQuotedString( value.asCString() ); break; case booleanValue: document_ += valueToString( value.asBool() ); break; case arrayValue: { document_ += "["; int size = value.size(); for ( int index =0; index < size; ++index ) { if ( index > 0 ) document_ += ","; writeValue( value[index] ); } document_ += "]"; } break; case objectValue: { Value::Members members( value.getMemberNames() ); document_ += "{"; for ( Value::Members::iterator it = members.begin(); it != members.end(); ++it ) { const std::string &name = *it; if ( it != members.begin() ) document_ += ","; document_ += valueToQuotedString( name.c_str() ); document_ += yamlCompatiblityEnabled_ ? ": " : ":"; writeValue( value[name] ); } document_ += "}"; } break; } }
void StyledStreamWriter::writeValue(const Value &value) { switch (value.type()) { case nullValue: pushValue("null"); break; case intValue: pushValue(valueToString(value.asInt())); break; case uintValue: pushValue(valueToString(value.asUInt())); break; case realValue: pushValue(valueToString(value.asDouble())); break; case stringValue: pushValue(valueToQuotedString(value.asCString())); break; case booleanValue: pushValue(valueToString(value.asBool())); break; case arrayValue: writeArrayValue(value); break; case objectValue: { Value::Members members(value.getMemberNames()); if (members.empty()) pushValue("{}"); else { writeWithIndent("{"); indent(); Value::Members::iterator it = members.begin(); while (true) { const std::string &name = *it; const Value &childValue = value[name]; writeCommentBeforeValue(childValue); writeWithIndent(valueToQuotedString(name.c_str())); *document_ << " : "; writeValue(childValue); if (++it == members.end()) { writeCommentAfterValueOnSameLine(childValue); break; } *document_ << ","; writeCommentAfterValueOnSameLine(childValue); } unindent(); writeWithIndent("}"); } } break; } }
void FastWriter::writeValue(const Value& value) { switch (value.type()) { case nullValue: if (!dropNullPlaceholders_) document_ += "null"; break; case intValue: document_ += valueToString(value.asLargestInt()); break; case uintValue: document_ += valueToString(value.asLargestUInt()); break; case realValue: document_ += valueToString(value.asDouble()); break; case stringValue: { // Is NULL possible for value.string_? No. char const* str; char const* end; bool ok = value.getString(&str, &end); if (ok) document_ += valueToQuotedStringN(str, static_cast<unsigned>(end-str)); break; } case booleanValue: document_ += valueToString(value.asBool()); break; case arrayValue: { document_ += '['; ArrayIndex size = value.size(); for (ArrayIndex index = 0; index < size; ++index) { if (index > 0) document_ += ','; writeValue(value[index]); } document_ += ']'; } break; case objectValue: { Value::Members members(value.getMemberNames()); document_ += '{'; for (Value::Members::iterator it = members.begin(); it != members.end(); ++it) { const JSONCPP_STRING& name = *it; if (it != members.begin()) document_ += ','; document_ += valueToQuotedStringN(name.data(), static_cast<unsigned>(name.length())); document_ += yamlCompatiblityEnabled_ ? ": " : ":"; writeValue(value[name]); } document_ += '}'; } break; } }
static void printValueTree( FILE *fout, Json::Value &value, const std::string &path = "." ) { switch ( value.type() ) { case Json::nullValue: fprintf( fout, "%s=null\n", path.c_str() ); break; case Json::intValue: fprintf( fout, "%s=%s\n", path.c_str(), Json::valueToString( value.asLargestInt() ).c_str() ); break; case Json::uintValue: fprintf( fout, "%s=%s\n", path.c_str(), Json::valueToString( value.asLargestUInt() ).c_str() ); break; case Json::realValue: fprintf( fout, "%s=%s\n", path.c_str(), normalizeFloatingPointStr(value.asDouble()).c_str() ); break; case Json::stringValue: fprintf( fout, "%s=\"%s\"\n", path.c_str(), value.asString().c_str() ); break; case Json::booleanValue: fprintf( fout, "%s=%s\n", path.c_str(), value.asBool() ? "true" : "false" ); break; case Json::arrayValue: { fprintf( fout, "%s=[]\n", path.c_str() ); int size = value.size(); for ( int index =0; index < size; ++index ) { static char buffer[16]; sprintf( buffer, "[%d]", index ); printValueTree( fout, value[index], path + buffer ); } } break; case Json::objectValue: { fprintf( fout, "%s={}\n", path.c_str() ); Json::Value::Members members( value.getMemberNames() ); std::sort( members.begin(), members.end() ); std::string suffix = *(path.end()-1) == '.' ? "" : "."; for ( Json::Value::Members::iterator it = members.begin(); it != members.end(); ++it ) { const std::string &name = *it; printValueTree( fout, value[name], path + suffix + name ); } } break; default: break; } }
// Make a vector constant, which is a struct containing a float array. // Note: this must agree with the definition of OpVec3. llvm::Constant* CgConst::MakeVector(const float* data, unsigned int length) const { std::vector<llvm::Constant*> members(3); members[0] = MakeFloat(data[0]); members[1] = MakeFloat(data[1]); members[2] = MakeFloat(data[2]); llvm::StructType* vecTy = llvm::dyn_cast<llvm::StructType>(mTypes->GetVecTy()); assert(vecTy != NULL && "Expected vector type to be an llvm::StructType"); return llvm::ConstantStruct::get(vecTy, llvm::ArrayRef<llvm::Constant*>(members)); }
void printValueTree( const Json::Value& value, const std::string& path) { switch ( value.type() ) { case Json::nullValue: XBMC->Log(LOG_DEBUG, "%s=null\n", path.c_str() ); break; case Json::intValue: XBMC->Log(LOG_DEBUG, "%s=%d\n", path.c_str(), value.asInt() ); break; case Json::uintValue: XBMC->Log(LOG_DEBUG, "%s=%u\n", path.c_str(), value.asUInt() ); break; case Json::realValue: XBMC->Log(LOG_DEBUG, "%s=%.16g\n", path.c_str(), value.asDouble() ); break; case Json::stringValue: XBMC->Log(LOG_DEBUG, "%s=\"%s\"\n", path.c_str(), value.asString().c_str() ); break; case Json::booleanValue: XBMC->Log(LOG_DEBUG, "%s=%s\n", path.c_str(), value.asBool() ? "true" : "false" ); break; case Json::arrayValue: { XBMC->Log(LOG_DEBUG, "%s=[]\n", path.c_str() ); int size = value.size(); for ( int index =0; index < size; ++index ) { static char buffer[16]; snprintf( buffer, 16, "[%d]", index ); printValueTree( value[index], path + buffer ); } } break; case Json::objectValue: { XBMC->Log(LOG_DEBUG, "%s={}\n", path.c_str() ); Json::Value::Members members( value.getMemberNames() ); std::sort( members.begin(), members.end() ); std::string suffix = *(path.end()-1) == '.' ? "" : "."; for ( Json::Value::Members::iterator it = members.begin(); it != members.end(); ++it ) { const std::string &name = *it; printValueTree( value[name], path + suffix + name ); } } break; default: break; } }
void DUpdateVisitor::visitMClass(const MClass *klass) { auto dclass = dynamic_cast<DClass *>(m_target); QMT_CHECK(dclass); if (isUpdating(klass->umlNamespace() != dclass->umlNamespace())) dclass->setUmlNamespace(klass->umlNamespace()); if (isUpdating(klass->templateParameters() != dclass->templateParameters())) dclass->setTemplateParameters(klass->templateParameters()); if (isUpdating(klass->members() != dclass->members())) dclass->setMembers(klass->members()); visitMObject(klass); }
BSONObj ReplicaSetConfig::toBSON() const { BSONObjBuilder configBuilder; configBuilder.append(kIdFieldName, _replSetName); configBuilder.appendIntOrLL(kVersionFieldName, _version); if (_configServer) { // Only include "configsvr" field if true configBuilder.append(kConfigServerFieldName, _configServer); } if (_protocolVersion > 0) { configBuilder.append(kProtocolVersionFieldName, _protocolVersion); } BSONArrayBuilder members(configBuilder.subarrayStart(kMembersFieldName)); for (MemberIterator mem = membersBegin(); mem != membersEnd(); mem++) { members.append(mem->toBSON(getTagConfig())); } members.done(); BSONObjBuilder settingsBuilder(configBuilder.subobjStart(kSettingsFieldName)); settingsBuilder.append(kChainingAllowedFieldName, _chainingAllowed); settingsBuilder.appendIntOrLL(kHeartbeatIntervalFieldName, durationCount<Milliseconds>(_heartbeatInterval)); settingsBuilder.appendIntOrLL(kHeartbeatTimeoutFieldName, durationCount<Seconds>(_heartbeatTimeoutPeriod)); settingsBuilder.appendIntOrLL(kElectionTimeoutFieldName, durationCount<Milliseconds>(_electionTimeoutPeriod)); BSONObjBuilder gleModes(settingsBuilder.subobjStart(kGetLastErrorModesFieldName)); for (StringMap<ReplicaSetTagPattern>::const_iterator mode = _customWriteConcernModes.begin(); mode != _customWriteConcernModes.end(); ++mode) { if (mode->first[0] == '$') { // Filter out internal modes continue; } BSONObjBuilder modeBuilder(gleModes.subobjStart(mode->first)); for (ReplicaSetTagPattern::ConstraintIterator itr = mode->second.constraintsBegin(); itr != mode->second.constraintsEnd(); itr++) { modeBuilder.append(_tagConfig.getTagKey(ReplicaSetTag(itr->getKeyIndex(), 0)), itr->getMinCount()); } modeBuilder.done(); } gleModes.done(); settingsBuilder.append(kGetLastErrorDefaultsFieldName, _defaultWriteConcern.toBSON()); settingsBuilder.done(); return configBuilder.obj(); }
void kJsonProtocolBase::fromJson(const std::string& json) { Json::Value root; if(_reader.parse(json, root)) { Json::Value::Members members(root.getMemberNames()); for (Json::Value::Members::iterator it = members.begin(); it != members.end(); ++it) { _data[*it] = root[*it]; } } // int testover=1; }
void BuiltStyledStreamWriter::writeValue(Value const& value) { switch (value.type()) { case nullValue: pushValue(nullSymbol_); break; case intValue: pushValue(valueToString(value.asLargestInt())); break; case uintValue: pushValue(valueToString(value.asLargestUInt())); break; case realValue: pushValue(valueToString(value.asDouble())); break; case stringValue: pushValue(valueToQuotedString(value.asCString())); break; case booleanValue: pushValue(valueToString(value.asBool())); break; case arrayValue: writeArrayValue(value); break; case objectValue: { Value::Members members(value.getMemberNames()); if (members.empty()) pushValue("{}"); else { writeWithIndent("{"); indent(); Value::Members::iterator it = members.begin(); for (;;) { std::string const& name = *it; Value const& childValue = value[name]; writeCommentBeforeValue(childValue); writeWithIndent(valueToQuotedString(name.c_str())); sout_ << colonSymbol_; writeValue(childValue); if (++it == members.end()) { writeCommentAfterValueOnSameLine(childValue); break; } sout_ << ","; writeCommentAfterValueOnSameLine(childValue); } unindent(); writeWithIndent("}"); } } break; } }
Boolean Groupsock::output(UsageEnvironment& env, u_int8_t ttlToSend, unsigned char* buffer, unsigned bufferSize, DirectedNetInterface* interfaceNotToFwdBackTo) { do { // First, do the datagram send, to each destination: Boolean writeSuccess = True; for (destRecord* dests = fDests; dests != NULL; dests = dests->fNext) { int res = 0; if (!(res = write(dests->fGroupEId.groupAddress().s_addr, dests->fPort, ttlToSend, buffer, bufferSize))) { if (-1 == res) { fprintf(stderr, "errno = %d, errorsrting = %s\n", strerror(errno)); } writeSuccess = False; break; } } if (!writeSuccess) break; statsOutgoing.countPacket(bufferSize); statsGroupOutgoing.countPacket(bufferSize); // Then, forward to our members: int numMembers = 0; if (!members().IsEmpty()) { numMembers = outputToAllMembersExcept(interfaceNotToFwdBackTo, ttlToSend, buffer, bufferSize, ourIPAddress(env)); if (numMembers < 0) break; } if (DebugLevel >= 3) { env << *this << ": wrote " << bufferSize << " bytes, ttl " << (unsigned)ttlToSend; if (numMembers > 0) { env << "; relayed to " << numMembers << " members"; } env << "\n"; } return True; } while (0); if (DebugLevel >= 0) { // this is a fatal error env.setResultMsg("Groupsock write failed: ", env.getResultMsg()); } return False; }
/** * Add the specified relation to the list of relations we want to * build. This calls the new_relation() and new_member() * functions to actually decide what to keep. * * This member function is named relation() so the manager can * be used as a handler for the first pass through a data file. * * @param relation Relation we might want to build. */ void relation(const osmium::Relation& relation) { if (derived().new_relation(relation)) { auto rel_handle = relations_database().add(relation); std::size_t n = 0; for (auto& member : rel_handle->members()) { if (wanted_type(member.type()) && derived().new_member(relation, member, n)) { member_database(member.type()).track(rel_handle, member.ref(), n); } else { member.set_ref(0); // set member id to zero to indicate we are not interested } ++n; } } }
void CommandAddRefs::find_nodes_and_ways_in_relations() { m_vout << "Reading source file to find nodes/ways in relations...\n"; osmium::io::Reader reader(m_source_file, osmium::osm_entity_bits::relation); while (osmium::memory::Buffer buffer = reader.read()) { for (auto it = buffer.begin<osmium::Relation>(); it != buffer.end<osmium::Relation>(); ++it) { if (m_relation_ids.count(it->id())) { for (const auto& member : it->members()) { if (member.type() == osmium::item_type::node) { m_node_ids.insert(member.ref()); } else if (member.type() == osmium::item_type::way) { m_way_ids.insert(member.ref()); } } } } } reader.close(); }
Boolean Groupsock::output(UsageEnvironment& env, unsigned char* buffer, unsigned bufferSize, DirectedNetInterface* interfaceNotToFwdBackTo) { do { // First, do the datagram send, to each destination: Boolean writeSuccess = True; for (destRecord* dests = fDests; dests != NULL; dests = dests->fNext) { if (!write(dests->fGroupEId.groupAddress().s_addr, dests->fGroupEId.portNum(), dests->fGroupEId.ttl(), buffer, bufferSize)) { writeSuccess = False; break; } } if (!writeSuccess) break; statsOutgoing.countPacket(bufferSize); statsGroupOutgoing.countPacket(bufferSize); // Then, forward to our members: int numMembers = 0; if (!members().IsEmpty()) { numMembers = outputToAllMembersExcept(interfaceNotToFwdBackTo, ttl(), buffer, bufferSize, ourIPAddress(env)); if (numMembers < 0) break; } if (DebugLevel >= 3) { env << *this << ": wrote " << bufferSize << " bytes, ttl " << (unsigned)ttl(); if (numMembers > 0) { env << "; relayed to " << numMembers << " members"; } env << "\n"; } return True; } while (0); if (DebugLevel >= 0) { // this is a fatal error UsageEnvironment::MsgString msg = strDup(env.getResultMsg()); env.setResultMsg("Groupsock write failed: ", msg); delete[] (char*)msg; } return False; }
int ToPb2(Message& message, const Json::Value& value) { int ret = 0; const Descriptor* pDescriptor = message.GetDescriptor(); const FieldDescriptor* pFieldDescriptor = NULL; bool bRepeated = false; map<string, string> key_map; Json::Value::Members members(value.getMemberNames()); for (Json::Value::Members::iterator it = members.begin(); it != members.end(); ++it) { const std::string &name = *it; if (value[name].isNull()) { continue; } pFieldDescriptor = pDescriptor->FindFieldByName(name); if (NULL == pFieldDescriptor) { ret += 1; continue; } bRepeated = pFieldDescriptor->is_repeated(); if ((bRepeated && !value[name].isArray()) || (!bRepeated && value[name].isArray())) { ret += 1; continue; } if (bRepeated) { ret += ToPbRepeated(value[name], pFieldDescriptor, message, key_map); continue; } ret += ToPbSingle(value[name], pFieldDescriptor, message, key_map); } return ret; }
void VRSDClient::HandleUserDataMemberRequest(VMessage* pMessage) { // read first the variable name we should check char* pVariableName = NULL; if(!pMessage->ReadString(&pVariableName)) return; // get the userdata type of the variable char* pUserDataType = NULL; if(!pMessage->ReadString(&pUserDataType)) return; // get the corresponding user data accessor by the user data type IVRSDUserDataAccessor* pUserDataAccessor = GetUserDataAccessor(pUserDataType); SwigTypeDataAccessor universalDataAccessor("universal"); if(pUserDataAccessor==NULL) pUserDataAccessor = &universalDataAccessor; DynArray_cl<VRSDScriptSymbol> members(16, VRSDScriptSymbol()); unsigned int iMemberCount = 0; // Only get the user data member if there is an accessor void* pUserDataPointer = NULL; void* pEnvironment = NULL; if(pMessage->GetMessageType() == 'LUDM') { if(m_pClientLanguageImplementation->GetUserDataPointerFromLocal(pVariableName, &pUserDataPointer, &pEnvironment)) pUserDataAccessor->GetUserDataMembers(pUserDataPointer, pEnvironment, members, iMemberCount); } else if(pMessage->GetMessageType() == 'GUDM') { if(m_pClientLanguageImplementation->GetUserDataPointerFromGlobal(pVariableName, &pUserDataPointer, &pEnvironment)) pUserDataAccessor->GetUserDataMembers(pUserDataPointer, pEnvironment, members, iMemberCount); } SendSymbols('SMUD', members, iMemberCount, pVariableName); }
int CConfigManager::setConfig(const char* name, const CConfigTable& table, const char* user /* = 0 */, int applyOptions /* = applyDelaySave */) { int ret = applyOptions; if (strcmp(name, "All") == 0) { tracepoint(); if (m_configAll == table) { return ret; } m_mutex.Enter(); Json::Value::Members members( table.getMemberNames() ); m_mutex.Leave(); for ( Json::Value::Members::iterator it = members.begin(); it != members.end(); ++it ) { const std::string &name = *it; m_mutex.Enter(); ret |= setConfig(name.c_str(), table[name], user, applyDelaySave | applyWithoutLog); m_mutex.Leave(); } m_mutex.Enter(); m_changed = true; saveFile(); m_mutex.Leave(); // 统一记录日志 //CLog::instance()->append("RecallConfig", 0, user); tracef("CConfigManager::setConfig set all Configs.\n"); return ret; } CGuard guard(m_mutex); if(m_configAll[name] == table) { tracepoint(); return ret; } //更新全局表格 m_configAll[name] = table;; //m_changed = true; m_mutex.Enter(); m_changed = true; saveFile(); m_mutex.Leave(); //保存文件,优先处理延迟保存 //if (!(ret & applyDelaySave)) //{ // saveFile(); //} /* if (!(ret & IConfigManager::applyWithoutLog)) { ILog::instance()->append("SaveConfig", name, user); } */ return ret; }
void djvMathTest::run(int &, char **) { DJV_DEBUG("djvMathTest::run"); members(); }
static void printValueTree(FILE* fout, Json::Value& value, const JSONCPP_STRING& path = ".") { if (value.hasComment(Json::commentBefore)) { fprintf(fout, "%s\n", value.getComment(Json::commentBefore).c_str()); } switch (value.type()) { case Json::nullValue: fprintf(fout, "%s=null\n", path.c_str()); break; case Json::intValue: fprintf(fout, "%s=%s\n", path.c_str(), Json::valueToString(value.asLargestInt()).c_str()); break; case Json::uintValue: fprintf(fout, "%s=%s\n", path.c_str(), Json::valueToString(value.asLargestUInt()).c_str()); break; case Json::realValue: fprintf(fout, "%s=%s\n", path.c_str(), normalizeFloatingPointStr(value.asDouble()).c_str()); break; case Json::stringValue: fprintf(fout, "%s=\"%s\"\n", path.c_str(), value.asString().c_str()); break; case Json::booleanValue: fprintf(fout, "%s=%s\n", path.c_str(), value.asBool() ? "true" : "false"); break; case Json::arrayValue: { fprintf(fout, "%s=[]\n", path.c_str()); Json::ArrayIndex size = value.size(); for (Json::ArrayIndex index = 0; index < size; ++index) { static char buffer[16]; #if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__) sprintf_s(buffer, sizeof(buffer), "[%d]", index); #else snprintf(buffer, sizeof(buffer), "[%d]", index); #endif printValueTree(fout, value[index], path + buffer); } } break; case Json::objectValue: { fprintf(fout, "%s={}\n", path.c_str()); Json::Value::Members members(value.getMemberNames()); std::sort(members.begin(), members.end()); JSONCPP_STRING suffix = *(path.end() - 1) == '.' ? "" : "."; for (Json::Value::Members::iterator it = members.begin(); it != members.end(); ++it) { const JSONCPP_STRING name = *it; printValueTree(fout, value[name], path + suffix + name); } } break; default: break; } if (value.hasComment(Json::commentAfter)) { fprintf(fout, "%s\n", value.getComment(Json::commentAfter).c_str()); } }
void room::send_data(simple_wml::document& data, const network::connection exclude, std::string packet_type) const { wesnothd::send_to_many(data, members(), exclude, packet_type); }
int Groupsock::outputToAllMembersExcept(DirectedNetInterface* exceptInterface, u_int8_t ttlToFwd, unsigned char* data, unsigned size, netAddressBits sourceAddr) { // Don't forward TTL-0 packets if (ttlToFwd == 0) return 0; DirectedNetInterfaceSet::Iterator iter(members()); unsigned numMembers = 0; DirectedNetInterface* interf; while ((interf = iter.next()) != NULL) { // Check whether we've asked to exclude this interface: if (interf == exceptInterface) continue; // Check that the packet's source address makes it OK to // be relayed across this interface: UsageEnvironment& saveEnv = env(); // because the following call may delete "this" if (!interf->SourceAddrOKForRelaying(saveEnv, sourceAddr)) { if (strcmp(saveEnv.getResultMsg(), "") != 0) { // Treat this as a fatal error return -1; } else { continue; } } if (numMembers == 0) { // We know that we're going to forward to at least one // member, so fill in the tunnel encapsulation trailer. // (Note: Allow for it not being 4-byte-aligned.) TunnelEncapsulationTrailer* trailerInPacket = (TunnelEncapsulationTrailer*)&data[size]; TunnelEncapsulationTrailer* trailer; Boolean misaligned = ((unsigned long)trailerInPacket & 3) != 0; unsigned trailerOffset; u_int8_t tunnelCmd; if (isSSM()) { // add an 'auxilliary address' before the trailer trailerOffset = TunnelEncapsulationTrailerAuxSize; tunnelCmd = TunnelDataAuxCmd; } else { trailerOffset = 0; tunnelCmd = TunnelDataCmd; } unsigned trailerSize = TunnelEncapsulationTrailerSize + trailerOffset; unsigned tmpTr[TunnelEncapsulationTrailerMaxSize]; if (misaligned) { trailer = (TunnelEncapsulationTrailer*)&tmpTr; } else { trailer = trailerInPacket; } trailer += trailerOffset; if (fDests != NULL) { trailer->address() = fDests->fGroupEId.groupAddress().s_addr; trailer->port() = fDests->fPort; // structure copy, outputs in network order } trailer->ttl() = ttlToFwd; trailer->command() = tunnelCmd; if (isSSM()) { trailer->auxAddress() = sourceFilterAddress().s_addr; } if (misaligned) { memmove(trailerInPacket, trailer-trailerOffset, trailerSize); } size += trailerSize; } interf->write(data, size); ++numMembers; } return numMembers; }
int ORD::find_elim_ordering() { int ws; int wr; char eoname[512]; char eoname_other[512]; // Get size and rank from the communicator MPI_Comm_size(comm, &ws); MPI_Comm_rank(comm, &wr); double xtime = MPI_Wtime(); sprintf(eoname, "%s.order.%d", this->filename.c_str(), ws); sprintf(eoname_other, "%s.order_other.%d", this->filename.c_str(), ws); DEBUG("size: %d, rank %d \n", ws, wr); int n = G->get_num_nodes(); int x = n/ws; int xm = n%ws; int i = 0; DEBUG("n: %d x: %d xm: %d \n", n, x, xm); vector<int> xadj; vector<int> adjncy; vector<int> vtxdist(ws + 1, 0); vector<int> sizes(2*ws,0); vector<int> ordering(x+1, 0); vector<int> recvcnt(ws, 0); vector<int> displ(ws, 0); int numflag = 0; int options[10]; options[0] = 0; vtxdist[0] = 0; for (i = 1; i <= ws; i++) { vtxdist[i] = vtxdist[i - 1] + x; if (i <= xm) vtxdist[i]++; } // prepareing displacement and receive counts to use with MPI_Gatherv for (i = 0; i < ws; i++) { recvcnt[i] = x; if (i < xm) recvcnt[i] ++; if (i > 0) displ[i] += displ[i - 1] + recvcnt[i - 1]; } DEBUG("range: %d, %d\n", vtxdist[wr], vtxdist[wr + 1]); int j = 0; xadj.push_back(0); for (i = vtxdist[wr]; i < vtxdist[wr + 1]; i++) { Graph::Node *no = G->get_node(i); list<int> *l = no->get_nbrs_ptr(); list<int>::iterator it = l->begin(); for (; it != l->end(); ++it) { adjncy.push_back(*it); j++; } xadj.push_back(j); } if (METIS_OK != ParMETIS_V3_NodeND(&vtxdist.front(), &xadj.front(), &adjncy.front(), &numflag, options, &ordering.front(), &sizes.front(), &comm)) { FERROR("error occured while processing parmetis, aborting\n"); MPI_Abort(MPI_COMM_WORLD, -1); } DEBUG("output from ParMETIS\n"); double parmet_time = MPI_Wtime() - xtime; vector<int> recvbuf; n = G->get_num_nodes(); if (wr == 0) { recvbuf = vector<int>(n, 0); } if (MPI_SUCCESS != MPI_Gatherv((void *)&ordering.front(), recvcnt[wr], MPI_INT, (void *)&recvbuf.front(), &recvcnt.front(), &displ.front(), MPI_INT, 0, comm)) { FERROR("MPI error occured at Gatherv, Abort!\n"); MPI_Abort(comm, -1); } vector<int> eo(n, 0); if (wr == 0) { for (int i = 0; i < n; i++) { eo[recvbuf[i]] = i; } FILE *f = fopen(eoname_other, "w"); for (int i = 0; i < n; i++) fprintf(f, "%d\n", eo[i] + 1); fclose(f); DEBUG("ParMetis NodeND elimination ordering is in : %s\n", eoname_other); } ordering.clear(); ordering.resize(recvcnt[wr], 0); if (MPI_SUCCESS != MPI_Scatterv ((void *)&eo.front(), &recvcnt.front(), &displ.front(), MPI_INT, (void *)&ordering.front(), recvcnt[wr], MPI_INT, 0, comm)) { FERROR("MPI error occured at Scatterv, Abort! \n"); MPI_Abort(comm, -1); } DEBUG("Scatterv completed\n"); Graph::GraphCreatorFile gf; Graph::VertexWeightedGraph *wg; Graph::GraphEOUtil eoutil; Graph::GraphProperties prop; list<int>members(ordering.begin(), ordering.end()); wg = gf.create_component(G, &members, false); prop.make_canonical(wg); vector<int> ord(recvcnt[wr], 0); vector<int> ordsend(recvcnt[wr, 0]); double xxtime = MPI_Wtime(); eoutil.find_elimination_ordering(wg, &ord, GD_AMD, false); DEBUG("eo time : %f\n", MPI_Wtime() - xxtime); int sz = recvcnt[wr]; for (int i = 0; i < sz; i++) ordsend[i] = wg->get_node(ord[i])->get_label(); recvbuf.assign(n, -1); if (MPI_SUCCESS != MPI_Gatherv((void *)&ordsend.front(), recvcnt[wr], MPI_INT, (void *)&recvbuf.front(), &recvcnt.front(), &displ.front(), MPI_INT, 0, comm)) { FERROR("MPI error occured at Gatherv, Abort!\n"); MPI_Abort(comm, -1); } double p_amd_time = MPI_Wtime() - xtime; if (wr == 0) { FILE *f = fopen(eoname, "w"); for (int i = 0; i < n && wr == 0; i++) fprintf(f, "%d\n", recvbuf[i]); fclose(f); } DEBUG("ordering is written into %s\n", eoname); DEBUG("%f,%f\n", parmet_time, p_amd_time); return 0; }
v8::Handle<v8::Value> js_members() const { return members().js_instance(); }
void LocationType::update(Graph* inGraph, boost::python::object inClass) { mClass = inClass; mFunctions.clear(); mProperties.clear(); mMutables.clear(); mKeys.clear(); mKeyDefaults.clear(); mKeyValidators.clear(); mAttrTypes.clear(); mDefersTo = boost::python::object(); boost::python::object pyIsMutable = evalInModule("lambda x: isinstance(x, Mutable)", "ufora.BackendGateway.ComputedGraph.ComputedGraph"); boost::python::object pyIsKey = evalInModule("lambda x: isinstance(x, Key)", "ufora.BackendGateway.ComputedGraph.ComputedGraph"); boost::python::object pyIsType = evalInModule("lambda x: isinstance(x, type(Key))", "ufora.BackendGateway.ComputedGraph.ComputedGraph"); boost::python::object pySimpleSeq = evalInModule("lambda x: isSimpleFunction(x)[1]", "ufora.BackendGateway.ComputedGraph.ComputedGraph"); boost::python::object pyIsFunction = evalInModule("lambda x: isinstance(x, Function)", "ufora.BackendGateway.ComputedGraph.ComputedGraph"); boost::python::object pyIsProperty = evalInModule("lambda x: isinstance(x, Property)", "ufora.BackendGateway.ComputedGraph.ComputedGraph"); boost::python::object pyIsInitializer = evalInModule("lambda x: isinstance(x, Initializer)", "ufora.BackendGateway.ComputedGraph.ComputedGraph"); boost::python::object pyIsPythonFunction = evalInModule("lambda x: isinstance(x, functype)", "ufora.BackendGateway.ComputedGraph.ComputedGraph"); boost::python::object pyIsNotCached = evalInModule("lambda x: isinstance(x, NotCached)", "ufora.BackendGateway.ComputedGraph.ComputedGraph"); boost::python::dict members(evalInModule("getClassMember", "ufora.BackendGateway.ComputedGraph.ComputedGraph")(inClass)); py_list instItems = members.items(); for (int32_t i = 0; i < len(instItems); i++) { boost::python::object attrName = instItems[i][0]; string attrNameStr = pyToString(attrName); boost::python::object attrVal = instItems[i][1]; id_type attrID = id(attrName); inGraph->registerPropertyName(attrName); if (pyIsInitializer(attrVal)) mInitializer = attrVal.attr("f"); else if (pyIsMutable(attrVal)) { boost::python::object onChanged = attrVal.attr("onUpdate"); boost::python::object defaultValue = attrVal.attr("defaultValue"); mMutables[attrID] = make_pair(defaultValue, onChanged); mAttrTypes[attrID] = attrMutable; } else if (pyIsKey(attrVal)) { mKeys[attrID] = attrVal.attr("t"); mAttrTypes[attrID] = attrKey; mKeyDefaults[attrID] = attrVal.attr("default"); mKeyValidators[attrID] = attrVal.attr("validator"); } else if (pyIsFunction(attrVal)) { mAttrTypes[attrID] = attrFunction; mFunctions[attrID] = attrVal.attr("f"); } else if (pyIsNotCached(attrVal)) { mAttrTypes[attrID] = attrNotCached; mFunctions[attrID] = attrVal.attr("f"); } else if (pyIsType(attrVal)) //a key by default { mKeys[attrID] = attrVal; mKeyDefaults[attrID] = boost::python::object(); mAttrTypes[attrID] = attrKey; mKeyValidators[attrKey] = boost::python::object(); } else if (pyIsPythonFunction(attrVal)) { mProperties[attrID] = attrVal; mAttrTypes[attrID] = attrProperty; } else if (pyIsProperty(attrVal)) { mProperties[attrID] = attrVal.attr("cacheFunc"); boost::python::object setter = attrVal.attr("setter"); //if the setter is 'None', there's no setter if (setter.ptr() != boost::python::object().ptr()) mPropertySetters[attrID] = setter; //is the property lazy? mIsLazyProperty[attrID] = boost::python::extract<bool>(attrVal.attr("isLazy"))(); mAttrTypes[attrID] = attrProperty; } else if (attrNameStr.size() && attrNameStr[attrNameStr.size()-1] != '_') { mClassAttributes[attrID] = attrVal; mAttrTypes[attrID] = attrClassAttribute; } } }
//RTK连接接收报文解析 bool ApsAppRequestMessage::ParseRequestMessage(std::string &message) { // bool ret = m_reader.parse(message, m_root); if (!ret)//The message is not json { ApsLogger::Debug("Failed to parse request message!"); } else//pares json message ok { // m_command = m_root["name"].asString(); const char * cmd = m_command.c_str(); if(!strcmp(cmd,"connect")) { m_appID= m_root["appid"].asString(); m_cleanFlag= m_root["cleansession"].asBool(); m_keepalive = m_root["keepalive"].asInt(); } else if(!strcmp(cmd,"publish")) { m_mid= m_root["msgid"].asInt(); m_qos= m_root["Qos"].asInt(); m_remainFlag= m_root["remain"].asBool(); Json::Value options = m_root["options"]; m_timeOnLive= options["time_to_live"].asInt(); Json::Value audience = m_root["audience"]; Json::Value::Members members(audience.getMemberNames()); //std::sort( members.begin(), members.end() ); for (Json::Value::Members::iterator it = members.begin();it != members.end(); ++it) { if(strcmp(it->c_str(), "usrid")==0) { m_userID= audience["usrid"].asCString(); } else if(strcmp(it->c_str(), "devid")==0) { m_deviceID= audience["devid"].asCString(); } } Json::Value alert; bool alert_flag = false; bool ios_flag = false; bool android_flag = false; Json::Value notification = m_root["notification"]; members = notification.getMemberNames(); //std::sort( members.begin(), members.end() ); for ( Json::Value::Members::iterator it = members.begin();it != members.end(); ++it ) { if(strcmp(it->c_str(), "alert")==0) { alert = notification["alert"]; alert_flag = true; } else if(strcmp(it->c_str(), "ios")==0 ) { ios_flag = true; m_iOS = notification["ios"]; bool ios_flag = false; Json::Value::Members ios_members = m_iOS.getMemberNames(); //std::sort( members.begin(), members.end() ); for (Json::Value::Members::iterator it_ios = ios_members.begin();it_ios != ios_members.end(); ++it_ios ) { if(strcmp(it_ios->c_str(), "alert")==0 ) { ios_flag = true; break; } } if(!ios_flag) { if(alert_flag) { m_iOS["alert"]=alert; } } } else if(strcmp(it->c_str(), "android")==0) { android_flag = true; m_android= notification["android"]; bool android_flag = false; Json::Value::Members android_members = m_android.getMemberNames(); for ( Json::Value::Members::iterator it_android = android_members.begin();it_android != android_members.end(); ++it_android ) { if( strcmp(it_android->c_str(), "alert")==0 ) { android_flag = true; break; } } if(!android_flag) { if(alert_flag) { m_android["alert"]=alert; } } } } if(alert_flag) { if(!android_flag) { m_android["alert"]=alert; } if(!ios_flag) { m_iOS["alert"]=alert; } } } } return ret; }
Graph::Graph(const int *cartan, const std::vector<Word>& gens, //namesake const std::vector<Word>& v_cogens, const std::vector<Word>& e_gens, const std::vector<Word>& f_gens, const Vect& weights) { //define symmetry group relations std::vector<Word> words = words_from_cartan(cartan); { const Logging::fake_ostream& os = logger.debug(); os << "relations ="; for (int w=0; w<6; ++w) { Word& word = words[w]; os << "\n "; for (unsigned i=0; i<word.size(); ++i) { os << word[i]; } } os |0; } //check vertex stabilizer generators { const Logging::fake_ostream& os = logger.debug(); os << "v_cogens ="; for (unsigned w=0; w<v_cogens.size(); ++w) { const Word& jenn = v_cogens[w]; //namesake os << "\n "; for (unsigned t=0; t<jenn.size(); ++t) { int j = jenn[t]; os << j; Assert (0<=j and j<4, "generator out of range: letter w[" << w << "][" << t << "] = " << j ); } } os |0; } //check edge generators { const Logging::fake_ostream& os = logger.debug(); os << "e_gens ="; for (unsigned w=0; w<e_gens.size(); ++w) { const Word& edge = e_gens[w]; os << "\n "; for (unsigned t=0; t<edge.size(); ++t) { int j = edge[t]; os << j; Assert (0<=j and j<4, "generator out of range: letter w[" << w << "][" << t << "] = " << j ); } } os |0; } //check face generators { const Logging::fake_ostream& os = logger.debug(); os << "f_gens ="; for (unsigned w=0; w<f_gens.size(); ++w) { const Word& face = f_gens[w]; os << "\n "; for (unsigned t=0; t<face.size(); ++t) { int j = face[t]; os << j; Assert (0<=j and j<4, "generator out of range: letter w[" << w << "][" << t << "] = " << j ); } } os |0; } //build symmetry group Group group(words); logger.debug() << "group.ord = " << group.ord |0; //build subgroup std::vector<int> subgroup; subgroup.push_back(0); std::set<int> in_subgroup; in_subgroup.insert(0); for (unsigned g=0; g<subgroup.size(); ++g) { int g0 = subgroup[g]; for (unsigned j=0; j<gens.size(); ++j) { int g1 = group.left(g0,gens[j]); if (in_subgroup.find(g1) != in_subgroup.end()) continue; subgroup.push_back(g1); in_subgroup.insert(g1); } } logger.debug() << "subgroup.ord = " << subgroup.size() |0; //build cosets and count ord std::map<int,int> coset; //maps group elements to cosets ord = 0; //used as coset number for (unsigned g=0; g<subgroup.size(); ++g) { int g0 = subgroup[g]; if (coset.find(g0) != coset.end()) continue; int c0 = ord++; coset[g0] = c0; std::vector<int> members(1, g0); std::vector<int> others(0); for (unsigned i=0; i<members.size(); ++i) { int g1 = members[i]; for (unsigned w=0; w<v_cogens.size(); ++w) { int g2 = group.left(g1, v_cogens[w]); if (coset.find(g2) != coset.end()) continue; coset[g2] = c0; members.push_back(g2); } } } logger.info() << "cosets table built: " << " ord = " << ord |0; //build edge lists std::vector<std::set<int> > neigh(ord); for (unsigned g=0; g<subgroup.size(); ++g) { int g0 = subgroup[g]; int c0 = coset[g0]; for (unsigned w=0; w<e_gens.size(); ++w) { int g1 = group.left(g0, e_gens[w]); Assert (in_subgroup.find(g1) != in_subgroup.end(), "edge leaves subgroup"); int c1 = coset[g1]; if (c0 != c1) neigh[c0].insert(c1); } } // make symmetric for (int c0=0; c0<ord; ++c0) { const std::set<int>& n = neigh[c0]; for (std::set<int>::iterator c1=n.begin(); c1!=n.end(); ++c1) { neigh[*c1].insert(c0); } } // build edge table adj.resize(ord); for (int c=0; c<ord; ++c) { adj[c].insert(adj[c].begin(), neigh[c].begin(), neigh[c].end()); } neigh.clear(); deg = adj[0].size(); logger.info() << "edge table built: deg = " << deg |0; //define faces for (unsigned g=0; g<f_gens.size(); ++g) { const Word& face = f_gens[g]; logger.debug() << "defining faces on " << face |0; Logging::IndentBlock block; //define basic face in group Ring basic(1,0); // g = 0; int g0 = 0; for (unsigned c=0; true; ++c) { g0 = group.left(g0, face[c%face.size()]); if (c >= face.size() and g0 == 0) break; if (in_subgroup.find(g0) != in_subgroup.end() and g0 != basic.back()) { basic.push_back(g0); } } for (unsigned c=0; c<basic.size(); ++c) { logger.debug() << " corner: " << basic[c] |0; } logger.debug() << "sides/face (free) = " << basic.size() |0; //build orbit of basic face std::vector<Ring> faces_g; faces_g.push_back(basic); FaceRecognizer recognized; recognized(basic); for (unsigned i=0; i<faces_g.size(); ++i) { const Ring f = faces_g[i]; for (unsigned j=0; j<gens.size(); ++j) { //right action of group on faces Ring f_j(f.size()); for (unsigned c=0; c<f.size(); ++c) { f_j[c] = group.right(f[c],gens[j]); } //add face if (not recognized(f_j)) { faces_g.push_back(f_j); //logger.debug() << "new face: " << f_j |0; } else { //logger.debug() << "old face: " << f_j|0; } } } //hom face down to quotient graph recognized.clear(); for (unsigned f=0; f<faces_g.size(); ++f) { const Ring face_g = faces_g[f]; Ring face; face.push_back(coset[face_g[0]]); for (unsigned i=1; i<face_g.size(); ++i) { int c = coset[face_g[i]]; if (c != face.back() and c != face[0]) { face.push_back(c); } } if (face.size() < 3) continue; if (not recognized(face)) { faces.push_back(face); } } } ord_f = faces.size(); logger.info() << "faces defined: order = " << ord_f |0; //define vertex coset std::vector<Word> vertex_coset; for (unsigned g=0; g<subgroup.size(); ++g) { int g0 = subgroup[g]; if (coset[g0]==0) vertex_coset.push_back(group.parse(g0)); } //build geometry std::vector<Mat> gen_reps(gens.size()); points.resize(ord); build_geom(cartan, vertex_coset, gens, v_cogens, weights, gen_reps, points[0]); std::vector<int> pointed(ord,0); pointed[0] = true; logger.debug() << "geometry built" |0; //build point sets std::vector<int> reached(1,0); std::set<int> is_reached; is_reached.insert(0); for (unsigned g=0; g<subgroup.size(); ++g) { int g0 = reached[g]; for (unsigned j=0; j<gens.size(); ++j) { int g1 = group.right(g0,gens[j]); if (is_reached.find(g1) == is_reached.end()) { if (not pointed[coset[g1]]) { vect_mult(gen_reps[j], points[coset[g0]], points[coset[g1]]); pointed[coset[g1]] = true; } reached.push_back(g1); is_reached.insert(g1); } } } logger.debug() << "point set built." |0; //build face normals normals.resize(ord_f); for (int f=0; f<ord_f; ++f) { Ring& face = faces[f]; Vect &a = points[face[0]]; Vect &b = points[face[1]]; Vect &c = points[face[2]]; Vect &n = normals[f]; cross4(a,b,c, n); normalize(n); /* Assert1(fabs(inner(a,n)) < 1e-6, "bad normal: <n,a> = " << fabs(inner(a,n))); Assert1(fabs(inner(b,n)) < 1e-6, "bad normal: <n,b> = " << fabs(inner(b,n))); Assert1(fabs(inner(c,n)) < 1e-6, "bad normal: <n,b> = " << fabs(inner(c,n))); */ } logger.debug() << "face normals built." |0; }
/** @todo Still to setup Dispatch table methods Interface prototypes */ void Type::init() { static bool inited= false; if(!inited) { Type placeHolderType; inited= true; // create the types for(size_t type= 0; type < sizeof(gTypeBootStrapTable)/sizeof(gTypeBootStrapTable[0]); ++type) { const_cast<Type*>(gTypeBootStrapTable[type].type)->assign(new Extrinsic(placeHolderType, Type::kCountOfMembers), Pointer::DoNotRetain); } // create the interfaces for(size_t interface= 0; interface < sizeof(gInterfaceBootStrapTable)/sizeof(gInterfaceBootStrapTable[0]); ++interface) { gInterfaceBootStrapTable[interface].assign(new Extrinsic(Interface::type, Interface::kCountOfMembers), Pointer::DoNotRetain); } // assign interface of all interfaces for(size_t interface= 0; interface < sizeof(gInterfaceBootStrapTable)/sizeof(gInterfaceBootStrapTable[0]); ++interface) { gInterfaceBootStrapTable[interface]._interface= &gInterfaceBootStrapTable[iInterface].ref<GenericInstance>(); Pointer::_retain(gInterfaceBootStrapTable[interface]._interface); } // initialize all Pointer types and interfaces for(size_t type= 0; type < sizeof(gTypeBootStrapTable)/sizeof(gTypeBootStrapTable[0]); ++type) { size_t index= gTypeBootStrapTable[type].interfaceIndex; *const_cast<Type*>(gTypeBootStrapTable[type].type)= const_cast<GenericInstance*>(&Type::type.ref<GenericInstance>()); *const_cast<Interface*>(gTypeBootStrapTable[type].interface)= gInterfaceBootStrapTable[index]; } // set the name, parent and dispatches (and fill in interface of the dispatch) for(size_t type= 0; type < sizeof(gTypeBootStrapTable)/sizeof(gTypeBootStrapTable[0]); ++type) { size_t index= gTypeBootStrapTable[type].interfaceIndex; List dispatches(1); List members(gTypeBootStrapTable[type].memberCount); List constants(gTypeBootStrapTable[type].constantCount); dispatches.set(0, Dispatch(gInterfaceBootStrapTable[index])); const_cast<Type*>(gTypeBootStrapTable[type].type)->ref<Extrinsic>()[Name]= ASCIIText(gTypeBootStrapTable[type].name); const_cast<Type*>(gTypeBootStrapTable[type].type)->ref<Extrinsic>()[Parent]= Instance::type; const_cast<Type*>(gTypeBootStrapTable[type].type)->ref<Extrinsic>()[Dispatches]= dispatches; const_cast<Type*>(gTypeBootStrapTable[type].type)->ref<Extrinsic>()[Constants]= constants; const_cast<Type*>(gTypeBootStrapTable[type].type)->ref<Extrinsic>()[Members]= members; } // Fill in a list of all the known types so far List typeList(sizeof(gTypeBootStrapTable)/sizeof(gTypeBootStrapTable[0])); for(size_t type= 0; type < sizeof(gTypeBootStrapTable)/sizeof(gTypeBootStrapTable[0]); ++type) { typeList.set(type, *gTypeBootStrapTable[type].type); } Type *typeType= const_cast<Type*>(&Type::type); ///< Get Type's type to fix up List &members= typeType->ref<Extrinsic>()[Members].ref<List>(); List &constants= typeType->ref<Extrinsic>()[Constants].ref<List>(); Reference allTypes(typeList); members.set(Name, gInterfaceBootStrapTable[iText]); members.set(Parent, gInterfaceBootStrapTable[iType]); members.set(Dispatches, gInterfaceBootStrapTable[iList]); members.set(Constants, gInterfaceBootStrapTable[iList]); members.set(Members, gInterfaceBootStrapTable[iList]); constants.set(AllTypes, allTypes); // call the init for every type for(size_t type= 0; type < sizeof(gTypeBootStrapTable)/sizeof(gTypeBootStrapTable[0]); ++type) { gTypeBootStrapTable[type].init(); } } }
void cGuild::load( const QSqlQuery& result ) { serial_ = result.value( 0 ).toInt(); name_ = result.value( 1 ).toString(); abbreviation_ = result.value( 2 ).toString(); charta_ = result.value( 3 ).toString(); website_ = result.value( 4 ).toString(); alignment_ = ( eAlignment ) result.value( 5 ).toInt(); leader_ = dynamic_cast<P_PLAYER>( World::instance()->findChar( result.value( 6 ).toInt() ) ); founded_.setTime_t( result.value( 7 ).toInt() ); guildstone_ = World::instance()->findItem( result.value( 8 ).toInt() ); // Load members and canidates QSqlQuery members( QString( "SELECT player,showsign,guildtitle,joined FROM guilds_members WHERE guild = %1" ).arg( serial_ ) ); while ( members.next() ) { P_PLAYER player = dynamic_cast<P_PLAYER>( World::instance()->findChar( members.value( 0 ).toInt() ) ); if ( player ) { player->setGuild( this ); members_.append( player ); MemberInfo* info = new MemberInfo; info->setShowSign( members.value( 1 ).toInt() != 0 ); info->setGuildTitle( members.value( 2 ).toString() ); info->setJoined( members.value( 3 ).toInt() ); memberinfo_.insert( player, info ); } } QSqlQuery canidates( QString( "SELECT player FROM guilds_canidates WHERE guild = %1" ).arg( serial_ ) ); while ( canidates.next() ) { P_PLAYER player = dynamic_cast<P_PLAYER>( World::instance()->findChar( canidates.value( 0 ).toInt() ) ); if ( player ) { player->setGuild( this ); canidates_.append( player ); } } // Clear the leader if he's not a member of the guild if ( !members_.contains( leader_ ) ) { leader_ = 0; } Guilds::instance()->registerGuild( this ); QSqlQuery allies( QString( "SELECT ally FROM guilds_allies WHERE guild = %1" ).arg( serial_ ) ); while ( allies.next() ) { allies_.append( allies.value( 0 ).toInt() ); } QSqlQuery enemies( QString( "SELECT enemy FROM guilds_enemies WHERE guild = %1" ).arg( serial_ ) ); while ( enemies.next() ) { enemies_.append( enemies.value( 0 ).toInt() ); } }
void djvOpenGlTest::run(int &, char **) { DJV_DEBUG("djvOpenGlTest::run"); members(); }
bool PortSet::contains(Port member) const { set<Port> memberSet = members(); return memberSet.find(member) != memberSet.end(); }