Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/virtual.h

    r8f910430 rbf71cfd  
    1010// Created On       : Tus Jul 11 15:08:00 2017
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Mon May 17 11:03:00 2021
    13 // Update Count     : 2
     12// Last Modified On : Wed Jul 26 14:18:00 2017
     13// Update Count     : 1
    1414//
    1515
     
    2020#endif
    2121
    22 // Information on a type for the virtual system.
    23 // There should be exactly one instance per type and there should be a
    24 // pointer to it at the head of every virtual table.
    25 struct __cfavir_type_info {
    26         // Type id of parent type, null if this is a root type.
    27     struct __cfavir_type_info const * const parent;
     22// All strict/explicate vtables should have this head, showing their parent.
     23struct __cfa__parent_vtable {
     24    struct __cfa__parent_vtable const * const parent;
    2825};
    2926
    30 // A pointer to type information acts as the type id.
    31 typedef struct __cfavir_type_info const * __cfavir_type_id;
    32 
    33 // Takes in two non-null type ids.
    34 int __cfavir_is_parent(
    35                 __cfavir_type_id parent, __cfavir_type_id child );
     27// Takes in two non-null pointers to type_objects.
     28int __cfa__is_parent( struct __cfa__parent_vtable const * parent,
     29                struct __cfa__parent_vtable const * child );
    3630
    3731// If parent is a parent of child then return child, otherwise return NULL.
    3832// Input pointers are none-null, child's first level should be an object with
    3933// a vtable
    40 void * __cfavir_virtual_cast(
    41                 __cfavir_type_id parent, __cfavir_type_id const * child );
     34void * __cfa__virtual_cast( struct __cfa__parent_vtable const * parent,
     35                struct __cfa__parent_vtable const * const * child );
    4236
    4337#ifdef __cforall
Note: See TracChangeset for help on using the changeset viewer.