IAnjutaSymbolManager

IAnjutaSymbolManager — Source code symbols manager inteface

Stability Level

Unstable, unless otherwise indicated

Synopsis


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

#define             IANJUTA_SYMBOL_MANAGER_ERROR
                    IAnjutaSymbolManager;
                    IAnjutaSymbolManagerIface;
GQuark              ianjuta_symbol_manager_error_quark  (void);
IAnjutaIterable*    ianjuta_symbol_manager_get_class_parents
                                                        (IAnjutaSymbolManager *obj,
                                                         const IAnjutaSymbol *symbol,
                                                         IAnjutaSymbolField info_fields,
                                                         GError **err);
IAnjutaIterable*    ianjuta_symbol_manager_get_members  (IAnjutaSymbolManager *obj,
                                                         const IAnjutaSymbol *symbol,
                                                         IAnjutaSymbolField info_fields,
                                                         gboolean global_search,
                                                         GError **err);
IAnjutaIterable*    ianjuta_symbol_manager_get_parent_scope
                                                        (IAnjutaSymbolManager *obj,
                                                         const IAnjutaSymbol *symbol,
                                                         const gchar *filename,
                                                         IAnjutaSymbolField info_fields,
                                                         GError **err);
IAnjutaIterable*    ianjuta_symbol_manager_get_scope    (IAnjutaSymbolManager *obj,
                                                         const gchar *filename,
                                                         gulong line,
                                                         IAnjutaSymbolField info_fields,
                                                         GError **err);
IAnjutaSymbol*      ianjuta_symbol_manager_get_symbol_by_id
                                                        (IAnjutaSymbolManager *obj,
                                                         gint symbol_id,
                                                         IAnjutaSymbolField info_fields,
                                                         GError **err);
IAnjutaIterable*    ianjuta_symbol_manager_get_symbol_more_info
                                                        (IAnjutaSymbolManager *obj,
                                                         const IAnjutaSymbol *symbol,
                                                         IAnjutaSymbolField info_fields,
                                                         GError **err);
IAnjutaIterable*    ianjuta_symbol_manager_search       (IAnjutaSymbolManager *obj,
                                                         IAnjutaSymbolType match_types,
                                                         gboolean include_types,
                                                         IAnjutaSymbolField info_fields,
                                                         const gchar *match_name,
                                                         gboolean partial_name_match,
                                                         gboolean global_symbols_search,
                                                         gboolean global_tags_search,
                                                         gint results_limit,
                                                         gint results_offset,
                                                         GError **err);

Object Hierarchy

  GInterface
   +----IAnjutaSymbolManager

Prerequisites

IAnjutaSymbolManager requires GObject.

Description

Details

IANJUTA_SYMBOL_MANAGER_ERROR

#define IANJUTA_SYMBOL_MANAGER_ERROR ianjuta_symbol_manager_error_quark()


IAnjutaSymbolManager

typedef struct _IAnjutaSymbolManager IAnjutaSymbolManager;


IAnjutaSymbolManagerIface

typedef struct {
	GTypeInterface g_iface;
	

	IAnjutaIterable* (*get_class_parents) (IAnjutaSymbolManager *obj, const IAnjutaSymbol *symbol,  IAnjutaSymbolField info_fields, GError **err);
	IAnjutaIterable* (*get_members) (IAnjutaSymbolManager *obj, const IAnjutaSymbol *symbol,  IAnjutaSymbolField info_fields,  gboolean global_search, GError **err);
	IAnjutaIterable* (*get_parent_scope) (IAnjutaSymbolManager *obj, const IAnjutaSymbol *symbol,  const gchar *filename,  IAnjutaSymbolField info_fields, GError **err);
	IAnjutaIterable* (*get_scope) (IAnjutaSymbolManager *obj, const gchar* filename,  gulong line,  IAnjutaSymbolField info_fields, GError **err);
	IAnjutaSymbol* (*get_symbol_by_id) (IAnjutaSymbolManager *obj, gint symbol_id,  IAnjutaSymbolField info_fields, GError **err);
	IAnjutaIterable* (*get_symbol_more_info) (IAnjutaSymbolManager *obj, const IAnjutaSymbol *symbol,  IAnjutaSymbolField info_fields, GError **err);
	IAnjutaIterable* (*search) (IAnjutaSymbolManager *obj, IAnjutaSymbolType match_types,  gboolean include_types,  IAnjutaSymbolField info_fields,  const gchar *match_name,  gboolean partial_name_match,  gboolean global_symbols_search,  gboolean global_tags_search,  gint results_limit,  gint results_offset, GError **err);
} IAnjutaSymbolManagerIface;


ianjuta_symbol_manager_error_quark ()

GQuark              ianjuta_symbol_manager_error_quark  (void);

Returns :


ianjuta_symbol_manager_get_class_parents ()

IAnjutaIterable*    ianjuta_symbol_manager_get_class_parents
                                                        (IAnjutaSymbolManager *obj,
                                                         const IAnjutaSymbol *symbol,
                                                         IAnjutaSymbolField info_fields,
                                                         GError **err);

obj :

symbol :

