#include <nr.hh>
Inheritance diagram for NRSimpleAttribute< void * >:


Definition at line 262 of file nr.hh.
|
|
Definition at line 137 of file nr.hh. 00137 { ONE_PHASE_PULL_ALGORITHM = 12010, 00138 TWO_PHASE_PULL_ALGORITHM, 00139 ONE_PHASE_PUSH_ALGORITHM };
|
|
|
Definition at line 135 of file nr.hh. 00135 { INTEREST_CLASS = 10010, DISINTEREST_CLASS, DATA_CLASS };
|
|
|
Definition at line 95 of file nr.hh. 00095 { 00096 // reserved constant values used for key 00097 // range 1000-1499 is diffusion-specific 00098 SCOPE_KEY = 1001, // INT32_TYPE 00099 CLASS_KEY = 1002, // INT32_TYPE 00100 ALGORITHM_KEY = 1003, // INT32_TYPE 00101 SUBSCRIPTION_ID_KEY = 1004, // INT32_TYPE 00102 FLOWS_KEY = 1005, // BLOB_TYPE 00103 00104 // range 1500-1999 is reserved for system filters 00105 REINFORCEMENT_KEY = 1500, // BLOB_TYPE 00106 LATITUDE_KEY = 1501, // FLOAT_TYPE 00107 LONGITUDE_KEY = 1502, // FLOAT_TYPE 00108 ROUTE_KEY = 1503, // STRING_TYPE 00109 SOURCE_ROUTE_KEY = 1504, // STRING_TYPE 00110 00111 // range 2000-2999 is app specific 00112 DATABLOCK_KEY = 2001, // BLOB_TYPE 00113 TASK_FREQUENCY_KEY = 2002, // FLOAT_TYPE, in secs 00114 TASK_NAME_KEY = 2003, // STRING_TYPE 00115 TASK_QUERY_DETAIL_KEY = 2004, // BLOB_TYPE 00116 TARGET_KEY = 2005, // STRING_TYPE 00117 TARGET_RANGE_KEY = 2006, // FLOAT_TYPE 00118 CONFIDENCE_KEY = 2007, // FLOAT_TYPE 00119 00120 // RMST Keys 00121 RMST_DATA_KEY = 2010, // BLOB_TYPE The actual data (fragment) 00122 RMST_ID_KEY = 2011, // INT32_TYPE Unique ID for the frag set 00123 RMST_FRAG_KEY = 2012, // INT32_TYPE Fragment ID 00124 RMST_MAX_FRAG_KEY = 2013, // INT32_TYPE Largest frag id in set 00125 RMST_TSPRT_CTL_KEY = 2014, // INT32_TYPE Transport Control Messages 00126 RMST_PKTS_SENT_KEY = 2015, // INT32_TYPE Support for blacklisting 00127 RMST_TARGET_KEY = 2016 // STRING_TYPE Type of Rmst Data 00128 00129 // range 3000-3999 is reserved for experimentation 00130 // and user-defined keys 00131 };
|
|
|
Definition at line 149 of file nr.hh.
|
|
|
Definition at line 136 of file nr.hh. 00136 { NODE_LOCAL_SCOPE = 11010, GLOBAL_SCOPE };
|
|
|
Definition at line 142 of file nr.hh. 00142 { INT32_TYPE, // 32-bit signed integer 00143 FLOAT32_TYPE, // 32-bit 00144 FLOAT64_TYPE, // 64-bit 00145 STRING_TYPE, // UTF-8 format, max length 1024 chars 00146 BLOB_TYPE }; // uninterpreted binary data
|
|
||||||||||||||||||||||||
|
Definition at line 272 of file nr.cc. References NRAttribute::BLOB_TYPE, NRAttribute::len_, NRSimpleAttribute< T >::setVal(), and NRAttribute::val_. 00272 : 00273 NRAttribute(key, type, op, size) 00274 { 00275 assert(type == BLOB_TYPE); 00276 val_ = NULL; 00277 setVal(val, len_); 00278 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 266 of file nr.hh. References NRAttribute::BLOB_TYPE, NRAttribute::type_, and NRAttribute::val_.
|
|
||||||||||||||||
|
Definition at line 157 of file nr.hh. References NRAttribute::find_key_from(). 00158 { 00159 00160 return find_key_from(key, attrs, attrs->begin(), place); 00161 };
Here is the call graph for this function: ![]() |
|
||||||||||||||||||||
|
Definition at line 115 of file nr.cc. Referenced by NRSimpleAttributeFactory< T >::find(), NRSimpleAttributeFactory< T >::find_from(), NRAttribute::find_key(), NRAttribute::find_matching_key(), and NRAttribute::find_matching_key_from(). 00117 { 00118 00119 NRAttrVec::iterator i; 00120 00121 for (i = start; i != attrs->end(); ++i) { 00122 if ((*i)->getKey() == key) { 00123 if (place) 00124 *place = i; 00125 return (*i); 00126 }; 00127 }; 00128 return NULL; 00129 }
|
|
||||||||||||
|
Definition at line 173 of file nr.hh. References NRAttribute::find_key_from(), and NRAttribute::key_. 00174 { 00175 return find_key_from(key_, attrs, attrs->begin(), place); 00176 };
Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Definition at line 167 of file nr.hh. References NRAttribute::find_key_from(), and NRAttribute::key_. 00169 { 00170 return find_key_from(key_, attrs, start, place); 00171 };
Here is the call graph for this function: ![]() |
|
|
Definition at line 183 of file nr.hh. References NRAttribute::val_. Referenced by NRAttribute::isEQ(), NRAttribute::isGE(), NRAttribute::isGT(), and PackAttrs(). 00183 { return val_; };
|
|
|
Definition at line 178 of file nr.hh. References NRAttribute::key_. Referenced by CopyAttrs(), NRAttribute::isSameKey(), PackAttrs(), and PrintAttrs(). 00178 { return key_; };
|
|
|
Reimplemented from NRAttribute. Definition at line 272 of file nr.hh. References NRAttribute::len_. 00272 {return len_; };
|
|
|
Definition at line 180 of file nr.hh. References NRAttribute::op_. Referenced by DiffusionRouting::checkPublication(), DiffusionRouting::checkSubscription(), CopyAttrs(), GeoRoutingFilter::extractLocation(), PackAttrs(), PrintAttrs(), GradientFilter::processNewMessage(), and OnePhasePullFilter::processNewMessage(). 00180 { return op_; };
|
|
|
Definition at line 179 of file nr.hh. References NRAttribute::type_. Referenced by CopyAttrs(), NRAttribute::isSameKey(), PackAttrs(), and PrintAttrs(). 00179 { return type_; };
|
|
|
Definition at line 271 of file nr.hh. References NRAttribute::val_. Referenced by PushSenderApp::run(), GearSenderApp::run(), TPPPingSenderApp::run(), and OPPPingSenderApp::run(). 00271 { return (void *)val_; };
|
|
|
Definition at line 131 of file nr.cc. References abort(), NRAttribute::BLOB_TYPE, NRAttribute::FLOAT32_TYPE, NRAttribute::FLOAT64_TYPE, NRAttribute::getGenericVal(), NRAttribute::getLen(), NRAttribute::INT32_TYPE, NRAttribute::isSameKey(), NRAttribute::len_, NRAttribute::STRING_TYPE, NRAttribute::type_, and NRAttribute::val_. Referenced by NRAttribute::isNE(). 00131 { 00132 00133 // Keys need to be the same 00134 if (!isSameKey(attr)) 00135 abort(); 00136 00137 switch (type_){ 00138 00139 case INT32_TYPE: 00140 return (*(int32_t *) val_ == *(int32_t *) attr->getGenericVal()); 00141 break; 00142 00143 case FLOAT32_TYPE: 00144 return (*(float *) val_ == *(float *) attr->getGenericVal()); 00145 break; 00146 00147 case FLOAT64_TYPE: 00148 return (*(double *) val_ == *(double *) attr->getGenericVal()); 00149 break; 00150 00151 case STRING_TYPE: 00152 if (len_ != attr->getLen()) 00153 return false; 00154 return (!strncmp((char *) val_, (char *) attr->getGenericVal(), len_)); 00155 break; 00156 00157 case BLOB_TYPE: 00158 if (len_ != attr->getLen()) 00159 return false; 00160 return (!memcmp((void *) val_, (void *) attr->getGenericVal(), len_)); 00161 break; 00162 00163 default: 00164 abort(); 00165 break; 00166 } 00167 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 215 of file nr.cc. References abort(), NRAttribute::BLOB_TYPE, NRAttribute::FLOAT32_TYPE, NRAttribute::FLOAT64_TYPE, NRAttribute::getGenericVal(), NRAttribute::getLen(), NRAttribute::INT32_TYPE, NRAttribute::isSameKey(), NRAttribute::len_, min, NRAttribute::STRING_TYPE, NRAttribute::type_, and NRAttribute::val_. Referenced by NRAttribute::isLT(). 00215 { 00216 00217 int cmplen, cmp; // must be here for initialization reasons 00218 00219 // Keys need to be the same 00220 if (!isSameKey(attr)) 00221 abort(); 00222 00223 switch (type_) { 00224 00225 case INT32_TYPE: 00226 return (*(int32_t *) val_ >= *(int32_t *) attr->getGenericVal()); 00227 break; 00228 00229 case FLOAT32_TYPE: 00230 return (*(float *) val_ >= *(float *) attr->getGenericVal()); 00231 break; 00232 00233 case FLOAT64_TYPE: 00234 return (*(double *) val_ >= *(double *) attr->getGenericVal()); 00235 break; 00236 00237 case STRING_TYPE: 00238 return (strcmp((char *) val_, (char *) attr->getGenericVal()) >= 0); 00239 break; 00240 00241 case BLOB_TYPE: 00242 cmplen = min(len_, attr->getLen()); 00243 cmp = memcmp((void *) val_, (void *) attr->getGenericVal(), cmplen); 00244 00245 // We are greater or equal to attr 00246 if (cmp >= 0) 00247 return true; 00248 return false; 00249 break; 00250 00251 default: 00252 abort(); 00253 break; 00254 } 00255 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 169 of file nr.cc. References abort(), NRAttribute::BLOB_TYPE, NRAttribute::FLOAT32_TYPE, NRAttribute::FLOAT64_TYPE, NRAttribute::getGenericVal(), NRAttribute::getLen(), NRAttribute::INT32_TYPE, NRAttribute::isSameKey(), NRAttribute::len_, min, NRAttribute::STRING_TYPE, NRAttribute::type_, and NRAttribute::val_. Referenced by NRAttribute::isLE(). 00169 { 00170 00171 int cmplen, cmp; // must be here for initialization reasons 00172 00173 // Keys need to be the same 00174 if (!isSameKey(attr)) 00175 abort(); 00176 00177 switch (type_) { 00178 00179 case INT32_TYPE: 00180 return (*(int32_t *) val_ > *(int32_t *) attr->getGenericVal()); 00181 break; 00182 00183 case FLOAT32_TYPE: 00184 return (*(float *) val_ > *(float *) attr->getGenericVal()); 00185 break; 00186 00187 case FLOAT64_TYPE: 00188 return (*(double *) val_ > *(double *) attr->getGenericVal()); 00189 break; 00190 00191 case STRING_TYPE: 00192 return strncmp((char *) val_, (char *) attr->getGenericVal(), 00193 min(len_, attr->getLen())); 00194 break; 00195 00196 case BLOB_TYPE: 00197 cmplen = min(len_, attr->getLen()); 00198 cmp = memcmp((void *) val_, (void *) attr->getGenericVal(), cmplen); 00199 00200 // We are greater than attr 00201 if (cmp > 0) 00202 return true; 00203 // We are equal to attr up to len_, but we are longer 00204 if (cmp == 0 && (len_ > attr->getLen())) 00205 return true; 00206 return false; 00207 break; 00208 00209 default: 00210 abort(); 00211 break; 00212 } 00213 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 203 of file nr.hh. References NRAttribute::isGT(). 00203 { 00204 return (!isGT(attr)); 00205 };
Here is the call graph for this function: ![]() |
|
|
Definition at line 199 of file nr.hh. References NRAttribute::isGE(). 00199 { 00200 return (!isGE(attr)); 00201 };
Here is the call graph for this function: ![]() |
|
|
Definition at line 195 of file nr.hh. References NRAttribute::isEQ(). 00195 { 00196 return (!isEQ(attr)); 00197 };
Here is the call graph for this function: ![]() |
|
|
Definition at line 185 of file nr.hh. References NRAttribute::getKey(), NRAttribute::getType(), NRAttribute::key_, and NRAttribute::type_. Referenced by NRAttribute::isEQ(), NRAttribute::isGE(), and NRAttribute::isGT().
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 280 of file nr.cc. References NRAttribute::len_, and NRAttribute::val_. 00280 { 00281 delete [] (char *) val_; 00282 len_ = len; 00283 val_ = (void *) new char[len_]; 00284 memcpy(val_, value, len_); 00285 }
|
|
|
Definition at line 205 of file nr.hh. Referenced by NRAttribute::find_matching_key(), NRAttribute::find_matching_key_from(), NRAttribute::getKey(), NRAttribute::isSameKey(), and NRAttribute::NRAttribute(). |
|
|
Definition at line 212 of file nr.hh. Referenced by getLen(), NRSimpleAttribute< char * >::getLen(), NRSimpleAttribute< int >::getLen(), NRAttribute::getLen(), NRAttribute::isEQ(), NRAttribute::isGE(), NRAttribute::isGT(), NRAttribute::NRAttribute(), NRSimpleAttribute(), setVal(), and NRSimpleAttribute< char * >::setVal(). |
|
|
Definition at line 211 of file nr.hh. Referenced by NRAttribute::getOp(), and NRAttribute::NRAttribute(). |
|
|
Definition at line 210 of file nr.hh. Referenced by NRAttribute::getType(), NRAttribute::isEQ(), NRAttribute::isGE(), NRAttribute::isGT(), NRAttribute::isSameKey(), NRAttribute::NRAttribute(), ~NRSimpleAttribute(), NRSimpleAttribute< char * >::~NRSimpleAttribute(), and NRSimpleAttribute< int >::~NRSimpleAttribute(). |
|
1.4.6