25 #ifndef GCU_APPLICATION_H
26 #define GCU_APPLICATION_H
52 #define GCU_CONF_DIR "gchemutils"
75 Application (std::string name, std::string datadir = DATADIR,
char const *help_name = NULL,
char const *icon_name = NULL,
CmdContext *cc = NULL);
89 void OnHelp (std::string s =
"");
97 std::string
const &
GetName ()
const {
return Name;}
117 virtual bool FileProcess (G_GNUC_UNUSED
const gchar* filename, G_GNUC_UNUSED
const gchar* mime_type, G_GNUC_UNUSED
bool bSave, G_GNUC_UNUSED GtkWindow *window, G_GNUC_UNUSED
Document *pDoc = NULL)
189 bool Save (std::string
const &uri,
const char *mime_type,
Object const *Obj,
ContentType type,
const char *options = NULL);
203 bool Save (GsfOutput *output,
const char *mime_type,
Object const *Obj,
ContentType type,
const char *options = NULL);
230 void RegisterOptions (GOptionEntry
const *entries,
char const *translation_domain = GETTEXT_PACKAGE);
298 void AddRule (
const std::string& type1,
RuleId rule,
const std::string& type2);
313 const std::set<TypeId>&
GetRules (
const std::string& type,
RuleId rule);
359 TypeDesc
const *GetTypeDescription (
TypeId Id);
374 char*
ConvertToCML (std::string
const &uri,
const char *mime_type,
const char *options = NULL);
384 char*
ConvertToCML (GsfInput *input,
const char *mime_type,
const char *options = NULL);
394 void ConvertFromCML (
const char *cml, std::string
const &uri,
const char *mime_type,
const char *options = NULL);
404 void ConvertFromCML (
const char *cml, GsfOutput *output,
const char *mime_type,
const char *options = NULL);
410 std::list < Database >
const &
GetDatabases (
char const *classname) {
return m_Databases[classname];}
452 void RemoveDocument (
Document *Doc);
453 int OpenBabelSocket ();
454 char const *MimeToBabelType (
char const *mime_type);
458 std::string HelpName;
459 std::string HelpBrowser;
460 std::string HelpFilename;
462 std::string IconName;
463 static GOConfNode *m_ConfDir;
464 std::list <option_data> m_Options;
465 std::map <TypeId, TypeDesc> m_Types;
466 std::map <std::string, std::string> m_BabelTypes;
467 std::map < std::string, std::list <Database> >m_Databases;
538 #endif // GCU_APPLICATION_H