Update of /cvsroot/csp/APPLICATIONS/CSPSim/Include
In directory sc8-pr-cvs1:/tmp/cvs-serv24189/Include
Modified Files:
CSPSim.i Config.h SimpleConfig.h
Log Message:
Index: CSPSim.i
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/CSPSim.i,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** CSPSim.i 26 Jun 2003 09:25:45 -0000 1.6
--- CSPSim.i 23 Jul 2003 01:28:58 -0000 1.7
***************
*** 55,58 ****
--- 55,71 ----
+ %exception CSPSim::createVehicle {
+ try {
+ $action
+ } catch (simdata::Exception &e) {
+ std::string msg = e.getType() + ": " + e.getMessage();
+ PyErr_SetString(PyExc_RuntimeError, msg.c_str());
+ SWIG_fail;
+ } catch (...) {
+ PyErr_SetString(PyExc_RuntimeError, "Caught an (unknown) exception in CSPSim::createVehicle");
+ SWIG_fail;
+ }
+ }
+
%extend CSPSim {
void createVehicle(const char *path, simdata::Vector3 position,
***************
*** 82,83 ****
--- 95,99 ----
void setShell(PyObject *shell) { self->getShell()->bind(shell); }
}
+
+ %exception;
+
Index: Config.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/Config.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Config.h 26 Jun 2003 09:25:45 -0000 1.4
--- Config.h 23 Jul 2003 01:28:58 -0000 1.5
***************
*** 40,43 ****
--- 40,57 ----
extern bool openConfig(std::string path, bool report_error=true);
+ /**
+ * Get the main cache path.
+ */
+ extern std::string getCachePath();
+
+ /**
+ * Get the main configuration path.
+ */
+ extern std::string getConfigPath();
+
+ /**
+ * Get the specific configuration path.
+ */
+ extern std::string getConfigPath(std::string const &);
/**
Index: SimpleConfig.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/SimpleConfig.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** SimpleConfig.h 18 Jul 2003 02:00:22 -0000 1.8
--- SimpleConfig.h 23 Jul 2003 01:28:58 -0000 1.9
***************
*** 334,337 ****
--- 334,353 ----
void setPath(const std::string §ion, const std::string &key, const std::string &value);
+ /**
+ * Get the current configuration file path.
+ *
+ * @returns the full path to the configuration file.
+ */
+ std::string getConfigurationPath() const;
+
+ /**
+ * Get the path to the directory containing the current configuration
+ * file.
+ *
+ * @returns the full path to the directory containing the
+ * current configuration file.
+ */
+ std::string getConfigurationDirectory() const;
+
private:
|