GLStats  0.1.0
data.h
1 
2 /* Copyright (c) 2012-2013, Stefan Eilemann <eile@eyescale.ch>
3  *
4  * This library is free software; you can redistribute it and/or modify it under
5  * the terms of the GNU Lesser General Public License version 2.1 as published
6  * by the Free Software Foundation.
7  *
8  * This library is distributed in the hope that it will be useful, but WITHOUT
9  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
11  * details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this library; if not, write to the Free Software Foundation, Inc.,
15  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16  */
17 
18 #ifndef GLSTATS_DATA_H
19 #define GLSTATS_DATA_H
20 
21 #include <GLStats/api.h>
22 #include <GLStats/types.h>
23 
24 namespace GLStats
25 {
26 namespace detail { class Data; }
27 
29  class Data
30  {
31  public:
33  GLSTATS_API Data();
34 
36  GLSTATS_API Data( const Data& from );
37 
39  GLSTATS_API virtual ~Data();
40 
42  GLSTATS_API void setEntity( const uint32_t identifier,
43  const Entity& entity );
44 
46  const Entity& getEntity( const uint32_t identifier ) const;
47 
49  GLSTATS_API void setThread( const uint32_t identifier,
50  const Thread& thread );
51 
53  const Thread& getThread( const uint32_t identifier ) const;
54 
56  GLSTATS_API void setType( const uint32_t identifier, const Type& type );
57 
59  const Type& getType( const uint32_t identifier ) const;
60 
62  GLSTATS_API const TypeMap& getTypes() const;
63 
65  GLSTATS_API void addItem( const Item& item );
66 
68  GLSTATS_API const Items& getItems() const;
69 
71  GLSTATS_API uint128_t computeMinMax() const;
72 
74  GLSTATS_API void setText( const std::string& text );
75 
77  GLSTATS_API const std::string& getText() const;
78 
80  GLSTATS_API void obsolete( const uint32_t nFrames );
81 
83  GLSTATS_API void clear();
84 
85  private:
86  detail::Data* const impl_;
87  };
88 }
89 
90 #endif //GLSTATS_DATA_H