cout << "The CAASysLineSetting program begins ...."<< endl << endl;
// ---------------------------------
// 0 - Get the repository class
// ---------------------------------
CATSettingRepository* SettingRepository = CATSettingRepository::GetRepository("CATProduct");
if (SettingRepository == NULL)
{
cout<<"Fail to get the SettingRepository point."<<endl;
return 0;
}
// ----------------------------------------------------
// 1 - List all the attributes in the repository class
// ----------------------------------------------------
char* oAttributeName = new char[100];
char* oAttributeClass = new char[100];
long* oAttributeSize = 0;
short iReset = 1;
while (SettingRepository->NextAttribute(
oAttributeName,
oAttributeClass,
oAttributeSize,
iReset) == 0)
{
cout << oAttributeName
<< " is an instance of the class "
<< oAttributeClass << endl;
}
// -------------------------------------------------------
// 12- Delete the CAASysLineSetting class
// -------------------------------------------------------
delete SettingRepository;
SettingRepository = NULL ;
delete oAttributeName;
oAttributeName = NULL;
delete oAttributeClass;
oAttributeClass = NULL;
delete oAttributeSize;
oAttributeSize = NULL;
cout << "The CAASysLineSetting program is finished ...."<< endl << endl;
return 0;