Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/wrapper/src/pointer.h

    r73abe95 r200fcb3  
    3434void ?{}(content_t* this)
    3535{
    36         sout | "Constructing content" | endl;
     36        sout | "Constructing content";
    3737        this->count = 0;
    3838}
     
    4040void ^?{}(content_t* this)
    4141{
    42         sout | "Destroying content" | endl;
     42        sout | "Destroying content";
    4343}
    4444
     
    5353void ?{}(wrapper_t* this)
    5454{
    55         sout | "Constructing empty ref pointer" | endl | endl;
     55        sout | "Constructing empty ref pointer" | nl;
    5656        this->ptr = NULL;
    5757}
     
    5959void ?{}(wrapper_t* this, wrapper_t rhs)
    6060{
    61         sout | "Constructing ref pointer from copy" | endl;
     61        sout | "Constructing ref pointer from copy";
    6262        this->ptr = rhs.ptr;
    6363        this->ptr->count++;
    64         sout | "Reference is " | this->ptr->count | endl | endl;
     64        sout | "Reference is " | this->ptr->count | nl;
    6565}
    6666
     
    6969        if(this->ptr)
    7070        {
    71                 sout | "Destroying ref pointer" | endl;
     71                sout | "Destroying ref pointer";
    7272                this->ptr->count--;
    73                 sout | "Reference is " | this->ptr->count | endl | endl;
     73                sout | "Reference is " | this->ptr->count | nl;
    7474                if(!this->ptr->count) delete(this->ptr);
    7575        }
    7676        else
    7777        {
    78                 sout | "Destroying empty ref pointer" | endl | endl;
     78                sout | "Destroying empty ref pointer" | nl;
    7979        }
    8080}
     
    8282wrapper_t ?=?(wrapper_t* this, wrapper_t rhs)
    8383{
    84         sout | "Setting ref pointer" | endl;
     84        sout | "Setting ref pointer";
    8585        if(this->ptr)
    8686        {
    8787                this->ptr->count--;
    88                 sout | "Reference is " | this->ptr->count | endl | endl;
     88                sout | "Reference is " | this->ptr->count | nl;
    8989                if(!this->ptr->count) delete(this->ptr);
    9090        }
    9191        this->ptr = rhs.ptr;
    9292        this->ptr->count++;
    93         sout | "Reference is " | this->ptr->count | endl | endl;
     93        sout | "Reference is " | this->ptr->count | nl;
    9494}
    9595
     
    9898        this->ptr = c;
    9999        this->ptr->count++;
    100         sout | "Setting ref pointer" | endl;
    101         sout | "Reference is " | this->ptr->count | endl | endl;
     100        sout | "Setting ref pointer";
     101        sout | "Reference is " | this->ptr->count | nl;
    102102}
    103103
    104104void clear(wrapper_t* this)
    105105{
    106         sout | "Clearing ref pointer" | endl;
     106        sout | "Clearing ref pointer";
    107107        this->ptr->count--;
    108         sout | "Reference is " | this->ptr->count | endl | endl;
     108        sout | "Reference is " | this->ptr->count | nl;
    109109        if(!this->ptr->count) delete(this->ptr);
    110110        this->ptr = NULL;
Note: See TracChangeset for help on using the changeset viewer.