static void doFile(const char* moduleName) { assert(moduleName); printBeginGuard(moduleName, cout); printCopyright(cout); cout << endl; cout << "#include \"AAFTypes.h\"" << endl; cout << endl; cout << "// AAF type definition UIDs." << endl << "//" << endl << endl; size_t i = 0; for (i = 0; i < sizeof(types)/sizeof(types[0]); i++){ printDefinition("const aafUID_t", prefix, types[i].name, 0, types[i].identifier, cout); } cout << endl; printEndGuard(moduleName, cout); }
static void doFile (const char * moduleName) { assert (moduleName); printBeginGuard(moduleName, cout); printCopyright (cout); cout << endl; cout << "#include \"AAFTypes.h\"" << endl; cout << endl; cout << "// AAF extensible enumeration member UIDs." << endl << "//" << endl << endl; size_t i = 0; for (i = 0; i < sizeof(members)/sizeof(members[0]); i++) { if (members[i].kind == 1) { if ((i > 0) && (members[i-1].kind == 1)) { cout << "// None currently defined" << endl; cout << endl; } cout << "// Members of " << members[i].name << endl; cout << "//" << endl; } else if (members[i].kind == 2) { printDefinition("const aafUID_t", prefix, members[i].name, 0, members[i].identifier, cout); } } printEndGuard(moduleName, cout); }
static void doFile (const char * moduleName) { assert(moduleName); printBeginGuard(moduleName, cout); printCopyright(cout); cout << endl; cout << "#include \"AAFTypes.h\"" << endl; cout << endl; cout << "// AAF class definition UIDs." << endl << "//" << endl << endl; cout << "// The AAF reference implementation uses shorter names than" << endl << "// SMPTE. The names are shortened by the following aliases." << endl << "//" << endl; size_t maxNameLength = 0; size_t i = 0; for (i = 0; i < sizeof(aliases)/sizeof(aliases[0]); i++){ size_t length = strlen(aliases[i].alias); if (length > maxNameLength) { maxNameLength = length; } } size_t width = maxNameLength; for (i = 0; i < sizeof(aliases)/sizeof(aliases[0]); i++){ cout << "#define " << prefix; printName(aliases[i].alias, width, cout); cout << " " << prefix; printName(aliases[i].name, 0, cout); cout << endl; } cout << endl; for (i = 0; i < sizeof(classes)/sizeof(classes[0]); i++){ printDefinition("const aafUID_t", prefix, classes[i].name, 0, classes[i].identifier, cout); } printEndGuard(moduleName, cout); }
static void doFile(const char* moduleName) { assert(moduleName); printBeginGuard(moduleName, cout); printCopyright(cout); cout << endl; cout << "#include \"AAFTypes.h\"" << endl; cout << endl; cout << "// AAF property definition UIDs." << endl << "//" << endl << endl; size_t i = 0; for (i = 0; i < sizeof(properties)/sizeof(properties[0]); i++){ printDefinition("const aafUID_t", prefix, properties[i].name, 0, properties[i].identifier, cout); } Property_t special[] = { {"Root_MetaDictionary", {0x0D010301, 0x0101, 0x0100,{0x06, 0x0E, 0x2B, 0x34, 0x01, 0x01, 0x01, 0x02}}}, {"Root_Header", {0x0D010301, 0x0102, 0x0100, {0x06, 0x0E, 0x2B, 0x34, 0x01, 0x01, 0x01, 0x02}}} }; cout << "// Special property definition ids used for specifying the" << endl; cout << "// starting strong reference in the target list of a" << endl; cout << "// weak reference." << endl; cout << "//" << endl; for (i = 0; i < sizeof(special)/sizeof(special[0]); i++){ printDefinition("const aafUID_t", prefix, special[i].name, 0, special[i].identifier, cout); } printEndGuard(moduleName, cout); }
static void doFile(const char* moduleName) { assert(moduleName); printBeginGuard(moduleName, cout); printCopyright(cout); cout << endl; cout << "// AAF property identifiers (PIDs)." << endl << "//" << endl << endl; cout << "// A property is identified by a globally unique 16-byte" << endl << "// identifier. To save space in an AAF file we store a" << endl << "// 2-byte file unique PID with each property." << endl << "// The mapping for a particular file is recorded in the" << endl << "// dictionary contained in that file." << endl << "// For the predefined properties we optimize by using a" << endl << "// fixed, compiled-in mapping." << endl << "// This file defines that mapping." << endl << "//" << endl; size_t maxNameLength = 0; size_t i = 0; for (i = 0; i < sizeof(properties)/sizeof(properties[0]); i++) { size_t length = strlen(properties[i].name); if (length > maxNameLength) { maxNameLength = length; } } for (i = 0; i < sizeof(properties)/sizeof(properties[0]); i++) { printDefinition("const int", "PID_", properties[i].name, maxNameLength, properties[i].identifier, cout); } printEndGuard(moduleName, cout); }
static void doFile (const char * moduleName) { assert(moduleName); printBeginGuard(moduleName, cout); printCopyright(cout); cout << endl; cout << "#include \"AAFTypes.h\"" << endl; cout << endl; cout << "// AAF stored object UIDs." << endl << "//" << endl << endl; cout << "#if !defined(INIT_AUID)" << endl; cout << "#define "; cout << "DEFINE_AUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \\" << endl; cout << " extern \"C\" const aafUID_t name" << endl; cout << "#else" << endl; cout << "#define "; cout << "DEFINE_AUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \\" << endl; cout << " extern \"C\" const aafUID_t name = \\" << endl; cout << " { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }" << endl; cout << "#endif" << endl; cout << endl; cout << "// The AAF reference implementation uses shorter names than" << endl << "// SMPTE. The names are shortened by the following aliases." << endl << "//" << endl; size_t maxNameLength = 0; size_t i = 0; for (i = 0; i < sizeof(aliases)/sizeof(aliases[0]); i++){ size_t length = strlen(aliases[i].alias); if (length > maxNameLength) { maxNameLength = length; } } size_t width = maxNameLength; for (i = 0; i < sizeof(aliases)/sizeof(aliases[0]); i++){ cout << "#define " << prefix; printName(aliases[i].alias, width, cout); cout << " " << prefix; printName(aliases[i].name, 0, cout); cout << endl; } cout << endl; for (i = 0; i < sizeof(classes)/sizeof(classes[0]); i++){ printMacroInvocation(prefix, "DEFINE_AUID", classes[i].name, classes[i].identifier, cout); cout << endl; } printEndGuard(moduleName, cout); }