Geany  dev
Data Structures | Typedefs | Functions
tm_source_file.h File Reference

The TMSourceFile structure and associated functions are used to maintain tags for individual files. More...

Data Structures

struct  TMSourceFile
 The TMSourceFile structure represents the source file and its tags in the tag manager. More...
 

Typedefs

typedef struct TMSourceFile TMSourceFile
 The TMSourceFile structure represents the source file and its tags in the tag manager.
 

Functions

gchar * tm_get_real_path (const gchar *file_name)
 Given a file name, returns a newly allocated string containing the realpath() of the file. More...
 
void tm_source_file_free (TMSourceFile *source_file)
 Decrements the reference count of source_file. More...
 
TMSourceFiletm_source_file_new (const char *file_name, const char *name)
 Initializes a TMSourceFile structure and returns a pointer to it. More...
 

Detailed Description

The TMSourceFile structure and associated functions are used to maintain tags for individual files.

Function Documentation

gchar* tm_get_real_path ( const gchar *  file_name)

Given a file name, returns a newly allocated string containing the realpath() of the file.

Parameters
file_nameThe original file_name
Returns
A newly allocated string containing the real path to the file. NULL if none is available.
void tm_source_file_free ( TMSourceFile source_file)

Decrements the reference count of source_file.

If the reference count drops to 0, then source_file is freed, including all contents. Make sure the source_file is already removed from any TMWorkSpace before the this happens.

Parameters
source_fileThe source file to free.
See also
tm_workspace_remove_source_file()
TMSourceFile* tm_source_file_new ( const char *  file_name,
const char *  name 
)

Initializes a TMSourceFile structure and returns a pointer to it.

The TMSourceFile has to be added to TMWorkspace to start its parsing.

Parameters
file_nameThe file name.
nameName of the used programming language, NULL to disable parsing.
Returns
The created unparsed TMSourceFile object.