Skip to content

Commit 32234ab

Browse files
authored
Merge pull request #103 from jhu-cisst/rc-1.3.0
rc 1.3.0
2 parents 052a92a + 78505ea commit 32234ab

File tree

149 files changed

+1677
-3177
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+1677
-3177
lines changed

.github/workflows/macos-latest.yml renamed to .github/workflows/macos-13.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: macOS latest
1+
name: macOS 13
22

33
on:
44
# Triggers the workflow on push or pull request events but only for the master branch
@@ -11,13 +11,13 @@ on:
1111
jobs:
1212
build:
1313

14-
runs-on: macos-latest
14+
runs-on: macos-13
1515

1616
steps:
1717
- uses: actions/checkout@v3
1818

1919
- name: Install Qt
20-
uses: jurplel/install-qt-action@v2
20+
uses: jurplel/install-qt-action@v3
2121
with:
2222
mirror: http://mirrors.ocf.berkeley.edu/qt/
2323

.github/workflows/ubuntu-20.04.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-20.04
1515

1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v3
1818

1919
- name: Install Dependencies
2020
run: |

.github/workflows/ubuntu-22.04.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Ubuntu 22.04
33
on:
44
# Triggers the workflow on push or pull request events but only for the master branch
55
push:
6-
branches: [ devel ]
6+
branches: [ master, devel ]
77

88
# Allows you to run this workflow manually from the Actions tab
99
workflow_dispatch:
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-22.04
1515

1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v3
1818

1919
- name: Install Dependencies
2020
run: |

.github/workflows/windows-2019.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: windows-2019
1515

1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v3
1818

1919
- name: Install Qt
2020
uses: jurplel/install-qt-action@v3

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,33 @@ Change log
22
==========
33

44

5+
1.3.0 (2024-08-30)
6+
==================
7+
8+
* API changes:
9+
* Added `override` for all derived methods
10+
* Removed redefinition of `virtual` in derived classes
11+
* cisstParameterTypes: `prmJointType` is now `cmnJointType` and JSON serialization now uses the string value (not enum number)
12+
* Deprecated features:
13+
* cisstParameterTypes: removed all classes related to transformation graph
14+
* New features
15+
* cisstDataGenerator: added support for enum in global scope, fix for `override`
16+
* cisstParameterTypes: added types `prmImageFrame`, `prmCameraInfo` and `prmDepthMap.h`
17+
* cisstRobot:
18+
* Gravity can be declared as vector
19+
* Uses `cmnJointType`
20+
* Bug fixes:
21+
* CMake:
22+
* `cisst_offer_saw_component` updated to search for `component` or `core` (new SAW directory structure)
23+
* cisstMultiTask:
24+
* Fix for `mtsManagerLocal.GetInstance`
25+
* cisstParameterTypes:
26+
* More `CISST_EXPORT` for Windows
27+
* Added new data types for SWIG wrapping
28+
* Fixed `prmActuatorState::ToStream`
29+
* Added missing `break` in `prmOperatingState.cpp`
30+
* Fixed some GitHub actions/workflows
31+
532
1.2.1 (2022-12-29)
633
==================
734

CMakeLists.txt

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## -*- Mode: CMAKE; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
22

33
#
4-
# (C) Copyright 2005-2023 Johns Hopkins University (JHU), All Rights Reserved.
4+
# (C) Copyright 2005-2024 Johns Hopkins University (JHU), All Rights Reserved.
55
#
66
# --- begin cisst license - do not edit ---
77
#
@@ -16,7 +16,7 @@
1616
cmake_minimum_required (VERSION 3.10)
1717

1818
# cisst (Computer Integrated Surgical Systems and Technology)
19-
project (cisst VERSION 1.2.1)
19+
project (cisst VERSION 1.3.0)
2020

2121
# cisst compiler settings
2222
include (cmake/cisstSettings.cmake)
@@ -159,7 +159,7 @@ set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CISST_CMAKE_SOURCE_DIR}")
159159
include (cisstMacros)
160160
include (cisstInternalMacros)
161161

