COPASI API  4.16.103
CRaptorInit.cpp
Go to the documentation of this file.
1 // Copyright (C) 2010 - 2015 by Pedro Mendes, Virginia Tech Intellectual
2 // Properties, Inc., University of Heidelberg, and The University
3 // of Manchester.
4 // All rights reserved.
5 
6 // Copyright (C) 2008 - 2009 by Pedro Mendes, Virginia Tech Intellectual
7 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
8 // and The University of Manchester.
9 // All rights reserved.
10 
11 #include <raptor.h>
12 #include <string.h>
13 #include <stdlib.h>
14 
15 #include "copasi.h"
16 
17 #include "CRaptorInit.h"
18 
19 // static
20 bool CRaptorInit::Initialized = false;
21 
23 {
24  if (!Initialized)
25  {
26  raptor_init();
27  Initialized = true;
28  atexit(&raptor_finish);
29  }
30 }
31 
33 {}
34 
35 // static
36 bool CRaptorInit::isLocalURI(raptor_uri * pURI)
37 {
38  raptor_uri * pTmp =
39  raptor_new_uri_for_retrieval(pURI);
40 
41  bool isLocal =
42  (strcmp("/", (char *) raptor_uri_as_string(pTmp)) == 0);
43 
44  pRaptorFreeUri(pTmp);
45 
46  return isLocal;
47 }
static bool Initialized
Definition: CRaptorInit.h:44
static bool isLocalURI(raptor_uri *pURI)
Definition: CRaptorInit.cpp:36
#define pRaptorFreeUri(p)
Definition: CRaptorInit.h:47