Changeset 610
- Timestamp:
- 08/18/14 10:03:36 (5 years ago)
- Location:
- branches/work_311
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/work_311/ARApi.h
r422 r610 20 20 #include <arstruct.h> 21 21 #include <arextern.h> 22 #include "util/Memory.h" 22 23 23 24 // this is just a little workaround for a bug in ar.h version 7.5 … … 91 92 #define AR_XML_VERSION_710 10 92 93 #define AR_XML_VERSION_750 11 93 94 // template for clearing memory of AR structs95 template<class T>96 void ARZeroMemory(T* obj) { memset(obj, 0, sizeof(T)); } -
branches/work_311/ARInsideLib.vcproj
r605 r610 2116 2116 <File 2117 2117 RelativePath=".\util\Context.h" 2118 > 2119 </File> 2120 <File 2121 RelativePath=".\util\Memory.cpp" 2122 > 2123 </File> 2124 <File 2125 RelativePath=".\util\Memory.h" 2118 2126 > 2119 2127 </File> -
branches/work_311/core/ARQualification.cpp
r592 r610 341 341 342 342 CDocCurrencyField docCurrency(formId, *operand->u.currencyField); 343 c har *prefix = getFieldPrefix(operand);343 const char *prefix = getFieldPrefix(operand); 344 344 345 345 qText << delimiter; … … 394 394 } 395 395 396 c har* CARQualification::getFieldPrefix(ARFieldValueOrArithStruct *operand)396 const char* CARQualification::getFieldPrefix(ARFieldValueOrArithStruct *operand) 397 397 { 398 398 if (operand == NULL) return NULL; … … 429 429 return true; 430 430 } 431 throw exception("NotImplementedException");432 } 433 431 throw AppException("NotImplementedException", "ARQual"); 432 } 433 -
branches/work_311/core/ARQualification.h
r592 r610 49 49 void CheckOperand(ARFieldValueOrArithStruct *operand, ARFieldValueOrArithStruct *parent, stringstream &qText); 50 50 int FindCurrentEnumFieldId(); 51 c har* getFieldPrefix(ARFieldValueOrArithStruct *operand);51 const char* getFieldPrefix(ARFieldValueOrArithStruct *operand); 52 52 bool getFormIdAndDelimiter(ARFieldValueOrArithStruct *operand, int &formId, char &delimiter); 53 53 -
branches/work_311/lists/ARFieldList.cpp
r549 r610 324 324 { 325 325 names.nameList = new ARNameType[amount]; 326 ZeroMemory(names.nameList, sizeof(ARNameType) * amount);326 ARZeroMemory(names.nameList, sizeof(ARNameType) * amount); 327 327 328 328 fieldIds.internalIdList = new ARInternalId[amount]; 329 ZeroMemory(fieldIds.internalIdList, sizeof(ARInternalId) * amount);329 ARZeroMemory(fieldIds.internalIdList, sizeof(ARInternalId) * amount); 330 330 331 331 fieldMaps.mappingList = new ARFieldMappingStruct[amount]; 332 ZeroMemory(fieldMaps.mappingList, sizeof(ARFieldMappingStruct) * amount);332 ARZeroMemory(fieldMaps.mappingList, sizeof(ARFieldMappingStruct) * amount); 333 333 334 334 dataTypes.intList = new unsigned int[amount]; 335 ZeroMemory(dataTypes.intList, sizeof(unsigned int) * amount);335 ARZeroMemory(dataTypes.intList, sizeof(unsigned int) * amount); 336 336 337 337 options.intList = new unsigned int[amount]; 338 ZeroMemory(options.intList, sizeof(unsigned int) * amount);338 ARZeroMemory(options.intList, sizeof(unsigned int) * amount); 339 339 340 340 createModes.intList = new unsigned int[amount]; 341 ZeroMemory(createModes.intList, sizeof(unsigned int) * amount);341 ARZeroMemory(createModes.intList, sizeof(unsigned int) * amount); 342 342 343 343 fieldOptions.intList = new unsigned int[amount]; 344 ZeroMemory(fieldOptions.intList, sizeof(unsigned int) * amount);344 ARZeroMemory(fieldOptions.intList, sizeof(unsigned int) * amount); 345 345 346 346 defaultValues.valueList = new ARValueStruct[amount]; 347 ZeroMemory(defaultValues.valueList, sizeof(ARValueStruct) * amount);347 ARZeroMemory(defaultValues.valueList, sizeof(ARValueStruct) * amount); 348 348 349 349 permLists.permissionList = new ARPermissionList[amount]; 350 ZeroMemory(permLists.permissionList, sizeof(ARPermissionList) * amount);350 ARZeroMemory(permLists.permissionList, sizeof(ARPermissionList) * amount); 351 351 352 352 limits.fieldLimitList = new ARFieldLimitStruct[amount]; 353 ZeroMemory(limits.fieldLimitList, sizeof(ARFieldLimitStruct) * amount);353 ARZeroMemory(limits.fieldLimitList, sizeof(ARFieldLimitStruct) * amount); 354 354 355 355 dInstanceLists.dInstanceList = new ARDisplayInstanceList[amount]; 356 ZeroMemory(dInstanceLists.dInstanceList, sizeof(ARDisplayInstanceList) * amount);356 ARZeroMemory(dInstanceLists.dInstanceList, sizeof(ARDisplayInstanceList) * amount); 357 357 358 358 helpTexts.stringList = new char*[amount]; 359 ZeroMemory(helpTexts.stringList, sizeof(char*) * amount);359 ARZeroMemory(helpTexts.stringList, sizeof(char*) * amount); 360 360 361 361 changedTimes.timestampList = new ARTimestamp[amount]; 362 ZeroMemory(changedTimes.timestampList, sizeof(ARTimestamp) * amount);362 ARZeroMemory(changedTimes.timestampList, sizeof(ARTimestamp) * amount); 363 363 364 364 owners.nameList = new ARAccessNameType[amount]; 365 ZeroMemory(owners.nameList, sizeof(ARAccessNameType) * amount);365 ARZeroMemory(owners.nameList, sizeof(ARAccessNameType) * amount); 366 366 367 367 changedUsers.nameList = new ARAccessNameType[amount]; 368 ZeroMemory(changedUsers.nameList, sizeof(ARAccessNameType) * amount);368 ARZeroMemory(changedUsers.nameList, sizeof(ARAccessNameType) * amount); 369 369 370 370 changeDiary.stringList = new char*[amount]; 371 ZeroMemory(changeDiary.stringList, sizeof(char*) * amount);371 ARZeroMemory(changeDiary.stringList, sizeof(char*) * amount); 372 372 373 373 #if AR_CURRENT_API_VERSION >= AR_API_VERSION_763 374 374 objProps.propsList = new ARPropList[amount]; 375 ZeroMemory(objProps.propsList, sizeof(ARPropList) * amount);375 ARZeroMemory(objProps.propsList, sizeof(ARPropList) * amount); 376 376 #endif 377 377 } -
branches/work_311/lists/ARVUIList.cpp
r549 r610 226 226 { 227 227 ids.internalIdList = new ARInternalId[amount]; 228 ZeroMemory(ids.internalIdList, sizeof(ARInternalId) * amount);228 ARZeroMemory(ids.internalIdList, sizeof(ARInternalId) * amount); 229 229 230 230 names.nameList = new ARNameType[amount]; 231 ZeroMemory(names.nameList, sizeof(ARNameType) * amount);231 ARZeroMemory(names.nameList, sizeof(ARNameType) * amount); 232 232 233 233 locales.localeList = new ARLocaleType[amount]; 234 ZeroMemory(locales.localeList, sizeof(ARLocaleType) * amount);234 ARZeroMemory(locales.localeList, sizeof(ARLocaleType) * amount); 235 235 236 236 types.intList = new unsigned int[amount]; 237 ZeroMemory(types.intList, sizeof(unsigned int) * amount);237 ARZeroMemory(types.intList, sizeof(unsigned int) * amount); 238 238 239 239 dispProps.propsList = new ARPropList[amount]; 240 ZeroMemory(dispProps.propsList, sizeof(ARPropList) * amount);240 ARZeroMemory(dispProps.propsList, sizeof(ARPropList) * amount); 241 241 242 242 helpTexts.stringList = new char*[amount]; 243 ZeroMemory(helpTexts.stringList, sizeof(char*) * amount);243 ARZeroMemory(helpTexts.stringList, sizeof(char*) * amount); 244 244 245 245 changedTimes.timestampList = new ARTimestamp[amount]; 246 ZeroMemory(changedTimes.timestampList, sizeof(ARTimestamp) * amount);246 ARZeroMemory(changedTimes.timestampList, sizeof(ARTimestamp) * amount); 247 247 248 248 owners.nameList = new ARAccessNameType[amount]; 249 ZeroMemory(owners.nameList, sizeof(ARAccessNameType) * amount);249 ARZeroMemory(owners.nameList, sizeof(ARAccessNameType) * amount); 250 250 251 251 changedUsers.nameList = new ARAccessNameType[amount]; 252 ZeroMemory(changedUsers.nameList, sizeof(ARAccessNameType) * amount);252 ARZeroMemory(changedUsers.nameList, sizeof(ARAccessNameType) * amount); 253 253 254 254 changeDiary.stringList = new char*[amount]; 255 ZeroMemory(changeDiary.stringList, sizeof(char*) * amount);255 ARZeroMemory(changeDiary.stringList, sizeof(char*) * amount); 256 256 257 257 #if AR_CURRENT_API_VERSION >= AR_API_VERSION_763 258 258 objProps.propsList = new ARPropList[amount]; 259 ZeroMemory(objProps.propsList, sizeof(ARPropList) * amount);259 ARZeroMemory(objProps.propsList, sizeof(ARPropList) * amount); 260 260 #endif 261 261 } -
branches/work_311/project.cmake/files.cmake
r608 r610 308 308 util/CommandLineValidator.cpp 309 309 util/Context.cpp 310 util/Memory.cpp 310 311 util/RefItem.cpp 311 312 util/ResourceFileLocatorAndExtractor.cpp … … 318 319 util/CommandLineValidator.h 319 320 util/Context.h 321 util/Memory.h 320 322 util/RefItem.h 321 323 util/ResourceFileLocatorAndExtractor.h
Note: See TracChangeset
for help on using the changeset viewer.