162-
# Set CISST_CATKIN_BUILT
162+
# Set CISST_CATKIN_BUILT. For ROS2, see colcon.pkg
163163
cisst_is_catkin_build (CISST_CATKIN_BUILT)
164164

165165
# Destination for CMake package config files
@@ -818,6 +818,17 @@ if (UNIX)
818818
configure_file ("${cisst_SOURCE_DIR}/utils/cisstvars.sh.in"
819819
"${CISST_SCRIPTS_DIRECTORY}/cisstvars.sh"
820820
@ONLY)
821+
822+
# installed version
823+
configure_file (
824+
"${cisst_SOURCE_DIR}/utils/cisstvars.sh.installed.in"
825+
"${cisst_BINARY_DIR}/utils/cisstvars.sh.installed"
826+
@ONLY)
827+
install (
828+
PROGRAMS "${cisst_BINARY_DIR}/utils/cisstvars.sh.installed"
829+
DESTINATION bin
830+
RENAME "cisstvars.sh")
831+
821832
endif (UNIX)
822833

823834
# License file

cisstCommon/CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#
2-
#
3-
# (C) Copyright 2005-2012 Johns Hopkins University (JHU), All Rights
4-
# Reserved.
2+
# (C) Copyright 2005-2024 Johns Hopkins University (JHU), All Rights Reserved.
53
#
64
# --- begin cisst license - do not edit ---
75
#
@@ -14,8 +12,12 @@
1412
# All cisstCommon libraries
1513
project (cisstCommonLibs)
1614

15+
# cisstDataGenerator must be compiled first
16+
if (NOT CMAKE_CROSSCOMPILING)
17+
add_subdirectory (applications/cisstDataGenerator)
18+
endif()
19+
1720
add_subdirectory (code)
18-
add_subdirectory (applications)
1921

2022
cisst_offer_python (cisstCommon)
2123
cisst_offer_tests_python (cisstCommon)
Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#
2-
#
3-
# (C) Copyright 2005-2011 Johns Hopkins University (JHU), All Rights
4-
# Reserved.
2+
# (C) Copyright 2005-2024 Johns Hopkins University (JHU), All Rights Reserved.
53
#
64
# --- begin cisst license - do not edit ---
75
#
@@ -13,8 +11,3 @@
1311

1412
# All cisstCommon applications
1513
project (cisstCommonApplications)
16-
17-
# data generator should always be compiled so we don't use cisst_offer_application
18-
if (NOT CMAKE_CROSSCOMPILING)
19-
add_subdirectory (cisstDataGenerator)
20-
endif (NOT CMAKE_CROSSCOMPILING)

cisstCommon/applications/cisstDataGenerator/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- Mode: CMAKE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
22
# ex: set filetype=cmake softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab:
33
#
4-
# (C) Copyright 2010-2015 Johns Hopkins University (JHU), All Rights Reserved.
4+
# (C) Copyright 2010-2024 Johns Hopkins University (JHU), All Rights Reserved.
55
#
66
# --- begin cisst license - do not edit ---
77
#
@@ -81,3 +81,5 @@ add_dependencies (cisstDataGenerator cisstRevision)
8181
install (TARGETS cisstDataGenerator
8282
COMPONENT cisstCommon
8383
RUNTIME DESTINATION bin)
84+
85+

cisstCommon/applications/cisstDataGenerator/cdgBaseClass.h

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
/* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
33

44
/*
5-
65
Author(s): Anton Deguet
76
Created on: 2010-09-06
87
9-
(C) Copyright 2010-2013 Johns Hopkins University (JHU), All Rights
10-
Reserved.
8+
(C) Copyright 2010-2023 Johns Hopkins University (JHU), All Rights Reserved.
119
1210
--- begin cisst license - do not edit ---
1311
@@ -16,7 +14,6 @@ no warranty. The complete license can be found in license.txt and
1614
http://www.cisst.org/cisst/license.txt.
1715
1816
--- end cisst license ---
19-
2017
*/
2118

2219
#ifndef _cdgBaseClass_h
@@ -33,12 +30,12 @@ class cdgBaseClass: public cdgScope
3330

