Commit 413e4a84 authored by Paul Asmuth's avatar Paul Asmuth
Browse files

move command list into signaltk_cmd.cc

parent 4ceb933c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ add_subdirectory(src/signaltk/core)
add_subdirectory(src/signaltk/plot)
add_subdirectory(src/signaltk/util)

add_executable(signaltk src/signaltk_cli.cc src/signaltk.cc)
add_executable(signaltk src/signaltk_cli.cc src/signaltk_cmd.cc src/signaltk.cc)
target_link_libraries(signaltk signaltk-plot signaltk-graphics signaltk-util ${CAIRO_LIBRARIES})

add_custom_target(check ALL DEPENDS signaltk COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/test/test_runner.sh")
+0 −16
Original line number Diff line number Diff line
@@ -14,22 +14,6 @@

namespace signaltk {

const std::vector<Command> command_list {

  // command: img new
  Command {
    .name = {"img", "new"},
    .fn = &cmd_image_new,
  },

  // command: plot gridlines
  Command {
    .name = {"plot", "gridlines"},
    .fn = &cmd_plot_gridlines,
  },

};

int cmd(
    Context* ctx,
    const char** args,

src/signaltk_cmd.cc

0 → 100644
+33 −0
Original line number Diff line number Diff line
/**
 * This file is part of the "FnordMetric" project
 *   Copyright (c) 2018 Paul Asmuth
 *
 * FnordMetric is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License v3.0. You should have received a
 * copy of the GNU General Public License along with this program. If not, see
 * <http://www.gnu.org/licenses/>.
 */
#include <signaltk.h>
#include <signaltk/core/image_api.h>
#include <signaltk/plot/plot_api.h>

namespace signaltk {

const std::vector<Command> command_list {

  // command: img new
  Command {
    .name = {"img", "new"},
    .fn = &cmd_image_new,
  },

  // command: plot gridlines
  Command {
    .name = {"plot", "gridlines"},
    .fn = &cmd_plot_gridlines,
  },

};

} // namespace signaltk