Ignore:
Timestamp:
Jan 10, 2019, 3:50:34 PM (5 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
d97c3a4
Parents:
aeb8f70 (diff), 08222c7 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Aaron Moss <a3moss@…> (01/10/19 14:46:09)
git-committer:
Aaron Moss <a3moss@…> (01/10/19 15:50:34)
Message:

Merge remote-tracking branch 'plg/master' into deferred_resn

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/iostream.hfa

    raeb8f70 re99e43f  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Aug 11 08:22:49 2018
    13 // Update Count     : 156
     12// Last Modified On : Mon Dec 24 18:33:40 2018
     13// Update Count     : 220
    1414//
    1515
     
    2020trait ostream( dtype ostype ) {
    2121        // private
    22         bool sepPrt( ostype & );                                                        // return separator state (on/off)
     22        bool sepPrt( ostype & );                                                        // get separator state (on/off)
    2323        void sepReset( ostype & );                                                      // set separator state to default state
    2424        void sepReset( ostype &, bool );                                        // set separator and default state
    2525        const char * sepGetCur( ostype & );                                     // get current separator string
    2626        void sepSetCur( ostype &, const char * );                       // set current separator string
    27         bool getNL( ostype & );                                                 // check newline
     27        bool getNL( ostype & );                                                         // check newline
    2828        void setNL( ostype &, bool );                                           // saw newline
     29        bool getANL( ostype & );                                                        // get auto newline (on/off)
     30        bool getPrt( ostype & );                                                        // get fmt called in output cascade
     31        void setPrt( ostype &, bool );                                          // set fmt called in output cascade
    2932        // public
    3033        void sepOn( ostype & );                                                         // turn separator state on
    3134        void sepOff( ostype & );                                                        // turn separator state off
    3235        bool sepDisable( ostype & );                                            // set default state to off, and return previous state
    33         bool sepEnable( ostype & );                                             // set default state to on, and return previous state
     36        bool sepEnable( ostype & );                                                     // set default state to on, and return previous state
     37        void nlOn( ostype & );                                                          // turn auto-newline state on
     38        void nlOff( ostype & );                                                         // turn auto-newline state off
    3439
    3540        const char * sepGet( ostype & );                                        // get separator string
     
    4348        void close( ostype & os );
    4449        ostype & write( ostype &, const char *, size_t );
    45         int fmt( ostype &, const char fmt[], ... );
     50        int fmt( ostype &, const char format[], ... );
    4651}; // ostream
    4752
     
    5863forall( dtype ostype | ostream( ostype ) ) {
    5964        ostype & ?|?( ostype &, bool );
     65        void ?|?( ostype &, bool );
    6066
    6167        ostype & ?|?( ostype &, char );
     68        void ?|?( ostype &, char );
    6269        ostype & ?|?( ostype &, signed char );
     70        void ?|?( ostype &, signed char );
    6371        ostype & ?|?( ostype &, unsigned char );
     72        void ?|?( ostype &, unsigned char );
    6473
    6574        ostype & ?|?( ostype &, short int );
     75        void ?|?( ostype &, short int );
    6676        ostype & ?|?( ostype &, unsigned short int );
     77        void ?|?( ostype &, unsigned short int );
    6778        ostype & ?|?( ostype &, int );
     79        void ?|?( ostype &, int );
    6880        ostype & ?|?( ostype &, unsigned int );
     81        void ?|?( ostype &, unsigned int );
    6982        ostype & ?|?( ostype &, long int );
     83        void ?|?( ostype &, long int );
    7084        ostype & ?|?( ostype &, long long int );
     85        void ?|?( ostype &, long long int );
    7186        ostype & ?|?( ostype &, unsigned long int );
     87        void ?|?( ostype &, unsigned long int );
    7288        ostype & ?|?( ostype &, unsigned long long int );
     89        void ?|?( ostype &, unsigned long long int );
    7390
    7491        ostype & ?|?( ostype &, float ); // FIX ME: should not be required
     92        void ?|?( ostype &, float ); // FIX ME: should not be required
    7593        ostype & ?|?( ostype &, double );
     94        void ?|?( ostype &, double );
    7695        ostype & ?|?( ostype &, long double );
     96        void ?|?( ostype &, long double );
    7797
    7898        ostype & ?|?( ostype &, float _Complex );
     99        void ?|?( ostype &, float _Complex );
    79100        ostype & ?|?( ostype &, double _Complex );
     101        void ?|?( ostype &, double _Complex );
    80102        ostype & ?|?( ostype &, long double _Complex );
     103        void ?|?( ostype &, long double _Complex );
    81104
    82105        ostype & ?|?( ostype &, const char * );
     106        void ?|?( ostype &, const char * );
    83107        // ostype & ?|?( ostype &, const char16_t * );
    84108#if ! ( __ARM_ARCH_ISA_ARM == 1 && __ARM_32BIT_STATE == 1 ) // char32_t == wchar_t => ambiguous
     
    87111        // ostype & ?|?( ostype &, const wchar_t * );
    88112        ostype & ?|?( ostype &, const void * );
     113        void ?|?( ostype &, const void * );
    89114
    90115        // manipulators
    91116        ostype & ?|?( ostype &, ostype & (*)( ostype & ) );
    92         ostype & endl( ostype & );
     117        void ?|?( ostype &, ostype & (*)( ostype & ) );
     118        ostype & nl( ostype & );
     119        void nl( ostype & );
     120        ostype & nonl( ostype & );
    93121        ostype & sep( ostype & );
    94122        ostype & sepTuple( ostype & );
     
    97125        ostype & sepDisable( ostype & );
    98126        ostype & sepEnable( ostype & );
     127        ostype & nlOn( ostype & );
     128        ostype & nlOff( ostype & );
    99129} // distribution
    100130
    101131// tuples
    102 forall( dtype ostype, otype T, ttype Params | writeable( T, ostype ) | { ostype & ?|?( ostype &, Params ); } )
    103 ostype & ?|?( ostype & os, T arg, Params rest );
     132forall( dtype ostype, otype T, ttype Params | writeable( T, ostype ) | { ostype & ?|?( ostype &, Params ); } ) {
     133        ostype & ?|?( ostype & os, T arg, Params rest );
     134        void ?|?( ostype & os, T arg, Params rest );
     135} // distribution
    104136
    105137// writes the range [begin, end) to the given stream
    106 forall( dtype ostype, otype elt_type | writeable( elt_type, ostype ), otype iterator_type | iterator( iterator_type, elt_type ) )
    107 void write( iterator_type begin, iterator_type end, ostype & os );
    108 
    109 forall( dtype ostype, otype elt_type | writeable( elt_type, ostype ), otype iterator_type | iterator( iterator_type, elt_type ) )
    110 void write_reverse( iterator_type begin, iterator_type end, ostype & os );
     138forall( dtype ostype, otype elt_type | writeable( elt_type, ostype ), otype iterator_type | iterator( iterator_type, elt_type ) ) {
     139        void write( iterator_type begin, iterator_type end, ostype & os );
     140        void write_reverse( iterator_type begin, iterator_type end, ostype & os );
     141} // distribution
    111142
    112143//---------------------------------------
     
    119150        istype & read( istype &, char *, size_t );
    120151        istype & ungetc( istype &, char );
    121         int fmt( istype &, const char fmt[], ... );
     152        int fmt( istype &, const char format[], ... );
    122153}; // istream
    123154
     
    152183        // manipulators
    153184        istype & ?|?( istype &, istype & (*)( istype & ) );
    154         istype & endl( istype & is );
     185        istype & nl( istype & is );
    155186} // distribution
    156187
     
    164195
    165196
    166 #include <time_t.hfa>                                                                           // Duration (constructors) / Time (constructors)
    167 
    168 forall( dtype ostype | ostream( ostype ) ) ostype & ?|?( ostype & os, Duration dur );
    169 forall( dtype ostype | ostream( ostype ) ) ostype & ?|?( ostype & os, Time time );
    170 
     197#include <time_t.hfa>                                                                   // Duration (constructors) / Time (constructors)
     198
     199forall( dtype ostype | ostream( ostype ) ) {
     200        ostype & ?|?( ostype & os, Duration dur );
     201        void ?|?( ostype & os, Duration dur );
     202        ostype & ?|?( ostype & os, Time time );
     203        void ?|?( ostype & os, Time time );
     204} // distribution
    171205
    172206// Local Variables: //
Note: See TracChangeset for help on using the changeset viewer.