Vireo  1.0
Compact runtime for Virtual Instruments
 All Classes Files Functions Variables Enumerations Enumerator Macros Groups Pages
Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | List of all members
Vireo::CustomPointerType Class Reference

A type describes a pointer with a predefined value. For example the address to a C function. More...

#include <TypeAndDataManager.h>

Inheritance diagram for Vireo::CustomPointerType:
Vireo::PointerType Vireo::WrappedType Vireo::TypeCommon

Public Member Functions

virtual NIError InitData (void *pData, TypeRef pattern=null)
 Initialize (re)initialize a value to the default value for the Type. Buffer must be well formed.
 
virtual void * Begin (PointerAccessEnum mode)
 
- Public Member Functions inherited from Vireo::PointerType
virtual void Visit (TypeVisitor *tv)
 
virtual TypeRef GetSubElement (Int32 index)
 Get an element of an Aggregate using it index.
 
virtual Int32 SubElementCount ()
 How many element in an Aggregate, 0 if the type is not an Aggregate.
 
virtual TypeRef GetSubElementByName (SubString *name)
 Get an element of an Aggregate using the elements field name.
 
- Public Member Functions inherited from Vireo::WrappedType
virtual TypeRef BaseType ()
 For a wrapped type, return the type that was wrapped, null otherwise.
 
virtual Int32 BitSize ()
 Size of the type in bits including padding. If the type is bit level it s the raw bit size wiht no padding.
 
virtual void GetName (SubString *name)
 Set the SubString to the name if the type is not anonymous.
 
virtual IntIndex * GetDimensionLengths ()
 Return a pointer to the raw vector of dimension lengths.
 
virtual NIError CopyData (const void *pData, void *pDataCopy)
 May a deep copy fom the source to the copy.
 
virtual NIError ClearData (void *pData)
 Free up any storage and put value to null/zero state.
 
- Public Member Functions inherited from Vireo::TypeCommon
 TypeCommon (TypeManagerRef typeManager)
 
TypeManagerRef TheTypeManager ()
 
TypeRef Next ()
 
EncodingEnum BitEncoding ()
 How the data as a whole is encoded, either a simple encoding like "2s compliment binary" or an Aggregate encoding.
 
Int32 AQAlignment ()
 Memory alignment required for values of this type.
 
Int32 TopAQSize ()
 Amount of memory needed for the top level data structure for the type including any padding if needed.
 
Boolean HasCustomDefault ()
 True if the initial value for data of this type is not just zeroed out memory.
 
Boolean IsMutableValue ()
 True if the initial value can be changed.
 
Int32 Rank ()
 Dimensionality of the type. Simple Scalars are Rank 0, arrays can be rank 0 as well.
 
Boolean IsArray ()
 True if the type is an indexable container that contains another type.
 
Boolean IsFlat ()
 True if data can be copied by a simple block copy.
 
Boolean IsValid ()
 True if all types the type is composed of have been resolved to valid types.
 
Boolean IsBitLevel ()
 True if the type a BitBlock or a BitClusters.
 
Boolean HasPadding ()
 True if TopAQSize includes internal or external padding necessary for proper aligmnet of multiple elements.
 
Boolean HasGenericType ()
 True if the type contains one or more generic types.
 
Boolean IsInputParam ()
 True if aggregate element is used as an input parameter.
 
Boolean IsOutputParam ()
 True if aggregate element is used as an output parameter.
 
Boolean IsAlias ()
 True if aggregate element is owned elsewhere (e.g. its an i ,o ,io, or alias) .
 
Boolean IsStaticParam ()
 True if the parameer is only visible to the callee, and is preserved between calls.
 
Boolean IsTempParam ()
 True is the parameter is only visible to the callee, but may be cleared between calls.
 
Boolean IsOptionalParam ()
 True if the parameter is not required. For non flat values null may be passed in.
 
UsageTypeEnum ElementUsageType ()
 
PointerTypeEnum PointerType ()
 What type of internal pointer is this type. Only used for CustomValuePointers.
 
TypeRef GetSubElementOffsetFromPath (SubString *name, Int32 *offset)
 Parse through a path, digging through Aggregate element names. Calculates the cumulative offset. More...
 
TypeRef GetSubElementInstancePointerFromPath (SubString *name, void *start, void **end, Boolean allowDynamic)
 Parse through a path, digging through Aggregate element names, references and array indexes. More...
 
virtual void GetElementName (SubString *name)
 Set the SubString to the aggregates elements field name.
 
virtual IntIndex ElementOffset ()
 Offset in AQs in the containing aggregate.
 
void ZeroOutTop (void *pData)
 Zero out a buffer that will hold a value of the type without consideration for the existing bits.
 
NIError InitData (void *pData, IntIndex count)
 Initialize a linear block to the deault value for the type.
 
NIError CopyData (const void *pData, void *pDataCopy, IntIndex count)
 Deep copy a linear block of values from one locatio to another.
 
NIError ClearData (void *pData, IntIndex count)
 Dealocate and null out a linear block of value of the type.
 
NIError MultiCopyData (const void *pSingleData, void *pDataCopy, IntIndex count)
 Make multiple copies of a single instance to a linear block.
 
Boolean CompareType (TypeRef otherType)
 
Boolean IsA (const SubString *name)
 
Boolean IsA (TypeRef otherType, Boolean compatibleArrays)
 

Static Public Member Functions

static CustomPointerTypeNew (TypeManagerRef typeManager, TypeRef type, void *pointer, PointerTypeEnum pointerType)
 
- Static Public Member Functions inherited from Vireo::PointerType
static PointerTypeNew (TypeManagerRef typeManager, TypeRef type)
 

Public Attributes

void * _defaultPointerValue
 

Private Member Functions

 CustomPointerType (TypeManagerRef typeManager, TypeRef type, void *pointer, PointerTypeEnum pointerType)
 

Additional Inherited Members

- Protected Member Functions inherited from Vireo::PointerType
 PointerType (TypeManagerRef typeManager, TypeRef type)
 
- Protected Member Functions inherited from Vireo::WrappedType
 WrappedType (TypeManagerRef typeManager, TypeRef type)
 
- Protected Attributes inherited from Vireo::WrappedType
union {
   TypeRef   _wrapped
 
   MaxAlignedType   _alignent
 
}; 
 
- Protected Attributes inherited from Vireo::TypeCommon
Int32 _topAQSize
 
UInt16 _rank:8
 
UInt16 _aqAlignment:8
 
UInt16 _encoding:kEncodingBitFieldSize
 
UInt16 _isFlat:1
 
UInt16 _isValid:1
 
UInt16 _isBitLevel:1
 
UInt16 _hasCustomDefault:1
 
UInt16 _isMutableValue:1
 
UInt16 _hasGenericType:1
 
UInt16 _hasPadding:1
 
UInt16 _elementUsageType:3
 
UInt16 _pointerType:3
 
UInt16 _ownsDefDefData:1
 

Detailed Description

A type describes a pointer with a predefined value. For example the address to a C function.


The documentation for this class was generated from the following files: