Example Active Object Lets demonstrate how this works, using an active object that performs file operations (copy file, delete file, rename file). First, the data structures used internally by our active object. /* type of command. */ typedef enum { CMD_TYPE_TERM = 0, /* terminate internal thread. */ CMD_TYPE_COPY, CMD_TYPE_DEL, CMD_TYPE_RENAME } cmd_type_t; /* a structure for each command type. */ struct cmd_copy_data { char* from; char* to; }; struct cmd_del_data { char* filepath; }; struct cmd_rename_data { char* from; char* to; }; /* a structure for a command. */ struct cmd { cmd_type_t cmd; union { struct cmd_copy_data copy_data; struct cmd_del_data del_data; struct cmd_rename_data rename_data; } u; };