47 :theName(src.theName),
48 theValue(src.theValue)
55 if(in.fail())
return false;
59 if((in.peek() !=
'=')||
87 <<
"Bad attribute format encountered near:\n\""<< spec<<
"\"\n" 88 <<
"Parsing aborted...\n";
93 spec = spec.after(
'=');
98 char quote_char = spec[0];
99 spec = spec.after(quote_char);
106 spec = spec.
after(quote_char);
108 spec = spec.fromRegExp(next_entry.
c_str());
180 return ((!in.fail())&&
187 if(in.fail())
return false;
191 char startQuote =
'\0';
197 while(!done&&!in.fail())
217 bool is_empty =
false;
218 std::string::size_type p = 0;
230 if(*startIter == startQuote)
239 if(*endIter != startQuote)
246 return ((!in.bad())&& (is_empty ||
theValue !=
""));
ossimString before(const ossimString &str, std::string::size_type pos=0) const
METHOD: before(str, pos) Returns string beginning at pos and ending one before the token str If strin...
bool read(std::istream &in)
const ossimString & getName() const
std::basic_stringstream< char > stringstream
Class for char mixed input and output memory streams.
void setNameValue(const ossimString &name, const ossimString &value)
const ossimString & getValue() const
bool readValue(std::istream &in)
std::string::iterator end()
void setValue(const ossimString &value)
#define RTTI_DEF2(cls, name, b1, b2)
std::string::size_type size() const
std::string::iterator begin()
ossimString trim(const ossimString &valueToTrim=ossimString(" \\)) const
this will strip lead and trailing character passed in.
std::basic_istream< char > istream
Base class for char input streams.
std::ostream & operator<<(std::ostream &os, const ossimXmlAttribute *xml_attr)
void setName(const ossimString &name)
virtual void setErrorStatus() const
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string's contents...
ossimString after(const ossimString &str, std::string::size_type pos=0) const
METHOD: after(str, pos) Returns string immediately after the token str.
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
std::basic_ostream< char > ostream
Base class for char output streams.
bool readName(std::istream &in)