Martin Javier Del Rio Llobera 10 yıl önce
ebeveyn
işleme
b0529e6293
2 değiştirilmiş dosya ile 55 ekleme ve 49 silme
  1. 52 46
      TP/.idea/workspace.xml
  2. 3 3
      TP/src/atleta.cpp

+ 52 - 46
TP/.idea/workspace.xml

@@ -37,32 +37,24 @@
   </component>
   <component name="FileEditorManager">
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
-      <file leaf-file-name="competencia.cpp" pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/competencia.cpp">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="690">
-              <caret line="46" column="0" selection-start-line="46" selection-start-column="0" selection-end-line="46" selection-end-column="0" />
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="competencia.h" pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/include/competencia.h">
+      <file leaf-file-name="tipos.h" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/include/tipos.h">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="195">
-              <caret line="14" column="4" selection-start-line="14" selection-start-column="4" selection-end-line="14" selection-end-column="31" />
+            <state relative-caret-position="0">
+              <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
               <folding />
             </state>
           </provider>
         </entry>
       </file>
-      <file leaf-file-name="atleta.h" pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/include/atleta.h">
+      <file leaf-file-name="jjoo.cpp" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/jjoo.cpp">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="540">
-              <caret line="36" column="9" selection-start-line="36" selection-start-column="9" selection-end-line="36" selection-end-column="37" />
-              <folding />
+            <state relative-caret-position="0">
+              <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+              <folding>
+                <element signature="e#0#28#0" expanded="true" />
+              </folding>
             </state>
           </provider>
         </entry>
@@ -71,17 +63,7 @@
         <entry file="file://$PROJECT_DIR$/src/atleta.cpp">
           <provider selected="true" editor-type-id="text-editor">
             <state relative-caret-position="384">
-              <caret line="78" column="14" selection-start-line="78" selection-start-column="14" selection-end-line="78" selection-end-column="14" />
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="tipos.h" pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/include/tipos.h">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="0">
-              <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+              <caret line="120" column="19" selection-start-line="120" selection-start-column="19" selection-end-line="120" selection-end-column="19" />
               <folding />
             </state>
           </provider>
@@ -204,7 +186,7 @@
     <property name="settings.editor.selected.configurable" value="reference.settingsdialog.IDE.editor.colors.Language Defaults" />
     <property name="settings.editor.splitter.proportion" value="0.2" />
   </component>
-  <component name="RunManager" selected="Google Test.All in competencia_tests.cpp">
+  <component name="RunManager" selected="Google Test.All in atleta_tests.cpp">
     <configuration default="false" name="All in atleta_tests.cpp" type="CMakeGoogleTestRunConfigurationType" factoryName="Google Test" temporary="true" PASS_PARENT_ENVS_2="true" PROJECT_NAME="TPI" TARGET_NAME="correrTests" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="TPI" RUN_TARGET_NAME="correrTests" TEST_PATTERN="atleta_tests.*:atleta_tests/*.*:*/atleta_tests.*/*:*/atleta_tests/*.*" TEST_MODE="PATTERN">
       <envs />
       <method />
@@ -410,8 +392,8 @@
     </list>
     <recent_temporary>
       <list size="2">
-        <item index="0" class="java.lang.String" itemvalue="Google Test.All in competencia_tests.cpp" />
-        <item index="1" class="java.lang.String" itemvalue="Google Test.All in atleta_tests.cpp" />
+        <item index="0" class="java.lang.String" itemvalue="Google Test.All in atleta_tests.cpp" />
+        <item index="1" class="java.lang.String" itemvalue="Google Test.All in competencia_tests.cpp" />
       </list>
     </recent_temporary>
   </component>
@@ -426,7 +408,7 @@
       <option name="presentableId" value="Default" />
       <updated>1475674371119</updated>
       <workItem from="1475674372900" duration="11445000" />
-      <workItem from="1475849412309" duration="468000" />
+      <workItem from="1475849412309" duration="990000" />
     </task>
     <servers />
   </component>
@@ -434,15 +416,21 @@
     <history-entry file="All_in_atleta_tests_cpp - 2016.10.07 at 11h 17m 48s.xml">
       <configuration name="All in atleta_tests.cpp" configurationId="CMakeGoogleTestRunConfigurationType" />
     </history-entry>
