creaContours_lib
OutlineGroup Class Reference

#include <OutlineGroup.h>

Public Types

enum  {
  PROPAGATION = 0, PLANE_SECTION = 1, OVERLAPED = 2, STRIP = 3,
  MANUAL_GROUP = 4
}
 

Public Member Functions

 OutlineGroup (std::string theName, int theGroupType)
 
 ~OutlineGroup ()
 
bool isMemberOfGroup (std::string aKeyName)
 
void removeOutline (std::string theNameToRemove, bool allOcurrencies=true)
 
void addOutline (std::string theNameNw)
 
std::string getName ()
 
void setName (std::string theNwName)
 
bool getIfVisibleGroup ()
 
void setIfVisibleGroup (bool theNwVisiblity)
 
bool getIfStaticGroup ()
 
void setIfStaticGroup (bool theNwStatic)
 
bool getIfSelectedGroup ()
 
void setIfSelectedGroup (bool theNwSelected)
 
bool getIfEditingGroup ()
 
void setIfEditingGroup (bool theNwEditing)
 
int getGroupType ()
 
void setGroupType (int theType)
 
int getOutlinesCount ()
 
void setIfEditingGroup (int theTotal)
 
void addOutline_PropagationType (std::string theOutlineKeyName)
 
void addOutline_PlaneSectionType (std::string theOutlineKeyName)
 
void addOutline_OverlapedType (std::string theOutlineKeyName)
 
void addOutline_StripType (std::string theOutlineKeyName)
 
void addOutline_ManualType (std::string theOutlineKeyName)
 
std::vector< std::string > getGroupOutlinesNames ()
 

Private Attributes

bool acceptsRepetedOutlines
 
std::string name
 
bool visibleGroup
 
bool selectedGroup
 
bool editingGroup
 
bool staticGroup
 
int groupType
 
int totalCount
 
std::vector< std::string > outlines_keyNames
 

Detailed Description

Definition at line 36 of file OutlineGroup.h.

Member Enumeration Documentation

anonymous enum
Enumerator
PROPAGATION 
PLANE_SECTION 
OVERLAPED 
STRIP 
MANUAL_GROUP 

Definition at line 252 of file OutlineGroup.h.

253  {
254  PROPAGATION = 0,
255  PLANE_SECTION = 1,
256  OVERLAPED = 2,
257  STRIP = 3,
258  MANUAL_GROUP = 4,
259  };

Constructor & Destructor Documentation

OutlineGroup::OutlineGroup ( std::string  theName,
int  theGroupType 
)

Definition at line 46 of file OutlineGroup.cxx.

References acceptsRepetedOutlines, editingGroup, groupType, MANUAL_GROUP, name, OVERLAPED, PLANE_SECTION, PROPAGATION, selectedGroup, staticGroup, STRIP, totalCount, and visibleGroup.

47  {
48  name = theName;
49  groupType = theGroupType;
50  totalCount = 0;
51 
53  {
54  visibleGroup = true;
55  selectedGroup = false;
56  editingGroup = false;
57  staticGroup = false;
58  acceptsRepetedOutlines = false;
59  }
60  else if ( groupType == STRIP )
61  {
62  visibleGroup = true;
63  selectedGroup = false;
64  editingGroup = false;
65  staticGroup = false;
67  }
68  else if ( groupType == OVERLAPED )
69  {
70  visibleGroup = true;
71  selectedGroup = false;
72  editingGroup = false;
73  staticGroup = true;
74  acceptsRepetedOutlines = false;
75  }
76  else if ( groupType == MANUAL_GROUP )
77  {
78  visibleGroup = true;
79  selectedGroup = true;
80  editingGroup = true;
81  staticGroup = false;
83  }
84  }
OutlineGroup::~OutlineGroup ( )

Definition at line 89 of file OutlineGroup.cxx.

References outlines_keyNames.

90  {
91  outlines_keyNames.clear();
92  }

Member Function Documentation

void OutlineGroup::addOutline ( std::string  theNameNw)

