openldev/openldev-settings/openldev-project.h File Reference

ProjectSettings. More...

#include "../openldev-utils.h"
#include "openldev-makefile-parser.h"
#include "openldev-xml-parser.h"
#include <vector>
#include <string>
#include <fstream>
#include <glib.h>
#include <gtk/gtk.h>

Data Structures

struct  ProjectSettings
 Information about a currently open OpenLDev project. More...

Functions

ProjectSettings * openldev_project_settings_new (string file)
void openldev_project_settings_close_project (ProjectSettings *project)
gboolean openldev_project_settings_load_project_file (ProjectSettings *project, string file)
gboolean openldev_project_settings_get_file_in_project (ProjectSettings *project, const char *file)
vector< string > openldev_project_settings_get_makefile_list (ProjectSettings *project)
vector< string > openldev_project_settings_get_sources (ProjectSettings *project, const char *makefile, gboolean full)
vector< string > openldev_project_settings_get_sources_all (ProjectSettings *project)
void openldev_project_settings_add_lastfile (ProjectSettings *project, const char *file)
void openldev_project_settings_remove_lastfile (ProjectSettings *project, const char *file)
void openldev_project_settings_set_language (ProjectSettings *project, const char *value)
void openldev_project_settings_set_compile (ProjectSettings *project, const char *value)
void openldev_project_settings_set_build (ProjectSettings *project, const char *value)
void openldev_project_settings_set_autogen (ProjectSettings *project, const char *value)
void openldev_project_settings_set_configure (ProjectSettings *project, const char *value)
void openldev_project_settings_set_clean (ProjectSettings *project, const char *value)
void openldev_project_settings_set_version (ProjectSettings *project, const char *value)
void openldev_project_settings_set_execute (ProjectSettings *project, const char *value)
vector< string > openldev_project_settings_get_lastfiles (ProjectSettings *project)
string openldev_project_settings_get_template (ProjectSettings *project)
string openldev_project_settings_get_language (ProjectSettings *project)
string openldev_project_settings_get_compile (ProjectSettings *project)
string openldev_project_settings_get_build (ProjectSettings *project)
string openldev_project_settings_get_autogen (ProjectSettings *project)
string openldev_project_settings_get_configure (ProjectSettings *project)
string openldev_project_settings_get_clean (ProjectSettings *project)
string openldev_project_settings_get_location (ProjectSettings *project)
string openldev_project_settings_get_name (ProjectSettings *project)
string openldev_project_settings_get_version (ProjectSettings *project)
string openldev_project_settings_get_fullname (ProjectSettings *project)


Detailed Description


Function Documentation

void openldev_project_settings_add_lastfile (  ProjectSettings *  project,
const char *  file
) 
 

Add a file from the list of open files. This should be called when a file is opened and OpenLDev has not invoked this action.

Parameters:
project A ProjectSettings object.
file The full path of the file that was just opened.

void openldev_project_settings_close_project (  ProjectSettings *  project  ) 
 

Save the current project and reset all of the variables in the ProjectSettings object.

Parameters:
project A ProjectSettings object.

string openldev_project_settings_get_autogen (  ProjectSettings *  project  ) 
 

Retrieve the command that will be called when the Auto Generate menu item is activated.

Parameters:
project A ProjectSettings object.
Returns:
The auto generate command (usually './autogen.sh').

string openldev_project_settings_get_build (  ProjectSettings *  project  ) 
 

Retrieve the command that will be called when the Build menu item is activated.

Parameters:
project A ProjectSettings object.
Returns:
The build command (usually 'make').

string openldev_project_settings_get_clean (  ProjectSettings *  project  ) 
 

Retrieve the command that will be called when the Clean menu item is activated.

Parameters:
project A ProjectSettings object.
Returns:
The clean command (usually 'make clean').

string openldev_project_settings_get_compile (  ProjectSettings *  project  ) 
 

Retrieve the command that will be called when the Compile menu item is activated.

Parameters:
project A ProjectSettings object.
Returns:
The compile command (usually 'make {FILE}').

string openldev_project_settings_get_configure (  ProjectSettings *  project  ) 
 

Retrieve the command that will be called when the Configure menu item is activated.

Parameters:
project A ProjectSettings object.
Returns:
The configure command (usually './configure').

gboolean openldev_project_settings_get_file_in_project (  ProjectSettings *  project,
const char *  file
) 
 

Parameters:
project A ProjectSettings object.

string openldev_project_settings_get_fullname (  ProjectSettings *  project  ) 
 

Retrieve the full file name of the project file. This includes the path, project name and file extension.

Parameters:
project A ProjectSettings object.
Returns:
The full location of the project file.

string openldev_project_settings_get_language (  ProjectSettings *  project  ) 
 

Retrieve the programming language of the project. This is really just for reference and can be changed without affecting the operation of OpenLDev.

Parameters:
project A ProjectSettings object.
Returns:
Project programming language such as 'C++' or 'C'.

vector<string> openldev_project_settings_get_lastfiles (  ProjectSettings *  project  ) 
 