3431
public:
3532
cdgBaseClass(size_t lineNumber);
36-
cdgScope::Type GetScope(void) const;
37-
cdgScope * Create(size_t lineNumber) const;
38-
bool Validate(std::string & errorMessage);
33+
cdgScope::Type GetScope(void) const override;
34+
cdgScope * Create(size_t lineNumber) const override;
35+
bool Validate(std::string & errorMessage) override;
3936
void GenerateHeaderInheritance(std::ostream & outputStream) const;
40-
void GenerateHeader(std::ostream & outputStream) const;
41-
void GenerateCode(std::ostream & outputStream) const;
37+
void GenerateHeader(std::ostream & outputStream) const override;
38+
void GenerateCode(std::ostream & outputStream) const override;
4239

4340
private:
4441
cdgBaseClass(void); // make sure constructor with line number is always used.

cisstCommon/applications/cisstDataGenerator/cdgClass.cpp

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Author(s): Anton Deguet
66
Created on: 2010-09-06
77
8-
(C) Copyright 2010-2021 Johns Hopkins University (JHU), All Rights Reserved.
8+
(C) Copyright 2010-2024 Johns Hopkins University (JHU), All Rights Reserved.
99
1010
--- begin cisst license - do not edit ---
1111
@@ -128,7 +128,10 @@ bool cdgClass::Validate(std::string & CMN_UNUSED(errorMessage))
128128
}
129129
}
130130
for (size_t index = 0; index < Members.size(); index++) {
131-
Members[index]->ClassName = this->ClassWithNamespace(); // this->GetFieldValue("name");
131+
Members[index]->ClassName = this->ClassWithNamespace();
132+
}
133+
for (size_t index = 0; index < Enums.size(); index++) {
134+
Enums[index]->ClassName = this->ClassWithNamespace();
132135
}
133136

134137
return true;
@@ -231,26 +234,42 @@ void cdgClass::GenerateHeader(std::ostream & outputStream) const
231234
// global functions for enums have to be declared after the enum is defined
232235
const std::string classWithNamespace = this->ClassWithNamespace();
233236
for (index = 0; index < Enums.size(); ++index) {
234-
Enums[index]->GenerateDataFunctionsHeader(outputStream, classWithNamespace, this->GetFieldValue("attribute"));
237+
Enums[index]->GenerateDataFunctionsHeader(outputStream, this->GetFieldValue("attribute"));
235238
}
236239

237240
}
238241

239242

240243
void cdgClass::GenerateStandardMethodsHeader(std::ostream & outputStream) const
241244
{
245+
std::string overrides = "";
246+
for (size_t index = 0; index < BaseClasses.size(); index++) {
247+
if (BaseClasses[index]->GetFieldValue("is-data") == "true") {
248+
overrides = " override";
249+
break;
250+
}
251+
}
252+
242253
outputStream << " /* default methods */" << std::endl
243254
<< " public:" << std::endl
244-
<< " void SerializeRaw(std::ostream & outputStream) const;" << std::endl
245-
<< " void DeSerializeRaw(std::istream & inputStream);" << std::endl
246-
<< " void ToStream(std::ostream & outputStream) const;" << std::endl
255+
<< " void SerializeRaw(std::ostream & outputStream) const" << overrides << ";" << std::endl
256+
<< " void DeSerializeRaw(std::istream & inputStream)" << overrides << ";" << std::endl
257+
<< " void ToStream(std::ostream & outputStream) const" << overrides << ";" << std::endl
247258
<< " void ToStreamRaw(std::ostream & outputStream, const char delimiter = ' '," << std::endl
248-
<< " bool headerOnly = false, const std::string & headerPrefix = \"\") const;" << std::endl;
259+
<< " bool headerOnly = false, const std::string & headerPrefix = \"\") const" << overrides << ";" << std::endl;
249260
}
250261

251262

