+Pointer *Pointer::Copy(CYPool &pool, const char *rename) const {
+ return new(pool) Pointer(*type.Copy(pool));
+}
+
+Array *Array::Copy(CYPool &pool, const char *rename) const {
+ return new(pool) Array(*type.Copy(pool), size);
+}
+
+#ifdef CY_OBJECTIVEC
+Object *Object::Copy(CYPool &pool, const char *rename) const {
+ return new(pool) Object(pool.strdup(name));
+}
+#endif
+
+Enum *Enum::Copy(CYPool &pool, const char *rename) const {
+ if (rename == NULL)
+ rename = pool.strdup(name);
+ else if (rename[0] == '\0')
+ rename = NULL;
+ Enum *copy(new(pool) Enum(*type.Copy(pool), count, rename));
+ copy->constants = new(pool) Constant[count];
+ for (size_t i(0); i != count; ++i) {
+ copy->constants[i].name = pool.strdup(constants[i].name);
+ copy->constants[i].value = constants[i].value;