From explorer example below,I was completely confused for property char * which has no any identifier here,is it a anoynmous property or something else?
Thanks for your clarification.
Code: Select all
struct QuickPathTool
{
char path[MAX_LOCATION];
property char * ///------>no identifier here?
{
set
{
char * unquoted;
GetWorkingDir(path, MAX_LOCATION);
if(value[0] == '\"')
StripQuotes(value, unquoted);
else
unquoted = value;
PathCat(path, unquoted);
if(!FileExists(path))
{
// this incomplete functionality is not quite at it's place in this class
int len;
char * original = CopyString(path);
while((len = strlen(path)))
{
StripLastDirectory(path, path);
if(FileExists(path))
{
// TODO: message location does not exist,
// this higher location exists though
// go there?
break;
}
}
if(!len)
{
// TODO: message location does not exist,
// unable to select alternate location
}
path[0] = '\0';
delete original;
}
}
get { return path[0] ? path : null; }
}
property bool { get { return (bool)path[0]; } }
};