FACT++  1.0
static void user_routine ( void *  tagp,
void *  bufp,
int *  size 
)
static

Definition at line 11 of file diccpp.cxx.

References DimClient::getNoDataCopy(), DimCore::inCallback, DimInfoHandler::infoHandler(), DimInfo::infoHandler(), DimInfo::itsData, DimInfo::itsDataSize, DimInfo::itsHandler, DimInfoHandler::itsService, DimInfo::itsSize, size, and t.

Referenced by dic_add_error_handler(), dis_add_client_exit_handler(), dis_add_cmnd(), dis_add_cmnd_dns(), dis_add_error_handler(), dis_add_exit_handler(), dis_add_service(), dis_add_service_dns(), do_dis_add_cmnd(), do_dis_add_cmnd_dns(), do_dis_add_service(), do_dis_add_service_dns(), DimInfo::doIt(), DimStampedInfo::doIt(), DimUpdatedInfo::doIt(), dtq_add_entry(), dtq_start_timer(), and DimInfo::timerHandler().

12 {
13 // int *tag = (int *)tagp;
14  char *buf = (char *)bufp;
15 // int id = *tag;
16  DimInfo *t;
17 
18 // t = (DimInfo *)id_get_ptr(id, SRC_DIC);
19  t = * (DimInfo **)tagp;
20  if(DimClient::getNoDataCopy() == 0)
21  {
22  if(*size > 0)
23  {
24  if(!t->itsDataSize)
25  {
26  t->itsData = new char[*size];
27  t->itsDataSize = *size;
28  }
29  else if(t->itsDataSize < *size)
30  {
31  delete[] (char *)(t->itsData);
32  t->itsData = new char[*size];
33  t->itsDataSize = *size;
34  }
35  memcpy(t->itsData, buf, (size_t)*size);
36  }
37  else if (*size == 0)
38  {
39  if(t->itsDataSize)
40  {
41  delete[] (char *)(t->itsData);
42  t->itsDataSize = 0;
43  }
44  t->itsData = buf;
45  }
46  }
47  else
48  {
49  t->itsData = buf;
50  }
51  t->itsSize = *size;
52  if(t->itsHandler)
53  {
54  t->itsHandler->itsService = t;
56  t->itsHandler->infoHandler();
58  }
59  else
60  {
62  t->infoHandler();
64  }
65 }
virtual void infoHandler()=0
int itsSize
Definition: dic.hxx:99
Definition: dic.hxx:31
void * itsData
Definition: dic.hxx:97
virtual void infoHandler()
Definition: diccpp.cxx:68
static int inCallback
Definition: dim.hxx:11
static int getNoDataCopy()
Definition: diccpp.cxx:1241
DimInfoHandler * itsHandler
Definition: dic.hxx:34
DimInfo * itsService
Definition: dic.hxx:25
int size
Definition: db_dim_server.c:17
TT t
Definition: test_client.c:26
int itsDataSize
Definition: dic.hxx:98

+ Here is the call graph for this function:

+ Here is the caller graph for this function: