27 #include "ObjCryst/ObjCryst/General.h"
34 #include "ObjCryst/wxCryst/wxCryst.h"
47 float InputFloat(istream &is,
const char endchar=
' ');
57 class WXXMLCrystTag:
public WXCrystObj
60 WXXMLCrystTag(wxWindow *parent, XMLCrystTag*);
61 virtual void CrystUpdate();
62 virtual void SetObjName(
const string&);
63 virtual string GetObjName()
const;
64 virtual bool Show(
const bool);
77 XMLCrystTag(
const string &tagName,
const bool isEndTag=
false,
const bool isEmptyTag=
false);
79 const string& GetName()
const;
80 const string& GetClassName()
const;
81 unsigned int GetNbAttribute()
const;
82 void AddAttribute(
const string &attName,
const string &attValue);
83 void GetAttribute(
const int attNum,
string &attName,
string &attValue);
84 const string& GetAttributeName(
const int attNum)
const;
85 const string& GetAttributeValue(
const int attNum)
const;
86 void SetIsEndTag(
const bool isEndTag);
88 void SetIsEmptyTag(
const bool isEmptyTag);
89 bool IsEmptyTag()
const;
95 vector<pair<std::string,std::string> > mvAttribute;
96 friend ostream& operator<< (ostream&,
const XMLCrystTag&);
97 friend istream& operator>> (istream&,
XMLCrystTag&);
104 void WXNotifyDelete();
106 WXXMLCrystTag *mpWXXMLCrystTag;
111 ostream& operator<< (ostream&,
const XMLCrystTag&);
118 void IOCrystExtractNameSpace(istream &is,
string &str);
119 void IOCrystExtractNameLine(istream &is,
string &str);
120 void IOCrystExtractNameQuoted(istream &is,
string &str);
121 void IOCrystXMLOutputNameQuoted(ostream &os,
const string &str);
129 WXIOCrystTag(wxWindow *parent, IOCrystTag*);
130 virtual void CrystUpdate();
131 virtual void SetObjName(
const string&);
132 virtual string GetObjName()
const;
133 virtual bool Show(
const bool);
145 IOCrystTag(
const string& type,
const string& name,
const unsigned long version=0);
146 IOCrystTag(istream &is);
147 virtual ~IOCrystTag();
148 void XMLInput(istream &is);
149 bool operator==(
const IOCrystTag&)
const;
150 const string &GetType()
const;
151 const string &GetName()
const;
152 unsigned long GetVersion()
const;
153 bool IsClosingTag()
const;
156 const string &GetClassName()
const;
160 unsigned long mTagVersion;
165 virtual WXCrystObj* WXCreate(wxWindow*);
168 void WXNotifyDelete();
170 WXIOCrystTag *mpWXIOCrystTag;
177 #endif //_REFOBJ_IO_H_
bool ISNAN_OR_INF(REAL r)
Test if the value is a NaN.
float InputFloat(istream &is, const char endchar)
Safely read a floating-point value from a stream.
Base class for all displayed ObjCryst objects (with a title, and a sizer to stack objects)...
The namespace which includes all objects (crystallographic and algorithmic) in ObjCryst++.
class to input or output a well-formatted xml beginning or ending tag.