![]() |
![]() |
![]() |
Anjuta Developers Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
#include <libanjuta/interfaces/ianjuta-symbol.h> #define IANJUTA_SYMBOL_ERROR enum IAnjutaSymbolField; struct IAnjutaSymbolIface; enum IAnjutaSymbolType; GQuark ianjuta_symbol_error_quark (void
); gboolean ianjuta_symbol_get_boolean (IAnjutaSymbol *obj
,IAnjutaSymbolField field
,GError **err
); GFile * ianjuta_symbol_get_file (IAnjutaSymbol *obj
,GError **err
); const GdkPixbuf * ianjuta_symbol_get_icon (IAnjutaSymbol *obj
,GError **err
); gint ianjuta_symbol_get_int (IAnjutaSymbol *obj
,IAnjutaSymbolField field
,GError **err
); const gchar * ianjuta_symbol_get_string (IAnjutaSymbol *obj
,IAnjutaSymbolField field
,GError **err
); IAnjutaSymbolType ianjuta_symbol_get_sym_type (IAnjutaSymbol *obj
,GError **err
);
This interface is used to define a symbol, normally got from symbol queries. A symbol has various fields that can be retrieved by using their get methods. A symbol will have only those fields which have been selected to be included in their respective queries, so make sure the needed fields are correctly specified during query creation.
typedef enum { IANJUTA_SYMBOL_FIELD_ID, IANJUTA_SYMBOL_FIELD_NAME, IANJUTA_SYMBOL_FIELD_FILE_POS, IANJUTA_SYMBOL_FILED_SCOPE_DEF_ID, IANJUTA_SYMBOL_FIELD_FILE_SCOPE, IANJUTA_SYMBOL_FIELD_SIGNATURE, IANJUTA_SYMBOL_FIELD_RETURNTYPE, IANJUTA_SYMBOL_FIELD_TYPE, IANJUTA_SYMBOL_FIELD_TYPE_NAME, IANJUTA_SYMBOL_FIELD_FILE_PATH, IANJUTA_SYMBOL_FIELD_PROJECT_NAME, IANJUTA_SYMBOL_FIELD_PROJECT_VERSION, IANJUTA_SYMBOL_FIELD_IMPLEMENTATION, IANJUTA_SYMBOL_FIELD_ACCESS, IANJUTA_SYMBOL_FIELD_KIND, IANJUTA_SYMBOL_FIELD_IS_CONTAINER, IANJUTA_SYMBOL_FIELD_END } IAnjutaSymbolField;
Symbol Fields. Used to define and retrieve results from query. Each of
these fields are either integer or string. Use the right method to
retrieve them. That is, for integer use ianjuta_symbol_get_int()
,
for string use ianjuta_symbol_get_string()
, and for boolean use
ianjuta_symbol_get_boolean()
. Some fields can be in both forms,
e.g. IANJUTA_SYMBOL_FIELD_TYPE.
Integer. A unique ID of the symbol | |
String. Name of the symbol | |
Integer. The file line number where the symbol is found. | |
Boolean: TRUE if symbol is within file scope, otherwise FALSE. | |
String. Signature of a method, if symbol is a funtion. Namely, the arguments list of the funtion. | |
String. Return type of a method, if symbol is a function. | |
Both string and Integer. Type attribute of a symbol. In string form, it is name of the type in string form. In integer form, it is IAnjutaSymbolType enumerator value. | |
type_name attribute of a symbol. If a type could be "class" then its type_name may be "MyFooClass" etc. | |
String. The relative path to the file where the symbol is found. | |
String. The project name to which the symbol belongs to. | |
String. The project version to which the symbol belongs to. | |
String. Implementation attribute of a symbol. It may be "pure virtual", "virtual", etc. | |
String. Access attribute of a symbol. It may be "public", "private" etc. | |
Kind attribute of a symbol, such as "enumerator", "namespace", "class" etc. | |
Boolean. TRUE if symbol is a scope container, such as namespace, class, struct etc., otherwise FALSE. | |
The end marker. |
struct IAnjutaSymbolIface { GTypeInterface g_iface; gboolean (*get_boolean) (IAnjutaSymbol *obj, IAnjutaSymbolField field, GError **err); GFile* (*get_file) (IAnjutaSymbol *obj, GError **err); const GdkPixbuf * (*get_icon) (IAnjutaSymbol *obj, GError **err); gint (*get_int) (IAnjutaSymbol *obj, IAnjutaSymbolField field, GError **err); const gchar* (*get_string) (IAnjutaSymbol *obj, IAnjutaSymbolField field, GError **err); IAnjutaSymbolType (*get_sym_type) (IAnjutaSymbol *obj, GError **err); };
typedef enum { IANJUTA_SYMBOL_TYPE_NONE = 0, IANJUTA_SYMBOL_TYPE_UNDEF = 1, IANJUTA_SYMBOL_TYPE_CLASS = 2, IANJUTA_SYMBOL_TYPE_ENUM = 4, IANJUTA_SYMBOL_TYPE_ENUMERATOR = 8, IANJUTA_SYMBOL_TYPE_FIELD = 16, IANJUTA_SYMBOL_TYPE_FUNCTION = 32, IANJUTA_SYMBOL_TYPE_INTERFACE = 64, IANJUTA_SYMBOL_TYPE_MEMBER = 128, IANJUTA_SYMBOL_TYPE_METHOD = 256, IANJUTA_SYMBOL_TYPE_NAMESPACE = 512, IANJUTA_SYMBOL_TYPE_PACKAGE = 1024, IANJUTA_SYMBOL_TYPE_PROTOTYPE = 2048, IANJUTA_SYMBOL_TYPE_STRUCT = 4096, IANJUTA_SYMBOL_TYPE_TYPEDEF = 8192, IANJUTA_SYMBOL_TYPE_UNION = 16384, IANJUTA_SYMBOL_TYPE_VARIABLE = 32768, IANJUTA_SYMBOL_TYPE_EXTERNVAR = 65536, IANJUTA_SYMBOL_TYPE_MACRO = 131072, IANJUTA_SYMBOL_TYPE_MACRO_WITH_ARG = 262144, IANJUTA_SYMBOL_TYPE_FILE = 524288, IANJUTA_SYMBOL_TYPE_OTHER = 1048576, IANJUTA_SYMBOL_TYPE_SCOPE_CONTAINER = IANJUTA_SYMBOL_TYPE_CLASS | IANJUTA_SYMBOL_TYPE_ENUM | IANJUTA_SYMBOL_TYPE_INTERFACE | IANJUTA_SYMBOL_TYPE_NAMESPACE | IANJUTA_SYMBOL_TYPE_PACKAGE | IANJUTA_SYMBOL_TYPE_STRUCT | IANJUTA_SYMBOL_TYPE_UNION, IANJUTA_SYMBOL_TYPE_MAX = 2097151 } IAnjutaSymbolType;
None spedified. | |
Unknown type. | |
Class declaration | |
Enum declaration | |
Enumerator value | |
Field (Java only) | |
Function definition | |
Interface (Java only) | |
Member variable of class/struct | |
Class method (Java only) | |
Namespace declaration | |
Package (Java only) | |
Function prototype | |
Struct declaration | |
Typedef | |
Union | |
Variable | |
Extern or forward declaration | |
Macro (without arguments) | |
Parameterized macro | |
File (Pseudo tag) | |
Other (non C/C++/Java tag) | |
types which are subjected to create a scope. | |
Maximum value, used as end marker. |
gboolean ianjuta_symbol_get_boolean (IAnjutaSymbol *obj
,IAnjutaSymbolField field
,GError **err
);
Retreives the boolean value of a boolean field
.
|
Self |
|
The field to retrieve. |
|
Error propagation and reporting. |
Returns : |
The boolean |
GFile * ianjuta_symbol_get_file (IAnjutaSymbol *obj
,GError **err
);
A convenience method to get GFile object for IANJUTA_SYMBOL_FIELD_FILE_PATH field. The file where the symbol is declared. It contains the absolute path of the file unlike raw value of field IANJUTA_SYMBOL_FIELD_FILE_PATH.
|
Self |
|
Error propagation and reporting. |
Returns : |
A GFile object. It must be unrefed after use. |
const GdkPixbuf * ianjuta_symbol_get_icon (IAnjutaSymbol *obj
,GError **err
);
A convenience method to get a small icon (16x16) representing the symbol kind. You *need* a query with fields IANJUTA_SYMBOL_FIELD_ACCESS and IANJUTA_SYMBOL_FIELD_KIND selected.
|
Self |
|
Error propagation and reporting. |
Returns : |
a Pixbuf icon representing the symbol. Ref the icon if you need to keep it. |
gint ianjuta_symbol_get_int (IAnjutaSymbol *obj
,IAnjutaSymbolField field
,GError **err
);
Retreives the integer value of an integer field
.
|
Self |
|
The field to retrieve. |
|
Error propagation and reporting. |
Returns : |
The integer |
const gchar * ianjuta_symbol_get_string (IAnjutaSymbol *obj
,IAnjutaSymbolField field
,GError **err
);
Retreives the string value of a string field
.
|
Self |
|
The field to retrieve. |
|
Error propagation and reporting. |
Returns : |
The string |
IAnjutaSymbolType ianjuta_symbol_get_sym_type (IAnjutaSymbol *obj
,GError **err
);
A convenience method to get value of IANJUTA_SYMBOL_FIELD_TYPE field typecasted to IAnjutaSymbolType. Numerical value is unchanged.
|
Self |
|
Error propagation and reporting. |
Returns : |
a IAnjutaSymbolType |