mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 05:07:00 -04:00
finished symbol rendering
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@90 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
+16
-8
@@ -112,22 +112,30 @@ class Package {
|
||||
/// Open a file given an absolute filename
|
||||
static InputStreamP openAbsoluteFile(const String& name);
|
||||
|
||||
/* // --------------------------------------------------- : Managing the inside of the package : IO files
|
||||
// --------------------------------------------------- : Managing the inside of the package : Reader/writer
|
||||
|
||||
template <typename T>
|
||||
void readFile<T> (String n, T& obj) {
|
||||
In i(openFileIn(n), filename + _("/") + n);
|
||||
void readFile(const String& file, T& obj) {
|
||||
Reader reader(openIn(file), absoluteFilename() + _("/") + file);
|
||||
try {
|
||||
i(obj);
|
||||
} catch (ParseError e) {
|
||||
throw FileParseError(e.what(), filename+_("/")+n); // more detailed message
|
||||
reader.handle(obj);
|
||||
} catch (const ParseError& err) {
|
||||
throw FileParseError(err.what(), absoluteFilename() + _("/") + file); // more detailed message
|
||||
}
|
||||
}
|
||||
template <typename T>
|
||||
T readFile(const String& file) {
|
||||
T obj;
|
||||
readFile(file, obj);
|
||||
return obj;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void writeFile(const String& file, T obj) {
|
||||
void writeFile(const String& file, const T& obj) {
|
||||
Writer writer(openOut(file));
|
||||
writer.handle(obj);
|
||||
}
|
||||
*/
|
||||
|
||||
// --------------------------------------------------- : Private stuff
|
||||
private:
|
||||
|
||||
|
||||
@@ -98,4 +98,4 @@ InputStreamP PackageManager::openFileFromPackage(const String& name) {
|
||||
|
||||
void PackageManager::destroy() {
|
||||
loaded_packages.clear();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user