Definition at line 139 of file OutlineGroup.cxx.

References acceptsRepetedOutlines, isMemberOfGroup(), and outlines_keyNames.

140  {
141  bool ifInclude = acceptsRepetedOutlines ? true : !isMemberOfGroup(theNameNw);
142  if ( ifInclude )
143  outlines_keyNames.push_back(theNameNw);
144  /*
145  if( groupType == PROPAGATION )
146  addOutline_PropagationType( theNameNw );
147  else if ( groupType == PLANE_SECTION )
148  addOutline_PlaneSectionType( theNameNw );
149  else if ( groupType == OVERLAPED )
150  addOutline_OverlapedType( theNameNw );
151  else if ( groupType == STRIP )
152  addOutline_StripType( theNameNw );
153  else if ( groupType == MANUAL_GROUP )
154  addOutline_ManualType( theNameNw );
155  */
156  }

Here is the call graph for this function:

void OutlineGroup::addOutline_ManualType ( std::string  theOutlineKeyName)

Definition at line 327 of file OutlineGroup.cxx.

References outlines_keyNames.

328  {
329  outlines_keyNames.push_back(theOutlineKeyName);
330  }
void OutlineGroup::addOutline_OverlapedType ( std::string  theOutlineKeyName)

Definition at line 307 of file OutlineGroup.cxx.

References isMemberOfGroup(), and outlines_keyNames.

308  {
309  bool ifInclude = isMemberOfGroup(theOutlineKeyName);
310  if ( ifInclude )
311  outlines_keyNames.push_back(theOutlineKeyName);
312  }

Here is the call graph for this function:

void OutlineGroup::addOutline_PlaneSectionType ( std::string  theOutlineKeyName)

Definition at line 297 of file OutlineGroup.cxx.

References outlines_keyNames.

298  {
299  outlines_keyNames.push_back(theOutlineKeyName);
300  }
void OutlineGroup::addOutline_PropagationType ( std::string  theOutlineKeyName)

Definition at line 288 of file OutlineGroup.cxx.

References outlines_keyNames.

289  {
290  outlines_keyNames.push_back(theOutlineKeyName);
291  }
void OutlineGroup::addOutline_StripType ( std::string  theOutlineKeyName)

Definition at line 318 of file OutlineGroup.cxx.

References outlines_keyNames.

319  {
320  outlines_keyNames.push_back(theOutlineKeyName);
321  }
std::vector< std::string > OutlineGroup::getGroupOutlinesNames ( )

Definition at line 336 of file OutlineGroup.cxx.

References outlines_keyNames.

337  {
338  return outlines_keyNames;
339  }
int OutlineGroup::getGroupType ( )

Definition at line 252 of file OutlineGroup.cxx.

References groupType.

253  {
254  return groupType;
255  }
bool OutlineGroup::getIfEditingGroup ( )

Definition at line 234 of file OutlineGroup.cxx.

References editingGroup.

235  {
236  return editingGroup;
237  }
bool OutlineGroup::getIfSelectedGroup ( )

Definition at line 216 of file OutlineGroup.cxx.

References selectedGroup.

217  {
218  return selectedGroup;
219  }
bool OutlineGroup::getIfStaticGroup ( )

Definition at line 198 of file OutlineGroup.cxx.

References staticGroup.

199  {
200  return staticGroup;
201  }
bool OutlineGroup::getIfVisibleGroup ( )

Definition at line 180 of file OutlineGroup.cxx.

References visibleGroup.

181  {
182  return visibleGroup;
183  }
std::string OutlineGroup::getName ( )

Definition at line 162 of file OutlineGroup.cxx.

References name.

163  {
164  return name;
165  }
int OutlineGroup::getOutlinesCount ( )

Definition at line 279 of file OutlineGroup.cxx.

References totalCount.

280  {
281  return totalCount;
282  }
bool OutlineGroup::isMemberOfGroup ( std::string  aKeyName)

Definition at line 103 of file OutlineGroup.cxx.

References outlines_keyNames.

Referenced by addOutline(), and addOutline_OverlapedType().

