They named the boy Tom. What is this structure?

This sentence contains object complement. They are subject, name is predicate, boy is object and Tom is object complement. They chose Tom as their group leader.

Double objects refer to people and things as objects respectively. He gave me an apple.