Add int/bool attribute clone macros
authorScott Cantor <cantor.2@osu.edu>
Wed, 21 Dec 2011 21:03:00 +0000 (21:03 +0000)
committerScott Cantor <cantor.2@osu.edu>
Wed, 21 Dec 2011 21:03:00 +0000 (21:03 +0000)
xmltooling/base.h

index 0f8bf1b..f70e0f6 100644 (file)
     set##proper(src.get##proper())
 
 /**
+ * Implements cloning of an integer child attribute, for use in copy constructor or
+ * deferred clone methods.
+ *
+ * proper   the proper name of the attribute to clone
+ */
+#define IMPL_CLONE_INTEGER_ATTRIB(proper) \
+    set##proper(src.m_##proper)
+
+/**
+ * Implements cloning of a boolean child attribute, for use in copy constructor or
+ * deferred clone methods.
+ *
+ * proper   the proper name of the attribute to clone
+ */
+#define IMPL_CLONE_BOOLEAN_ATTRIB(proper) \
+    proper(src.m_##proper)
+
+/**
  * Implements cloning of a child object, for use in copy constructor or
  * deferred clone methods.
  *