-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Position implementation change #1510
Open
bam241
wants to merge
15
commits into
cyclus:main
Choose a base branch
from
bam241:position
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
4add0ce
some change in position
bam241 98a8e7c
restauring agent state
bam241 0aab955
remove position deps in agent.cc, add include snippet, restaure posit…
bam241 b72b431
add missing include snippet
bam241 67e4659
fix position.cycpp
bam241 b54a56d
clang-format
bam241 fda3e98
add coordinate in the commun include snippet, fix format of the coord…
bam241 1809717
add some comment in position.cycpp and rename it into position.h.cycpp
bam241 81e56b8
add missin quote, rename to position.cycpp.h to allow syntax highligh…
bam241 b801c85
change the CMakeFile accordingly
bam241 003f635
fix CMakeList
bam241 b08344a
clang-format
bam241 d5ffd15
add missing file, got lost in the renamaing
bam241 8916efc
Update src/toolkit/position.cycpp.h
bam241 c8bce6d
add header initialisation in the snippet
bam241 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
// This includes the required header to add geographic coordinates to a | ||
// archetypes. | ||
// One only need to: | ||
// - '#include "toolkit/position.cycpp.h"' in the core of the archetype class (as | ||
// private) | ||
// - and in the EnterNotify() method: | ||
// - set the coordinates 'coordinates = cyclus::toolkit::Position(latitude, | ||
// longitude);' | ||
// - call the record method: 'coordinates.RecordPosititon(this);' | ||
|
||
cyclus::toolkit::Position coordinates(0,0); | ||
|
||
#pragma cyclus var { \ | ||
"default": 0.0, \ | ||
"uilabel": "Geographical latitude in degrees as a double", \ | ||
"doc": "Latitude of the agent's geographical position. The value should " \ | ||
"be expressed in degrees as a double." \ | ||
} | ||
double latitude; | ||
// required for compilation but not added by the cycpp preprocessor... | ||
std::vector<int> cycpp_shape_latitude = 0; | ||
|
||
#pragma cyclus var { \ | ||
"default": 0.0, \ | ||
"uilabel": "Geographical longitude in degrees as a double", \ | ||
"doc": "Longitude of the agent's geographical position. The value should " \ | ||
"be expressed in degrees as a double." \ | ||
} | ||
double longitude; | ||
// required for compilation but not added by the cycpp preprocessor... | ||
std::vector<int> cycpp_shape_longitude = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thinks we need a longer message here that explains how it all works, since it is a brand new concept,
Also, can we use one of the archetypes that’s in
cyclus/cyclus
to demonstrate?