Back to index

lightning-sunbird  0.9+nobinonly
rcascii.h File Reference

Go to the source code of this file.


class PR_IMPLEMENT (RCFormatStuff)
class PR_IMPLEMENT (RCFormatBuffer)
class PR_IMPLEMENT (RCFormat)
class PR_IMPLEMENT (RCPrint)

Function Documentation

class PR_IMPLEMENT ( RCFormatStuff  )

Definition at line 53 of file rcascii.h.

    virtual ~RCFormatStuff();

    ** Process the arbitrary argument list using as indicated by
    ** the 'fmt' string. Each segment of the processing the stuff
    ** function is called with the relavent translation.
    virtual PRInt32 Sx_printf(void *state, const char *fmt, ...);

    ** The 'state' argument is not processed by the runtime. It
    ** is merely passed from the Sx_printf() call. It is intended
    ** to be used by the client to figure out what to do with the
    ** new string.
    ** The new string ('stuff') is ASCII translation driven by the
    ** Sx_printf()'s 'fmt' string. It is not guaranteed to be a null
    ** terminated string.
    ** The return value is the number of bytes copied from the 'stuff'
    ** string. It is accumulated for each of the calls to the stuff
    ** function and returned from the original caller of Sx_printf().
    virtual PRSize StuffFunction(
        void *state, const char *stuff, PRSize stufflen) = 0;
};  /* RCFormatStuff */
class PR_IMPLEMENT ( RCFormatBuffer  )

Definition at line 91 of file rcascii.h.

                                  : public RCFormatStuff
    virtual ~RCFormatBuffer();

    ** Format the trailing arguments as indicated by the 'fmt'
    ** string. Put the result in 'buffer'. Return the number
    ** of bytes moved into 'buffer'. 'buffer' will always be
    ** a properly terminated string even if the convresion fails.
    virtual PRSize Sn_printf(
        char *buffer, PRSize length, const char *fmt, ...);

    virtual char *Sm_append(char *buffer, const char *fmt, ...);

    ** This class overrides the stuff function, does not preserve
    ** its virtual-ness and no longer allows the clients to call
    ** it in the clear. In other words, it is now the implementation
    ** for this class.
    PRSize StuffFunction(void*, const char*, PRSize);
};  /* RCFormatBuffer */
class PR_IMPLEMENT ( RCFormat  )

Definition at line 128 of file rcascii.h.

                            : pubic RCFormatBuffer
    virtual ~RCFormat();

    ** Translate the trailing arguments according to the 'fmt'
    ** string and store the results in the object.
    virtual PRSize Sm_printf(const char *fmt, ...);

    ** Extract the latest translation.
    ** The object does not surrender the memory occupied by
    ** the string. If the caller wishes to modify the data,
    ** it must first be copied.
    const char*();

    char *buffer;

    RCFormat(const RCFormat&);
    RCFormat& operator=(const RCFormat&);
}; /* RCFormat */
class PR_IMPLEMENT ( RCPrint  )

Definition at line 162 of file rcascii.h.

                           : public RCFormat
    virtual ~RCPrint();
    RCPrint(RCIO* output);
    RCPrint(RCFileIO::SpecialFile output);

    virtual PRSize Printf(const char *fmt, ...);
};  /* RCPrint */