18
PolymakeProperty(const string &name_, const string &value_);
19
PolymakeProperty(const string &name_, const string &value_, bool embedded_=true);
24
static bool xmlForced;
23
25
string application,type;
25
27
list<PolymakeProperty> properties;
26
28
list<PolymakeProperty>::iterator findProperty(const char *p);
27
void writeProperty(const char *p, const string &data);
29
void writeProperty(const char *p, const string &data, bool embedded=false);
32
bool isXmlFormat()const{return isXml;}
34
* This function takes the Gfan property names and maps them to the corresponding names in
35
* polymake type SymmetricFan (if the file is an xml file). This preserves compatibility with old
36
* Gfan files. Maybe Gfan should switch completely to polymake names in the future.
38
const char *mapToPolymakeNames(const char *s);
40
* Calling this function will set the xmlForced flag, with the consequence that every subsequently
41
* created PolymakeFile is output in XML format no matter with what parameters it is created.
43
static void forceXml(){xmlForced=true;}
29
44
void open(const char *fileName_);
30
void create(const char *fileName_, const char *application_, const char *type_);
45
void create(const char *fileName_, const char *application_, const char *type_, bool isXml_=false);
31
46
void writeStream(ostream &file);
33
bool hasProperty(const char *p);
48
bool hasProperty(const char *p, bool doAssert=false);
35
50
// The following could be part of a subclass to avoid dependencies on gfan
36
51
int readCardinalProperty(const char *p);
40
55
void writeBooleanProperty(const char *p, bool n);
42
57
IntegerMatrix readMatrixProperty(const char *p, int height, int width);
43
void writeMatrixProperty(const char *p, const IntegerMatrix &m, bool indexed=false);
58
void writeMatrixProperty(const char *p, const IntegerMatrix &m, bool indexed=false, const vector<string> *comments=0);
60
IntegerMatrix readArrayArrayIntProperty(const char *p, int width);
61
void writeArrayArrayIntProperty(const char *p, const IntegerMatrix &m);
45
63
vector<list<int> > readMatrixIncidenceProperty(const char *p);
46
void writeIncidenceMatrixProperty(const char *p, const vector<list<int> > &m);
64
void writeIncidenceMatrixProperty(const char *p, const vector<list<int> > &m, int baseSetSize);
48
66
IntegerVector readCardinalVectorProperty(const char *p);
49
67
void writeCardinalVectorProperty(const char *p, IntegerVector const &v);