info_fields :

err :

Returns :


ianjuta_symbol_manager_get_members ()

IAnjutaIterable*    ianjuta_symbol_manager_get_members  (IAnjutaSymbolManager *obj,
                                                         const IAnjutaSymbol *symbol,
                                                         IAnjutaSymbolField info_fields,
                                                         gboolean global_search,
                                                         GError **err);

Database query. The returned IAnjutaIterable object must be unrefed after use.

obj :

Self

symbol :

info_fields :

Kind of infos you would like to have available on the resulting Symbols.

global_search :

fixme

err :

Error propagation and reporting.

Returns :


ianjuta_symbol_manager_get_parent_scope ()

IAnjutaIterable*    ianjuta_symbol_manager_get_parent_scope
                                                        (IAnjutaSymbolManager *obj,
                                                         const IAnjutaSymbol *symbol,
                                                         const gchar *filename,
                                                         IAnjutaSymbolField info_fields,
                                                         GError **err);

Find the parent scope given a symbol

The returned IAnjutaIterable object should contain just one element if the query is successful, no element or NULL is returned if function went wrong. The returned IAnjutaIterable object must be unrefed after use.

obj :

Self

symbol :

Symbol which you want to know the parent scope of.

filename :

Can be NULL. Full path filename where to search for the parent scope symbol.

info_fields :

Kind of infos you would like to have available on the resulting Symbols.

err :

Error propagation and reporting.

Returns :


ianjuta_symbol_manager_get_scope ()

IAnjutaIterable*    ianjuta_symbol_manager_get_scope    (IAnjutaSymbolManager *obj,
                                                         const gchar *filename,
                                                         gulong line,
                                                         IAnjutaSymbolField info_fields,
                                                         GError **err);

Get the scope specified by the line of the file.

Returns Iterator should contain just one element if the query is successful, no element or NULL is returned if function went wrong.

obj :

Self

filename :

full path of the file. line line of filename in which symbol exist.

line :

info_fields :

Kind of infos you would like to have available on the resulting Symbols.

err :

Error propagation and reporting.

Returns :

an iterator

ianjuta_symbol_manager_get_symbol_by_id ()

IAnjutaSymbol*      ianjuta_symbol_manager_get_symbol_by_id
                                                        (IAnjutaSymbolManager *obj,
                                                         gint symbol_id,
                                                         IAnjutaSymbolField info_fields,
                                                         GError **err);

A symbol is identified by an unique id. If you have its id you can also have its object IAnjutaSymbol.

obj :

Self symbol_id unique id of the symbol you want to know about.

symbol_id :

info_fields :

Kind of infos you would like to have available on the resulting Symbols. return NULL on error.

err :

Returns :


ianjuta_symbol_manager_get_symbol_more_info ()

IAnjutaIterable*    ianjuta_symbol_manager_get_symbol_more_info
                                                        (IAnjutaSymbolManager *obj,
                                                         const IAnjutaSymbol *symbol,
                                                         IAnjutaSymbolField info_fields,
                                                         GError **err);

While at first sight this function may seem as useless, in a deeper inspection you can see that you can achieve speed improvements for example avoiding to pass many info_fields requests to a search query, which itself could require complicated joins between engine tables, slowing down the thing. It's up to you to see which method is more performant.

obj :

Self symbol symbol of which you want to know more infos about.

symbol :

info_fields :

Kind of infos you would like to have available on the resulting Symbols.

err :

Error propagation and reporting.

Returns :


ianjuta_symbol_manager_search ()

IAnjutaIterable*    ianjuta_symbol_manager_search       (IAnjutaSymbolManager *obj,
                                                         IAnjutaSymbolType match_types,
                                                         gboolean include_types,
                                                         IAnjutaSymbolField info_fields,
                                                         const gchar *match_name,
                                                         gboolean partial_name_match,
                                                         gboolean global_symbols_search,
                                                         gboolean global_tags_search,
                                                         gint results_limit,
                                                         gint results_offset,
                                                         GError **err);

Database query. The returned IAnjutaIterable object must be unrefed after use.

obj :

Self

match_types :

If passed IANJUTA_TYPE_MAX the function will not perfom any filter.

include_types :

Should the result contain or exclude the match_types? TRUE to include them, FALSE to exclude. For example use may want all symbols but classes.

info_fields :

Kind of infos you would like to have available on the resulting Symbols.

match_name :

fixme

partial_name_match :

if TRUE it will search for match_name%, it FALSE for the exact string match_name.

global_symbols_search :

if TRUE it will search only for public/extern functions. If FALSE it will search also for static/private functions.

global_tags_search :

If TRUE it'll search only for system tags, using pkg-config to retrieve installed packages infos. If FALSE only current project's symbols will be searched.

results_limit :

Limit results to an upper bound. -1 If you don't want to use this par.

results_offset :

Skip results_offset results. -1 If you don't want to use this par. results_limit Limit results to an upper bound. -1 If you don't want to use this par. results_offset Skip results_offset results. -1 If you don't want to use this par.

err :

Error propagation and reporting.

Returns :

See Also

IAnjutaSymbol