Yes, but not an easy way!
You'd have to use the enumerators: i've created several functions that find buildings, using enumerators.
Open the Enumerators.h to see what enumerators you have. Select the one you want to use (eg. PlayerBuildingEnum for buildings of a certain player), then use GetNext to browse through all the buildings that player has:
Unit u;
PlayerBuildingEnum enum1(1, mapVehicleFactory);
while (enum1.GetNext(u))
{
// this code here will get executed for each VF it finds (for this particular player)
}