Retrieve a list of files that are currently open in the editor. This is used to reopen files after the application has been closed.

Parameters:
project A ProjectSettings object.
Returns:
A list of files that are currently open in the editor.

string openldev_project_settings_get_location (  ProjectSettings *  project  ) 
 

Retrieve the full location of the project. This includes the base project directory.

Parameters:
project A ProjectSettings object.
Returns:
The full location of the project, obtained from the project file name.

vector<string> openldev_project_settings_get_makefile_list (  ProjectSettings *  project  ) 
 

Get a list of Makefile.am files in the project. This is done by parsing all of the SUBDIRS variables.

Parameters:
project A ProjectSettings object.
Returns:
List of makefiles in the project.

string openldev_project_settings_get_name (  ProjectSettings *  project  ) 
 

Retrieve the formal name of the project. This is obtained from the project file name.

Parameters:
project A ProjectSettings object.
Returns:
The specified name of the project, obtained from the project file name.

vector<string> openldev_project_settings_get_sources (  ProjectSettings *  project,
const char *  makefile,
gboolean  full
) 
 

Parameters:
project A ProjectSettings object.
makefile The full path file location of the Makefile.am.
full TRUE if all of the SUBDIRS in makefile should be parsed recursively for sources.
Returns:
The list of sources in the folder or the whole project.

vector<string> openldev_project_settings_get_sources_all (  ProjectSettings *  project  ) 
 

Get a list of all of the sources in a project's file structure. These are obtained from the targets in your Makefile.am(s).

Parameters:
project A ProjectSettings object.
Returns:
The list of sources in the project.

string openldev_project_settings_get_template (  ProjectSettings *  project  ) 
 

Retrieve the short template name used to create the project. This can be useful when trying to obtain default settings for build commands or file content.

Parameters:
project A ProjectSettings object.
Returns:
The short name of the project template used.

string openldev_project_settings_get_version (  ProjectSettings *  project  ) 
 

Retrieve the current version of the project that is passed in your project configure.in.

Parameters:
project A ProjectSettings object.
Returns:
The current version of the project, obtained from the configure.in file.

gboolean openldev_project_settings_load_project_file (  ProjectSettings *  project,
string  file
) 
 

Load a project file in to an already created ProjectSettings object.

Parameters:
project A ProjectSettings object.
file The project file to be loaded.
Returns:
TRUE if the project was successfully loaded.

ProjectSettings* openldev_project_settings_new (  string  file  ) 
 

Create a new ProjectSettings object. If file is empty, a new object will be created, but all of the elements will be empty.

Parameters:
file The location of a project file.
Returns:
A new ProjectSettings object or an empty object if file is empty.

void openldev_project_settings_remove_lastfile (  ProjectSettings *  project,
const char *  file
) 
 

Remove a file from the list of open files. This should be called when a file is closed and OpenLDev has not invoked this action.

Parameters:
project A ProjectSettings object.
file The full path of the file that was just closed.

void openldev_project_settings_set_autogen (  ProjectSettings *  project,
const char *  value
) 
 

Change the automatic generation command that is used. This is useful if you do not want to build every source directory on build.

Parameters:
project A ProjectSettings object.
value The string to replace the current value.

void openldev_project_settings_set_build (  ProjectSettings *  project,
const char *  value
) 
 

Change the build command that is used.

Parameters:
project A ProjectSettings object.
value The string to replace the current value.

void openldev_project_settings_set_clean (  ProjectSettings *  project,
const char *  value
) 
 

Change the clean command that is used. The default is 'make clean', but you can change it to 'make distclean' if you want not only object files to be deleted, but also configure output files.

Parameters:
project A ProjectSettings object.
value The string to replace the current value.

void openldev_project_settings_set_compile (  ProjectSettings *  project,
const char *  value
) 
 

Change the compile command that is used. Every instance of {FILE} will be replaced by the full path of the current file.

Parameters:
project A ProjectSettings object.
value The string to replace the current value.

void openldev_project_settings_set_configure (  ProjectSettings *  project,
const char *  value
) 
 

Change the configure command that is used. This can be used when you want to automatically pass parameters to configure.

Parameters:
project A ProjectSettings object.
value The string to replace the current value.

void openldev_project_settings_set_execute (  ProjectSettings *  project,
const char *  value
) 
 

Change the execute command that is used. Every instance of {BASE} will be replaced by the project location. Every instance of {NAME} will be replaced with the project name.

Parameters:
project A ProjectSettings object.
value The string to replace the current value.

void openldev_project_settings_set_language (  ProjectSettings *  project,
const char *  value
) 
 

Change the default programming language of the project. Changing this won't affect the editor; it is just for reference.

Parameters:
project A ProjectSettings object.
value The string to replace the current value.

void openldev_project_settings_set_version (  ProjectSettings *  project,
const char *  value
) 
 

Change the current version of the project. This will edit your project configure.in file.

Parameters:
project A ProjectSettings object.
value The string to replace the current value.


Generated on Mon Apr 24 21:35:34 2006 for OpenLDev by  doxygen 1.4.6