252263
void cdgClass::GenerateDataMethodsHeader(std::ostream & outputStream) const
253264
{
265+
std::string overrides = "";
266+
for (size_t index = 0; index < BaseClasses.size(); index++) {
267+
if (BaseClasses[index]->GetFieldValue("is-data") == "true") {
268+
overrides = " override";
269+
break;
270+
}
271+
}
272+
254273
std::string name = this->GetFieldValue("name");
255274
outputStream << " /* default data methods */" << std::endl
256275
<< " public:" << std::endl
@@ -261,13 +280,13 @@ void cdgClass::GenerateDataMethodsHeader(std::ostream & outputStream) const
261280
<< " std::string SerializeDescription(const char delimiter = ',', const std::string & userDescription = \"\") const;" << std::endl
262281
<< " void DeSerializeText(std::istream & inputStream, const char delimiter = ',') CISST_THROW(std::runtime_error);" << std::endl
263282
<< " std::string HumanReadable(void) const;" << std::endl
264-
<< " bool ScalarNumberIsFixed(void) const;" << std::endl
265-
<< " size_t ScalarNumber(void) const;" << std::endl
266-
<< " double Scalar(const size_t index) const CISST_THROW(std::out_of_range);" << std::endl
267-
<< " std::string ScalarDescription(const size_t index, const std::string & userDescription = \"\") const CISST_THROW(std::out_of_range);" << std::endl
283+
<< " bool ScalarNumberIsFixed(void) const" << overrides << ";" << std::endl
284+
<< " size_t ScalarNumber(void) const" << overrides << ";" << std::endl
285+
<< " double Scalar(const size_t index) const CISST_THROW(std::out_of_range)" << overrides << ";" << std::endl
286+
<< " std::string ScalarDescription(const size_t index, const std::string & userDescription = \"\") const CISST_THROW(std::out_of_range)" << overrides << ";" << std::endl
268287
<< "#if CISST_HAS_JSON" << std::endl
269-
<< " void SerializeTextJSON(Json::Value & jsonValue) const;" << std::endl
270-
<< " void DeSerializeTextJSON(const Json::Value & jsonValue) CISST_THROW(std::runtime_error);" << std::endl
288+
<< " void SerializeTextJSON(Json::Value & jsonValue) const" << overrides << ";" << std::endl
289+
<< " void DeSerializeTextJSON(const Json::Value & jsonValue) CISST_THROW(std::runtime_error)" << overrides << ";" << std::endl
271290
<< "#endif // CISST_HAS_JSON" << std::endl
272291
<< std::endl;
273292
}
@@ -896,7 +915,7 @@ void cdgClass::GenerateDataFunctionsCode(std::ostream & outputStream) const
896915
<< "#endif // CISST_HAS_JSON" << std::endl;
897916

898917
for (index = 0; index < Enums.size(); ++index) {
899-
Enums[index]->GenerateDataFunctionsCode(outputStream, className);
918+
Enums[index]->GenerateDataFunctionsCode(outputStream);
900919
}
901920
}
902921

cisstCommon/applications/cisstDataGenerator/cdgClass.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Author(s): Anton Deguet
66
Created on: 2010-09-06
77
8-
(C) Copyright 2010-2021 Johns Hopkins University (JHU), All Rights Reserved.
8+
(C) Copyright 2010-2023 Johns Hopkins University (JHU), All Rights Reserved.
99
1010
--- begin cisst license - do not edit ---
1111
@@ -64,11 +64,11 @@ class cdgClass: public cdgScope
6464

6565
public:
6666
cdgClass(size_t lineNumber);
67-
cdgScope::Type GetScope(void) const;
68-
cdgScope * Create(size_t lineNumber) const;
69-
bool Validate(std::string & errorMessage);
70-
void GenerateHeader(std::ostream & outputStream) const;
71-
void GenerateCode(std::ostream & outputStream) const;
67+
cdgScope::Type GetScope(void) const override;
68+
cdgScope * Create(size_t lineNumber) const override;
69+
bool Validate(std::string & errorMessage) override;
70+
void GenerateHeader(std::ostream & outputStream) const override;
71+
void GenerateCode(std::ostream & outputStream) const override;
7272

7373
protected:
7474

0 commit comments

Comments
 (0)