61 return retval.c_str();
67 if(strcmp(count_tag,
"NOM")==0)
74 else if(strcmp(count_tag,
"CBO")==0)
78 else if(strcmp(count_tag,
"NOC")==0)
82 relationship_map_t::iterator iter;
93 else if(strcmp(count_tag,
"DIT")==0)
100 static int recursion_depth=0;
102 if(recursion_depth>100)
104 cerr <<
"Recursion overflow attempting to calculate DIT for "
110 relationship_map_t::iterator iter;
117 (*iter).second->supplier_module_ptr(
project)->get_count(
"DIT");
118 if(retval<parent_depth+1)
120 retval=parent_depth+1;
128 else if(strncmp(count_tag,
"FI",2)==0)
130 relationship_map_t::iterator iter;
134 retval+=(*iter).second->get_count(count_tag);
138 else if(strncmp(count_tag,
"FO",2)==0)
140 relationship_map_t::iterator iter;
144 retval+=(*iter).second->get_count(count_tag);
148 else if(strncmp(count_tag,
"IF4",3)==0)
150 char if4_suffix=count_tag[3];
151 string fi_variant=
"FI", fo_variant=
"FO";
154 fi_variant+=if4_suffix;
155 fo_variant+=if4_suffix;
165 int extent_count=extPtr->
get_count(count_tag);
166 retval+=extent_count;
170 member_map_t::iterator memIter=
member_map.begin();
173 int member_count=(*memIter).second->get_count(count_tag);
174 retval+=member_count;
205 module_line.
ToFile(ofstr);
208 while(extent_ptr!=NULL)
215 extent_line.
ToFile(ofstr);
236 string line_keyword_dummy;
241 next_line.
Extract(line_keyword_dummy) &&
266 string module_name_dummy, module_type_dummy;
269 next_line.
Extract(line_keyword_dummy) &&
270 next_line.
Extract(module_name_dummy) &&
271 next_line.
Extract(module_type_dummy) &&
279 if(found_eptr!=new_extent)
281 cerr <<
"Failed to add extent for module "
303 cerr <<
"Ignoring member extent on line " <<
ifstr_line << endl;
CCCC_Table< CCCC_Module > module_table
virtual string key() const
relationship_map_t client_map
bool Insert(const string &s)
static CCCC_Project * get_active_project()
static const string MODULE_PREFIX
virtual int get_count(const char *count_tag)
int get_count(const char *count_tag)
CCCC_Project * current_loading_project
int GetFromItem(CCCC_Item &item)
int ToFile(ofstream &outfile)
T * find_or_insert(T *new_item_ptr)
bool FromFile(ifstream &ifstr)
Extent_Table extent_table
int AddToItem(CCCC_Item &item)
string name(int name_level) const
relationship_map_t supplier_map
static const string MODEXT_PREFIX
bool PeekAtNextLinePrefix(ifstream &ifstr, string pfx)
int FromFile(ifstream &infile)
bool ToFile(ofstream &ofstr)