Search found 27 matches

by acDev
Thu Oct 10, 2013 9:30 am
Forum: Support - RCF
Topic: How to hide the same code (not using MACRO) ?
Replies: 3
Views: 5452

Re: How to hide the same code (not using MACRO) ?

This will remove the duplication for you: .... But if the features have different number of arguments? Now I've done this: #define M_PREFIX \ int hr = NOERROR; \ int xi = 0; \ do { \ try { #define M_POSTFIX \ } \ catch (const RCF::Exception & e) \ { \ hr = E_FAIL; \ if (!xi && e.getErrorId() != RCF...
by acDev
Thu Oct 10, 2013 8:05 am
Forum: Wish List
Topic: Make an object ServerImpl individually for each RcfSession.
Replies: 3
Views: 10433

Make an object ServerImpl individually for each RcfSession.

Now we have to create an object ServerImpl globally (or on a stack). class ServerImpl { public: void Print(const std::string & s) { std::cout << "I_Server service: " << s << std::endl; } }; int main() { ... ServerImpl g_srv; server.bind<I_Server>(g_srv); ... return 0; } I would like to object Server...
by acDev
Thu Oct 10, 2013 7:42 am
Forum: Support - RCF
Topic: How to hide the same code (not using MACRO) ?
Replies: 3
Views: 5452

How to hide the same code (not using MACRO) ?

Client-side code: // interface (C-style) int NI_Print(const std::string & text); int NI_PrintSL(const QStringList & text); int NI_Print(const std::string & text) { int hr = NOERROR; int xi = 0; do { try { hr = g_rcfclnt->Print(text); } catch (const RCF::Exception & e) { hr = E_FAIL; if (!xi && e.get...
by acDev
Wed Oct 09, 2013 7:16 pm
Forum: Support - RCF
Topic: [SF] How serialize C-array of fundamental type ?
Replies: 1
Views: 4002

[SF] How serialize C-array of fundamental type ?

Code: Select all

class MyClass
{
public:
    int size;
    char buffer[64];    // StaticArray
    void serialize(SF::Archive &ar)
    {
        ar & size & ??????;
    }
}
Documentation on this subject is empty.

PS. preserialize -> SerializeStaticArray ?
by acDev
Wed Oct 09, 2013 3:00 pm
Forum: Support - RCF
Topic: [SF] Serialization Qt classes (with examples)
Replies: 5
Views: 9686

Re: [SF] Serialization Qt classes (with examples)

In the first post changed the implementation QString. Serialization QByteArray. File "SF/QByteArray.hpp" #ifndef INCLUDE_SF_QBYTEARRAY_HPP #define INCLUDE_SF_QBYTEARRAY_HPP #include <QByteArray> #include <boost/config.hpp> #include <SF/Archive.hpp> #include <SF/Stream.hpp> namespace SF { // QByteArr...
by acDev
Wed Oct 09, 2013 6:42 am
Forum: Support - RCF
Topic: [SF] Serialization Qt classes (with examples)
Replies: 5
Views: 9686

Re: [SF] Serialization Qt classes (with examples)

jarl wrote:Thanks - that's great! If you don't mind, I will include this in the RCF distribution, for the other QT users out there.
Of course, you can include.

At week plan to do serialization of the following classes: QByteArray, QRgb, QDateTime, QMap, QPair, QHostAddress.
by acDev
Tue Oct 08, 2013 3:16 pm
Forum: Support - RCF
Topic: [SF] Serialization Qt classes (with examples)
Replies: 5
Views: 9686

[SF] Serialization Qt classes (with examples)

Just realized the serialization support the following classes: QString, QList<T>, QStringList. File "SF/include/QString.hpp" #ifndef INCLUDE_SF_QSTRING_HPP #define INCLUDE_SF_QSTRING_HPP #include <QByteArray> #include <QString> #include <boost/config.hpp> #include <SF/Archive.hpp> #include <SF/Strea...