::SHE+ILA::'s C++ FBI class [$64]

Elegant Women in Violet Velvet Dresses in Luxurious Setting
20
0
  • Squishy Plushie's avatar Artist
    Squishy Pl...
  • Prompt
    Read prompt
  • DDG Model
    DaVinci2
  • Access
    Public
  • Created
    5h ago
  • Try

More about ::SHE+ILA::'s C++ FBI class [$64]

So that we can test and run certain ::SHE+ILA:: programs under MS-Windows etc., we have bundled the important FBI (Fundamental Buffer Interface) operators into a class :
class FBI {
FBI& operator <= (Buf& buf); // This is used as the Specify operator, since C++ does not allow the "<::" syntax :)
FBI& operator -> (Buf& buf); // This is used as the Instantiate operator, for the above reason
FBI& operator << (Buf& buf); // Insert
FBI& operator >>= (Buf& buf); // Extract
Buf operator + (Buf& buf); // This is used as the "#" (length) operator
FBI& operator [] (Buf& buf); // Subscript, but C++ doesn't like an inline vector here (such as [1, 2, 3])
FBI& operator() (int opcode, buf& buf); // Reduce (since "op/" is nonsense to C++)
};
Plus appropriate constructors and destructors. We have omitted the "reflected" versions of the FBI operators, because they are redundant,
e.g. "::>" can be put on the other end of the expression as "<::", etc.
Also we have omitted the "Wait" (?x and x?) operators for now (we can use a named method, such as WaitFull() and WaitEmpty() ).
The Index versions of these operators can be coded with an ancilliary class,
for example a <<[N] b can be written as
a << woo(N, b), where woo builds a tuple to be used by "<<".

Comments


Loading Dream Comments...

Discover more dreams from this artist