Пример #1
0
		void operator()(Locator loc, bool first)
		{
			// write the separator if necessary
			if(!first) this->out << ", ";
			else indent(this->out, this->obj.depth()+1);
			// write the value
			wr_val(loc.get());
		}
Пример #2
0
 void operator()(Locator loc, bool first)
 {
     this->indent(1);
     this->out << '<' << name << '>';
     // write the value
     wr_val(loc.get());
     this->out << '<' << name << "/>";
 }
Пример #3
0
 void operator()(MetaCntnr)
 {
     if(!MetaCntnr::empty(this->obj.value))
     {
         wr_val(
             MetaCntnr::
             default_traversal::
             start(this->obj.value).
             front().get()
         );
     }
 }
Пример #4
0
		void operator()(IterInfo)
		{
			typedef typename IterInfo::type meta_member;
			// write the separator if necessary
			// write the member name and the separating ':'
			indent(out, obj.depth()+1)
				<< "<member name='"
				<< meta_member::base_name()
				<< "' type='"
				<< meta_member::type::full_name()
				<< "'>";
			// write the value
			wr_val(meta_member::get(obj.value));
			out	<< "<member/>"
				<< std::endl;
		}
Пример #5
0
		void operator()(IterInfo)
		{
			typedef typename IterInfo::type meta_member;
			// write the separator if necessary
			if(!IterInfo::is_first::value)
				this->out << ", " << std::endl;
			// write the member name and the separating ':'
			indent(this->out, this->obj.depth()+1)
				<< '"'
				<< meta_member::base_name()
				<< '"'
				<< ": ";
			// write the value
			wr_val(meta_member::get(this->obj.value));
			if(IterInfo::is_last::value)
				this->out << std::endl;
		}
Пример #6
0
		void operator()(Locator loc)
		{
			// write the value
			if(loc) wr_val(loc.get());
		}
Пример #7
0
 void wr_val(const std::string& x)
 {
     std::string::const_iterator i = x.begin(), e = x.end();
     while(i != e) wr_val(*i++);
 }