MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
search.h File Reference
#include "myassert.h"
#include "withlab.h"
Include dependency graph for search.h:

Go to the source code of this file.

Functions

template<class T >
T * pLabelSearch (T **const p, int iSize, unsigned int uL)
 
template<class T >
int LabelSearch (T **const p, int iSize, unsigned int uL)
 

Function Documentation

template<class T >
int LabelSearch ( T **const  p,
int  iSize,
unsigned int  uL 
)

Definition at line 62 of file search.h.

References ASSERT.

63 {
64  ASSERT(p != NULL);
65  for (int i = 0; i < iSize; i++) {
66  if (p[i] != NULL && p[i]->GetLabel() == uL) {
67  return i;
68  }
69  }
70  return -1;
71 }
#define ASSERT(expression)
Definition: colamd.c:977
template<class T >
T* pLabelSearch ( T **const  p,
int  iSize,
unsigned int  uL 
)

Definition at line 50 of file search.h.

References ASSERT.

Referenced by DataManager::pFindDrive().

51 {
52  ASSERT(p != NULL);
53  for (int i = 0; i < iSize; i++) {
54  if (p[i] != NULL && p[i]->GetLabel() == uL) {
55  return p[i];
56  }
57  }
58  return NULL;
59 }
#define ASSERT(expression)
Definition: colamd.c:977