00001 /* 00002 DASI Library Copyright (C) 2004-2006 Derek Jones 00003 This software is free for educational use only--no commercial use allowed. 00004 00005 This library is distributed in the hope that it will be useful, 00006 but WITHOUT ANY WARRANTY; without even the implied warranty of 00007 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00008 */ 00009 00010 #ifndef OLIST_H 00011 #define OLIST_H 00012 #include <types.h> 00013 #include <jaus/component.h> 00014 #include <jaus/jaus_message.h> 00015 #include <shared.h> 00016 struct Component_Item 00017 { 00018 uint8 depth; 00019 OBJECT object; 00020 short instance; 00021 }; 00022 00024 00026 class Component_List // a list of target node--not itsself 00027 { 00028 public: 00029 #ifdef DOS 00030 Component_List(Component_Item*); 00032 OBJECT component(int,char**); 00033 #endif 00034 Component_List(void); 00036 Component_Item operator[](int); 00038 OBJECT component(int i); 00040 uint8 depth(int); 00042 bool receive_component_list(void*); 00044 int tail(void); 00046 void tail(int t); 00048 bool sublist(int index, Component_List& cl); 00050 bool superlist(int index, Component_List& cl); 00051 void clear(void); 00052 bool root(void); 00053 void root(bool r); 00054 bool terminal(void); 00055 void terminal(bool r); 00057 void set(int i,uint8 d, uint8 inst, OBJECT o); 00058 private: 00059 void dostuff(void*, short& counter); 00060 Component_Item _object[OOMRM_OBJECT_MAX]; 00061 int _tail; 00062 bool _root; 00063 bool _terminal; 00064 }; 00065 00066 #endif
1.3