CCCC - C and C++ Code Counter  9999-git
CCCC Development version (post-3.1.4)
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Private Attributes | Friends | List of all members
CCCC_Record Class Referenceabstract

#include <cccc_rec.h>

Inheritance diagram for CCCC_Record:
[legend]
Collaboration diagram for CCCC_Record:
[legend]

Public Member Functions

virtual ~CCCC_Record ()
 
virtual string name (int level) const
 
virtual string key () const
 
AugmentedBool get_flag (PSFlag psf)
 
virtual void add_extent (CCCC_Item &)
 
virtual void sort ()
 
virtual int get_count (const char *count_tag)=0
 

Static Public Member Functions

static CCCC_Projectget_active_project ()
 
static void set_active_project (CCCC_Project *prj)
 

Protected Types

typedef CCCC_Table< CCCC_ExtentExtent_Table
 

Protected Member Functions

virtual void merge_flags (string &new_flags)
 

Protected Attributes

Extent_Table extent_table
 
string flags
 

Static Private Attributes

static CCCC_Projectactive_project =NULL
 

Friends

class CCCC_Html_Stream
 
class CCCC_Xml_Stream
 
int rank_by_string (const void *p1, const void *p2)
 

Detailed Description

Definition at line 38 of file cccc_rec.h.

Member Typedef Documentation

Definition at line 44 of file cccc_rec.h.

Constructor & Destructor Documentation

virtual CCCC_Record::~CCCC_Record ( )
inlinevirtual

Definition at line 49 of file cccc_rec.h.

49 {}

Member Function Documentation

void CCCC_Record::add_extent ( CCCC_Item is)
virtual

Reimplemented in CCCC_UseRelationship.

Definition at line 63 of file cccc_rec.cc.

64 {
65  CCCC_Extent *new_extent=new CCCC_Extent;
66  new_extent->GetFromItem(is);
67  CCCC_Extent *inserted_extent=extent_table.find_or_insert(new_extent);
68  if(new_extent != inserted_extent)
69  {
70  delete new_extent;
71  }
72 }
int GetFromItem(CCCC_Item &item)
Definition: cccc_ext.cc:84
T * find_or_insert(T *new_item_ptr)
Definition: cccc_tbl.cc:78
Extent_Table extent_table
Definition: cccc_rec.h:45

Here is the call graph for this function:

Here is the caller graph for this function:

CCCC_Project * CCCC_Record::get_active_project ( )
static

Definition at line 28 of file cccc_rec.cc.

28 { return active_project; }
static CCCC_Project * active_project
Definition: cccc_rec.h:42

Here is the caller graph for this function:

virtual int CCCC_Record::get_count ( const char *  count_tag)
pure virtual
AugmentedBool CCCC_Record::get_flag ( PSFlag  psf)
inline

Definition at line 52 of file cccc_rec.h.

52 { return (AugmentedBool) flags[psf]; }
AugmentedBool
Definition: cccc_utl.h:59
string flags
Definition: cccc_rec.h:46
string CCCC_Record::key ( ) const
virtual

Definition at line 76 of file cccc_rec.cc.

76 { return name(nlRANK); }
virtual string name(int level) const
Definition: cccc_rec.cc:75

Here is the call graph for this function:

Here is the caller graph for this function:

void CCCC_Record::merge_flags ( string &  new_flags)
protectedvirtual

Definition at line 31 of file cccc_rec.cc.

32 {
33  const char *new_flag_array=new_flags.c_str();
34  const char *flag_array=flags.c_str();
35  unsigned int len=strlen(flag_array);
36  if(strlen(new_flag_array)==len)
37  {
38  char buf[100];
39  unsigned int i;
40  for(i=0; i<len;i++)
41  {
42  if(flag_array[i]=='?')
43  {
44  buf[i]=new_flag_array[i];
45  }
46  else
47  {
48  buf[i]=flag_array[i];
49  }
50  }
51  buf[len]='\0';
52  flags=buf;
53  }
54  else
55  {
56  // if the parent record has just been created it may have
57  // an empty flags member, so we use Resolve_Fields to copy
58  // the flags from the first extent
59  Resolve_Fields(flags,new_flags);
60  }
61 }
void Resolve_Fields(string &field1, string &field2)
Definition: cccc_db.cc:105
string flags
Definition: cccc_rec.h:46

Here is the call graph for this function:

string CCCC_Record::name ( int  level) const
virtual

Reimplemented in CCCC_Project, CCCC_Module, CCCC_Member, and CCCC_UseRelationship.

Definition at line 75 of file cccc_rec.cc.

75 { return ""; }

Here is the caller graph for this function:

void CCCC_Record::set_active_project ( CCCC_Project prj)
static

Definition at line 29 of file cccc_rec.cc.

CCCC_Project * prj
Definition: ccccmain.cc:49
static CCCC_Project * active_project
Definition: cccc_rec.h:42

Here is the caller graph for this function:

virtual void CCCC_Record::sort ( )
inlinevirtual

Definition at line 55 of file cccc_rec.h.

55 { extent_table.sort(); }
void sort()
Definition: cccc_tbl.cc:105
Extent_Table extent_table
Definition: cccc_rec.h:45

Here is the call graph for this function:

Friends And Related Function Documentation

friend class CCCC_Html_Stream
friend

Definition at line 40 of file cccc_rec.h.

friend class CCCC_Xml_Stream
friend

Definition at line 41 of file cccc_rec.h.

int rank_by_string ( const void *  p1,
const void *  p2 
)
friend

Member Data Documentation

CCCC_Project * CCCC_Record::active_project =NULL
staticprivate

Definition at line 42 of file cccc_rec.h.

Extent_Table CCCC_Record::extent_table
protected

Definition at line 45 of file cccc_rec.h.

string CCCC_Record::flags
protected

Definition at line 46 of file cccc_rec.h.


The documentation for this class was generated from the following files: