Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • cberge/dynamic-graph
  • ostasse/dynamic-graph
  • gsaurel/dynamic-graph
  • stack-of-tasks/dynamic-graph
4 results
Show changes
Commits on Source (78)
Showing
with 718 additions and 327 deletions
---
ColumnLimit: 80
...
# pre-commit run -a (Guilhem Saurel, 2022-07-27)
e9a222fb0a1f236e534e21c66cb623fd8d25b8d6
# pre-commit: details (Guilhem Saurel, 2022-04-14)
1c0f3cc1048a8b2a8206510a51a237b2f1e68a34
# pre-commit run -a (Guilhem Saurel, 2022-03-30)
0c1e6fb50735d4d6cc93e15d3bef202392d47c5b
# clang format defaults + pre-commit (Guilhem Saurel, 2022-03-30)
b6fc5d81e645a84fa8f4d656371adfb27c2b2b23
# [value] Clang format. (Olivier Stasse, 2022-01-09)
b852eef0d56de04ae91a43b1ddbd837ec69ddbe6
# linters: fix clang-check-12 (Guilhem Saurel, 2021-09-14)
ca1b2fc51540b4fcb2cd0b4fccaa33b02738af41
# reformat for clang-format-12 (Guilhem Saurel, 2021-09-07)
ed5899076b7b11c16d9517295e3826dd9b9d80d2
# format (Guilhem Saurel, 2020-11-13)
c54add29f80f6bcd1d05ca741d472491cf74c180
# format (Guilhem Saurel, 2020-07-22)
f4def3bfeaf0f9c9a6d5c5eb01c3a3b2fbb04b2f
# clang format. (Olivier Stasse, 2020-02-03)
70864112c87365af645f0404f881edf36c1ec734
# [clang] Update format. (Olivier Stasse, 2019-08-26)
384b2078e4962d762db4293bf3396be17df4e5c7
# [clang-format] Comply to Google style. (Olivier Stasse, 2019-08-20)
df48199dd436ba8341ae93c7b1f87eb30d0f457a
_build* _build*
*~ .~
\ No newline at end of file compile_commands.json
[submodule "cmake"] [submodule "cmake"]
path = cmake path = cmake
url = git://github.com/jrl-umi3218/jrl-cmakemodules.git url = https://github.com/jrl-umi3218/jrl-cmakemodules.git
[submodule ".travis"]
path = .travis
url = git://github.com/jrl-umi3218/jrl-travis.git
ci:
autoupdate_branch: 'devel'
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v14.0.6
hooks:
- id: clang-format
args: [--style=Google]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:
- id: cmake-format
Subproject commit cbc92f81bdd0dcfd7fc1eae56801d8111267937d
git:
depth: false
language: cpp
sudo: required
compiler:
- gcc
- clang
env:
global:
- DEBSIGN_KEYID=5AE5CD75
- secure: "lEJYxth3fNsmvNS7Ern9+kEpHk4X3Tjo51GBUQBNL6g+YyZJKm4xwBEfwK+sewlmhY3oLUds+5H/2zE27q517kIcpP2Tlp4sRfooJfnBS7YYyF+1boxbvOXrZ2aqev3rzkyvKKMBg0UJTvAiSf7JgVCkMv33GeAX3/I+djEh23U="
- secure: "QTw5QQDaeQWBz6APcUCyl9P9UPI/T3j1++9o9fPxygS9R/7bQYNCrSH++owcAVCJgUI5oY3RmnYk/PjVygOLM0vbFqB2mMySibAhO/U3pSLtZ/HyPjqI9fX0TV/Cf7ji7soeXKk8p6kI2InMILpODLBaLdfm/jgCdAfecr5sGQI="
- secure: "JEcGQsUgEND64cAGVEHSxg8j7SlwofuYtLamANszs/h8FGYZ82rEjmG7r2zqSfBj/i1WsnSbTSsh8WJuXzvV8fw8enkcLEuJG9scQJzuzY8hnLe81o1fhEkclML0SLkLQ2Fu6rIqlKKeYwmJFFhSIj69ESRIkDhkjA1OrV7szzc="
- APT_DEPENDENCIES="doxygen libboost-dev libboost-test-dev libboost-filesystem-dev libboost-system-dev libboost-thread-dev libboost-program-options-dev libeigen3-dev"
- PPA_URI="stack-of-tasks/snapshot"
- NSIQCPPSTYLE_FILEFILTERPATH=cmake/filefilter.txt
notifications:
hipchat:
rooms:
- secure: "SP8KX6gPzBT0BCpcL3ybK4Cgx7a7rmK3Hv/fD2lIf/RUdTwtzLh/J/l9xSYuMZisLe1tM+12vfP7r6t1RNdXrB7pSpYvFRNIWmyfBC7KnUFVn5rwxUnDPhKY3D/XaJ1cycbBJqJdUjYjFKCGEm4x6cpRRN61Ii66RAUvm1h9aHQ="
email:
- hpp-source@laas.fr
branches:
only:
- master
- devel
script: ./travis_custom/build_custom
after_success: ./.travis/run after_success
after_failure: ./.travis/run after_failure
before_install: ./travis_custom/custom_before_install
matrix:
allow_failures:
- compiler: clang
CMAKE_MINIMUM_REQUIRED(VERSION 3.1) cmake_minimum_required(VERSION 3.1)
# Project properties # Project properties
SET(PROJECT_ORG stack-of-tasks) set(PROJECT_ORG stack-of-tasks)
SET(PROJECT_NAME dynamic-graph) set(PROJECT_NAME dynamic-graph)
SET(PROJECT_DESCRIPTION "Dynamic graph library") set(PROJECT_DESCRIPTION "Dynamic graph library")
SET(PROJECT_URL "https://github.com/${PROJECT_ORG}/${PROJECT_NAME}") set(PROJECT_URL "https://github.com/${PROJECT_ORG}/${PROJECT_NAME}")
SET(PROJECT_SUFFIX "-v3")
# Project options # Project options
OPTION(SUFFIX_SO_VERSION "Suffix library name with its version" ON) option(SUFFIX_SO_VERSION "Suffix library name with its version" ON)
# Project configuration # Project configuration
SET(PROJECT_USE_CMAKE_EXPORT TRUE) set(PROJECT_USE_CMAKE_EXPORT TRUE)
SET(CUSTOM_HEADER_DIR ${PROJECT_NAME}) set(CUSTOM_HEADER_DIR ${PROJECT_NAME})
SET(CXX_DISABLE_WERROR TRUE) set(CXX_DISABLE_WERROR TRUE)
# Doxygen setup # Doxygen setup
SET(DOXYGEN_USE_MATHJAX YES) set(DOXYGEN_USE_MATHJAX YES)
SET(DOXYGEN_USE_TEMPLATE_CSS YES) set(DOXYGEN_USE_TEMPLATE_CSS YES)
# JRL-cmakemodule setup # JRL-cmakemodule setup
INCLUDE(cmake/base.cmake) include(cmake/base.cmake)
INCLUDE(cmake/boost.cmake) include(cmake/boost.cmake)
# Project definition # Project definition
COMPUTE_PROJECT_ARGS(PROJECT_ARGS LANGUAGES CXX) compute_project_args(PROJECT_ARGS LANGUAGES CXX)
PROJECT(${PROJECT_NAME} ${PROJECT_ARGS}) project(${PROJECT_NAME} ${PROJECT_ARGS})
CHECK_MINIMAL_CXX_STANDARD(11 ENFORCE) check_minimal_cxx_standard(14 ENFORCE)
INCLUDE(cmake/pthread.cmake) # needs to be included after the CXX definition include(cmake/pthread.cmake) # needs to be included after the CXX definition
# Project dependencies # Project dependencies
FIND_PACKAGE(Boost REQUIRED COMPONENTS unit_test_framework) if(BUILD_TESTING)
ADD_PROJECT_DEPENDENCY(Boost REQUIRED COMPONENTS serialization system thread) find_package(Boost REQUIRED COMPONENTS unit_test_framework)
ADD_PROJECT_DEPENDENCY(Eigen3 REQUIRED PKG_CONFIG_REQUIRES eigen3) endif()
SEARCH_FOR_PTHREAD() add_project_dependency(Boost REQUIRED COMPONENTS serialization system thread)
add_project_dependency(Eigen3 REQUIRED)
search_for_pthread()
if(Boost_VERSION GREATER 107299 OR Boost_VERSION_MACRO GREATER 107299)
# Silence a warning about a deprecated use of boost bind by boost >= 1.73
# without dropping support for boost < 1.73
add_definitions(-DBOOST_BIND_GLOBAL_PLACEHOLDERS)
endif()
# Add configuration headers for plug-ins. # Add configuration headers for plug-ins.
GENERATE_CONFIGURATION_HEADER( generate_configuration_header(${HEADER_DIR} config-tracer.hh DG_TRACER
${HEADER_DIR} config-tracer.hh DG_TRACER tracer_EXPORTS) tracer_EXPORTS)
GENERATE_CONFIGURATION_HEADER( generate_configuration_header(${HEADER_DIR} config-tracer-real-time.hh
${HEADER_DIR} DG_TRACERREALTIME tracer_real_time_EXPORTS)
config-tracer-real-time.hh DG_TRACERREALTIME tracer_real_time_EXPORTS)
# Verbosity level # Verbosity level
IF(NOT (\"${CMAKE_VERBOSITY_LEVEL}\" STREQUAL \"\")) if(NOT (\"${CMAKE_VERBOSITY_LEVEL}\" STREQUAL \"\"))
ADD_DEFINITIONS(-DVP_DEBUG_MODE=${CMAKE_VERBOSITY_LEVEL} -DVP_DEBUG) add_definitions(-DVP_DEBUG_MODE=${CMAKE_VERBOSITY_LEVEL} -DVP_DEBUG)
ENDIF(NOT (\"${CMAKE_VERBOSITY_LEVEL}\" STREQUAL \"\")) endif(NOT (\"${CMAKE_VERBOSITY_LEVEL}\" STREQUAL \"\"))
# Main Library # Main Library
SET(${PROJECT_NAME}_HEADERS set(${PROJECT_NAME}_HEADERS
include/${CUSTOM_HEADER_DIR}/fwd.hh include/${CUSTOM_HEADER_DIR}/fwd.hh
include/${CUSTOM_HEADER_DIR}/debug.h include/${CUSTOM_HEADER_DIR}/debug.h
include/${CUSTOM_HEADER_DIR}/real-time-logger.h include/${CUSTOM_HEADER_DIR}/real-time-logger.h
include/${CUSTOM_HEADER_DIR}/real-time-logger-def.h include/${CUSTOM_HEADER_DIR}/real-time-logger-def.h
include/${CUSTOM_HEADER_DIR}/dynamic-graph-api.h
include/${CUSTOM_HEADER_DIR}/dynamic-graph-api.h include/${CUSTOM_HEADER_DIR}/entity.h
include/${CUSTOM_HEADER_DIR}/factory.h
include/${CUSTOM_HEADER_DIR}/entity.h include/${CUSTOM_HEADER_DIR}/pool.h
include/${CUSTOM_HEADER_DIR}/factory.h include/${CUSTOM_HEADER_DIR}/exception-abstract.h
include/${CUSTOM_HEADER_DIR}/pool.h include/${CUSTOM_HEADER_DIR}/exception-factory.h
include/${CUSTOM_HEADER_DIR}/exception-signal.h
include/${CUSTOM_HEADER_DIR}/exception-abstract.h include/${CUSTOM_HEADER_DIR}/exception-traces.h
include/${CUSTOM_HEADER_DIR}/exception-factory.h include/${CUSTOM_HEADER_DIR}/signal.h
include/${CUSTOM_HEADER_DIR}/exception-signal.h include/${CUSTOM_HEADER_DIR}/signal-array.h
include/${CUSTOM_HEADER_DIR}/exception-traces.h include/${CUSTOM_HEADER_DIR}/signal-base.h
include/${CUSTOM_HEADER_DIR}/signal-ptr.h
include/${CUSTOM_HEADER_DIR}/signal.h include/${CUSTOM_HEADER_DIR}/signal-time-dependent.h
include/${CUSTOM_HEADER_DIR}/signal-array.h include/${CUSTOM_HEADER_DIR}/signal-ptr.t.cpp
include/${CUSTOM_HEADER_DIR}/signal-base.h include/${CUSTOM_HEADER_DIR}/signal.t.cpp
include/${CUSTOM_HEADER_DIR}/signal-ptr.h include/${CUSTOM_HEADER_DIR}/time-dependency.h
include/${CUSTOM_HEADER_DIR}/signal-time-dependent.h include/${CUSTOM_HEADER_DIR}/time-dependency.t.cpp
include/${CUSTOM_HEADER_DIR}/signal-ptr.t.cpp # Kept for a brittle backward compatiblity.
include/${CUSTOM_HEADER_DIR}/signal.t.cpp include/${CUSTOM_HEADER_DIR}/signal-caster.h
include/${CUSTOM_HEADER_DIR}/time-dependency.h include/${CUSTOM_HEADER_DIR}/signal-cast-helper.h
include/${CUSTOM_HEADER_DIR}/time-dependency.t.cpp include/${CUSTOM_HEADER_DIR}/all-signals.h
# Kept for a brittle backward compatiblity. include/${CUSTOM_HEADER_DIR}/signal-helper.h
include/${CUSTOM_HEADER_DIR}/signal-caster.h include/${CUSTOM_HEADER_DIR}/entity-helper.h
include/${CUSTOM_HEADER_DIR}/signal-cast-helper.h include/${CUSTOM_HEADER_DIR}/tracer.h
include/${CUSTOM_HEADER_DIR}/all-signals.h include/${CUSTOM_HEADER_DIR}/tracer-real-time.h
include/${CUSTOM_HEADER_DIR}/signal-helper.h include/${CUSTOM_HEADER_DIR}/command.h
include/${CUSTOM_HEADER_DIR}/entity-helper.h include/${CUSTOM_HEADER_DIR}/eigen-io.h
include/${CUSTOM_HEADER_DIR}/linear-algebra.h
include/${CUSTOM_HEADER_DIR}/tracer.h include/${CUSTOM_HEADER_DIR}/value.h
include/${CUSTOM_HEADER_DIR}/tracer-real-time.h include/${CUSTOM_HEADER_DIR}/command-setter.h
include/${CUSTOM_HEADER_DIR}/command-setter.t.cpp
include/${CUSTOM_HEADER_DIR}/command.h include/${CUSTOM_HEADER_DIR}/command-getter.h
include/${CUSTOM_HEADER_DIR}/eigen-io.h include/${CUSTOM_HEADER_DIR}/command-getter.t.cpp
include/${CUSTOM_HEADER_DIR}/linear-algebra.h include/${CUSTOM_HEADER_DIR}/command-direct-getter.h
include/${CUSTOM_HEADER_DIR}/value.h include/${CUSTOM_HEADER_DIR}/command-direct-setter.h
include/${CUSTOM_HEADER_DIR}/command-bind.h
include/${CUSTOM_HEADER_DIR}/command-setter.h include/${CUSTOM_HEADER_DIR}/all-commands.h
include/${CUSTOM_HEADER_DIR}/command-setter.t.cpp include/${CUSTOM_HEADER_DIR}/logger.h)
include/${CUSTOM_HEADER_DIR}/command-getter.h
include/${CUSTOM_HEADER_DIR}/command-getter.t.cpp set(${PROJECT_NAME}_SOURCES
include/${CUSTOM_HEADER_DIR}/command-direct-getter.h src/debug/debug.cpp
include/${CUSTOM_HEADER_DIR}/command-direct-setter.h src/debug/real-time-logger.cpp
include/${CUSTOM_HEADER_DIR}/command-bind.h src/debug/logger.cpp
include/${CUSTOM_HEADER_DIR}/all-commands.h src/dgraph/entity.cpp
src/dgraph/factory.cpp
include/${CUSTOM_HEADER_DIR}/logger.h src/dgraph/pool.cpp
) src/exception/exception-abstract.cpp
src/exception/exception-factory.cpp
SET(${PROJECT_NAME}_SOURCES src/exception/exception-signal.cpp
src/debug/debug.cpp src/exception/exception-traces.cpp
src/debug/real-time-logger.cpp src/mt/process-list.cpp
src/debug/logger.cpp src/signal/signal-array.cpp
src/command/value.cpp
src/dgraph/entity.cpp src/command/command.cpp)
src/dgraph/factory.cpp
src/dgraph/pool.cpp add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS})
src/exception/exception-abstract.cpp modernize_target_link_libraries(
src/exception/exception-factory.cpp ${PROJECT_NAME}
src/exception/exception-signal.cpp SCOPE
src/exception/exception-traces.cpp PUBLIC
TARGETS
src/mt/process-list.cpp Eigen3::Eigen
INCLUDE_DIRS
src/signal/signal-array.cpp ${EIGEN3_INCLUDE_DIR})
target_include_directories(${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:include>)
src/command/value.cpp target_link_libraries(${PROJECT_NAME} PUBLIC Boost::serialization Boost::system
src/command/command.cpp Boost::thread)
)
if(UNIX)
ADD_LIBRARY(${PROJECT_NAME} SHARED target_link_libraries(${PROJECT_NAME} PUBLIC ${CMAKE_DL_LIBS} pthread)
${${PROJECT_NAME}_SOURCES} ${${PROJECT_NAME}_HEADERS}) endif(UNIX)
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} SYSTEM PUBLIC ${EIGEN3_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}) if(SUFFIX_SO_VERSION)
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:include>) set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} PUBLIC ${Boost_LIBRARIES}) endif(SUFFIX_SO_VERSION)
IF(UNIX) install(
TARGET_LINK_LIBRARIES(${PROJECT_NAME} PUBLIC ${CMAKE_DL_LIBS} pthread) TARGETS ${PROJECT_NAME}
ENDIF(UNIX) EXPORT ${TARGETS_EXPORT_NAME}
DESTINATION lib)
IF(SUFFIX_SO_VERSION)
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION}) set(DYNAMIC_GRAPH_PLUGINDIR "lib/${PROJECT_NAME}-plugins")
ENDIF(SUFFIX_SO_VERSION) set(PACKAGE_EXTRA_MACROS
"set(DYNAMIC_GRAPH_PLUGINDIR ${DYNAMIC_GRAPH_PLUGINDIR})")
INSTALL(TARGETS ${PROJECT_NAME} EXPORT ${TARGETS_EXPORT_NAME} DESTINATION lib) set(PKG_CONFIG_EXTRA "plugindir=${DYNAMIC_GRAPH_PLUGINDIR}")
add_subdirectory(src)
SET(DYNAMIC_GRAPH_PLUGINDIR "${CMAKE_INSTALL_PREFIX}/lib/${PROJECT_NAME}-plugins") if(BUILD_TESTING)
SET(PACKAGE_EXTRA_MACROS "set(DYNAMIC_GRAPH_PLUGINDIR ${DYNAMIC_GRAPH_PLUGINDIR})") add_subdirectory(tests)
SET(PKG_CONFIG_EXTRA "plugindir=${DYNAMIC_GRAPH_PLUGINDIR}") endif(BUILD_TESTING)
SET(CMAKE_INSTALL_RPATH "${DYNAMIC_GRAPH_PLUGINDIR}")
pkg_config_append_libs(${PROJECT_NAME})
ADD_SUBDIRECTORY(src) install(FILES package.xml DESTINATION share/${PROJECT_NAME})
ADD_SUBDIRECTORY(tests)
PKG_CONFIG_APPEND_LIBS(${PROJECT_NAME})
INSTALL(FILES package.xml DESTINATION share/${PROJECT_NAME})
...@@ -129,4 +129,3 @@ stasse (3): ...@@ -129,4 +129,3 @@ stasse (3):
Reinforce the dependant->dependent policy. Merge the florent branch. Makes the test_depend.cpp test works. Reinforce the dependant->dependent policy. Merge the florent branch. Makes the test_depend.cpp test works.
Reinforce the dependant->dependent policy. Reinforce the dependant->dependent policy.
Adding documentation to cmdPlug. Adding documentation to cmdPlug.
...@@ -4,6 +4,7 @@ dynamic-graph ...@@ -4,6 +4,7 @@ dynamic-graph
[![Building status](https://gitlab.laas.fr/stack-of-tasks/dynamic-graph/badges/master/pipeline.svg)](https://gitlab.laas.fr/stack-of-tasks/dynamic-graph/commits/master) [![Building status](https://gitlab.laas.fr/stack-of-tasks/dynamic-graph/badges/master/pipeline.svg)](https://gitlab.laas.fr/stack-of-tasks/dynamic-graph/commits/master)
[![Coverage report](https://gitlab.laas.fr/stack-of-tasks/dynamic-graph/badges/master/coverage.svg?job=doc-coverage)](http://projects.laas.fr/stack-of-tasks/doc/stack-of-tasks/dynamic-graph/master/coverage/) [![Coverage report](https://gitlab.laas.fr/stack-of-tasks/dynamic-graph/badges/master/coverage.svg?job=doc-coverage)](http://projects.laas.fr/stack-of-tasks/doc/stack-of-tasks/dynamic-graph/master/coverage/)
[![License](https://img.shields.io/badge/License-BSD%202--Clause-green.svg)](https://opensource.org/licenses/BSD-2-Clause) [![License](https://img.shields.io/badge/License-BSD%202--Clause-green.svg)](https://opensource.org/licenses/BSD-2-Clause)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/stack-of-tasks/dynamic-graph/master.svg)](https://results.pre-commit.ci/latest/github/stack-of-tasks/dynamic-graph)
This software provides an efficient way to modelize a C++ data-flow. This software provides an efficient way to modelize a C++ data-flow.
......
Subproject commit c6e4768fc40c1da1bdee04354538151b9c898acf Subproject commit 47c0cbf0b29433060682377dcb28266e8dc38995
...@@ -293,7 +293,7 @@ WARN_LOGFILE = @CMAKE_BINARY_DIR@/doc/doxygen.log ...@@ -293,7 +293,7 @@ WARN_LOGFILE = @CMAKE_BINARY_DIR@/doc/doxygen.log
INPUT = @CMAKE_SOURCE_DIR@/include \ INPUT = @CMAKE_SOURCE_DIR@/include \
@CMAKE_SOURCE_DIR@/doc/additionalDoc @CMAKE_SOURCE_DIR@/doc/additionalDoc
# The RECURSIVE tag can be used to turn specify whether or not subdirectories # The RECURSIVE tag can be used to turn specify whether or not subdirectories
# should be searched for input files as well. Possible values are YES and NO. # should be searched for input files as well. Possible values are YES and NO.
...@@ -672,4 +672,4 @@ MATHJAX_FORMAT = SVG ...@@ -672,4 +672,4 @@ MATHJAX_FORMAT = SVG
ALIASES += "cheatsheet=\xrefitem cheatsheet \"Remarkable identity\" \"Cheat sheet\"" ALIASES += "cheatsheet=\xrefitem cheatsheet \"Remarkable identity\" \"Cheat sheet\""
CITE_BIB_FILES += @CMAKE_SOURCE_DIR@/doc/sot.bib CITE_BIB_FILES += @CMAKE_SOURCE_DIR@/doc/sot.bib
\ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
id="svg2" id="svg2"
version="1.1" version="1.1"
inkscape:version="0.47 r22583" inkscape:version="0.47 r22583"
......
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
#include <dynamic-graph/command-setter.h> #include <dynamic-graph/command-setter.h>
#include <dynamic-graph/command.h> #include <dynamic-graph/command.h>
#endif //! DYNAMIC_GRAPH_ALL_COMMANDS_H #endif //! DYNAMIC_GRAPH_ALL_COMMANDS_H
...@@ -12,4 +12,4 @@ ...@@ -12,4 +12,4 @@
#include <dynamic-graph/signal-time-dependent.h> #include <dynamic-graph/signal-time-dependent.h>
#include <dynamic-graph/signal.h> #include <dynamic-graph/signal.h>
#endif //! DYNAMIC_GRAPH_ALL_SIGNALS_H #endif //! DYNAMIC_GRAPH_ALL_SIGNALS_H
This diff is collapsed.
...@@ -15,15 +15,17 @@ ...@@ -15,15 +15,17 @@
* *
*/ */
#include "dynamic-graph/command.h"
#include <boost/assign/list_of.hpp> #include <boost/assign/list_of.hpp>
#include "dynamic-graph/command.h"
/* --- GETTER --------------------------------------------------------- */ /* --- GETTER --------------------------------------------------------- */
namespace dynamicgraph { namespace dynamicgraph {
namespace command { namespace command {
template <class E, typename T> class DirectGetter : public Command { template <class E, typename T>
public: class DirectGetter : public Command {
public:
/// Pointer to method that sets parameter of type T /// Pointer to method that sets parameter of type T
typedef T (E::*GetterMethod)() const; typedef T (E::*GetterMethod)() const;
...@@ -31,10 +33,10 @@ public: ...@@ -31,10 +33,10 @@ public:
DirectGetter(E &entity, T *ptr, const std::string &docString) DirectGetter(E &entity, T *ptr, const std::string &docString)
: Command(entity, std::vector<Value::Type>(), docString), T_ptr(ptr) {} : Command(entity, std::vector<Value::Type>(), docString), T_ptr(ptr) {}
protected: protected:
virtual Value doExecute() { return Value(*T_ptr); } virtual Value doExecute() { return Value(*T_ptr); }
private: private:
T *T_ptr; T *T_ptr;
}; };
...@@ -50,7 +52,7 @@ inline std::string docDirectGetter(const std::string &name, ...@@ -50,7 +52,7 @@ inline std::string docDirectGetter(const std::string &name,
type + ".\n\n"; type + ".\n\n";
} }
} // namespace command } // namespace command
} // namespace dynamicgraph } // namespace dynamicgraph
#endif // __dg_command_direct_getter_h__ #endif // __dg_command_direct_getter_h__
...@@ -15,29 +15,31 @@ ...@@ -15,29 +15,31 @@
* *
*/ */
#include "dynamic-graph/command.h"
#include <boost/assign/list_of.hpp> #include <boost/assign/list_of.hpp>
#include "dynamic-graph/command.h"
/* --- SETTER --------------------------------------------------------- */ /* --- SETTER --------------------------------------------------------- */
namespace dynamicgraph { namespace dynamicgraph {
namespace command { namespace command {
template <class E, typename T> class DirectSetter : public Command { template <class E, typename T>
public: class DirectSetter : public Command {
public:
DirectSetter(E &entity, T *ptr, const std::string &docString) DirectSetter(E &entity, T *ptr, const std::string &docString)
: Command(entity, boost::assign::list_of(ValueHelper<T>::TypeID), : Command(entity, boost::assign::list_of(ValueHelper<T>::TypeID),
docString), docString),
T_ptr(ptr) {} T_ptr(ptr) {}
protected: protected:
virtual Value doExecute() { virtual Value doExecute() {
const std::vector<Value> &values = getParameterValues(); const std::vector<Value> &values = getParameterValues();
T val = values[0].value(); T val = values[0].value();
(*T_ptr) = val; (*T_ptr) = val;
return Value(); // void return Value(); // void
} }
private: private:
T *T_ptr; T *T_ptr;
}; };
...@@ -53,7 +55,7 @@ inline std::string docDirectSetter(const std::string &name, ...@@ -53,7 +55,7 @@ inline std::string docDirectSetter(const std::string &name,
".\nVoid return.\n\n"; ".\nVoid return.\n\n";
} }
} // namespace command } // namespace command
} // namespace dynamicgraph } // namespace dynamicgraph
#endif // __dg_command_direct_setter_h__ #endif // __dg_command_direct_setter_h__
...@@ -41,21 +41,22 @@ namespace command { ...@@ -41,21 +41,22 @@ namespace command {
/// \li T should be a type supported by class Value, /// \li T should be a type supported by class Value,
/// \li prototype of E::getParameter should be exactly as specified in this /// \li prototype of E::getParameter should be exactly as specified in this
/// example. /// example.
template <class E, typename T> class Getter : public Command { template <class E, typename T>
public: class Getter : public Command {
public:
/// Pointer to method that sets parameter of type T /// Pointer to method that sets parameter of type T
typedef T (E::*GetterMethod)() const; typedef T (E::*GetterMethod)() const;
/// Constructor /// Constructor
Getter(E &entity, GetterMethod getterMethod, const std::string &docString); Getter(E &entity, GetterMethod getterMethod, const std::string &docString);
protected: protected:
virtual Value doExecute(); virtual Value doExecute();
private: private:
GetterMethod getterMethod_; GetterMethod getterMethod_;
}; };
} // namespace command } // namespace command
} // namespace dynamicgraph } // namespace dynamicgraph
#include "dynamic-graph/command-getter.t.cpp" #include "dynamic-graph/command-getter.t.cpp"
#endif // DYNAMIC_GRAPH_COMMAND_GETTER_H #endif // DYNAMIC_GRAPH_COMMAND_GETTER_H
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#define DYNAMIC_GRAPH_COMMAND_GETTER_T_CPP #define DYNAMIC_GRAPH_COMMAND_GETTER_T_CPP
#include "dynamic-graph/command-getter.h" #include "dynamic-graph/command-getter.h"
#include <sstream> #include <sstream>
namespace dynamicgraph { namespace dynamicgraph {
...@@ -20,12 +21,13 @@ Getter<E, T>::Getter(E &entity, GetterMethod getterMethod, ...@@ -20,12 +21,13 @@ Getter<E, T>::Getter(E &entity, GetterMethod getterMethod,
: Command(entity, std::vector<Value::Type>(), docstring), : Command(entity, std::vector<Value::Type>(), docstring),
getterMethod_(getterMethod) {} getterMethod_(getterMethod) {}
template <class E, typename T> Value Getter<E, T>::doExecute() { template <class E, typename T>
Value Getter<E, T>::doExecute() {
E &entity = static_cast<E &>(owner()); E &entity = static_cast<E &>(owner());
T value = (entity.*getterMethod_)(); T value = (entity.*getterMethod_)();
return Value(value); return Value(value);
} }
} // namespace command } // namespace command
} // namespace dynamicgraph } // namespace dynamicgraph
#endif // DYNAMIC_GRAPH_COMMAND_GETTER_T_CPP #endif // DYNAMIC_GRAPH_COMMAND_GETTER_T_CPP