SNAP Library 4.0, User Reference
2017-07-27 13:18:06
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <attr.h>
Public Member Functions | |
TAttrPair () | |
TAttrPair (const TAttrPair &Attrs) | |
TAttrPair (TSIn &SIn) | |
Constructor for loading attributes from a (binary) stream SIn. More... | |
void | Save (TSOut &SOut) const |
Saves the attributes to a (binary) stream SOut. More... | |
void | Clr () |
Clears the contents of the attribute map. More... | |
int | AddSAttrDat (const TIntPr &Id, const TStr &AttrName, const TInt &Val) |
Add Int attribute with name AttrName for the given id Id . More... | |
int | AddSAttrDat (const TIntPr &Id, const TInt &AttrId, const TInt &Val) |
Add Int attribute with attribute id AttrId for the given id Id . More... | |
int | AddSAttrDat (const TIntPr &Id, const TStr &AttrName, const TFlt &Val) |
Add Flt attribute with name AttrName for the given id Id . More... | |
int | AddSAttrDat (const TIntPr &Id, const TInt &AttrId, const TFlt &Val) |
Add Flt attribute with attribute id AttrId for the given id Id . More... | |
int | AddSAttrDat (const TIntPr &Id, const TStr &AttrName, const TStr &Val) |
Add Str attribute with name AttrName for the given id Id . More... | |
int | AddSAttrDat (const TIntPr &Id, const TInt &AttrId, const TStr &Val) |
Add Str attribute with attribute id AttrId for the given id Id . More... | |
int | GetSAttrDat (const TIntPr &Id, const TStr &AttrName, TInt &ValX) const |
Get Int attribute with name AttrName for the given id Id . More... | |
int | GetSAttrDat (const TIntPr &Id, const TInt &AttrId, TInt &ValX) const |
Get Int attribute with attribute id AttrId for the given id Id . More... | |
int | GetSAttrDat (const TIntPr &Id, const TStr &AttrName, TFlt &ValX) const |
Get Flt attribute with name AttrName for the given id Id . More... | |
int | GetSAttrDat (const TIntPr &Id, const TInt &AttrId, TFlt &ValX) const |
Get Flt attribute with attribute id AttrId for the given id Id . More... | |
int | GetSAttrDat (const TIntPr &Id, const TStr &AttrName, TStr &ValX) const |
Get Str attribute with name AttrName for the given id Id . More... | |
int | GetSAttrDat (const TIntPr &Id, const TInt &AttrId, TStr &ValX) const |
Get Str attribute with attribute id AttrId for the given id Id . More... | |
int | DelSAttrDat (const TIntPr &Id, const TStr &AttrName) |
Delete attribute with name AttrName for the given id Id . More... | |
int | DelSAttrDat (const TIntPr &Id, const TInt &AttrId) |
Delete attribute with attribute id AttrId for the given id Id . More... | |
void | DelSAttrId (const TIntPr &Id) |
Delete all attributes for the given id Id . More... | |
void | GetSAttrV (const TIntPr &Id, const TAttrType AttrType, TAttrPrV &AttrV) const |
Get a list of all attributes of the given type AttrType for the given id Id . More... | |
int | GetIdVSAttr (const TStr &AttrName, TIntPrV &IdV) const |
Get a list of all ids that have an attribute with name AttrName . More... | |
int | GetIdVSAttr (const TInt &AttrId, TIntPrV &IdV) const |
Get a list of all ids that have an attribute with attribute id AttrId . More... | |
int | AddSAttr (const TStr &Name, const TAttrType &AttrType, TInt &AttrIdX) |
Adds a mapping for an attribute with name Name and type AttrType . More... | |
int | GetSAttrId (const TStr &Name, TInt &AttrIdX, TAttrType &AttrTypeX) const |
Given the attribute name Name , get the attribute id and type. More... | |
int | GetSAttrName (const TInt &AttrId, TStr &NameX, TAttrType &AttrTypeX) const |
Given the attribute id AttrId , get the attribute name and type. More... | |
Private Member Functions | |
int | GetIdVSAttr (const TInt &AttrId, const TAttrType Type, TIntPrV &IdV) const |
Private Attributes | |
TStrIntPrH | AttrNameToId |
TIntIntStrPrH | AttrIdToName |
TIntIntPrPrIntH | IntAttrVals |
TIntIntPrPrFltH | FltAttrVals |
TIntIntPrPrStrH | StrAttrVals |
|
inline |
Adds a mapping for an attribute with name Name and type AttrType
.
Add Int attribute with name AttrName
for the given id Id
.
Definition at line 246 of file attr.cpp.
Add Int attribute with attribute id AttrId
for the given id Id
.
Definition at line 255 of file attr.cpp.
Add Flt attribute with name AttrName
for the given id Id
.
Definition at line 263 of file attr.cpp.
Add Flt attribute with attribute id AttrId
for the given id Id
.
Definition at line 272 of file attr.cpp.
Add Str attribute with name AttrName
for the given id Id
.
Definition at line 280 of file attr.cpp.
Add Str attribute with attribute id AttrId
for the given id Id
.
Definition at line 289 of file attr.cpp.
|
inline |
Clears the contents of the attribute map.
Definition at line 122 of file attr.h.
Delete attribute with name AttrName
for the given id Id
.
Definition at line 347 of file attr.cpp.
void TAttrPair::DelSAttrId | ( | const TIntPr & | Id | ) |
Delete all attributes for the given id Id
.
|
private |
Get a list of all ids that have an attribute with name AttrName
.
Definition at line 436 of file attr.cpp.
Get a list of all ids that have an attribute with attribute id AttrId
.
Definition at line 445 of file attr.cpp.
Get Int attribute with name AttrName
for the given id Id
.
Definition at line 298 of file attr.cpp.
Get Int attribute with attribute id AttrId
for the given id Id
.
Definition at line 303 of file attr.cpp.
Get Flt attribute with name AttrName
for the given id Id
.
Definition at line 314 of file attr.cpp.
Get Flt attribute with attribute id AttrId
for the given id Id
.
Definition at line 319 of file attr.cpp.
Get Str attribute with name AttrName
for the given id Id
.
Definition at line 330 of file attr.cpp.
Get Str attribute with attribute id AttrId
for the given id Id
.
Definition at line 335 of file attr.cpp.
Get a list of all attributes of the given type AttrType
for the given id Id
.
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |