Giter Club home page Giter Club logo

Comments (4)

0xDEAD avatar 0xDEAD commented on May 28, 2024

Of course this feature could be optional (enabled with a parameter, disabled by default) to avoid "pollution with C++11-code" for legacy users of the generated code

from zserio.

0xDEAD avatar 0xDEAD commented on May 28, 2024

Patch for arrays (arrays of base integer types and complex types):

Runtime

Container(const std::initialize_list<ELEMENT_TYPE>& list) : Container()
{
    assign(list.begin(), list.end());
}

ArrayBase(const container_type& c)
        : container_type(c) {}

BieFieldArray(const typename ArrayBase<ARRAY_TRAITS>::container_type& container)
        : ArrayBase<ARRAY_TRAITS>(container) {}

ObjectArray(const typename ArrayBAse<detail::object_array_traits<OBJECT>>::container_type& container)
        : ObjectArray<ARRAY_TRAITS>(container) {}

Generated class for the compound type that contains the array (depends on type!)

void ArrayExample::setList(const zserio::UInt8Array::container_type &list)
{
    m_list = zserio::UInt8Array(list);
}

void ArrayExample::setList(const zserio::ObjectArray<test::MyType>& list)
{
    m_list = zserio::ObjectArray<test::MyType>(liste);
}

from zserio.

mikir avatar mikir commented on May 28, 2024

We will try to keep this issue in mind during design of new C++11 emitter within issue #108.

from zserio.

Mi-La avatar Mi-La commented on May 28, 2024

Will be solved by field constructors implemented in #108.

from zserio.

Related Issues (20)

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.