you can use a templated function for this - we only don't use templates in ProtobufFile since we are overloading CFile's various functions and overloading and templates is a pain in C++