+    <history-entry file="All_in_atleta_tests_cpp - 2016.10.07 at 11h 26m 25s.xml">
+      <configuration name="All in atleta_tests.cpp" configurationId="CMakeGoogleTestRunConfigurationType" />
+    </history-entry>
     <history-entry file="All_in_competencia_tests_cpp - 2016.10.07 at 11h 17m 57s.xml">
       <configuration name="All in competencia_tests.cpp" configurationId="CMakeGoogleTestRunConfigurationType" />
     </history-entry>
     <history-entry file="correrTests - 2016.10.07 at 11h 16m 32s.xml">
       <configuration name="correrTests" configurationId="CMakeGoogleTestRunConfigurationType" />
     </history-entry>
+    <history-entry file="correrTests - 2016.10.07 at 11h 26m 20s.xml">
+      <configuration name="correrTests" configurationId="CMakeGoogleTestRunConfigurationType" />
+    </history-entry>
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="11913000" />
+    <option name="totallyTimeSpent" value="12435000" />
   </component>
   <component name="ToolWindowManager">
     <frame x="64" y="-4" width="1857" height="1085" extended-state="6" />
@@ -545,18 +533,20 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/include/tipos.h">
+    <entry file="file://$PROJECT_DIR$/tests/atleta_tests.cpp">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="0">
           <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
-          <folding />
+          <folding>
+            <element signature="e#0#24#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/competencia.cpp">
+    <entry file="file://$PROJECT_DIR$/include/atleta.h">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="690">
-          <caret line="46" column="0" selection-start-line="46" selection-start-column="0" selection-end-line="46" selection-end-column="0" />
+        <state relative-caret-position="540">
+          <caret line="36" column="9" selection-start-line="36" selection-start-column="9" selection-end-line="36" selection-end-column="37" />
           <folding />
         </state>
       </provider>
@@ -569,28 +559,44 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/include/atleta.h">
+    <entry file="file://$PROJECT_DIR$/src/competencia.cpp">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="540">
-          <caret line="36" column="9" selection-start-line="36" selection-start-column="9" selection-end-line="36" selection-end-column="37" />
+        <state relative-caret-position="690">
+          <caret line="46" column="0" selection-start-line="46" selection-start-column="0" selection-end-line="46" selection-end-column="0" />
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/tests/atleta_tests.cpp">
+    <entry file="file://$PROJECT_DIR$/src/jjoo.cpp">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="0">
           <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
           <folding>
-            <element signature="e#0#24#0" expanded="true" />
+            <element signature="e#0#28#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
+    <entry file="file://$PROJECT_DIR$/src/tipos.cpp">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="0">
+          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/include/tipos.h">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="0">
+          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+          <folding />
+        </state>
+      </provider>
+    </entry>
     <entry file="file://$PROJECT_DIR$/src/atleta.cpp">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="384">
-          <caret line="78" column="14" selection-start-line="78" selection-start-column="14" selection-end-line="78" selection-end-column="14" />
+          <caret line="120" column="19" selection-start-line="120" selection-start-column="19" selection-end-line="120" selection-end-column="19" />
           <folding />
         </state>
       </provider>

+ 3 - 3
TP/src/atleta.cpp

@@ -8,7 +8,7 @@ Atleta::Atleta(const string &n, const Genero &g, const int &a, const Pais &p, co
     _anioNacimiento = a;
     _nacionalidad = p;
     _ciaNumber = c;
-    _deportes = {}; //Esto rompe un invariante del tipo Atleta
+    _deportes = {make_pair("Tenis", 50)};
 
 }
 
@@ -62,7 +62,7 @@ void Atleta::entrenarNuevoDeporte(const Deporte &d, const int &c) {
 
     unsigned int n = 0;
     bool encontro = false;
-//Si el deporte ya esta en la lista solo cambia su capacidad
+    //Si el deporte ya esta en la lista solo cambia su capacidad
     while(n < _deportes.size()){
         if(_deportes.at(n).first==d){
             _deportes.at(n).second = c;
@@ -118,7 +118,7 @@ bool Atleta::operator==(const Atleta &a) const {
     //Si tienen mismo nombre, sexo, fecha de nacimiento, nacionalidad, cia number
     //deportes y capacidades en estos, retorna true, sino false.
     bool res = false;
-    //Checkea que odo sea igual
+    //Checkea que todo sea igual
     if(a.nombre() == this->nombre() && a.genero() == this->genero() && a.anioNacimiento() == this->anioNacimiento() && a.ciaNumber() == this->ciaNumber() && a.deportes()==this->deportes()){
         bool mismasCapacidades = true;
         int n = 0;