Skip to content

Instantly share code, notes, and snippets.

@rondreas
Created May 4, 2021
Embed
What would you like to do?
Hello world for Modo
#include <lx_log.hpp>
#include <lxu_log.hpp>
#include <lxu_command.hpp>
#define SRVNAME_COMMAND "hello.world"
class CHelloCommand : public CLxCommand
{
public:
CLxUser_LogService log_service;
void execute()
{
log_service.DebugOut(LXi_DBLOG_NORMAL, "Hello, World!");
}
};
static CLxMeta_Command<CHelloCommand> cmd_meta(SRVNAME_COMMAND);
static class CRoot : public CLxMetaRoot
{
bool pre_init() LXx_OVERRIDE
{
cmd_meta.set_type_UI();
add(&cmd_meta);
return false;
}
} root_meta;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment