#include "TreeMask.h"

TreeMask::TreeMask()
{

}

TreeMask::TreeMask(const AgString& mask)
{
   this->mask=mask;
}

bool TreeMask::includes(AgObject *resourceMask)
{
    TreeMask *tm = dynamic_cast<TreeMask *>(resourceMask);
    assert(tm);

	if(mask.empty() ==true)
	{
		return true;
	}
    if(tm->mask.empty()== true)
	{
        return false;
    }
    return tm->mask.find(mask) && tm->mask[mask.length()] == SEPARATOR;
}

AgString TreeMask::toString()
{
	return mask;
}




