componentversion.h File Reference

Go to the source code of this file.

Classes

class  componentversion
 Entrypoint interface for declaring component's version information. Instead of implementing this directly, use DECLARE_COMPONENT_VERSION(). More...
class  componentversion_impl_simple
 Implementation helper. More...
class  componentversion_impl_copy
 Implementation helper. More...
class  componentversion_impl_simple_factory
class  componentversion_impl_copy_factory
class  component_installation_validator
class  component_installation_validator_filename
 Simple implementation of component_installation_validator that makes sure that our component DLL has not been renamed around by idiot users. More...

Defines

#define DECLARE_COMPONENT_VERSION(NAME, VERSION, ABOUT)
#define DECLARE_COMPONENT_VERSION_COPY(NAME, VERSION, ABOUT)   static componentversion_impl_copy_factory g_componentversion_service(NAME,VERSION,ABOUT);
 Same as DECLARE_COMPONENT_VERSION(), but parameters can be dynamically generated strings rather than compile-time constants.
#define VALIDATE_COMPONENT_FILENAME(FN)   static service_factory_single_t<component_installation_validator_filename> g_component_installation_validator_filename(FN);

Typedefs

typedef
service_factory_single_transparent_t
< componentversion_impl_simple
__componentversion_impl_simple_factory
typedef
service_factory_single_transparent_t
< componentversion_impl_copy
__componentversion_impl_copy_factory

Define Documentation

#define DECLARE_COMPONENT_VERSION ( NAME,
VERSION,
ABOUT   ) 
Value:
namespace {class componentversion_myimpl : public componentversion { public: componentversion_myimpl() {PFC_ASSERT( ABOUT );} \
                void get_file_name(pfc::string_base & out) {out = core_api::get_my_file_name();}        \
                void get_component_name(pfc::string_base & out) {out = NAME;}   \
                void get_component_version(pfc::string_base & out) {out = VERSION;}     \
                void get_about_message(pfc::string_base & out) {out = ABOUT;}   \
                }; static service_factory_single_t<componentversion_myimpl> g_componentversion_myimpl_factory; }

Use this to declare your component's version information. Parameters must ba plain const char * string constants. The ABOUT string can be NULL if you don't provide any information to show in the "About" dialog.
Example: DECLARE_COMPONENT_VERSION("blah","v1.337","")

#define DECLARE_COMPONENT_VERSION_COPY ( NAME,
VERSION,
ABOUT   )     static componentversion_impl_copy_factory g_componentversion_service(NAME,VERSION,ABOUT);

Same as DECLARE_COMPONENT_VERSION(), but parameters can be dynamically generated strings rather than compile-time constants.

#define VALIDATE_COMPONENT_FILENAME ( FN   )     static service_factory_single_t<component_installation_validator_filename> g_component_installation_validator_filename(FN);

Typedef Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated by  doxygen 1.6.2