104  {
105  for (int a=0; a < outlines_keyNames.size(); a++)
106  {
107  if ( outlines_keyNames[a].compare(aKeyName) == 0 )
108  return true;
109  }
110  return false;
111  }

Here is the caller graph for this function:

void OutlineGroup::removeOutline ( std::string  theNameToRemove,
bool  allOcurrencies = true 
)

Definition at line 117 of file OutlineGroup.cxx.

References acceptsRepetedOutlines, and outlines_keyNames.

118  {
119  std::vector <std::string>::iterator iter;
120 
121  bool ifContinue = true;
122  bool deleted = false;
123  for ( iter = outlines_keyNames.begin( ); iter != outlines_keyNames.end( ) && ifContinue; iter++ )
124  {
125  if ( (*iter).compare(theNameToRemove)==0 )
126  {
127  outlines_keyNames.erase(iter);
128  deleted = true;
129  }
130  ifContinue = allOcurrencies ? acceptsRepetedOutlines : deleted;
131  }
132  //delete iter; Se incluye esta linea o no ????????????????????
133  }
void OutlineGroup::setGroupType ( int  theType)

Definition at line 261 of file OutlineGroup.cxx.

References groupType.

262  {
263  groupType = theType;
264  }
void OutlineGroup::setIfEditingGroup ( bool  theNwEditing)

Definition at line 243 of file OutlineGroup.cxx.

References editingGroup.

244  {
245  editingGroup = theNwEditing;
246  }
void OutlineGroup::setIfEditingGroup ( int  theTotal)

Definition at line 270 of file OutlineGroup.cxx.

References totalCount.

271  {
272  totalCount = theTotal;
273  }
void OutlineGroup::setIfSelectedGroup ( bool  theNwSelected)

Definition at line 225 of file OutlineGroup.cxx.

References selectedGroup.

226  {
227  selectedGroup = theNwSelected;
228  }
void OutlineGroup::setIfStaticGroup ( bool  theNwStatic)

Definition at line 207 of file OutlineGroup.cxx.

References staticGroup.

208  {
209  staticGroup = theNwStatic;
210  }
void OutlineGroup::setIfVisibleGroup ( bool  theNwVisiblity)

Definition at line 189 of file OutlineGroup.cxx.

References visibleGroup.

190  {
191  visibleGroup = theNwVisiblity;
192  }
void OutlineGroup::setName ( std::string  theNwName)

Definition at line 171 of file OutlineGroup.cxx.

References name.

172  {
173  name = theNwName;
174  }

Member Data Documentation

bool OutlineGroup::acceptsRepetedOutlines
private

Definition at line 205 of file OutlineGroup.h.

Referenced by addOutline(), OutlineGroup(), and removeOutline().

bool OutlineGroup::editingGroup
private

Definition at line 225 of file OutlineGroup.h.

Referenced by getIfEditingGroup(), OutlineGroup(), and setIfEditingGroup().

int OutlineGroup::groupType
private

Definition at line 235 of file OutlineGroup.h.

Referenced by getGroupType(), OutlineGroup(), and setGroupType().

std::string OutlineGroup::name
private

Definition at line 210 of file OutlineGroup.h.

Referenced by getName(), OutlineGroup(), and setName().

bool OutlineGroup::selectedGroup
private

Definition at line 220 of file OutlineGroup.h.

Referenced by getIfSelectedGroup(), OutlineGroup(), and setIfSelectedGroup().

bool OutlineGroup::staticGroup
private

Definition at line 230 of file OutlineGroup.h.

Referenced by getIfStaticGroup(), OutlineGroup(), and setIfStaticGroup().

int OutlineGroup::totalCount
private

Definition at line 240 of file OutlineGroup.h.

Referenced by getOutlinesCount(), OutlineGroup(), and setIfEditingGroup().

bool OutlineGroup::visibleGroup
private

Definition at line 215 of file OutlineGroup.h.

Referenced by getIfVisibleGroup(), OutlineGroup(), and setIfVisibleGroup().


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