Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

DataPoolControlBlock.cpp

00001 // 00002 // Copyright 2004 P&P Software GmbH - All Rights Reserved 00003 // 00004 // DataPoolControlBlock.cpp 00005 // 00006 // Version 1.0 00007 // Date 15.10.03 (Version 1.0) 00008 // Author R. Totaro 00009 // 00010 // Change Record: 00011 00012 #include "../GeneralInclude/CompilerSwitches.h" 00013 #include "../GeneralInclude/DebugSupport.h" 00014 #include "../GeneralInclude/Constants.h" 00015 #include "../Base/CC_RootObject.h" 00016 #include "DataPoolControlBlock.h" 00017 00018 DataPoolControlBlock::DataPoolControlBlock(void) { 00019 dpu=pNULL; 00020 dpy=pNULL; 00021 } 00022 00023 void DataPoolControlBlock::setNumberOfInputs(unsigned int n) { 00024 assert(nInputs<0 && n>0); 00025 00026 nInputs=n; 00027 dpu=new TD_DataPoolId[n]; 00028 for (unsigned int i=0;i<n;i++) 00029 dpu[i]=-1; 00030 } 00031 00032 void DataPoolControlBlock::setNumberOfOutputs(unsigned int n) { 00033 assert(nOutputs<0 && n>0); 00034 00035 nOutputs=n; 00036 dpy=new TD_DataPoolId[n]; 00037 for (unsigned int i=0;i<n;i++) 00038 dpy[i]=-1; 00039 } 00040 00041 void DataPoolControlBlock::setInputLink(unsigned int i,TD_DataPoolId dpIdentifier) { 00042 assert(dpu!=pNULL && dpIdentifier>-1 && (int)i<nInputs); 00043 00044 if ((int)i<nInputs) 00045 dpu[i]=dpIdentifier; 00046 else 00047 CC_RootObject::getEventRepository()->create(this,EVT_ILLEGAL_CB); 00048 } 00049 00050 void DataPoolControlBlock::setOutputLink(unsigned int i,TD_DataPoolId dpIdentifier) { 00051 assert(dpy!=pNULL && dpIdentifier>-1 && (int)i<nOutputs); 00052 00053 if ((int)i<nOutputs) 00054 dpy[i]=dpIdentifier; 00055 else 00056 CC_RootObject::getEventRepository()->create(this,EVT_ILLEGAL_CB); 00057 } 00058 00059 bool DataPoolControlBlock::isObjectConfigured(void) { 00060 if (!ControlBlock::isObjectConfigured()) 00061 return false; 00062 00063 for (int i=0;i<nInputs;i++) { 00064 if (dpu[i]<0) 00065 return false; 00066 } 00067 00068 for (int i=0;i<nOutputs;i++) { 00069 if (dpy[i]<0) 00070 return false; 00071 } 00072 00073 return true; 00074 }
Copyright 2003 P&P Software GmbH - All Rights Reserved