Wow, my brother has a similar problem. He is a psychologist, and his wife thinks he shouldn't have to interact with anyone the moment he gets home.
Well, computer code is becoming simpler and simpler to understand, unlike law.
We started with Assembly, and then went to C, then C++, then java, and so on.
No, this is not the case, atleast not in the USA.
Without a warrant officers are limited to
1.) A patdown search for weapons if they feel threatened.
2.) A detailed search of a PERSON when that person enters custody.
3.) A search of the "wingspan" of a person when they enter custody.
4.) A cursory search of the premises in which someone was arrested if they have reason to believe an accomplice is hiding.
5.) When the owner consents to the search.
I've noticed several design suggestions in your code.