## IAnjutaDebuggerVariable IAnjutaDebuggerVariable — Variables interface for debuggers |

## Stability Level

Unstable, unless otherwise indicated

## Synopsis

    #include <libanjuta/interfaces/ianjuta-debugger-variable.h>

    #define             IANJUTA_DEBUGGER_VARIABLE_ERROR
                        IAnjutaDebuggerVariable;
                        IAnjutaDebuggerVariableIface;
                        IAnjutaDebuggerVariableObject;
    GQuark              ianjuta_debugger_variable_error_quark
                                                            (void);
    gboolean            ianjuta_debugger_variable_assign    (IAnjutaDebuggerVariable *obj,
                                                             const gchar *name,
                                                             const gchar *value,
                                                             GError **err);
    gboolean            ianjuta_debugger_variable_create    (IAnjutaDebuggerVariable *obj,
                                                             const gchar *expression,
                                                             IAnjutaDebuggerCallback callback,
                                                             gpointer user_data,
                                                             GError **err);
    gboolean            ianjuta_debugger_variable_destroy   (IAnjutaDebuggerVariable *obj,
                                                             const gchar *name,
                                                             GError **err);
    gboolean            ianjuta_debugger_variable_evaluate  (IAnjutaDebuggerVariable *obj,
                                                             const gchar *name,
                                                             IAnjutaDebuggerCallback callback,
                                                             gpointer user_data,
                                                             GError **err);
    gboolean            ianjuta_debugger_variable_list_children
                                                            (IAnjutaDebuggerVariable *obj,
                                                             const gchar *name,
                                                             IAnjutaDebuggerCallback callback,
                                                             gpointer user_data,
                                                             GError **err);
    gboolean            ianjuta_debugger_variable_update    (IAnjutaDebuggerVariable *obj,
                                                             IAnjutaDebuggerCallback callback,
                                                             gpointer user_data,
                                                             GError **err);

## Object Hierarchy

      GInterface
       +----IAnjutaDebuggerVariable

## Prerequisites

IAnjutaDebuggerVariable requires IAnjutaDebugger and GObject.

## Description

This interface is used to examine and change values of expression. It is based on the MI2 variable object interface of gdb. A variable needs to be created before being able to get or set its value and list its children.

## Details

### IANJUTA_DEBUGGER_VARIABLE_ERROR

    #define IANJUTA_DEBUGGER_VARIABLE_ERROR ianjuta_debugger_variable_error_quark()

### IAnjutaDebuggerVariable

    typedef struct _IAnjutaDebuggerVariable IAnjutaDebuggerVariable;

### IAnjutaDebuggerVariableIface

    typedef struct {
    	IAnjutaDebuggerIface g_iface;

    	gboolean (*assign) (IAnjutaDebuggerVariable *obj, const gchar *name,  const gchar *value, GError **err);
    	gboolean (*create) (IAnjutaDebuggerVariable *obj, const gchar *expression,  IAnjutaDebuggerCallback callback,  gpointer user_data, GError **err);
    	gboolean (*destroy) (IAnjutaDebuggerVariable *obj, const gchar *name, GError **err);
    	gboolean (*evaluate) (IAnjutaDebuggerVariable *obj, const gchar *name,  IAnjutaDebuggerCallback callback,  gpointer user_data, GError **err);
    	gboolean (*list_children) (IAnjutaDebuggerVariable *obj, const gchar *name,  IAnjutaDebuggerCallback callback,  gpointer user_data, GError **err);
    	gboolean (*update) (IAnjutaDebuggerVariable *obj, IAnjutaDebuggerCallback callback,  gpointer user_data, GError **err);
    } IAnjutaDebuggerVariableIface;

### IAnjutaDebuggerVariableObject

    typedef struct {
    	gchar *name;
    	gchar *expression;
    	gchar *type;
    	gchar *value;
    	gboolean changed;
    	gboolean exited;
    	gboolean deleted;
    	gint children;
    } IAnjutaDebuggerVariableObject;

### ianjuta_debugger_variable_error_quark ()

    GQuark              ianjuta_debugger_variable_error_quark
                                                            (void);

Returns : |

### ianjuta_debugger_variable_assign ()

    gboolean            ianjuta_debugger_variable_assign    (IAnjutaDebuggerVariable *obj,
                                                             const gchar *name,
                                                             const gchar *value,
                                                             GError **err);

Set the value of one variable or child object.

`obj` : | Self
`name` : | Variable name
`value` : | Variable value
`err` : | Error propagation and reporting.
Returns : | TRUE if the request succeed and the callback is called. If FALSE, the callback will not be called.

### ianjuta_debugger_variable_create ()

    gboolean            ianjuta_debugger_variable_create    (IAnjutaDebuggerVariable *obj,
                                                             const gchar *expression,
                                                             IAnjutaDebuggerCallback callback,
                                                             gpointer user_data,
                                                             GError **err);

Create a new variable object in the current thread and frame.

`obj` : | Self
`expression` : | Variable expression
`callback` : | Callback to call when the variable has been created
`user_data` : | User data that is passed back to the callback
`err` : | Error propagation and reporting.
Returns : | TRUE if the request succeed and the callback is called. If FALSE, the callback will not be called.

### ianjuta_debugger_variable_destroy ()

    gboolean            ianjuta_debugger_variable_destroy   (IAnjutaDebuggerVariable *obj,
                                                             const gchar *name,
                                                             GError **err);

Delete a previously created variable or child object including its own children.

`obj` : | Self
`name` : | Variable name
`err` : | Error propagation and reporting.
Returns : | TRUE if the request succeed and the callback is called. If FALSE, the callback will not be called.

### ianjuta_debugger_variable_evaluate ()

    gboolean            ianjuta_debugger_variable_evaluate  (IAnjutaDebuggerVariable *obj,
                                                             const gchar *name,
                                                             IAnjutaDebuggerCallback callback,
                                                             gpointer user_data,
                                                             GError **err);

Get the value of one variable or child object.

`obj` : | Self
`name` : | Variable name
`callback` : | Callback to call with the variable value
`user_data` : | User data that is passed back to the callback
`err` : | Error propagation and reporting.
Returns : | TRUE if the request succeed and the callback is called. If FALSE, the callback will not be called.

### ianjuta_debugger_variable_list_children ()

    gboolean            ianjuta_debugger_variable_list_children
                                                            (IAnjutaDebuggerVariable *obj,
                                                             const gchar *name,
                                                             IAnjutaDebuggerCallback callback,
                                                             gpointer user_data,
                                                             GError **err);

List and create objects for all children of a variable object.

`obj` : | Self
`name` : | Variable name
`callback` : | Callback to call when the children have been created
`user_data` : | User data that is passed back to the callback
`err` : | Error propagation and reporting.
Returns : | TRUE if the request succeed and the callback is called. If FALSE, the callback will not be called.

### ianjuta_debugger_variable_update ()

    gboolean            ianjuta_debugger_variable_update    (IAnjutaDebuggerVariable *obj,
                                                             IAnjutaDebuggerCallback callback,
                                                             gpointer user_data,
                                                             GError **err);

List all changed variable objects since the last call.

`obj` : | Self
`callback` : | Callback to call with the list of all changed variables
`user_data` : | User data that is passed back to the callback
`err` : | Error propagation and reporting.
Returns : | TRUE if the request succeed and the callback is called. If FALSE, the callback will not be called.