|
PLearn 0.1
|
#include "Object.h"#include "stringutils.h"#include <plearn/io/fileutils.h>#include <plearn/io/pl_log.h>#include <plearn/io/load_and_save.h>#include <plearn/io/openFile.h>#include <plearn/io/openString.h>#include "TypeFactory.h"#include "RemoteDeclareMethod.h"#include <algorithm>
Go to the source code of this file.
Namespaces | |
| namespace | PLearn |
< for swap | |
Functions | |
| Object * | PLearn::loadObject (const PPath &filename) |
| Loads an object from the given file (no macro-preprocessing is performed) | |
| Object * | PLearn::macroLoadObject (const PPath &filename, map< string, string > &vars) |
| Same as loadObject but first performs macro-processing on the file vars may be initialised with the values of some variables and upon return it will also contain newly $DEFINED variables. | |
| Object * | PLearn::macroLoadObject (const PPath &filename) |
| same as previous, but no need to pass a variables map | |
| Object * | PLearn::readObject (PStream &in, unsigned int id=UINT_MAX) |
| This function builds an object from its representation in the stream. | |
| PStream & | PLearn::operator>> (PStream &in, Object *&o) |
| This takes precedence over the template definitions for a template type T in PStream.h. | |
| void | PLearn::callFunction (const string &funcname, int nargs, PStream &io) |
| Calls a function previously declared with the declareFunction mechanism. | |
| Object * | PLearn::newObjectFromClassname (const string &classname) |
| Object * | PLearn::remote_deepCopy (Object *source) |
| BEGIN_DECLARE_REMOTE_FUNCTIONS | PLearn::declareFunction ("newObject",&newObject,(BodyDoc("Returns PLearn object from a string description.\n"), ArgDoc("representation","the string representation of the object"), RetDoc("newly created object"))) |
| PLearn::declareFunction ("newObjectFromClassname",&newObjectFromClassname,(BodyDoc("Returns PLearn object from a class name (string.)\n"), ArgDoc("classname","the class of the object, as a string"), RetDoc("newly created object"))) | |
| PLearn::declareFunction ("loadObject",&loadObject,(BodyDoc("Returns PLearn object from a file describing it.\n"), ArgDoc("filename","file containing the object to load"), RetDoc("newly created object"))) | |
| PLearn::declareFunction ("macroLoadObject", static_cast< Object *(*)(const PPath &, map< string, string > &)>(¯oLoadObject),(BodyDoc("Returns PLearn object from a file describing it,"" after macro-processing.\n"), ArgDoc("filename","file containing the object to load"), ArgDoc("vars","map of vars to values."), RetDoc("newly created object"))) | |
| PLearn::declareFunction ("deepCopy",&remote_deepCopy,(BodyDoc("Returns deep copy of a PLearn object.\n"), ArgDoc("source","object to be deep-copied"), RetDoc("deep copy of the object"))) | |
| void | printobj (PLearn::Object *p) |
| Useful function for debugging inside gdb: | |
| void printobj | ( | PLearn::Object * | p | ) |
Useful function for debugging inside gdb:
Object_INC
Definition at line 1102 of file Object.cc.
References PLearn::PStream::endl(), and PLearn::perr.
{
PLearn::PStream perr(&std::cerr);
perr << *p;
perr.endl();
}

1.7.4