Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to convert an enum class from string#994

Unanswered
AndyFitia asked this question inQ&A
Discussion options

Hey,

So here is an enum class : Test.
enum class Test{ Test1, Test2, Test3 }

And I already had :
template<> inline Test convertFromString(StringView str) {...}.

I tested it within the code and it works fine.

Butthe issue when passing the String"test1" to the InputPort in the Groot2 editor.

It treats that enum class as an integer and I get :
getInput(): Can't convert string [test1] to integer

TheThe TreeNodesModel XML actually says:
<input_port name="type" type="enum Test"/>

Thanks in advance.

You must be logged in to vote

Replies: 0 comments

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
1 participant
@AndyFitia

[8]ページ先頭

©2009-2025 Movatter.jp