]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
formatter: add the ability to dump attrs in xml entities
authorYehuda Sadeh <yehuda@inktank.com>
Fri, 22 Feb 2013 23:02:02 +0000 (15:02 -0800)
committerYehuda Sadeh <yehuda@inktank.com>
Fri, 8 Mar 2013 16:31:37 +0000 (08:31 -0800)
commit7cb6ee28073824591d8132a87ea09a11c44efd66
treeb62c978f159c2ecf9eaf1a9c4510ed95c810c837
parent6669e73fa50e3908ec825ee030c31a6dbede6ac0
formatter: add the ability to dump attrs in xml entities

xml entities may have attrs assigned to them. Add the ability
to set them. A usage example:

formatter->open_array_section_with_attrs("container",
     FormatterAttrs("name", "foo", NULL));

This will generate the following xml entity:
<container name="foo">

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
src/common/Formatter.cc
src/common/Formatter.h