## IAnjutaSymbol IAnjutaSymbol — Source code symbol interface |

## Stability Level

Unstable, unless otherwise indicated

## Functions

GQuark | ianjuta_symbol_error_quark ()
gboolean | ianjuta_symbol_get_boolean ()
GFile * | ianjuta_symbol_get_file ()
const GdkPixbuf * | ianjuta_symbol_get_icon ()
gint | ianjuta_symbol_get_int ()
const gchar * | ianjuta_symbol_get_string ()
IAnjutaSymbolType | ianjuta_symbol_get_sym_type ()

## Types and Values

#define | IANJUTA_SYMBOL_ERROR
enum | IAnjutaSymbolField
enum | IAnjutaSymbolType

## Object Hierarchy

        GEnum
        ├── IAnjutaSymbolField
        ╰── IAnjutaSymbolType
        GInterface
        ╰── IAnjutaSymbol

## Includes

    #include <libanjuta/interfaces/ianjuta-symbol.h>

## Description

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.

## Functions

### ianjuta_symbol_error_quark ()

    GQuark
    ianjuta_symbol_error_quark (void);

#### Returns

### ianjuta_symbol_get_boolean ()

    gboolean
    ianjuta_symbol_get_boolean (IAnjutaSymbol *obj,
                                IAnjutaSymbolField field,
                                GError **err);

Retreives the boolean value of a boolean `field` .

#### Parameters

obj | Self |
field | The field to retrieve. |
err | Error propagation and reporting. |

#### Returns

The boolean

### ianjuta_symbol_get_file ()

    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.

#### Parameters

obj | Self |
err | Error propagation and reporting. |

#### Returns

A GFile object. It must be unrefed after use.

### ianjuta_symbol_get_icon ()

    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.

#### Parameters

obj | Self |
err | Error propagation and reporting. |

#### Returns

a Pixbuf icon representing the symbol. Ref the icon if you need to keep it.

### ianjuta_symbol_get_int ()

    gint
    ianjuta_symbol_get_int (IAnjutaSymbol *obj,
                            IAnjutaSymbolField field,
                            GError **err);

Retreives the integer value of an integer `field` .

#### Parameters

obj | Self |
field | The field to retrieve. |
err | Error propagation and reporting. |

#### Returns

The integer

### ianjuta_symbol_get_string ()

    const gchar *
    ianjuta_symbol_get_string (IAnjutaSymbol *obj,
                               IAnjutaSymbolField field,
                               GError **err);

Retreives the string value of a string `field` .

#### Parameters

obj | Self |
field | The field to retrieve. |
err | Error propagation and reporting. |

#### Returns

The string

### ianjuta_symbol_get_sym_type ()

    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.

#### Parameters

obj | Self |
err | Error propagation and reporting. |

#### Returns

a IAnjutaSymbolType

## Types and Values

### IANJUTA_SYMBOL_ERROR

    #define IANJUTA_SYMBOL_ERROR ianjuta_symbol_error_quark()

### enum 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.

#### Members

IANJUTA_SYMBOL_FIELD_ID | Integer. A unique ID of the symbol |
IANJUTA_SYMBOL_FIELD_NAME | String. Name of the symbol |
IANJUTA_SYMBOL_FIELD_FILE_POS | Integer. The file line number where the symbol is found. |
IANJUTA_SYMBOL_FILED_SCOPE_DEF_ID |  |
IANJUTA_SYMBOL_FIELD_FILE_SCOPE | Boolean: TRUE if symbol is within file scope, otherwise FALSE. |
IANJUTA_SYMBOL_FIELD_SIGNATURE | String. Signature of a method, if symbol is a funtion. Namely, the arguments list of the funtion. |
IANJUTA_SYMBOL_FIELD_RETURNTYPE | String. Return type of a method, if symbol is a function. |
IANJUTA_SYMBOL_FIELD_TYPE | 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. |
IANJUTA_SYMBOL_FIELD_TYPE_NAME | type_name attribute of a symbol. If a type could be "class" then its type_name may be "MyFooClass" etc. |
IANJUTA_SYMBOL_FIELD_FILE_PATH | String. The relative path to the file where the symbol is found. |
IANJUTA_SYMBOL_FIELD_PROJECT_NAME | String. The project name to which the symbol belongs to. |
IANJUTA_SYMBOL_FIELD_PROJECT_VERSION | String. The project version to which the symbol belongs to. |
IANJUTA_SYMBOL_FIELD_IMPLEMENTATION | String. Implementation attribute of a symbol. It may be "pure virtual", "virtual", etc. |
IANJUTA_SYMBOL_FIELD_ACCESS | String. Access attribute of a symbol. It may be "public", "private" etc. |
IANJUTA_SYMBOL_FIELD_KIND | Kind attribute of a symbol, such as "enumerator", "namespace", "class" etc. |
IANJUTA_SYMBOL_FIELD_IS_CONTAINER | Boolean. TRUE if symbol is a scope container, such as namespace, class, struct etc., otherwise FALSE. |
IANJUTA_SYMBOL_FIELD_END | The end marker. |

### enum IAnjutaSymbolType

#### Members

IANJUTA_SYMBOL_TYPE_NONE | None spedified. |
IANJUTA_SYMBOL_TYPE_UNDEF | Unknown type. |
IANJUTA_SYMBOL_TYPE_CLASS | Class declaration |
IANJUTA_SYMBOL_TYPE_ENUM | Enum declaration |
IANJUTA_SYMBOL_TYPE_ENUMERATOR | Enumerator value |
IANJUTA_SYMBOL_TYPE_FIELD | Field (Java only) |
IANJUTA_SYMBOL_TYPE_FUNCTION | Function definition |
IANJUTA_SYMBOL_TYPE_INTERFACE | Interface (Java only) |
IANJUTA_SYMBOL_TYPE_MEMBER | Member variable of class/struct |
IANJUTA_SYMBOL_TYPE_METHOD | Class method (Java only) |
IANJUTA_SYMBOL_TYPE_NAMESPACE | Namespace declaration |
IANJUTA_SYMBOL_TYPE_PACKAGE | Package (Java only) |
IANJUTA_SYMBOL_TYPE_PROTOTYPE | Function prototype |
IANJUTA_SYMBOL_TYPE_STRUCT | Struct declaration |
IANJUTA_SYMBOL_TYPE_TYPEDEF | Typedef |
IANJUTA_SYMBOL_TYPE_UNION | Union |
IANJUTA_SYMBOL_TYPE_VARIABLE | Variable |
IANJUTA_SYMBOL_TYPE_EXTERNVAR | Extern or forward declaration |
IANJUTA_SYMBOL_TYPE_MACRO | Macro (without arguments) |
IANJUTA_SYMBOL_TYPE_MACRO_WITH_ARG | Parameterized macro |
IANJUTA_SYMBOL_TYPE_FILE | File (Pseudo tag) |
IANJUTA_SYMBOL_TYPE_OTHER | Other (non C/C++/Java tag) |
IANJUTA_SYMBOL_TYPE_SCOPE_CONTAINER | types which are subjected to create a scope. |
IANJUTA_SYMBOL_TYPE_MAX | Maximum value, used as end marker. |

## See Also

IAnjutaSymbolQuery, IAnjutaSymbolManager