Giter VIP home page Giter VIP logo

Comments (7)

SterlingPeet avatar SterlingPeet commented on August 16, 2024 1

The fix that is currently on the devel branch should correct that, I'll wait on other updates to push it to master.

from cookiecutter-fprime-deployment.

SterlingPeet avatar SterlingPeet commented on August 16, 2024

Well, thats a bug. The proposed fix is also buggy, but I agree that it should follow the pattern in the .cpp file. The cheetah template from F Prime upstream looks like this:


  // ----------------------------------------------------------------------
  // Construction, initialization, and destruction
  // ----------------------------------------------------------------------

  ${name}ComponentImpl ::
\#if FW_OBJECT_NAMES == 1
    ${name}ComponentImpl(
$emit_non_port_params([ $param_compName ])
    ) :
      ${component_base}(compName)
\#else
    ${name}ComponentImpl(void)
\#endif
  {

  }

So I think I will use that pattern.

from cookiecutter-fprime-deployment.

SterlingPeet avatar SterlingPeet commented on August 16, 2024

I think the fix actually ends up being this:

  {{cookiecutter.component_slug}}{{cookiecutter.component_explicit_component_suffix}}{{cookiecutter.component_impl_suffix}} ::
#if FW_OBJECT_NAMES == 1
    {{cookiecutter.component_slug}}{{cookiecutter.component_explicit_component_suffix}}{{cookiecutter.component_impl_suffix}}(
        const char *const compName
    ) :
      {{cookiecutter.component_slug}}ComponentBase(compName),
#else
      {{cookiecutter.component_slug}}{{cookiecutter.component_explicit_component_suffix}}{{cookiecutter.component_impl_suffix}}(void),
#endif

from cookiecutter-fprime-deployment.

nathancheek avatar nathancheek commented on August 16, 2024

I think it should not have , at the end of the alternate constructor header definition. Or does that work?

from cookiecutter-fprime-deployment.

SterlingPeet avatar SterlingPeet commented on August 16, 2024

I believe you need the comma for constructor initialization of member variables, which I am using. So, yes I think it works just fine.

from cookiecutter-fprime-deployment.

nathancheek avatar nathancheek commented on August 16, 2024

I just checked and that gives:

error: expected unqualified-id before '{' token

, is not a valid character to come directly after the constructor header definition. You could put : but only if followed by a member variable constructor initialization. Otherwise, it gives the same error as above. , is only meant for separating member variables in the constructor initialization section.

from cookiecutter-fprime-deployment.

SterlingPeet avatar SterlingPeet commented on August 16, 2024

Oh, I see, you are correct, the #if segment has ) : but I messed up the #else segment by putting ),.

from cookiecutter-fprime-deployment.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.