CCCC - C and C++ Code Counter
9999-git
CCCC Development version (post-3.1.4)
Main Page
Classes
Files
File List
File Members
cccc
cccc_tbl.h
Go to the documentation of this file.
1
/*
2
CCCC - C and C++ Code Counter
3
Copyright (C) 1994-2005 Tim Littlefair (tim_littlefair@hotmail.com)
4
5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation; either version 2 of the License, or
8
(at your option) any later version.
9
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
14
15
You should have received a copy of the GNU General Public License
16
along with this program; if not, write to the Free Software
17
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
*/
19
/*
20
* cccc_tbl.h
21
*
22
* defines the database used by CCCC to generate a report
23
*/
24
#ifndef CCCC_TBL_H
25
#define CCCC_TBL_H
26
27
#include <iostream>
28
#include <string>
29
30
#include <map>
31
32
using
std::string;
33
34
// CCCC_Table started its life as an array of pointers to CCCC_Records.
35
// It will ultimately become identical to a std::map from string to T*.
36
// In the mean time we are supporting a legacy API.
37
template
<
class
T>
class
CCCC_Table
38
:
public
std::map<string,T*>
39
{
40
typedef
std::map<string,T*>
map_t
;
41
typename
map_t::iterator
iter_
;
42
bool
sorted
;
43
44
public
:
45
CCCC_Table
();
46
virtual
~CCCC_Table
();
47
int
records
();
48
T*
find
(
string
name);
49
T*
find_or_insert
(T* new_item_ptr);
50
bool
remove
(T* old_item_ptr);
51
void
reset_iterator
();
52
T*
first_item
();
53
T*
next_item
();
54
virtual
int
get_count
(
const
char
*count_tag);
55
void
sort
();
56
};
57
58
#include "
cccc_tbl.cc
"
59
60
#endif // CCCC_DB_H
61
CCCC_Table::sort
void sort()
Definition:
cccc_tbl.cc:105
CCCC_Table::sorted
bool sorted
Definition:
cccc_tbl.h:42
CCCC_Table::CCCC_Table
CCCC_Table()
Definition:
cccc_tbl.cc:30
CCCC_Table::iter_
map_t::iterator iter_
Definition:
cccc_tbl.h:41
CCCC_Table::~CCCC_Table
virtual ~CCCC_Table()
Definition:
cccc_tbl.cc:36
CCCC_Table::reset_iterator
void reset_iterator()
Definition:
cccc_tbl.cc:113
CCCC_Table
Definition:
cccc_tbl.h:37
CCCC_Table::get_count
virtual int get_count(const char *count_tag)
Definition:
cccc_tbl.cc:52
CCCC_Table::first_item
T * first_item()
Definition:
cccc_tbl.cc:118
CCCC_Table::find_or_insert
T * find_or_insert(T *new_item_ptr)
Definition:
cccc_tbl.cc:78
CCCC_Table::next_item
T * next_item()
Definition:
cccc_tbl.cc:124
cccc_tbl.cc
CCCC_Table::find
T * find(string name)
Definition:
cccc_tbl.cc:66
CCCC_Table::map_t
std::map< string, T * > map_t
Definition:
cccc_tbl.h:40
CCCC_Table::records
int records()
Definition:
cccc_tbl.cc:135
Generated on Sat Sep 19 2015 16:02:27 for CCCC - C and C++ Code Counter by
1.8.10