ADT
        aaron-thesis
        arm-eh
        ast-experimental
        cleanup-dtors
        deferred_resn
        demangler
        enum
        forall-pointer-decay
        jacob/cs343-translation
        jenkins-sandbox
        new-ast
        new-ast-unique-expr
        new-env
        no_list
        persistent-indexer
        pthread-emulation
        qualifiedEnum
        resolv-new
        with_gc
      
      
        
          | 
            Last change
 on this file since 44b4114 was             0cf5b79, checked in by Thierry Delisle <tdelisle@…>, 8 years ago           | 
        
        
          | 
             
Added generic containers for runtime. 
Moved some internal code to bits folder. 
consistently used cforall instead of CFORALL define. 
 
           | 
        
        
          
            
              - 
Property                 mode
 set to                 
100644
               
             
           | 
        
        
          | 
            File size:
            1.1 KB
           | 
        
      
      
| Line |   | 
|---|
| 1 | //
 | 
|---|
| 2 | // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
 | 
|---|
| 3 | //
 | 
|---|
| 4 | // The contents of this file are covered under the licence agreement in the
 | 
|---|
| 5 | // file "LICENCE" distributed with Cforall.
 | 
|---|
| 6 | //
 | 
|---|
| 7 | // virtual.h -- Builtins for hierarchy objects.
 | 
|---|
| 8 | //
 | 
|---|
| 9 | // Author           : Andrew Beach
 | 
|---|
| 10 | // Created On       : Tus Jul 11 15:08:00 2017
 | 
|---|
| 11 | // Last Modified By : Andrew Beach
 | 
|---|
| 12 | // Last Modified On : Wed Jul 26 14:18:00 2017
 | 
|---|
| 13 | // Update Count     : 1
 | 
|---|
| 14 | //
 | 
|---|
| 15 | 
 | 
|---|
| 16 | #pragma once
 | 
|---|
| 17 | 
 | 
|---|
| 18 | #ifdef __cforall
 | 
|---|
| 19 | extern "C" {
 | 
|---|
| 20 | #endif
 | 
|---|
| 21 | 
 | 
|---|
| 22 | // All strict/explicate vtables should have this head, showing their parent.
 | 
|---|
| 23 | struct __cfa__parent_vtable {
 | 
|---|
| 24 |     struct __cfa__parent_vtable const * const parent;
 | 
|---|
| 25 | };
 | 
|---|
| 26 | 
 | 
|---|
| 27 | // Takes in two non-null pointers to type_objects.
 | 
|---|
| 28 | int __cfa__is_parent( struct __cfa__parent_vtable const * parent,
 | 
|---|
| 29 |                 struct __cfa__parent_vtable const * child );
 | 
|---|
| 30 | 
 | 
|---|
| 31 | // If parent is a parent of child then return child, otherwise return NULL.
 | 
|---|
| 32 | // Input pointers are none-null, child's first level should be an object with
 | 
|---|
| 33 | // a vtable
 | 
|---|
| 34 | void * __cfa__virtual_cast( struct __cfa__parent_vtable const * parent,
 | 
|---|
| 35 |                 struct __cfa__parent_vtable const * const * child );
 | 
|---|
| 36 | 
 | 
|---|
| 37 | #ifdef __cforall
 | 
|---|
| 38 | }
 | 
|---|
| 39 | #endif
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.