Represents the base class of attributes.
It is possible to add information to the Sage nodes using attributes. An attribute has two values:1.a type: user supplied types must be positive integers; negative integers are reserved for the system; the reserved types
are: #define DEPENDENCE_ATTRIBUTE -1001 #define INDUCTION_ATTRIBUTE -1002 #define ACCESS_ATTRIBUTE -1003 #define DEPGRAPH_ATTRIBUTE -1004 #define USEDLIST_ATTRIBUTE -1005 #define DEFINEDLIST_ATTRIBUTE -1006 #define NOGARBAGE_ATTRIBUTE -1007 #define GARBAGE_ATTRIBUTE -1008 #define ANNOTATION_EXPR_ATTRIBUTE -1009 2.data: the data field is a pointer to void that can be used to store any information.
enum typenode {BIFNODE, LLNODE, SYMBNODE, TYPENODE,...} corresponding respectively to SgStatement, SgExpression, SgSymbol, and SgType.
void* data
int dataSize
SgAttribute* next
typenode typeNode
void* ptToSage
int fileNumber
SgAttribute(int t, void *pt, int size, SgStatement &st, int filenum)
SgAttribute(int t, void *pt, int size, SgSymbol &st, int filenum)
SgAttribute(int t, void *pt, int size, SgExpression &st, int filenum)
SgAttribute(int t, void *pt, int size, SgType &st, int filenum)
~SgAttribute()
int getAttributeType()
void setAttributeType(int t)
void* getAttributeData()
void* setAttributeData(void *d)
int getAttributeSize()
void setAttributeSize(int s)
typenode getTypeNode()
void* getPtToSage()
void setPtToSage(void *sa)
void resetPtToSage()
void setPtToSage(SgStatement &st)
void setPtToSage(SgSymbol &st)
void setPtToSage(SgExpression &st)
void setPtToSage(SgType &st)
SgStatement* getStatement()
SgExpression* getExpression()
SgSymbol* getSgSymbol()
SgType* getType()
int getfileNumber()
SgAttribute* copy()
SgAttribute* getNext()
void setNext(SgAttribute *s)
int listLenght()
SgAttribute* getInlist(int num)
void save(FILE *file)
void save(FILE *file, void (*savefunction)(void *dat, FILE *f))
Email contact: zgs@npac.syr.edu