COPASI API  4.16.103
CCopasiObjectName.h
Go to the documentation of this file.
1 /* Begin CVS Header
2  $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/report/CCopasiObjectName.h,v $
3  $Revision: 1.8 $
4  $Name: $
5  $Author: shoops $
6  $Date: 2011/03/07 19:32:38 $
7  End CVS Header */
8 
9 // Copyright (C) 2011 - 2010 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., University of Heidelberg, and The University
11 // of Manchester.
12 // All rights reserved.
13 
14 // Copyright (C) 2001 - 2007 by Pedro Mendes, Virginia Tech Intellectual
15 // Properties, Inc. and EML Research, gGmbH.
16 // All rights reserved.
17 
18 /**
19  * Class CCopasiObjectName
20  *
21  * This class is the class for handling Copasi object names.
22  *
23  * Copyright Stefan Hoops 2002
24  */
25 
26 #ifndef COPASI_CCopasiObjectName
27 #define COPASI_CCopasiObjectName
28 
29 #include <string>
30 #include <set>
31 
32 /** @dia:pos 21.4754,29.8662 */
33 class CCopasiObjectName: public std::string
34 {
35  // Operations
36 public:
38 
39  CCopasiObjectName(const std::string & name);
40 
42 
44 
46 
48 
49  std::string getObjectType() const;
50 
51  std::string getObjectName() const;
52 
53  size_t getElementIndex(const size_t & pos = 0) const;
54 
55  std::string getElementName(const size_t & pos /*= 0*/,
56  const bool & unescape = true) const;
57 
58  static std::string escape(const std::string & name);
59 
60  static std::string unescape(const std::string & name);
61 
62  // private:
63  std::string::size_type findEx(const std::string & toFind,
64  const std::string::size_type & pos = 0) const;
65 };
66 
68 {
69 public:
71 
72  CRegisteredObjectName(const std::string & name);
73 
75 
77 
78  static const std::set<CRegisteredObjectName*> & getSet()
79  {return mSet;}
80 
81 private:
82  static std::set<CRegisteredObjectName*> mSet;
83 };
84 
85 #endif // COPASI_CCopasiObjectName
size_t getElementIndex(const size_t &pos=0) const
CCopasiObjectName getRemainder() const
static std::set< CRegisteredObjectName * > mSet
std::string getObjectType() const
static std::string unescape(const std::string &name)
static std::string escape(const std::string &name)
CCopasiObjectName getPrimary() const
std::string getElementName(const size_t &pos, const bool &unescape=true) const
std::string::size_type findEx(const std::string &toFind, const std::string::size_type &pos=0) const
static const std::set< CRegisteredObjectName * > & getSet()
std::string getObjectName() const