void TypeConf( void ) /*******************/ { type_display *curr; type_display *fcurr; StrCopy( " {", StrCopy( NameBuff, TxtBuff ) ); DUIDlgTxt( TxtBuff ); for( curr = TypeDisplay; curr != NULL; curr = curr->next ) { if( !curr->dirty ) continue; Attributes( curr, StrCopy( " { ", StrCopy( curr->name, StrCopy( " ", GetCmdEntry( TypeSettings, TY_STRUCT, StrCopy( " ", TxtBuff ) ) ) ) ) ); DUIDlgTxt( TxtBuff ); for( fcurr = curr->fields; fcurr != NULL; fcurr = fcurr->next ) { if( !fcurr->dirty ) continue; StrCopy( "}", Attributes( fcurr, StrCopy( " { ", StrCopy( fcurr->name, StrCopy( " ", GetCmdEntry( TypeSettings, TY_FIELD, StrCopy( " ", TxtBuff ) ) ) ) ) ) ); DUIDlgTxt( TxtBuff ); } DUIDlgTxt( " }" ); } DUIDlgTxt( "}" ); }
// --------------------------------------------------------------------------- // ConstructL // --------------------------------------------------------------------------- void CNcdReportInstall::ConstructL( const TDesC& aContentIdentifier, const CNcdNodeIdentifier& aMetadataId, const TDesC& aReportUri, const TDesC& aReportNamespace ) { DLTRACEIN(("")); BaseConstructL( aMetadataId ); if ( !aReportUri.Length() || !aReportNamespace.Length() ) { DLERROR(("Either URI, report URI or report namespace is empty")); User::Leave( KErrArgument ); } Attributes().SetAttributeL( ENcdReportAttributeGenericId, aContentIdentifier ); Attributes().SetAttributeL( ENcdReportAttributeReportUri, aReportUri ); Attributes().SetAttributeL( ENcdReportAttributeReportNamespace, aReportNamespace ); DLTRACEOUT(("")); }
// ---------------------------------------------------------------------------- string CGtfRecord::StrAttributes() const // ---------------------------------------------------------------------------- { string strAttributes; strAttributes.reserve(256); CGtfRecord::TAttributes attrs; attrs.insert( Attributes().begin(), Attributes().end() ); CGtfRecord::TAttrIt it; strAttributes += x_AttributeToString( "gene_id", GeneId() ); if ( StrType() != "gene" ) { strAttributes += x_AttributeToString( "transcript_id", TranscriptId() ); } for ( it = attrs.begin(); it != attrs.end(); ++it ) { string strKey = it->first; if ( NStr::StartsWith( strKey, "gff_" ) ) { continue; } if ( strKey == "exon_number" ) { continue; } strAttributes += x_AttributeToString( strKey, it->second.front() ); } if ( ! m_bNoExonNumbers ) { it = attrs.find( "exon_number" ); if ( it != attrs.end() ) { strAttributes += x_AttributeToString( "exon_number", it->second.front() ); } } return strAttributes; }
bool operator==(const AgentInfo& left, const AgentInfo& right) { return left.hostname() == right.hostname() && Resources(left.resources()) == Resources(right.resources()) && Attributes(left.attributes()) == Attributes(right.attributes()) && left.id() == right.id() && left.port() == right.port(); }
bool operator==(const SlaveInfo& left, const SlaveInfo& right) { return left.hostname() == right.hostname() && Resources(left.resources()) == Resources(right.resources()) && Attributes(left.attributes()) == Attributes(right.attributes()) && left.id() == right.id() && left.checkpoint() == right.checkpoint() && left.port() == right.port() && left.domain() == right.domain(); }
std::vector< SphereVtkOutput::Attributes > SphereVtkOutput::getAttributes() const { std::vector< Attributes > attributes; attributes.push_back( Attributes( vtk::typeToString< float >(), "mass", uint_c(1) ) ); attributes.push_back( Attributes( vtk::typeToString< float >(), "radius", uint_c(1) ) ); attributes.push_back( Attributes( vtk::typeToString< float >(), "velocity", uint_c(3) ) ); attributes.push_back( Attributes( vtk::typeToString< float >(), "orientation", uint_c(3) ) ); attributes.push_back( Attributes( vtk::typeToString< int >(), "rank", uint_c(1) ) ); return attributes; }
Profession Profession::byName(std::string name) { if(name == "Student") { return Profession("Student", Attributes(10, 10, 10), Stats(0, 0, 1500)); } throw std::string("Not such profession exists"); }
// --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- TBool CNcdReportInstall::CanBeRemoved() const { DLTRACEIN(("")); return Status().iStatus >= ENcdReportCancel && Status().iStatus == Attributes().AttributeInt32( ENcdReportAttributeLatestSentReport ); }
void device_node::Dump(int32 level) { put_level(level); kprintf("(%" B_PRId32 ") @%p \"%s\" (ref %" B_PRId32 ", init %" B_PRId32 ", module %p, data %p)\n", level, this, ModuleName(), fRefCount, fInitialized, DriverModule(), DriverData()); AttributeList::Iterator attribute = Attributes().GetIterator(); while (attribute.HasNext()) { dump_attribute(attribute.Next(), level); } DeviceList::Iterator deviceIterator = fDevices.GetIterator(); while (deviceIterator.HasNext()) { Device* device = deviceIterator.Next(); put_level(level); kprintf("device: %s, %p\n", device->ModuleName(), device->Data()); } NodeList::ConstIterator iterator = Children().GetIterator(); while (iterator.HasNext()) { iterator.Next()->Dump(level + 1); } }
int device_node::CompareTo(const device_attr* attributes) const { if (attributes == NULL) return -1; for (; attributes->name != NULL; attributes++) { // find corresponding attribute AttributeList::ConstIterator iterator = Attributes().GetIterator(); device_attr_private* attr = NULL; bool found = false; while (iterator.HasNext()) { attr = iterator.Next(); if (!strcmp(attr->name, attributes->name)) { found = true; break; } } if (!found) return -1; int compare = device_attr_private::Compare(attr, attributes); if (compare != 0) return compare; } return 0; }
void DiameterAuthSessionClientStateMachine::RxRAR(DiameterMsg &msg) { /* 8.3.1. Re-Auth-Request The Re-Auth-Request (RAR), indicated by the Command-Code set to 258 and the message flags' 'R' bit set, may be sent by any server to the access device that is providing session service, to request that the user be re-authenticated and/or re-authorized. Message Format <RAR> ::= < Diameter Header: 258, REQ, PXY > < Session-Id > { Origin-Host } { Origin-Realm } { Destination-Realm } { Destination-Host } { Auth-Application-Id } { Re-Auth-Request-Type } [ User-Name ] [ Origin-State-Id ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ DiameterIdentityAvpContainerWidget oHostAvp(msg.acl); DiameterIdentityAvpContainerWidget oRealmAvp(msg.acl); DiameterUInt32AvpContainerWidget authAppIdAvp(msg.acl); DiameterUInt32AvpContainerWidget reAuthTypeAvp(msg.acl); DiameterUtf8AvpContainerWidget uNameAvp(msg.acl); diameter_identity_t *host = oHostAvp.GetAvp(DIAMETER_AVPNAME_ORIGINHOST); diameter_identity_t *realm = oRealmAvp.GetAvp(DIAMETER_AVPNAME_ORIGINREALM); diameter_unsigned32_t *appId = authAppIdAvp.GetAvp(DIAMETER_AVPNAME_AUTHAPPID); diameter_unsigned32_t *reAuthType = reAuthTypeAvp.GetAvp(DIAMETER_AVPNAME_REAUTHREQTYPE); diameter_utf8string_t *uname = uNameAvp.GetAvp(DIAMETER_AVPNAME_USERNAME); AAA_LOG((LM_INFO, "(%P|%t) *** Re-Auth request received ***\n")); Attributes().MsgIdRxMessage(msg); DiameterSessionId sid; sid.Get(msg); sid.Dump(); if (host) { AAA_LOG((LM_INFO, "(%P|%t) From Host: %s\n", host->c_str())); } if (realm) { AAA_LOG((LM_INFO, "(%P|%t) From Realm: %s\n", realm->c_str())); } if (uname) { AAA_LOG((LM_INFO, "(%P|%t) From User: %s\n", uname->c_str())); } if (appId) { AAA_LOG((LM_INFO, "(%P|%t) Application Id: %d\n", *appId)); } if (reAuthType) { AAA_LOG((LM_INFO, "(%P|%t) ReAuth Type: %d\n", *reAuthType)); } }
void DiameterAuthSessionClientStateMachine::RxASR(DiameterMsg &msg) { /* 8.5.1. Abort-Session-Request The Abort-Session-Request (ASR), indicated by the Command-Code set to 274 and the message flags' 'R' bit set, may be sent by any server to the access device that is providing session service, to request that the session identified by the Session-Id be stopped. Message Format <ASR> ::= < Diameter Header: 274, REQ, PXY > < Session-Id > { Origin-Host } { Origin-Realm } { Destination-Realm } { Destination-Host } { Auth-Application-Id } [ User-Name ] [ Origin-State-Id ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ DiameterIdentityAvpContainerWidget oHostAvp(msg.acl); DiameterIdentityAvpContainerWidget oRealmAvp(msg.acl); DiameterUtf8AvpContainerWidget uNameAvp(msg.acl); DiameterUInt32AvpContainerWidget authAppIdAvp(msg.acl); DiameterUInt32AvpContainerWidget acctAppIdAvp(msg.acl); diameter_identity_t *host = oHostAvp.GetAvp(DIAMETER_AVPNAME_ORIGINHOST); diameter_identity_t *realm = oRealmAvp.GetAvp(DIAMETER_AVPNAME_ORIGINREALM); diameter_utf8string_t *uname = uNameAvp.GetAvp(DIAMETER_AVPNAME_USERNAME); diameter_unsigned32_t *authAppId = authAppIdAvp.GetAvp(DIAMETER_AVPNAME_AUTHAPPID); diameter_unsigned32_t *acctAppId = acctAppIdAvp.GetAvp(DIAMETER_AVPNAME_ACCTAPPID); AAA_LOG((LM_INFO, "(%P|%t) *** Abort session request received ***\n")); Attributes().MsgIdRxMessage(msg); DiameterSessionId sid; sid.Get(msg); sid.Dump(); if (host) { AAA_LOG((LM_INFO, "(%P|%t) From Host: %s\n", host->c_str())); } if (realm) { AAA_LOG((LM_INFO, "(%P|%t) From Realm: %s\n", realm->c_str())); } if (uname) { AAA_LOG((LM_INFO, "(%P|%t) From User: %s\n", uname->c_str())); } if (authAppId) { AAA_LOG((LM_INFO, "(%P|%t) Auth Application Id: %d\n", *authAppId)); } if (acctAppId) { AAA_LOG((LM_INFO, "(%P|%t) Acct Application Id: %d\n", *acctAppId)); } }
bool operator==( const ResourceProviderInfo& left, const ResourceProviderInfo& right) { if (left.id() != right.id()) { return false; } if (Attributes(left.attributes()) != Attributes(right.attributes())) { return false; } if (Resources(left.resources()) != Resources(right.resources())) { return false; } return true; }
static Ptr create( std::string vertexShader, std::string fragmentShader, const Uniforms& uniforms = Uniforms(), const Attributes& attributes = Attributes(), const Parameters& parameters = Parameters() ) { return three::make_shared<ShaderMaterial>( std::move(vertexShader), std::move(fragmentShader), uniforms, attributes, parameters ); }
// ---------------------------------------------------------------------------- string CGtfRecord::StrStructibutes() const // ---------------------------------------------------------------------------- { string strAttributes; strAttributes.reserve(256); CGtfRecord::TAttributes attrs; attrs.insert( Attributes().begin(), Attributes().end() ); CGtfRecord::TAttrIt it; strAttributes += x_AttributeToString( "gene_id", GeneId() ); if ( StrType() != "gene" ) { strAttributes += x_AttributeToString( "transcript_id", TranscriptId() ); } it = attrs.find( "exon_number" ); if ( it != attrs.end() ) { strAttributes += x_AttributeToString( "exon_number", it->second.front() ); } return strAttributes; }
// --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- TBool CNcdReportInstall::IsSendable() const { DLTRACEIN(("")); TInt value = ReportStatusToInstallReportStatus( Status() ); // Can send if status code is good and it's not being sent already. // Notice, that for now same constants are used here as in download report. return value != KNcdDownloadReportNotSupported && !ReportTransaction() && Attributes().AttributeInt32( ENcdReportAttributeSendable ); }
bool operator==( const ResourceProviderInfo& left, const ResourceProviderInfo& right) { // Order of reservations is important. if (left.default_reservations_size() != right.default_reservations_size()) { return false; } for (int i = 0; i < left.default_reservations_size(); i++) { if (left.default_reservations(i) != right.default_reservations(i)) { return false; } } return left.has_id() == right.has_id() && (!left.has_id() || left.id() == right.id()) && Attributes(left.attributes()) == Attributes(right.attributes()) && left.type() == right.type() && left.name() == right.name() && left.has_storage() == right.has_storage() && (!left.has_storage() || left.storage() == right.storage()); }
// --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- HBufC8* CNcdReportInstall::CreateReportL() const { DLTRACEIN(("")); CNcdRequestInstallation* report = NcdRequestGenerator::CreateInstallationReportRequestLC(); report->SetNamespaceL( Attributes().AttributeString16( ENcdReportAttributeReportNamespace ) ); AddReportDataL( *report ); HBufC8* data = ReportManager().GeneralManager().ProtocolManager().ProcessPreminetRequestL( ReportManager().Context(), *report, Attributes().AttributeString16( ENcdReportAttributeReportUri ), ETrue ); CleanupStack::PopAndDestroy( report ); return data; }
bool EC_DynamicComponent::ContainSameAttributes(const EC_DynamicComponent &comp) const { AttributeVector myAttributeVector = Attributes(); AttributeVector attributeVector = comp.Attributes(); if(attributeVector.size() != myAttributeVector.size()) return false; if(attributeVector.empty() && myAttributeVector.empty()) return true; std::sort(myAttributeVector.begin(), myAttributeVector.end(), &CmpAttributeByName); std::sort(attributeVector.begin(), attributeVector.end(), &CmpAttributeByName); AttributeVector::const_iterator iter1 = myAttributeVector.begin(); AttributeVector::const_iterator iter2 = attributeVector.begin(); while(iter1 != myAttributeVector.end() && iter2 != attributeVector.end()) { // Compare attribute names and type and if they mach continue iteration if not components aren't exactly the same. if ((*iter1)->Name() == (*iter2)->Name() && (*iter1)->TypeName() == (*iter2)->TypeName()) { if(iter1 != myAttributeVector.end()) iter1++; if(iter2 != attributeVector.end()) iter2++; } else { return false; } } return true; /*// Get both attributes and check if they are holding exact number of attributes. AttributeVector myAttributeVector = Attributes(); AttributeVector attributeVector = comp.Attributes(); if(attributeVector.size() != myAttributeVector.size()) return false; // Compare that every attribute is same in both components. QSet<IAttribute*> myAttributeSet; QSet<IAttribute*> attributeSet; for(uint i = 0; i < myAttributeSet.size(); i++) { attributeSet.insert(myAttributeVector[i]); myAttributeSet.insert(attributeVector[i]); } if(attributeSet != myAttributeSet) return false; return true;*/ }
bool CSProperties::Write2XML(TiXmlNode& root, bool parameterised, bool sparse) { TiXmlElement* prop=root.ToElement(); if (prop==NULL) return false; prop->SetAttribute("ID",uiID); prop->SetAttribute("Name",sName.c_str()); if (!sparse) { TiXmlElement FC("FillColor"); FC.SetAttribute("R",FillColor.R); FC.SetAttribute("G",FillColor.G); FC.SetAttribute("B",FillColor.B); FC.SetAttribute("a",FillColor.a); prop->InsertEndChild(FC); TiXmlElement EC("EdgeColor"); EC.SetAttribute("R",EdgeColor.R); EC.SetAttribute("G",EdgeColor.G); EC.SetAttribute("B",EdgeColor.B); EC.SetAttribute("a",EdgeColor.a); prop->InsertEndChild(EC); } if (m_Attribute_Name.size()) { TiXmlElement Attributes("Attributes"); for (size_t n=0;n<m_Attribute_Name.size();++n) { Attributes.SetAttribute(m_Attribute_Name.at(n).c_str(),m_Attribute_Value.at(n).c_str()); } prop->InsertEndChild(Attributes); } TiXmlElement Primitives("Primitives"); for (size_t i=0;i<vPrimitives.size();++i) { TiXmlElement PrimElem(vPrimitives.at(i)->GetTypeName().c_str()); vPrimitives.at(i)->Write2XML(PrimElem,parameterised); Primitives.InsertEndChild(PrimElem); } prop->InsertEndChild(Primitives); return true; }
void ISymbol::MergeTypeInfo(ISymbolPtr c) { c->TypeName() = Name(); // Ignore, Name(), Namespace(), and Type() c->Abstract() = Abstract(); c->Atomic() = Atomic(); c->Attributes() = Attributes(); c->BaseTypeName() = BaseTypeName(); c->Compositor() = Compositor(); c->DerivedType() = DerivedType(); c->Enumerations() = Enumerations(); c->FacetKinds() = FacetKinds(); c->Facets() = Facets(); c->Global() = Global(); c->Level() = Level(); c->List() = List(); c->ListSize() = ListSize(); c->ListType() = ListType(); c->Optional() = Optional(); c->Parent() = Parent(); c->Parsed() = Parsed(); c->PrimitiveType() = PrimitiveType(); c->Required() = Required(); c->SimpleContent() = SimpleContent(); c->SimpleType() = SimpleType(); c->SqlCount() = SqlCount(); c->SqlType() = SqlType(); c->SubstitutionGroupAffiliation() = SubstitutionGroupAffiliation(); c->SubstitutionList() = SubstitutionList(); c->SubTypes() = SubTypes(); c->SuperTypes() = SuperTypes(); c->Variable() = Variable(); c->Visited() = Visited(); c->XercesType() = XercesType(); // These are element particle definitions // c->Dimension() = Dimension(); // always 1 //c->LowerBounds() = LowerBounds(); //c->UpperBounds() = UpperBounds(); //c->OuterElementName() = OuterElementName(); // c->OuterElementTypeName() = OuterElementTypeName(); }
void ISymbol::DeepCopy(ISymbolPtr c) { c->Name()=Name(); c->Abstract() = Abstract(); c->Atomic() = Atomic(); c->Attributes() = Attributes(); c->BaseTypeName() = BaseTypeName(); c->Compositor() = Compositor(); c->DerivedType() = DerivedType(); c->Dimension() = Dimension(); c->Enumerations() = Enumerations(); c->FacetKinds() = FacetKinds(); c->Facets() = Facets(); c->Global() = Global(); c->Level() = Level(); c->List() = List(); c->ListSize() = ListSize(); c->ListType() = ListType(); c->LowerBounds() = LowerBounds(); c->Namespace() = Namespace(); c->Optional() = Optional(); c->OuterElementName() = OuterElementName(); c->OuterElementTypeName() = OuterElementTypeName(); c->Parent() = Parent(); c->Parsed() = Parsed(); c->PrimitiveType() = PrimitiveType(); c->Required() = Required(); c->SimpleContent() = SimpleContent(); c->SimpleType() = SimpleType(); c->SqlCount() = SqlCount(); c->SqlType() = SqlType(); c->SubstitutionGroupAffiliation() = SubstitutionGroupAffiliation(); c->SubstitutionList() = SubstitutionList(); c->SubTypes() = SubTypes(); c->SuperTypes() = SuperTypes(); c->Type() = Type(); c->TypeName() = TypeName(); c->UpperBounds() = UpperBounds(); c->Variable() = Variable(); c->Visited() = Visited(); c->XercesType() = XercesType(); }
boolean TextFileScript::Definition (ostream& out) { TextFileComp* comp = (TextFileComp*) GetSubject(); TextGraphic* g = comp->GetText(); int h = g->GetLineHeight(); out << "textfile("; out << h << ",\"" << comp->GetPathname() << "\""; if (comp->GetBegstr()) { out << " :begstr "; ParamList::output_text(out, comp->GetBegstr(), 0); } if (comp->GetEndstr()) { out << " :endstr "; ParamList::output_text(out, comp->GetEndstr(), 0); } if (comp->GetLineWidth() > -1) out << " :linewidth " << comp->GetLineWidth(); float sep = g->GetLineHeight() - 1; // correct for vert shift Transformer corrected, *t = g->GetTransformer(); corrected.Translate(0., sep); if (t == nil) { g->SetTransformer(&corrected); TextGS(out); g->SetTransformer(t); } else { t->Reference(); corrected.Postmultiply(t); g->SetTransformer(&corrected); TextGS(out); g->SetTransformer(t); Unref(t); } Annotation(out); Attributes(out); out << ")"; return out.good(); }
inline ArrayDesc createWindowDesc(ArrayDesc const& desc) { Dimensions const& dims = desc.getDimensions(); Dimensions aggDims(dims.size()); for (size_t i = 0, n = dims.size(); i < n; i++) { DimensionDesc const& srcDim = dims[i]; aggDims[i] = DimensionDesc(srcDim.getBaseName(), srcDim.getNamesAndAliases(), srcDim.getStartMin(), srcDim.getCurrStart(), srcDim.getCurrEnd(), srcDim.getEndMax(), srcDim.getChunkInterval(), 0, srcDim.getType(), srcDim.getFlags(), srcDim.getMappingArrayName(), srcDim.getComment(), srcDim.getFuncMapOffset(), srcDim.getFuncMapScale()); } ArrayDesc output (desc.getName(), Attributes(), aggDims); for (size_t i = dims.size() * 2, size = _parameters.size(); i < size; i++) { addAggregatedAttribute( (shared_ptr <OperatorParamAggregateCall> &) _parameters[i], desc, output); } if ( desc.getEmptyBitmapAttribute()) { AttributeDesc const* eAtt = desc.getEmptyBitmapAttribute(); output.addAttribute(AttributeDesc(output.getAttributes().size(), eAtt->getName(), eAtt->getType(), eAtt->getFlags(), eAtt->getDefaultCompressionMethod())); } return output; }
boolean TextScript::Definition (ostream& out) { TextOvComp* comp = (TextOvComp*) GetSubject(); TextGraphic* g = comp->GetText(); const char* text = g->GetOriginal(); int h = g->GetLineHeight(); out << "text("; out << h << ","; int indent_level = 0; Component* parent = comp; do { parent = parent->GetParent(); indent_level++; } while (parent != nil); ParamList::output_text(out, text, indent_level); float sep = g->GetLineHeight() - 1; // correct for vert shift Transformer corrected, *t = g->GetTransformer(); corrected.Translate(0., sep); if (t == nil) { g->SetTransformer(&corrected); TextGS(out); g->SetTransformer(t); } else { t->Reference(); corrected.Postmultiply(t); g->SetTransformer(&corrected); TextGS(out); g->SetTransformer(t); Unref(t); } Annotation(out); Attributes(out); out << ")"; return out.good(); }
Attributes CreateAttribute(const char* name, unsigned int sSize, PriorityType pt) { return Attributes(name, sSize, pt); }
void CMemSpyEngineHelperSysMemTrackerEntryOpenFile::CreateChangeDescriptorL( CMemSpyEngineHelperSysMemTrackerCycle& aCycle ) { CMemSpyEngineHelperSysMemTrackerCycleChangeOpenFile* changeDescriptor = CMemSpyEngineHelperSysMemTrackerCycleChangeOpenFile::NewLC( Attributes(), *iThreadName, *iFileName, iSize, iUniqueFileId ); aCycle.AddAndPopL( changeDescriptor ); }
virtual void Draw(CRhinoDisplayPipeline& dp) const { dp.DrawWireframeMesh(m_mesh, Attributes().DrawColor(Document(), dp.GetRhinoVP().ViewportId()), false); }
void EmitAttributes(RecordKeeper &RK, raw_ostream &OS) { Attributes(RK).emit(OS); }
void CMemSpyEngineHelperSysMemTrackerGlobalData::CreateChangeDescriptorL( CMemSpyEngineHelperSysMemTrackerCycle& aCycle ) { CMemSpyEngineHelperSysMemTrackerCycleChangeGlobalData* changeDescriptor = CMemSpyEngineHelperSysMemTrackerCycleChangeGlobalData::NewLC( Attributes(), *iChunkName, iCurrent, IsNew() ? NULL : iLast ); aCycle.AddAndPopL( changeDescriptor ); }