model_server/api/src/QueryApp.cxx
// Node factory -- used by the parser and the client app
// (this intermediate QueryApp stuff may disappear in
// favor of something more direct, but we will still
// need creation routines):
Node factory -- used by the parser and the client app
(this intermediate QueryApp stuff may disappear in
favor of something more direct, but we will still
need creation routines).
Node factory -- used by the parser and the client app ( this intermediate QueryApp stuff may disappear in favor of something more direct but we will still need creation routines ) .
QTree *QueryApp::CreateNode(int treecode, int appcode)
{
  QTree *node = NULL;
  switch (appcode)
  {
    case SUBCHK: switch (treecode)
                 {
                   case QTree::ROOT:   node = new SC_RootNode;   break;
		   case QTree::QUERY:  node = new SC_QueryNode;  break;
		 }
  }
  if (!node)
  {
    switch (treecode)
    {
      case QTree::ROOT:   node = new RootNode;      break;
      case QTree::FOLDER: node = new FolderNode;    break;
      case QTree::QUERY:  node = new QueryNode;     break;
      default:            node = new QTree;         break;
    }
  }
  return node;
}
QTree * QueryApp :: CreateNode ( int treecode , int appcode ) { QTree * node = NULL ; switch ( appcode ) { case SUBCHK : switch ( treecode ) { case QTree :: ROOT : node = new SC_RootNode ; break ; case QTree :: QUERY : node = new SC_QueryNode ; break ; } } if ( ! node ) { switch ( treecode ) { case QTree :: ROOT : node = new RootNode ; break ; case QTree :: FOLDER : node = new FolderNode ; break ; case QTree :: QUERY : node = new QueryNode ; break ; default : node = new QTree ; break ; } } return node ; }
Node factory -- used by the parser and the client app
(this intermediate QueryApp stuff may disappear in
favor of something more direct, but we will still
need creation routines):
Node factory -- used by the parser and the client app ( this intermediate QueryApp stuff may disappear in favor of something more direct but we will still need creation routines ) :
/* ok */ /* ok */