Coder Social home page Coder Social logo

tin's People

Contributors

bubba3558 avatar gala377 avatar jgajownik avatar rafalgal avatar

Watchers

 avatar  avatar  avatar

tin's Issues

Rola suffixu _

uint32_t getTypeId_() const;
uint32_t getSize_() const;
uint32_t getId_() const;

suffix "_" dodajemy tylko przy polach klasy protected i privata. Nie ma sensu robić tego w metodach, a tym bardziej w public.

Brakuje virtual

void serialize(Archive &ar, const unsigned int version) {

Nie wiem jak to jest z boostowym serialize. Więc popraw mnie jezeli się mylę, ale ta metoda powinna być virtual, żeby dało się ją przeciążać w klasach dziedziczących.

Do wyrzucenia

deserializingFunctionsMap[typeId] = [](Package *basePackage, const std::string &serialisationString) -> void {
boost::iostreams::basic_array_source<char> device(serialisationString.data(), serialisationString.size());
boost::iostreams::stream<boost::iostreams::basic_array_source<char> > a(device);
boost::archive::binary_iarchive inputArchive(a);
inputArchive & *(basePackage);
inputArchive & *(static_cast<T *>(basePackage));
};
serializingFunctiosMap[typeId] = [](Package *basePackage) -> std::string {
std::string serialisationString;
boost::iostreams::back_insert_device<std::string> inserter(serialisationString);
boost::iostreams::stream<boost::iostreams::back_insert_device<std::string> > s(inserter);
boost::archive::binary_oarchive outputArchive(s);
outputArchive & *basePackage;
outputArchive & *(static_cast<T *>(basePackage));
return serialisationString;

Te linijki wgl nie korzystują z tego, że ta funkcja jest templatowa. Nie ma sensu żeby to wgl tu było.

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.