diff --git a/AUTHORS.txt b/AUTHORS.txt old mode 100644 new mode 100755 diff --git a/LICENSE.txt b/LICENSE.txt old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 index e6dce6d..1bdb5e0 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +<<<<<<< HEAD KN2C-Program ======== @@ -38,3 +39,8 @@ Faraz Fallahi (fffaraz@gmail.com)
Milad AbaieRad (milad.abaeirad@gmail.com )
Mohsen Raoufi (mohsen.raoufi.2007@gmail.com)
+ + +======= +# MergeTest +>>>>>>> 28ea424bd019bb77bc1ab02977d2f91922110bed diff --git a/autocompile.sh b/autocompile.sh old mode 100644 new mode 100755 diff --git a/autorun.sh b/autorun.sh old mode 100644 new mode 100755 diff --git a/config/settings.ini b/config/settings.ini old mode 100644 new mode 100755 index 9bc3f3c..fa32789 --- a/config/settings.ini +++ b/config/settings.ini @@ -1,14 +1,14 @@ ; KN2C SSL Configuration File [Game] -Mode=Real;Simulation; +Mode=Simulation;Real; [Team] -Color =Yellow;Blue; +Color =Blue;Yellow; Side =Left;Right; [Field] Size = Double;Single; [Transmitter] -SerialPort = /dev/ttyUSB1 +SerialPort = /dev/ttyUSB0 [VisionConfig] UsingCameras = 7;CAMERA_NONE = 0, CAMERA_0 = 1, CAMERA_1 = 2, CAMERA_2 = 3, CAMERA_3 = 4, CAMERA_BOTH_L = 5,CAMERA_BOTH_R = 6,CAMERA_ALL = 7 @@ -17,11 +17,11 @@ UsingCameras = 7;CAMERA_NONE = 0, CAMERA_0 = 1, CAMERA_1 = 2, CAMERA_2 = 3, CAME RefereeBall = 100 [Simulation] -RefIP = 224.5.23.1 +RefIP = 224.5.23.1;127.0.0.1; RefPort = 10001 RefPortNew = 10003 RefUseNew = 1 -VisionIP = 224.5.23.6;127.0.0.1; +VisionIP = 127.0.0.1;224.5.23.6; VisionPort = 10020 [Real] @@ -33,7 +33,7 @@ VisionIP = 224.5.23.2 VisionPort = 10006 [grSim] -CommandIP = 224.5.23.6;127.0.0.1; +CommandIP = 127.0.0.1;224.5.23.6; CommandPort = 20011 BluePort = 30011 YellowPort = 30012 diff --git a/config/vars.ini b/config/vars.ini old mode 100644 new mode 100755 diff --git a/config/vars_sim.ini b/config/vars_sim.ini old mode 100644 new mode 100755 diff --git a/old_code/skill/skillkick.cpp b/old_code/skill/skillkick.cpp old mode 100644 new mode 100755 diff --git a/old_code/skill/skillkick.h b/old_code/skill/skillkick.h old mode 100644 new mode 100755 diff --git a/old_code/tactic/tacticblock.cpp b/old_code/tactic/tacticblock.cpp old mode 100644 new mode 100755 diff --git a/old_code/tactic/tacticblock.h b/old_code/tactic/tacticblock.h old mode 100644 new mode 100755 diff --git a/old_code/tactic/tacticstop.cpp b/old_code/tactic/tacticstop.cpp old mode 100644 new mode 100755 diff --git a/old_code/tactic/tacticstop.h b/old_code/tactic/tacticstop.h old mode 100644 new mode 100755 diff --git a/src/3rdparty/fsa.h b/src/3rdparty/fsa.h old mode 100644 new mode 100755 diff --git a/src/3rdparty/stlastar.h b/src/3rdparty/stlastar.h old mode 100644 new mode 100755 diff --git a/src/ai/Skills.h b/src/ai/Skills.h old mode 100644 new mode 100755 diff --git a/src/ai/Skills.h.autosave b/src/ai/Skills.h.autosave new file mode 100755 index 0000000..7e8f8b9 --- /dev/null +++ b/src/ai/Skills.h.autosave @@ -0,0 +1,12 @@ +#ifndef SKILLS_H +#define SKILLS_H + +#include "skill.h" +#include "skill/skillkick.h" +#include "skill/skilltest.h" +#include "skill/skillonetouch.h" +#include "skill/skillpassreceive.h" +//seyed ali hejazi +#include "skill/shootball.h" + +#endif // SKILLS_H diff --git a/src/ai/agent.cpp b/src/ai/agent.cpp index da5ebc0..e49032a 100644 --- a/src/ai/agent.cpp +++ b/src/ai/agent.cpp @@ -6,8 +6,6 @@ Agent::Agent() : { wm = 0; id = -1; - - ctrl = new Controller(); } void Agent::setID(int id) @@ -31,33 +29,31 @@ void Agent::SendCommand(RobotCommand rc) { if(!wm->ourRobot[id].isValid) return; + if( id == 0 ) wm->debug_pos.clear(); ControllerInput ci = nav.calc(rc); - ControllerResult co = ctrl->calc(ci); - - if( !controllerResultIsValid(co) ) + if( id == 0 ) { - delete ctrl; - ctrl = new Controller(); + wm->debug_pos.append(ci.mid_pos.loc); + wm->debug_pos.append(ci.cur_pos.loc); } + ControllerResult co = ctrl.calc(ci); + // Real Game Packet RobotData reRD; - reRD.RID = id; - reRD.Vx_sp = co.rs.VX * 1000; - reRD.Vy_sp = co.rs.VY * 1000; - reRD.Wr_sp = co.rs.VW * 1000; - reRD.Vx = wm->ourRobot[id].vel.loc.x * 1000; - reRD.Vy = wm->ourRobot[id].vel.loc.y * 1000; - reRD.Wr = wm->ourRobot[id].vel.dir * 100; - reRD.alpha = wm->ourRobot[id].pos.dir * 1000; - reRD.KICK = (quint8) rc.kickspeedx; - reRD.CHIP = (quint8) rc.kickspeedz; - reRD.SPIN = 128;//for test + reRD.RID = id; + reRD.M0 = co.msR.M0; + reRD.M1 = co.msR.M1; + reRD.M2 = co.msR.M2; + reRD.M3 = co.msR.M3; + reRD.KCK = (quint8) rc.kickspeedx; + reRD.CHP = (quint8) rc.kickspeedz; + outputBuffer->wpck.AddRobot(reRD); + // grSim Packet grRobotData grRD; - grRD.rid = id; grRD.velx = co.rs.VX; grRD.vely = co.rs.VY; @@ -106,14 +102,7 @@ bool Agent::grSimPacketIsValid(grRobotData grRD) if( !isnan(grRD.velx) && !isnan(grRD.vely) && !isnan(grRD.velw) && !isnan(grRD.wheel1) && !isnan(grRD.wheel2) && !isnan(grRD.wheel3) && !isnan(grRD.wheel4) ) return true; - return false; -} -bool Agent::controllerResultIsValid(ControllerResult co) -{ - if( isnan(co.rs.VW) || isnan(co.rs.VX) || isnan(co.rs.VY) ) - return false; - - return true; } + diff --git a/src/ai/agent.h b/src/ai/agent.h index 264b772..1919a2b 100644 --- a/src/ai/agent.h +++ b/src/ai/agent.h @@ -81,7 +81,7 @@ class Agent : public Robot private: int id; - Controller *ctrl; + Controller ctrl; Navigation nav; OutputBuffer *outputBuffer; WorldModel *wm; diff --git a/src/ai/ai.cpp b/src/ai/ai.cpp old mode 100644 new mode 100755 index 23ec217..bcf9492 --- a/src/ai/ai.cpp +++ b/src/ai/ai.cpp @@ -14,6 +14,9 @@ #include "play/playtest2.h" #include "play/playlearning.h" #include "play/playformations.h" +//ali hejazi +#include "play/playhw2_1.h" +#include "play/mantomandefense.h" AI::AI(WorldModel *worldmodel, QString field_size, OutputBuffer *outputbuffer, QObject *parent) : QObject(parent), @@ -21,6 +24,7 @@ AI::AI(WorldModel *worldmodel, QString field_size, OutputBuffer *outputbuffer, Q outputbuffer(outputbuffer) { qDebug() << "AI Initialization..."; + qDebug()<<"WTF WTF WTF"; connect(&timer, SIGNAL(timeout()), this, SLOT(timer_timeout())); Field::setup_consts(field_size); diff --git a/src/ai/ai.h b/src/ai/ai.h old mode 100644 new mode 100755 diff --git a/src/ai/knowledge.cpp b/src/ai/knowledge.cpp old mode 100644 new mode 100755 diff --git a/src/ai/knowledge.h b/src/ai/knowledge.h old mode 100644 new mode 100755 diff --git a/src/ai/learning/hillclimbing.cpp b/src/ai/learning/hillclimbing.cpp old mode 100644 new mode 100755 diff --git a/src/ai/learning/hillclimbing.h b/src/ai/learning/hillclimbing.h old mode 100644 new mode 100755 diff --git a/src/ai/learning/kick_learning.cpp b/src/ai/learning/kick_learning.cpp old mode 100644 new mode 100755 diff --git a/src/ai/learning/kick_learning.h b/src/ai/learning/kick_learning.h old mode 100644 new mode 100755 diff --git a/src/ai/learning/policy.cpp b/src/ai/learning/policy.cpp old mode 100644 new mode 100755 diff --git a/src/ai/learning/policy.h b/src/ai/learning/policy.h old mode 100644 new mode 100755 diff --git a/src/ai/learning/policyMem.proto b/src/ai/learning/policyMem.proto old mode 100644 new mode 100755 diff --git a/src/ai/man2man.cpp b/src/ai/man2man.cpp old mode 100644 new mode 100755 diff --git a/src/ai/man2man.h b/src/ai/man2man.h old mode 100644 new mode 100755 diff --git a/src/ai/mapsearchnode.cpp b/src/ai/mapsearchnode.cpp old mode 100644 new mode 100755 index 9c87661..faee99a --- a/src/ai/mapsearchnode.cpp +++ b/src/ai/mapsearchnode.cpp @@ -1,3 +1,4 @@ + #include "mapsearchnode.h" #include "worldmodel.h" @@ -82,37 +83,102 @@ bool MapSearchNode::GetSuccessors(AStarSearch *astarsearch, MapSe wm->navigation_pos.clear(); //kamin - for(int i=0; inavigation_pos.append(node.vec); + //kamout + if(node.vec != parent) astarsearch->AddSuccessor(node); + } + } + } + else{ + int goal_p_count=8; + for(int j=0; jnavigation_pos.append(node.vec); - //kamout - if(node.vec != parent) astarsearch->AddSuccessor(node); + Vector2D v(p_dist, p_dist); + v.rotate(360/goal_p_count * j); + MapSearchNode node = obs[i].center() + v; + //kamin + bool checkNodeInterference = true; + + for(int g=0;gnavigation_pos.append(node.vec); + //kamout + if(node.vec != parent) astarsearch->AddSuccessor(node); + } } } } + + //test +// for(int i=obs.size()-2; inavigation_pos.append(node.vec); +// //kamout +// if(node.vec != parent) astarsearch->AddSuccessor(node); +// } +// } +// } + + + //test + MapSearchNode goal; goal.vec = astarsearch->GetSolutionEnd()->vec; astarsearch->AddSuccessor(goal); @@ -146,11 +212,8 @@ float MapSearchNode::GetCost(MapSearchNode &successor) QList MapSearchNode::getObsCircle() { QList result; - - double b_rad = ROBOT_RADIUS + 2*BALL_RADIUS; - double r_rad = ROBOT_RADIUS * 2; - - + double b_rad = ROBOT_RADIUS + 2*BALL_RADIUS+50; + double r_rad = ROBOT_RADIUS * 2+50; if(isBallObs && wm->ball.isValid) { Circle2D c(wm->ball.pos.loc, b_rad); @@ -164,7 +227,7 @@ QList MapSearchNode::getObsCircle() Vector2D bloc = wm->ball.pos.loc; double bang = (bloc - rpos.loc).dir().radian() - rpos.dir; - if (bang > M_PI) bang -= 2 * M_PI; + if (bang > M_PI) bang -= 2 * M_PI;// if (bang < -M_PI) bang += 2 * M_PI; if(fabs(bang) > M_PI_4 * 3 / 4) @@ -192,6 +255,15 @@ QList MapSearchNode::getObsCircle() result.append(c); } + + + Circle2D oppGoal(Field::oppGoalCenter,1000); + Circle2D ourGoal(Field::ourGoalCenter,1000); + + result.append(oppGoal); + result.append(ourGoal); + + // for(int i=0; ipredict_pos.size(); i++) // { // Circle2D c(wm->predict_pos[i], b_rad); diff --git a/src/ai/mapsearchnode.h b/src/ai/mapsearchnode.h old mode 100644 new mode 100755 diff --git a/src/ai/mwbm.cpp b/src/ai/mwbm.cpp old mode 100644 new mode 100755 diff --git a/src/ai/mwbm.h b/src/ai/mwbm.h old mode 100644 new mode 100755 diff --git a/src/ai/navigation.cpp b/src/ai/navigation.cpp old mode 100644 new mode 100755 diff --git a/src/ai/navigation.h b/src/ai/navigation.h old mode 100644 new mode 100755 diff --git a/src/ai/play.cpp b/src/ai/play.cpp old mode 100644 new mode 100755 index 9270d7e..00ba943 --- a/src/ai/play.cpp +++ b/src/ai/play.cpp @@ -36,10 +36,9 @@ Tactic* Play::getTactic(int id) if(id >= PLAYERS_MAX_NUM || id < 0) return NULL; return tactics[id]; } - bool Play::conditionChanged() { - bool out; + bool out = true; QList activeAgents=wm->kn->ActiveAgents(); if(activeAgents.size() != numberOfPlayers) { diff --git a/src/ai/play.h b/src/ai/play.h old mode 100644 new mode 100755 diff --git a/src/ai/play/freeKicks/freeKicks.h b/src/ai/play/freeKicks/freeKicks.h old mode 100644 new mode 100755 index b5020c3..1512737 --- a/src/ai/play/freeKicks/freeKicks.h +++ b/src/ai/play/freeKicks/freeKicks.h @@ -14,7 +14,11 @@ #include "freekick10.h" #include "freekick11.h" #include "freekick47.h" - +//armin sadreddin +#include "freekicktest1.h" +//armin sadreddin #include "freekickdirect.h" - +//kamran +#include"freekicktest2.h" +//kamran #endif // FREEKICKS_H diff --git a/src/ai/play/freeKicks/freekick1.cpp b/src/ai/play/freeKicks/freekick1.cpp old mode 100644 new mode 100755 index e218580..b3ddf53 --- a/src/ai/play/freeKicks/freekick1.cpp +++ b/src/ai/play/freeKicks/freekick1.cpp @@ -176,7 +176,7 @@ void freeKick1::execute() activeAgents.removeOne(tAttackerMid->getID()); if(wm->cmgs.ourIndirectKick()) { - // recieverID = tAttackerMid->findBestPlayerForPass(); + recieverID = tAttackerMid->findBestPlayerForPass(); if(recieverID != -1) { wm->ourRobot[recieverID].Status = AgentStatus::RecievingPass; diff --git a/src/ai/play/freeKicks/freekick1.h b/src/ai/play/freeKicks/freekick1.h old mode 100644 new mode 100755 diff --git a/src/ai/play/freeKicks/freekick10.cpp b/src/ai/play/freeKicks/freekick10.cpp old mode 100644 new mode 100755 diff --git a/src/ai/play/freeKicks/freekick10.h b/src/ai/play/freeKicks/freekick10.h old mode 100644 new mode 100755 diff --git a/src/ai/play/freeKicks/freekick11.cpp b/src/ai/play/freeKicks/freekick11.cpp old mode 100644 new mode 100755 diff --git a/src/ai/play/freeKicks/freekick11.h b/src/ai/play/freeKicks/freekick11.h old mode 100644 new mode 100755 diff --git a/src/ai/play/freeKicks/freekick2.cpp b/src/ai/play/freeKicks/freekick2.cpp old mode 100644 new mode 100755 diff --git a/src/ai/play/freeKicks/freekick2.h b/src/ai/play/freeKicks/freekick2.h old mode 100644 new mode 100755 diff --git a/src/ai/play/freeKicks/freekick3.cpp b/src/ai/play/freeKicks/freekick3.cpp old mode 100644 new mode 100755 diff --git a/src/ai/play/freeKicks/freekick3.h b/src/ai/play/freeKicks/freekick3.h old mode 100644 new mode 100755 diff --git a/src/ai/play/freeKicks/freekick4.cpp b/src/ai/play/freeKicks/freekick4.cpp old mode 100644 new mode 100755 diff --git a/src/ai/play/freeKicks/freekick4.h b/src/ai/play/freeKicks/freekick4.h old mode 100644 new mode 100755 diff --git a/src/ai/play/freeKicks/freekick47.cpp b/src/ai/play/freeKicks/freekick47.cpp old mode 100644 new mode 100755 diff --git a/src/ai/play/freeKicks/freekick47.h b/src/ai/play/freeKicks/freekick47.h old mode 100644 new mode 100755 diff --git a/src/ai/play/freeKicks/freekick5.cpp b/src/ai/play/freeKicks/freekick5.cpp old mode 100644 new mode 100755 diff --git a/src/ai/play/freeKicks/freekick5.h b/src/ai/play/freeKicks/freekick5.h old mode 100644 new mode 100755 diff --git a/src/ai/play/freeKicks/freekick6.cpp b/src/ai/play/freeKicks/freekick6.cpp old mode 100644 new mode 100755 diff --git a/src/ai/play/freeKicks/freekick6.h b/src/ai/play/freeKicks/freekick6.h old mode 100644 new mode 100755 diff --git a/src/ai/play/freeKicks/freekick7.cpp b/src/ai/play/freeKicks/freekick7.cpp old mode 100644 new mode 100755 diff --git a/src/ai/play/freeKicks/freekick7.h b/src/ai/play/freeKicks/freekick7.h old mode 100644 new mode 100755 diff --git a/src/ai/play/freeKicks/freekick8.cpp b/src/ai/play/freeKicks/freekick8.cpp old mode 100644 new mode 100755 diff --git a/src/ai/play/freeKicks/freekick8.h b/src/ai/play/freeKicks/freekick8.h old mode 100644 new mode 100755 diff --git a/src/ai/play/freeKicks/freekick9.cpp b/src/ai/play/freeKicks/freekick9.cpp old mode 100644 new mode 100755 diff --git a/src/ai/play/freeKicks/freekick9.h b/src/ai/play/freeKicks/freekick9.h old mode 100644 new mode 100755 diff --git a/src/ai/play/freeKicks/freekick_base.cpp b/src/ai/play/freeKicks/freekick_base.cpp old mode 100644 new mode 100755 diff --git a/src/ai/play/freeKicks/freekick_base.h b/src/ai/play/freeKicks/freekick_base.h old mode 100644 new mode 100755 diff --git a/src/ai/play/freeKicks/freekickdirect.cpp b/src/ai/play/freeKicks/freekickdirect.cpp old mode 100644 new mode 100755 diff --git a/src/ai/play/freeKicks/freekickdirect.h b/src/ai/play/freeKicks/freekickdirect.h old mode 100644 new mode 100755 diff --git a/src/ai/play/freeKicks/freekicktest1.cpp b/src/ai/play/freeKicks/freekicktest1.cpp new file mode 100644 index 0000000..341e8be --- /dev/null +++ b/src/ai/play/freeKicks/freekicktest1.cpp @@ -0,0 +1,190 @@ +#include "freekicktest1.h" + +freekicktest1::freekicktest1(WorldModel *worldmodel, QObject *parent) : + freeKick_base(worldmodel,parent) +{ + freeKickStart = false; + freeKickRegion = fkRegion::RightRegion; + oppLevel = Level::Beginner; +} + +int freekicktest1::enterCondition(Level level) +{ + if( wm->kn->IsInsideRect(wm->ball.pos.loc, Vector2D(0.44*Field::MaxX,Field::MaxY) + , Vector2D(Field::MaxX,0.82*Field::MaxY)) + || + wm->kn->IsInsideRect(wm->ball.pos.loc, Vector2D(0.44*Field::MaxX,0.82*Field::MinY) + , Vector2D(Field::MaxX,Field::MinY))) + { + if( level == this->oppLevel) + return 600; + else + return 300; + } + + return 0; +} + +void freekicktest1::resetValues() +{ + this->rolesIsInit = false; +} + +void freekicktest1::setPositions() +{ + Position leftDefPos,rightDefPos,goaliePos; + int leftID = -1, rightID = -1 , midID = -1; + bool leftNav, rightNav; + + if( wm->ourRobot[previousLeftID].Role != AgentRole::DefenderLeft ) + previousLeftID = -1; + + if( wm->ourRobot[previousRightID].Role != AgentRole::DefenderRight ) + previousRightID = -1; + + if( (wm->ourRobot[tDefenderLeft->getID()].Role == AgentRole::DefenderLeft) && (leftChecker < PresenceCounter) ) + { + leftID = tDefenderLeft->getID(); + this->previousLeftID = tDefenderLeft->getID();; + } + + if( wm->ourRobot[tDefenderRight->getID()].Role == AgentRole::DefenderRight && (rightChecker < PresenceCounter) ) + { + rightID = tDefenderRight->getID(); + this->previousRightID = tDefenderRight->getID();; + } + + if( leftChecker > PresenceCounter || leftID == -1 || !wm->kn->robotIsIdle(leftID)) + { + midID = rightID; + leftID = -1; + } + + if( rightChecker > PresenceCounter || rightID == -1 || !wm->kn->robotIsIdle(rightID)) + { + midID = leftID; + rightID = -1; + } + + zonePositions(leftID,rightID,midID,goaliePos,leftDefPos,leftNav,rightDefPos,rightNav); + + tDefenderLeft->setIdlePosition(leftDefPos); + tDefenderLeft->setUseNav(leftNav); + tDefenderRight->setIdlePosition(rightDefPos); + tDefenderRight->setUseNav(rightNav); + + if( leftID != -1) + { + if( (wm->kn->robotIsIdle(leftID)) && (wm->ourRobot[leftID].pos.loc - leftDefPos.loc).length() > 250 ) + leftChecker++; + else + leftChecker = 0; + } + else + { + if( !haltedRobotIsInField(previousLeftID) ) + leftChecker = 0; + } + + if( rightID != -1) + { + if( (wm->kn->robotIsIdle(rightID)) && (wm->ourRobot[rightID].pos.loc - rightDefPos.loc).length() > 250 ) + rightChecker++; + else + rightChecker = 0; + } + else + { + if( !haltedRobotIsInField(previousRightID) ) + rightChecker = 0; + } + + tGolie->setIdlePosition(goaliePos); + + Position left,right; + if( wm->ball.pos.loc.y < 0 ) + { + left.loc = Vector2D(Field::MaxX/3,wm->ball.pos.loc.y+200); + right.loc = Vector2D(Field::MaxX/3,Field::oppGoalCenter.y+400); + } + else + { + left.loc = Vector2D(Field::MaxX/3,wm->ball.pos.loc.y-200); + right.loc = Vector2D(Field::MaxX/3,Field::oppGoalCenter.y-400); + } + + left.dir = ( Field::oppGoalCenter - wm->ourRobot[tAttackerLeft->getID()].pos.loc).dir().radian(); + tAttackerLeft->setIdlePosition(left); + + right.dir = ( Field::oppGoalCenter - wm->ourRobot[tAttackerRight->getID()].pos.loc).dir().radian(); + tAttackerRight->setIdlePosition(right); + + leftPos = left; + rightPos = right; + + tAttackerMid->setIdlePosition(wm->ourRobot[tAttackerMid->getID()].pos); + + if( checkDistances() ) + { + recieverID = tAttackerMid->findBestPlayerForPass(); + tAttackerMid->youHavePermissionForKick(recieverID); + } + else + { + tAttackerMid->youDontHavePermissionForKick(); + recieverID = -1; + } +} + +bool freekicktest1::checkDistances() +{ + bool leftInPos = true , rightInPos = true; + + if( wm->ourRobot[tAttackerLeft->getID()].isValid && tAttackerLeft->getID() != -1) + { + //if( !wm->kn->ReachedToPos(wm->ourRobot[tAttackerLeft->getID()].pos.loc, Vector2D(Field::MaxX/3,Field::oppGoalPost_L.y+200), 200)) + if( (wm->ourRobot[tAttackerLeft->getID()].pos.loc - leftPos.loc).length() > 200) + leftInPos = false; + } + + if( wm->ourRobot[tAttackerRight->getID()].isValid && tAttackerRight->getID() != -1) + { + // if( !wm->kn->ReachedToPos(wm->ourRobot[tAttackerRight->getID()].pos.loc, Vector2D(Field::MaxX/3,Field::oppGoalPost_R.y-200),200) ) + if( (wm->ourRobot[tAttackerRight->getID()].pos.loc - rightPos.loc).length() > 200) + rightInPos = false; + } + + return (rightInPos && leftInPos); +} + +void freekicktest1::execute() +{ + QList activeAgents=wm->kn->ActiveAgents(); + + // if(!rolesIsInit) + initRole(); + + for(int i=0;iisKicker(); + tAttackerMid->setFreeKickType(kickType::FreeKickTest1); + + activeAgents.removeOne(tAttackerMid->getID()); + if(wm->cmgs.ourIndirectKick()) + { + // recieverID = tAttackerMid->findBestPlayerForPass(); + if(recieverID != -1) + { + wm->ourRobot[recieverID].Status = AgentStatus::RecievingPass; + activeAgents.removeOne(recieverID); + } + } + while(activeAgents.size() > 0) + { + wm->ourRobot[activeAgents.takeFirst()].Status = AgentStatus::Idle; + } +} diff --git a/src/ai/play/freeKicks/freekicktest1.h b/src/ai/play/freeKicks/freekicktest1.h new file mode 100644 index 0000000..98f0358 --- /dev/null +++ b/src/ai/play/freeKicks/freekicktest1.h @@ -0,0 +1,22 @@ +#ifndef FREEKICKTEST1_H +#define FREEKICKTEST1_H + +#include "freekick_base.h" + +class freekicktest1 : public freeKick_base +{ +public: + explicit freekicktest1(WorldModel *worldmodel, QObject *parent = 0); + virtual void execute(); + virtual int enterCondition(Level level); + virtual void resetValues(); + +private: + void setPositions(); + bool checkDistances(); + + int recieverID; + Position rightPos, leftPos; +}; + +#endif // FREEKICKTEST1_H diff --git a/src/ai/play/freeKicks/freekicktest2.cpp b/src/ai/play/freeKicks/freekicktest2.cpp new file mode 100644 index 0000000..387ce6a --- /dev/null +++ b/src/ai/play/freeKicks/freekicktest2.cpp @@ -0,0 +1,168 @@ +#include "freekicktest2.h" +freeKickTest2::freeKickTest2(WorldModel *worldmodel, QObject *parent) : + freeKick_base(worldmodel,parent) +{ + freeKickStart = false; + freeKickRegion = fkRegion::RightRegion; + oppLevel = Level::Beginner; +} + +int freeKickTest2::enterCondition(Level level) +{ + if(wm->kn->IsInsideRect(wm->ball.pos.loc,Vector2D(Field::MinX,Field::MaxY),Vector2D(0,Field::MinY))){ + if(oppLevel==level) + return 700; + else + return 100; + } +} +void freeKickTest2::resetValues() +{ + this->rolesIsInit = false; +} + +void freeKickTest2::setPositions() +{ + Position leftDefPos,rightDefPos,goaliePos; + int leftID = -1, rightID = -1 , midID = -1; + bool leftNav, rightNav; + + if( wm->ourRobot[previousLeftID].Role != AgentRole::DefenderLeft ) + previousLeftID = -1; + + if( wm->ourRobot[previousRightID].Role != AgentRole::DefenderRight ) + previousRightID = -1; + + if( (wm->ourRobot[tDefenderLeft->getID()].Role == AgentRole::DefenderLeft) && (leftChecker < PresenceCounter) ) + { + leftID = tDefenderLeft->getID(); + this->previousLeftID = tDefenderLeft->getID();; + } + + if( wm->ourRobot[tDefenderRight->getID()].Role == AgentRole::DefenderRight && (rightChecker < PresenceCounter) ) + { + rightID = tDefenderRight->getID(); + this->previousRightID = tDefenderRight->getID();; + } + + if( leftChecker > PresenceCounter || leftID == -1 || !wm->kn->robotIsIdle(leftID)) + { + midID = rightID; + leftID = -1; + } + + if( rightChecker > PresenceCounter || rightID == -1 || !wm->kn->robotIsIdle(rightID)) + { + midID = leftID; + rightID = -1; + } + + zonePositions(leftID,rightID,midID,goaliePos,leftDefPos,leftNav,rightDefPos,rightNav); + + tDefenderLeft->setIdlePosition(leftDefPos); + tDefenderLeft->setUseNav(leftNav); + tDefenderRight->setIdlePosition(rightDefPos); + tDefenderRight->setUseNav(rightNav); + + if( leftID != -1) + { + if( (wm->kn->robotIsIdle(leftID)) && (wm->ourRobot[leftID].pos.loc - leftDefPos.loc).length() > 250 ) + leftChecker++; + else + leftChecker = 0; + } + else + { + if( !haltedRobotIsInField(previousLeftID) ) + leftChecker = 0; + } + + if( rightID != -1) + { + if( (wm->kn->robotIsIdle(rightID)) && (wm->ourRobot[rightID].pos.loc - rightDefPos.loc).length() > 250 ) + rightChecker++; + else + rightChecker = 0; + } + else + { + if( !haltedRobotIsInField(previousRightID) ) + rightChecker = 0; + } + + tGolie->setIdlePosition(goaliePos); + Position leftAttacker,rightAttacker; + tAttackerMid->setIdlePosition(wm->ourRobot[tAttackerMid->getID()].pos); + int indexMax=maxOppThreshold(); + int indexMin=minOppThreshold(); + leftAttacker.loc=Vector2D(Field::MaxX*0.5,wm->ourRobot[indexMax].pos.loc.y); + rightAttacker.loc=Vector2D(Field::MaxX*0.5,wm->ourRobot[indexMin].pos.loc.y); + leftAttacker.dir=(Field::oppGoalCenter-wm->ourRobot[tAttackerLeft->getID()].pos.loc).dir().radian(); + rightAttacker.dir=(Field::oppGoalCenter-wm->ourRobot[tAttackerRight->getID()].pos.loc).dir().radian(); + leftPos=leftAttacker; + rightPos=rightAttacker; + if(checkDistances()){ + recieverID=tAttackerMid->findBestPlayerForPass(); + tAttackerMid->youHavePermissionForKick(recieverID); + } + else { + recieverID=-1; + tAttackerMid->youDontHavePermissionForKick(); + } +} +int freeKickTest2::maxOppThreshold(){ + int index; + double max=0; + QList oppAgent=wm->kn->ActiveOppAgents(); + for(int i=0;iourRobot[oppAgent.at(i)].pos.loc.y){ + max=wm->ourRobot[oppAgent.at(i)].pos.loc.y; + index=oppAgent.at(i); + } + } + return index; +} + +int freeKickTest2::minOppThreshold(){ + int index; + double min; + QList oppAgent=wm->kn->ActiveOppAgents(); + min=oppAgent.at(0); + for(int i=0;iwm->ourRobot[oppAgent.at(i)].pos.loc.y){ + min=wm->ourRobot[oppAgent.at(i)].pos.loc.y; + index=oppAgent.at(i); + } + } + return index; +} + +bool freeKickTest2::checkDistances() +{ + bool value=false; + if(tAttackerRight->getID()!=-1 && tAttackerLeft->getID()!=-1 && !wm->ourRobot[tAttackerLeft->getID()].isValid && !wm->ourRobot[tAttackerRight->getID()].isValid) + if((wm->ourRobot[tAttackerLeft->getID()].pos.loc.y-leftPos.loc.y)<200 && (wm->ourRobot[tAttackerRight->getID()].pos.loc.y-rightPos.loc.y)<200){ + value=true; + } + return value; +} + +void freeKickTest2::execute() +{ + QList activeAgent=wm->kn->ActiveAgents(); + for(int i=0;iisKicker(recieverID); + tAttackerMid->setFreeKickType(kickType::FreekickTest2); + activeAgent.removeOne(tAttackerMid->getID()); + if(wm->cmgs.ourIndirectKick()){ + if(recieverID!=-1){ + wm->ourRobot[recieverID].Status=AgentStatus::RecievingPass; + activeAgent.removeOne(recieverID); + } + } + while(activeAgent.size()>0){ + wm->ourRobot[activeAgent.takeFirst()].Status=AgentStatus::Idle; + } +} diff --git a/src/ai/play/freeKicks/freekicktest2.h b/src/ai/play/freeKicks/freekicktest2.h new file mode 100644 index 0000000..338d625 --- /dev/null +++ b/src/ai/play/freeKicks/freekicktest2.h @@ -0,0 +1,22 @@ +#ifndef FREEKICKTEST2_H +#define FREEKICKTEST2_H +#include"freekick_base.h" +class freeKickTest2 : public freeKick_base +{ +public: + explicit freeKickTest2(WorldModel *worldmodel, QObject *parent = 0); + virtual void execute(); + virtual int enterCondition(Level level); + virtual void resetValues(); + +private: + void setPositions(); + bool checkDistances(); + int maxOppThreshold(); + int minOppThreshold(); + int recieverID; + Position rightPos, leftPos; + +}; + +#endif // FREEKICKTEST2_H diff --git a/src/ai/play/freeKicks/freekicktest3.cpp b/src/ai/play/freeKicks/freekicktest3.cpp new file mode 100644 index 0000000..2609dbf --- /dev/null +++ b/src/ai/play/freeKicks/freekicktest3.cpp @@ -0,0 +1,191 @@ +#include "freekicktest3.h" +#include "freekick1.h" + +freeKick1::freeKick1(WorldModel *worldmodel, QObject *parent) : + freeKick_base(worldmodel,parent) +{ + freeKickStart = false; + freeKickRegion = fkRegion::RightRegion; + oppLevel = Level::Beginner; +} + +int freeKick1::enterCondition(Level level) +{ + if( wm->kn->IsInsideRect(wm->ball.pos.loc, Vector2D(0.44*Field::MaxX,Field::MaxY) + , Vector2D(Field::MaxX,0.82*Field::MaxY)) + || + wm->kn->IsInsideRect(wm->ball.pos.loc, Vector2D(0.44*Field::MaxX,0.82*Field::MinY) + , Vector2D(Field::MaxX,Field::MinY))) + { + if( level == this->oppLevel) + return 600; + else + return 300; + } + + return 0; +} + +void freeKick1::resetValues() +{ + this->rolesIsInit = false; +} + +void freeKick1::setPositions() +{ + Position leftDefPos,rightDefPos,goaliePos; + int leftID = -1, rightID = -1 , midID = -1; + bool leftNav, rightNav; + + if( wm->ourRobot[previousLeftID].Role != AgentRole::DefenderLeft ) + previousLeftID = -1; + + if( wm->ourRobot[previousRightID].Role != AgentRole::DefenderRight ) + previousRightID = -1; + + if( (wm->ourRobot[tDefenderLeft->getID()].Role == AgentRole::DefenderLeft) && (leftChecker < PresenceCounter) ) + { + leftID = tDefenderLeft->getID(); + this->previousLeftID = tDefenderLeft->getID();; + } + + if( wm->ourRobot[tDefenderRight->getID()].Role == AgentRole::DefenderRight && (rightChecker < PresenceCounter) ) + { + rightID = tDefenderRight->getID(); + this->previousRightID = tDefenderRight->getID();; + } + + if( leftChecker > PresenceCounter || leftID == -1 || !wm->kn->robotIsIdle(leftID)) + { + midID = rightID; + leftID = -1; + } + + if( rightChecker > PresenceCounter || rightID == -1 || !wm->kn->robotIsIdle(rightID)) + { + midID = leftID; + rightID = -1; + } + + zonePositions(leftID,rightID,midID,goaliePos,leftDefPos,leftNav,rightDefPos,rightNav); + + tDefenderLeft->setIdlePosition(leftDefPos); + tDefenderLeft->setUseNav(leftNav); + tDefenderRight->setIdlePosition(rightDefPos); + tDefenderRight->setUseNav(rightNav); + + if( leftID != -1) + { + if( (wm->kn->robotIsIdle(leftID)) && (wm->ourRobot[leftID].pos.loc - leftDefPos.loc).length() > 250 ) + leftChecker++; + else + leftChecker = 0; + } + else + { + if( !haltedRobotIsInField(previousLeftID) ) + leftChecker = 0; + } + + if( rightID != -1) + { + if( (wm->kn->robotIsIdle(rightID)) && (wm->ourRobot[rightID].pos.loc - rightDefPos.loc).length() > 250 ) + rightChecker++; + else + rightChecker = 0; + } + else + { + if( !haltedRobotIsInField(previousRightID) ) + rightChecker = 0; + } + + tGolie->setIdlePosition(goaliePos); + + Position left,right; + if( wm->ball.pos.loc.y < 0 ) + { + left.loc = Vector2D(Field::MaxX/3,wm->ball.pos.loc.y+200); + right.loc = Vector2D(Field::MaxX/3,Field::oppGoalCenter.y+400); + } + else + { + left.loc = Vector2D(Field::MaxX/3,wm->ball.pos.loc.y-200); + right.loc = Vector2D(Field::MaxX/3,Field::oppGoalCenter.y-400); + } + + left.dir = ( Field::oppGoalCenter - wm->ourRobot[tAttackerLeft->getID()].pos.loc).dir().radian(); + tAttackerLeft->setIdlePosition(left); + + right.dir = ( Field::oppGoalCenter - wm->ourRobot[tAttackerRight->getID()].pos.loc).dir().radian(); + tAttackerRight->setIdlePosition(right); + + leftPos = left; + rightPos = right; + + tAttackerMid->setIdlePosition(wm->ourRobot[tAttackerMid->getID()].pos); + + if( checkDistances() ) + { + recieverID = tAttackerMid->findBestPlayerForPass(); + tAttackerMid->youHavePermissionForKick(recieverID); + } + else + { + tAttackerMid->youDontHavePermissionForKick(); + recieverID = -1; + } +} + +bool freeKick1::checkDistances() +{ + bool leftInPos = true , rightInPos = true; + + if( wm->ourRobot[tAttackerLeft->getID()].isValid && tAttackerLeft->getID() != -1) + { + //if( !wm->kn->ReachedToPos(wm->ourRobot[tAttackerLeft->getID()].pos.loc, Vector2D(Field::MaxX/3,Field::oppGoalPost_L.y+200), 200)) + if( (wm->ourRobot[tAttackerLeft->getID()].pos.loc - leftPos.loc).length() > 200) + leftInPos = false; + } + + if( wm->ourRobot[tAttackerRight->getID()].isValid && tAttackerRight->getID() != -1) + { + // if( !wm->kn->ReachedToPos(wm->ourRobot[tAttackerRight->getID()].pos.loc, Vector2D(Field::MaxX/3,Field::oppGoalPost_R.y-200),200) ) + if( (wm->ourRobot[tAttackerRight->getID()].pos.loc - rightPos.loc).length() > 200) + rightInPos = false; + } + + return (rightInPos && leftInPos); +} + +void freeKick1::execute() +{ + QList activeAgents=wm->kn->ActiveAgents(); + + // if(!rolesIsInit) + initRole(); + + for(int i=0;iisKicker(); + tAttackerMid->setFreeKickType(kickType::FreeKick1); + + activeAgents.removeOne(tAttackerMid->getID()); + if(wm->cmgs.ourIndirectKick()) + { + recieverID = tAttackerMid->findBestPlayerForPass(); + if(recieverID != -1) + { + wm->ourRobot[recieverID].Status = AgentStatus::RecievingPass; + activeAgents.removeOne(recieverID); + } + } + while(activeAgents.size() > 0) + { + wm->ourRobot[activeAgents.takeFirst()].Status = AgentStatus::Idle; + } +} diff --git a/src/ai/play/mantomandefense.cpp b/src/ai/play/mantomandefense.cpp new file mode 100755 index 0000000..8b3b2a9 --- /dev/null +++ b/src/ai/play/mantomandefense.cpp @@ -0,0 +1,59 @@ +#include "mantomandefense.h" + +mantomanDefense::mantomanDefense(WorldModel *worldmodel, QObject *parent) : + Play("PlayTest", worldmodel, parent) +{ + +} + +int mantomanDefense::enterCondition() +{ + return 0; +} + +void mantomanDefense::initRole() +{ +} + +void mantomanDefense::execute() +{ + + QList diffender = wm->kn->ActiveAgents(); + QList enemy = wm->kn->ActiveOppAgents(); + QList > distances; + for(int i = diffender.length() ; i > 0 ; i--){ + AlgorithmMin(diffender,enemy); + } +} + +void mantomanDefense::AlgorithmMin(QList& enm,QList& ally){ + QList > distances; + for(int i = 0 ; i < ally.length() ; i++){ + QList dists; + for(int j = 0 ; j < enm.length() ; j++){ + Segment2D seg(wm->ourRobot[ally[i]].pos.loc,wm->oppRobot[enm[j]].pos.loc); + std::cout << "i am here" << std::endl; + dists.append(seg.length()); + } + distances.append(dists); + } + + double min = 99999999; + int minIndex1 = 0; + int minIndex2 = 0; + for(int i = 0 ; i < ally.length() ; i++){ + for(int j = 0 ; j < enm.length() ; j++){ + if(distances[i][j] < min){ + min = distances[i][j]; + minIndex1 = i; + minIndex2 = j; + } + } + } + tacticmantoman = new TacticTestStandingForwardEnemy(wm); + tacticmantoman->setDistance(4); + tacticmantoman->setOppRobotIndex(enm[minIndex2]); + tactics[ally[minIndex1]] = tacticmantoman; + ally.removeAt(minIndex1); + enm.removeAt(minIndex2); +} diff --git a/src/ai/play/mantomandefense.h b/src/ai/play/mantomandefense.h new file mode 100755 index 0000000..3a544e4 --- /dev/null +++ b/src/ai/play/mantomandefense.h @@ -0,0 +1,19 @@ +#ifndef MANTOMANDEFENSE_H +#define MANTOMANDEFENSE_H +#include "play.h" +#include "man2man.h" + +class mantomanDefense : public Play +{ + Q_OBJECT +public: + explicit mantomanDefense(WorldModel *worldmodel, QObject *parent = 0); + virtual void execute(); + virtual void initRole(); + virtual int enterCondition(); +private: + TacticTestStandingForwardEnemy* tacticmantoman; + void AlgorithmMin(QList& enm, QList& ally); +}; + +#endif // MANTOMANDEFENSE_H diff --git a/src/ai/play/playcontrol.cpp b/src/ai/play/playcontrol.cpp old mode 100644 new mode 100755 diff --git a/src/ai/play/playcontrol.h b/src/ai/play/playcontrol.h old mode 100644 new mode 100755 diff --git a/src/ai/play/playformations.cpp b/src/ai/play/playformations.cpp old mode 100644 new mode 100755 diff --git a/src/ai/play/playformations.h b/src/ai/play/playformations.h old mode 100644 new mode 100755 diff --git a/src/ai/play/playfreekickopp.cpp b/src/ai/play/playfreekickopp.cpp old mode 100644 new mode 100755 index cd79d9e..0015bf8 --- a/src/ai/play/playfreekickopp.cpp +++ b/src/ai/play/playfreekickopp.cpp @@ -3,27 +3,17 @@ PlayFreeKickOpp::PlayFreeKickOpp(WorldModel *worldmodel, QObject *parent) : Play("PlayFreeKickOpp", worldmodel, parent) { - numberOfPlayers = 0; - - rolesIsInit = false; - go2ThePositions = false; - - waitTimer = new QTimer(); - connect(waitTimer,SIGNAL(timeout()),this,SLOT(waitTimer_timout())); - - tGolie = new TacticGoalie(wm); - - tDefenderLeft = new TacticDefender(wm); - tDefenderRight = new TacticDefender(wm); - - tAttackerLeft = new TacticAttacker(wm); - tAttackerMid = new TacticAttacker(wm); - tAttackerRight = new TacticAttacker(wm); + tGolie=new TacticGoalie(wm); + tDefenderLeft=new TacticDefender(wm); + tDefenderRight=new TacticDefender(wm); + tAttackerLeft=new TacticAttacker(wm); + tAttackerMid=new TacticAttacker(wm); + tAttackerRight=new TacticAttacker(wm); } int PlayFreeKickOpp::enterCondition() { - if(wm->cmgs.theirFreeKick() || wm->cmgs.theirDirectKick()) + /*if(wm->cmgs.theirFreeKick() || wm->cmgs.theirDirectKick()) { if(wm->gs_last != wm->gs) { @@ -41,134 +31,146 @@ int PlayFreeKickOpp::enterCondition() else { return 0; - } - // return 200000; + }*/ + return 0; } - -void PlayFreeKickOpp::waitTimer_timout() -{ - waitTimer->stop(); - go2ThePositions = true; -} - void PlayFreeKickOpp::initRole() { - QList activeAgents=wm->kn->ActiveAgents(); - numberOfPlayers = activeAgents.size(); - activeAgents.removeOne(wm->ref_goalie_our); - wm->ourRobot[wm->ref_goalie_our].Role = AgentRole::Golie; - switch (activeAgents.length()) { + QList ourActivePlayer=wm->kn->ActiveAgents(); + ourActivePlayer.removeOne(wm->ref_goalie_our); + wm->ourRobot[wm->ref_goalie_our].Role=AgentRole::Golie; + switch(ourActivePlayer.length()){ case 1: - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderRight; + wm->ourRobot[ourActivePlayer.takeFirst()].Role=AgentRole::AttackerLeft; break; case 2: - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderRight; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderLeft; + wm->ourRobot[ourActivePlayer.takeFirst()].Role=AgentRole::AttackerLeft; + wm->ourRobot[ourActivePlayer.takeFirst()].Role=AgentRole::AttackerRight; break; case 3: - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderRight; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderLeft; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::AttackerMid; + wm->ourRobot[ourActivePlayer.takeFirst()].Role=AgentRole::DefenderRight; + wm->ourRobot[ourActivePlayer.takeFirst()].Role=AgentRole::DefenderLeft; + wm->ourRobot[ourActivePlayer.takeFirst()].Role=AgentRole::AttackerLeft; break; case 4: - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderRight; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderLeft; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::AttackerMid; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::AttackerLeft; + wm->ourRobot[ourActivePlayer.takeFirst()].Role=AgentRole::DefenderRight; + wm->ourRobot[ourActivePlayer.takeFirst()].Role=AgentRole::DefenderLeft; + wm->ourRobot[ourActivePlayer.takeFirst()].Role=AgentRole::AttackerLeft; + wm->ourRobot[ourActivePlayer.takeFirst()].Role=AgentRole::AttackerMid; break; case 5: - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderRight; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderLeft; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::AttackerMid; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::AttackerLeft; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::AttackerRight; + wm->ourRobot[ourActivePlayer.takeFirst()].Role=AgentRole::DefenderRight; + wm->ourRobot[ourActivePlayer.takeFirst()].Role=AgentRole::DefenderLeft; + wm->ourRobot[ourActivePlayer.takeFirst()].Role=AgentRole::AttackerLeft; + wm->ourRobot[ourActivePlayer.takeFirst()].Role=AgentRole::AttackerMid; + wm->ourRobot[ourActivePlayer.takeFirst()].Role=AgentRole::AttackerRight; break; } - rolesIsInit = true; } -void PlayFreeKickOpp::pressing() -{ - QList oppPlayers = wm->kn->ActiveOppAgents(); - QList oppInSecure; - oppPlayers.removeOne(wm->ref_goalie_opp); - - QList ourPlayers = wm->kn->findAttackers(); - ourPlayers.removeOne(wm->ref_goalie_our); - - int counter = 0; - while( counter < oppPlayers.size() ) - { - if( wm->kn->IsInsideSecureArea(wm->oppRobot[oppPlayers.at(counter)].pos.loc,wm->ball.pos.loc)) - { - oppInSecure.append(oppPlayers.at(counter)); - oppPlayers.removeAt(counter); +bool PlayFreeKickOpp::isInsideTriangle(Vector2D pos, Vector2D vertex1){ + bool firstCon=false; + bool secondCon=false; + if((vertex1.x-Field::ourGoalPost_L.x)!=0 && pos.y<(vertex1.y-Field::ourGoalPost_L.y)/(vertex1.x-Field::ourGoalPost_L.x)*(pos.x-vertex1.x)+vertex1.y) + firstCon=true; + if((vertex1.x-Field::ourGoalPost_R.x)!=0 && pos.y>(vertex1.y-Field::ourGoalPost_R.y)/(vertex1.x-Field::ourGoalPost_R.x)*(pos.x-vertex1.x)+vertex1.y) + secondCon=true; + return firstCon && secondCon; +} +QList PlayFreeKickOpp::findmarking(Position_Evaluation posEval[],int oppNum){ + double temp; + int tempID; + QList man2man; + for(int i=0;ikn->IsInsideFarArea(wm->oppRobot[oppPlayers.at(counter)].pos.loc) ) - oppPlayers.removeAt(counter); - else - counter++; } - - // if( wm->cmgs.theirDirectKick() && oppInSecure.size() == 1 ) - // oppPlayers.append(oppInSecure.first() ); - - Marking defence; - defence.setWorldModel(wm); - bool isMatched; - QList m2m = defence.findMarking(ourPlayers,oppPlayers,isMatched); - if( isMatched ) - { - for(int i=0;ioppID=posEval[0].id; + man2man.at(0)->ourID=tAttackerLeft->getID(); + man2man.at(1)->oppID=posEval[1].id; + man2man.at(1)->ourID=tAttackerRight->getID(); + if(posEval[2].score==posEval[1].score){ + man2man.append(new marking_player); + man2man.at(2)->oppID=posEval[2].id; + man2man.at(2)->ourID=tDefenderLeft->getID(); } + return man2man; +} - while ( ourPlayers.size() > 0 ) - { - wm->ourRobot[ourPlayers.takeFirst()].Status = AgentStatus::Idle; - } - - wm->marking = m2m; - - if( wm->cmgs.theirDirectKick() && wm->defenceMode) - { - wm->ourRobot[tDefenderLeft->getID()].Status = AgentStatus::BlockingBall; - wm->ourRobot[tDefenderRight->getID()].Status = AgentStatus::BlockingBall; - } +void PlayFreeKickOpp::pressing() +{ + QList oppPlayer=wm->kn->ActiveOppAgents(); + QList ourPlayer=wm->kn->ActiveAgents(); + oppPlayer.removeOne(wm->ref_goalie_opp); + ourPlayer.removeOne(wm->ref_goalie_our); + int count=0; + Position_Evaluation posEval[oppPlayer.length()]; + //find distance to goal and ball + for(int i=0;ioppRobot[oppPlayer.at(i)].pos.loc.dist(Field::ourGoalCenter); + posEval[i].ballDis=wm->oppRobot[oppPlayer.at(i)].pos.loc.dist(wm->ball.pos.loc); + posEval[i].id=oppPlayer.at(i); + } + for(int i=0;ioppRobot[oppPlayer.at(i)].pos.loc,Field::ourGoalPost_L); + Segment2D segment2(wm->oppRobot[oppPlayer.at(i)].pos.loc,Field::ourGoalPost_R); + posEval[i].goalAngle=abs(segment1.direction().radian()-segment2.direction().radian()); + for(int j=0;joppRobot[ourPlayer.at(j)].pos.loc,wm->ourRobot[ourPlayer.at(i)].pos.loc)) + count++; + } + posEval[i].count=count; + } + for(int i=0;ioppRobot[posEval[i].id].pos.loc.x>0) + posEval[i].score=-1*(1/posEval[i].ballDis)+(10/posEval[i].goalDis); + if(wm->oppRobot[posEval[i].id].pos.loc.x<0) + posEval[i].score=(1/posEval[i].ballDis)+(10/posEval[i].goalDis); + } + else if(count>1) + posEval[i].score=0; + } + for(int i=0;iourID,man2man.at(i)->oppID); + } } -void PlayFreeKickOpp::setTactics(int index) +void PlayFreeKickOpp::setTactics(int RobotID) { - switch (wm->ourRobot[index].Role) { - case AgentRole::Golie: - tactics[index] = tGolie; - break; - case AgentRole::DefenderLeft: - tactics[index] = tDefenderLeft; - break; - case AgentRole::DefenderRight: - tactics[index] = tDefenderRight; + switch(wm->ourRobot[RobotID].Role){ + case AgentRole::AttackerLeft: + tactics[RobotID]=tAttackerLeft; break; case AgentRole::AttackerMid: - tactics[index] = tAttackerMid; + tactics[RobotID]=tAttackerMid; break; case AgentRole::AttackerRight: - tactics[index] = tAttackerRight; + tactics[RobotID]=tAttackerRight; break; - case AgentRole::AttackerLeft: - tactics[index] = tAttackerLeft; + case AgentRole::DefenderLeft: + tactics[RobotID]=tDefenderLeft; break; - default: + case AgentRole::DefenderRight: + tactics[RobotID]=tDefenderRight; + break; + case AgentRole::Golie: + tactics[RobotID]=tGolie; break; } } @@ -197,17 +199,11 @@ void PlayFreeKickOpp::setPositions() this->previousRightID = tDefenderRight->getID();; } - if( leftChecker > PresenceCounter || leftID == -1 || !wm->kn->robotIsIdle(leftID)) - { + if( leftChecker > PresenceCounter || leftID == -1 ) midID = rightID; - leftID = -1; - } - if( rightChecker > PresenceCounter || rightID == -1 || !wm->kn->robotIsIdle(rightID)) - { + if( rightChecker > PresenceCounter || rightID == -1) midID = leftID; - rightID = -1; - } zonePositions(leftID,rightID,midID,goaliePos,leftDefPos,leftNav,rightDefPos,rightNav); @@ -218,7 +214,7 @@ void PlayFreeKickOpp::setPositions() if( leftID != -1) { - if( (wm->kn->robotIsIdle(leftID)) && (wm->ourRobot[leftID].pos.loc - leftDefPos.loc).length() > 250 ) + if( (wm->ourRobot[leftID].Status != AgentStatus::FollowingBall ) && (wm->ourRobot[leftID].pos.loc - leftDefPos.loc).length() > 250 ) leftChecker++; else leftChecker = 0; @@ -231,7 +227,7 @@ void PlayFreeKickOpp::setPositions() if( rightID != -1) { - if( (wm->kn->robotIsIdle(rightID)) && (wm->ourRobot[rightID].pos.loc - rightDefPos.loc).length() > 250 ) + if( (wm->ourRobot[rightID].Status != AgentStatus::FollowingBall ) && (wm->ourRobot[rightID].pos.loc - rightDefPos.loc).length() > 250 ) rightChecker++; else rightChecker = 0; @@ -243,151 +239,119 @@ void PlayFreeKickOpp::setPositions() } tGolie->setIdlePosition(goaliePos); - - Vector2D finalPos,notImportant,leftPos,rightPos; - - Circle2D robotCircle(wm->ball.pos.loc,ALLOW_NEAR_BALL_RANGE); - Segment2D line2Goal(wm->ball.pos.loc,Field::ourGoalCenter); - robotCircle.intersection(line2Goal,&finalPos,¬Important); - - Circle2D secondCircle(finalPos,(2.5)*ROBOT_RADIUS); - robotCircle.intersection(secondCircle,&leftPos,&rightPos); - - if( !wm->kn->IsInsideField(leftPos) ) - { - leftPos = finalPos; - finalPos = rightPos; - - Vector2D leftPos2,rightPos2; - Circle2D secondCircle(finalPos,(2.5)*ROBOT_RADIUS); - robotCircle.intersection(secondCircle,&leftPos2,&rightPos2); - - if( leftPos.dist(leftPos2) < leftPos.dist(rightPos2) ) - rightPos = rightPos2; - else - rightPos = leftPos2; - + if(man2man.length()==3){ + Position attackerRight,attackerLeft,defenderLeft; + Vector2D inter1,inter2; + Circle2D circle1(wm->oppRobot[man2man.at(1)->oppID].pos.loc,50); + Segment2D seg1(wm->oppRobot[man2man.at(1)->oppID].pos.loc,Field::ourGoalCenter); + circle1.intersection(seg1,&inter1,&inter2); + tAttackerRight->setIdlePosition(inter1); + Vector2D inter3,inter4; + Circle2D circle2(wm->oppRobot[man2man.at(0)->oppID].pos.loc,50); + Segment2D seg2(wm->oppRobot[man2man.at(0)->oppID].pos.loc,Field::ourGoalCenter); + circle2.intersection(seg2,&inter3,&inter4); + tAttackerLeft->setIdlePosition(inter3); + Vector2D inter5,inter6; + Circle2D circle3(wm->oppRobot[man2man.at(2)->oppID].pos.loc,50); + Segment2D seg3(wm->oppRobot[man2man.at(2)->oppID].pos.loc,Field::ourGoalCenter); + circle3.intersection(seg3,&inter5,&inter6); + tDefenderLeft->setIdlePosition(inter5); + /* attackerRight.loc=wm->oppRobot[man2man.at(1)->oppID].pos.loc+threshhold; + attackerRight.dir=wm->oppRobot[man2man.at(1)->oppID].pos.dir+AngleDeg::PI; + tAttackerRight->setIdlePosition(attackerRight); + attackerLeft.loc=wm->oppRobot[man2man.at(0)->oppID].pos.loc+threshhold; + attackerLeft.dir=wm->oppRobot[man2man.at(0)->oppID].pos.dir+AngleDeg::PI; + tAttackerLeft->setIdlePosition(attackerLeft); + defenderLeft.loc=wm->oppRobot[man2man.at(2)->oppID].pos.loc+threshhold; + defenderLeft.dir=wm->oppRobot[man2man.at(2)->oppID].pos.dir+AngleDeg::PI; + tDefenderLeft->setIdlePosition(attackerLeft);*/ } - else if( !wm->kn->IsInsideField(rightPos) ) - { - rightPos = finalPos; - finalPos = leftPos; - - Vector2D leftPos2,rightPos2; - Circle2D secondCircle(finalPos,(2.5)*ROBOT_RADIUS); - robotCircle.intersection(secondCircle,&leftPos2,&rightPos2); + else if(man2man.length()==2){ + Vector2D inter1,inter2; + Circle2D circle1(wm->oppRobot[man2man.at(1)->oppID].pos.loc,50); + Segment2D seg1(wm->oppRobot[man2man.at(1)->oppID].pos.loc,Field::ourGoalCenter); + circle1.intersection(seg1,&inter1,&inter2); + tAttackerRight->setIdlePosition(inter1); + Vector2D inter3,inter4; + Circle2D circle2(wm->oppRobot[man2man.at(0)->oppID].pos.loc,50); + Segment2D seg2(wm->oppRobot[man2man.at(0)->oppID].pos.loc,Field::ourGoalCenter); + circle2.intersection(seg2,&inter3,&inter4); + tAttackerLeft->setIdlePosition(inter3); + } + int kickerId; + QList oppPlayer=wm->kn->ActiveOppAgents(); + double minDist=wm->oppRobot[oppPlayer.at(0)].pos.loc.dist(wm->ball.pos.loc); + for(int i=0;iwm->oppRobot[oppPlayer.at(i)].pos.loc.dist(wm->ball.pos.loc)){ + minDist=wm->oppRobot[oppPlayer.at(i)].pos.loc.dist(wm->ball.pos.loc); + kickerId=oppPlayer.at(i); + } + } + Vector2D inter1,inter2; + Line2D seg(wm->ball.pos.loc,wm->oppRobot[kickerId].pos.loc); + Circle2D circle(wm->ball.pos.loc,200); + circle.intersection(seg,&inter1,&inter2); + if(inter1.xsetIdlePosition(inter1); + else if(inter1.x>inter2.x) + tAttackerMid->setIdlePosition(inter2); - if( rightPos.dist(leftPos2) < rightPos.dist(rightPos2) ) - leftPos = rightPos2; - else - leftPos = leftPos2; +} +TacticAttacker* PlayFreeKickOpp::findTacticAttacker(int RobotID){ + if(wm->ourRobot[RobotID].Role==AgentRole::AttackerLeft){ + leftAttacker=false; + return tAttackerLeft; } - - QList pointsForIdle; - - if( wm->kn->IsInsideNearArea(wm->ball.pos.loc) ) - { - Vector2D candidateL_1, candidateL_2, mainL; - - Circle2D cir_l(Field::defenceLineLinear_L,Field::goalCircle_R+ROBOT_RADIUS); - Line2D thirty_l(Field::defenceLineLinear_L,AngleDeg(0)); - cir_l.intersection(thirty_l,&candidateL_1,&candidateL_2); - if( wm->kn->IsInsideField(candidateL_1) && !wm->kn->IsInsideGolieArea(candidateL_1) ) - mainL = candidateL_1; - else - mainL = candidateL_2; - - pointsForIdle.append(Vector2D(mainL.x, -sign(wm->ball.pos.loc.y)*mainL.y)); - - pointsForIdle.append(Vector2D(Field::ourPenaltySpot.x+200,Field::ourPenaltySpot.y)); - - // pointsForIdle.append(Vector2D(mainL.x, sign(wm->ball.pos.loc.y)*mainL.y)); + else if(wm->ourRobot[RobotID].Role==AgentRole::AttackerRight){ + rightAttacker=false; + return tAttackerRight; } - - pointsForIdle.append(finalPos); - pointsForIdle.append(rightPos); - pointsForIdle.append(leftPos); - - if(tAttackerLeft->getID()!=-1 && wm->ourRobot[tAttackerLeft->getID()].isValid && wm->ourRobot[tAttackerLeft->getID()].Status==AgentStatus::Idle) - { - for(int i=0;ikn->isOccupied(tAttackerLeft->getID(),pointsForIdle.at(i))) - { - tAttackerLeft->setIdlePosition(pointsForIdle.at(i)); - break; - } - } - + else if(wm->ourRobot[RobotID].Role==AgentRole::AttackerMid){ + midAttacker=false; + return tAttackerMid; } - - if(tAttackerRight->getID()!=-1 && wm->ourRobot[tAttackerRight->getID()].isValid && wm->ourRobot[tAttackerRight->getID()].Status==AgentStatus::Idle) - { - for(int i=0;ikn->isOccupied(tAttackerRight->getID(),pointsForIdle.at(i))) - { - tAttackerRight->setIdlePosition(pointsForIdle.at(i)); - break; - } - } - + return 0; +} +TacticDefender* PlayFreeKickOpp::findTacticDefender(int RobotID){ + if(wm->ourRobot[RobotID].Role==AgentRole::DefenderLeft){ + leftDefender=false; + return tDefenderLeft; } - - if(tAttackerMid->getID()!=-1 && wm->ourRobot[tAttackerMid->getID()].isValid && wm->ourRobot[tAttackerMid->getID()].Status==AgentStatus::Idle) - { - for(int i=0;ikn->isOccupied(tAttackerMid->getID(),pointsForIdle.at(i))) - { - tAttackerMid->setIdlePosition(pointsForIdle.at(i)); - break; - } - } - + else if(wm->ourRobot[RobotID].Role==AgentRole::DefenderRight){ + rightDefender=false; + return tDefenderRight; } + return 0; } void PlayFreeKickOpp::setPlayer2Keep(int ourR, int oppR) { - wm->ourRobot[ourR].Status = AgentStatus::BlockingRobot; - - switch (wm->ourRobot[ourR].Role) - { - case AgentRole::AttackerMid: - tAttackerMid->setPlayerToKeep(oppR); - break; - case AgentRole::AttackerRight: - tAttackerRight->setPlayerToKeep(oppR); - break; - case AgentRole::AttackerLeft: - tAttackerLeft->setPlayerToKeep(oppR); - break; + switch(wm->ourRobot[ourR].Role){ case AgentRole::DefenderLeft: tDefenderLeft->setPlayerToKeep(oppR); break; case AgentRole::DefenderRight: tDefenderRight->setPlayerToKeep(oppR); break; - default: + case AgentRole::AttackerLeft: + tAttackerRight->setPlayerToKeep(oppR); + case AgentRole::AttackerRight: + tAttackerRight->setPlayerToKeep(oppR); break; } } void PlayFreeKickOpp::execute() { - if(go2ThePositions) - { - QList activeAgents=wm->kn->ActiveAgents(); - - // if( !rolesIsInit ) - initRole(); - // else - pressing(); - - for(int i=0;i ourActivePlayer=wm->kn->ActiveAgents(); + for(int i=0;iourRobot[ourActivePlayer.at(i)].Status=AgentStatus::Idle; + } + initRole(); + for(int i=0;i +struct Position_Evaluation{ + double goalAngle; + int count; + int id; + double goalDis; + double ballDis; + double score; +}; +struct marking_player{ + int ourID; + int oppID; +}; class PlayFreeKickOpp : public Play { @@ -10,24 +23,20 @@ class PlayFreeKickOpp : public Play public: explicit PlayFreeKickOpp(WorldModel *worldmodel, QObject *parent = 0); virtual void execute(); - //virtual Tactic* getTactic(int id); virtual int enterCondition(); private: - bool go2ThePositions; - TacticGoalie* tGolie; TacticDefender* tDefenderLeft; + bool leftDefender=true; TacticDefender* tDefenderRight; + bool rightDefender=true; TacticAttacker* tAttackerMid; + bool midAttacker=true; TacticAttacker* tAttackerLeft; + bool leftAttacker=true; TacticAttacker* tAttackerRight; - - QTimer *waitTimer; - -private slots: - void waitTimer_timout(); - + bool rightAttacker=true; protected: virtual void initRole(); @@ -36,6 +45,12 @@ private slots: void setTactics(int index); void setPositions(); void setPlayer2Keep(int ourR,int oppR); + TacticAttacker* findTacticAttacker(int RobotID); + TacticDefender* findTacticDefender(int RobotID); + bool isInsideTriangle(Vector2D pos,Vector2D vertex1); + QListfindmarking(Position_Evaluation posEval[],int oppNum); + QListman2man; + }; #endif // PLAYFREEKICKOPP_H diff --git a/src/ai/play/playfreekickour.cpp b/src/ai/play/playfreekickour.cpp old mode 100644 new mode 100755 index 6bbf9eb..b6d1bf0 --- a/src/ai/play/playfreekickour.cpp +++ b/src/ai/play/playfreekickour.cpp @@ -81,6 +81,17 @@ void PlayFreeKickOur::execute() if( wm->select_fk[11] ) fk.append(new freeKick11(wm)); + if(wm->select_fk[12]) + fk.append(new freeKickTest2(wm)); + wm->select_fk[12]=true; + + if( wm->select_fk[12] ) + fk.append(new freekicktest1(wm)); + wm->select_fk[12]=true; + + if( wm->select_fk[13] ) + fk.append(new freekicktest1(wm)); + if( wm->select_fk[NUMBEROFFREEKICKS-1] ) fk.append(new freeKick47(wm)); diff --git a/src/ai/play/playfreekickour.h b/src/ai/play/playfreekickour.h old mode 100644 new mode 100755 diff --git a/src/ai/play/playgameon.cpp b/src/ai/play/playgameon.cpp old mode 100644 new mode 100755 index e573966..79be99c --- a/src/ai/play/playgameon.cpp +++ b/src/ai/play/playgameon.cpp @@ -102,13 +102,13 @@ void PlayGameOn::pressing(int ballOwner) wm->marking = m2m; } -int PlayGameOn::findBallOwner() +int PlayGameOn::findBallOwner() // I was here { int ownerIndex = -1; QList candidates , ours = wm->kn->ActiveAgents(); QList distance2Prediction; - if( wm->ball.isValid && !wm->kn->IsInsideGolieArea(wm->ball.pos.loc) ) + if( wm->ball.isValid && !wm->kn->IsInsideGolieArea(wm->ball.pos.loc) ) // agar toop valid bud va dakhele mohavate nabud { if( wm->defenceMode ) candidates = wm->kn->findAttackers(); @@ -281,7 +281,6 @@ QList PlayGameOn::freeRegions() void PlayGameOn::initRole() { wm->marking.clear(); - QList activeAgents=wm->kn->ActiveAgents(); QList attackers; numberOfPlayers = activeAgents.size(); @@ -303,6 +302,7 @@ void PlayGameOn::initRole() activeAgents.removeAt(i); } } + int counter = 0; while( counter < activeAgents.size() ) { @@ -445,7 +445,7 @@ void PlayGameOn::coach() } tGolie->setIdlePosition(goaliePos); - + wm->debug_pos.append(goaliePos.loc);//test game_status = wm->kn->gameStatus(game_status); int ballOwner = findBallOwner(); diff --git a/src/ai/play/playgameon.h b/src/ai/play/playgameon.h old mode 100644 new mode 100755 diff --git a/src/ai/play/playhalt.cpp b/src/ai/play/playhalt.cpp old mode 100644 new mode 100755 diff --git a/src/ai/play/playhalt.h b/src/ai/play/playhalt.h old mode 100644 new mode 100755 diff --git a/src/ai/play/playhw2_1.cpp b/src/ai/play/playhw2_1.cpp new file mode 100755 index 0000000..b5b6e2b --- /dev/null +++ b/src/ai/play/playhw2_1.cpp @@ -0,0 +1,23 @@ +#include "playhw2_1.h" + +PlayHW2_1::PlayHW2_1(WorldModel *worldmodel, QObject *parent) : + Play("PlayTest", worldmodel, parent) +{ + tTest = new TacticTestStandingForwardEnemy(wm); +} + +int PlayHW2_1::enterCondition() +{ + return 0; +} + +void PlayHW2_1::initRole() +{ +} + +void PlayHW2_1::execute() +{ + tTest->setDistance(5); + tactics[wm->kn->ActiveAgents()[0]] = tTest; + +} diff --git a/src/ai/play/playhw2_1.h b/src/ai/play/playhw2_1.h new file mode 100755 index 0000000..589e98a --- /dev/null +++ b/src/ai/play/playhw2_1.h @@ -0,0 +1,20 @@ +#ifndef PLAYHW2_1_H +#define PLAYHW2_1_H +#include "play.h" +#include "man2man.h" +#include "tactic/tacticteststandingforwardenemy.h" + +class PlayHW2_1 : public Play +{ + + Q_OBJECT +public: + explicit PlayHW2_1(WorldModel *worldmodel, QObject *parent = 0); + virtual void execute(); + virtual void initRole(); + virtual int enterCondition(); +private: + TacticTestStandingForwardEnemy* tTest; +}; + +#endif // PLAYHW2_1_H diff --git a/src/ai/play/playkickoffopp.cpp b/src/ai/play/playkickoffopp.cpp old mode 100644 new mode 100755 index 3e09df0..c215517 --- a/src/ai/play/playkickoffopp.cpp +++ b/src/ai/play/playkickoffopp.cpp @@ -1,248 +1,303 @@ #include "playkickoffopp.h" - +#include +#include +#include PlayKickoffOpp::PlayKickoffOpp(WorldModel *worldmodel, QObject *parent) : Play("PlayKickoffOpp", worldmodel, parent) { tGolie=new TacticGoalie(wm); - + tAttackerLeft=new TacticAttacker(wm); + tAttackerMid=new TacticAttacker(wm); + tAttackerRight=new TacticAttacker(wm); tDefenderLeft=new TacticDefender(wm); tDefenderRight=new TacticDefender(wm); - tAttackerLeft = new TacticAttacker(wm); - tAttackerMid = new TacticAttacker(wm); - tAttackerRight = new TacticAttacker(wm); } int PlayKickoffOpp::enterCondition() { - if(wm->cmgs.theirKickoff()) + /*if(wm->cmgs.theirKickoff()) return 100; else - return 0; + return 0;*/ + return 9999; } void PlayKickoffOpp::initRole() { - QList activeAgents=wm->kn->ActiveAgents(); - numberOfPlayers = activeAgents.size(); - activeAgents.removeOne(wm->ref_goalie_our); - wm->ourRobot[wm->ref_goalie_our].Role = AgentRole::Golie; - switch (activeAgents.length()) { - case 1: - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::AttackerMid; - break; - case 2: - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderRight; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderLeft; - break; - case 3: - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderRight; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderLeft; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::AttackerMid; - break; - case 4: - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderRight; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderLeft; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::AttackerMid; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::AttackerLeft; - break; - case 5: - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderRight; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderLeft; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::AttackerMid; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::AttackerRight; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::AttackerLeft; - break; + QList ourCurrentPlayers=wm->kn->ActiveAgents(); + ourCurrentPlayers.removeOne(wm->ref_goalie_our); + wm->ourRobot[wm->ref_goalie_our].Role=AgentRole::Golie; + switch(ourCurrentPlayers.length()){ + case 1: + wm->ourRobot[ourCurrentPlayers.takeFirst()].Role=AgentRole::DefenderLeft; + break; + case 2: + wm->ourRobot[ourCurrentPlayers.takeFirst()].Role=AgentRole::DefenderLeft; + wm->ourRobot[ourCurrentPlayers.takeFirst()].Role=AgentRole::DefenderRight; + break; + case 3: + wm->ourRobot[ourCurrentPlayers.takeFirst()].Role=AgentRole::DefenderLeft; + wm->ourRobot[ourCurrentPlayers.takeFirst()].Role=AgentRole::DefenderRight; + wm->ourRobot[ourCurrentPlayers.takeFirst()].Role=AgentRole::AttackerMid; + break; + case 4: + wm->ourRobot[ourCurrentPlayers.takeFirst()].Role=AgentRole::DefenderLeft; + wm->ourRobot[ourCurrentPlayers.takeFirst()].Role=AgentRole::DefenderRight; + wm->ourRobot[ourCurrentPlayers.takeFirst()].Role=AgentRole::AttackerMid; + wm->ourRobot[ourCurrentPlayers.takeFirst()].Role=AgentRole::AttackerLeft; + break; + case 5: + wm->ourRobot[ourCurrentPlayers.takeFirst()].Role=AgentRole::DefenderLeft; + wm->ourRobot[ourCurrentPlayers.takeFirst()].Role=AgentRole::DefenderRight; + wm->ourRobot[ourCurrentPlayers.takeFirst()].Role=AgentRole::AttackerMid; + wm->ourRobot[ourCurrentPlayers.takeFirst()].Role=AgentRole::AttackerLeft; + wm->ourRobot[ourCurrentPlayers.takeFirst()].Role=AgentRole::AttackerRight; + break; + } } - void PlayKickoffOpp::setTactics(int index) { - switch (wm->ourRobot[index].Role) { - case AgentRole::Golie: - tactics[index] = tGolie; - break; - case AgentRole::DefenderLeft: - tactics[index] = tDefenderLeft; - break; - case AgentRole::DefenderRight: - tactics[index] = tDefenderRight; - break; - case AgentRole::AttackerMid: - tactics[index] = tAttackerMid; - break; - case AgentRole::AttackerRight: - tactics[index] = tAttackerRight; - break; - case AgentRole::AttackerLeft: - tactics[index] = tAttackerLeft; - break; - default: - break; + switch(wm->ourRobot[index].Role){ + case AgentRole::Golie: + tactics[index]=tGolie; + break; + case AgentRole::AttackerLeft: + tactics[index]=tAttackerLeft; + break; + case AgentRole::AttackerMid: + tactics[index]=tAttackerMid; + break; + case AgentRole::AttackerRight: + tactics[index]=tAttackerRight; + break; + case AgentRole::DefenderLeft: + tactics[index]=tDefenderLeft; + break; + case AgentRole::DefenderRight: + tactics[index]=tDefenderRight; + break; + } +} +int PlayKickoffOpp::maximumGoalChanceID(QList oppPlayer){ + QList ourPlayer=wm->kn->ActiveAgents(); + QList RobotTriangle; + ourPlayer.removeOne(wm->ref_goalie_our); + ourPlayer.removeOne(tAttackerMid->getID()); + ourPlayer.removeOne(tAttackerRight->getID()); + oppPlayer.removeOne(wm->ref_goalie_opp); + oppPlayer.removeOne(kickerId); + double maxAngle=0; + int count=0; + int maxCount=0; + int maxId; + for(int i=0;ioppRobot[oppPlayer.at(i)].pos.loc,Field::ourGoalPost_L); + Segment2D segment2(wm->oppRobot[oppPlayer.at(i)].pos.loc,Field::ourGoalPost_R); + for(int j=0;jourRobot[ourPlayer.at(j)].pos.loc,wm->oppRobot[oppPlayer.at(i)].pos.loc)){ + RobotTriangle.append(ourPlayer.at(j)); + } + } + for(int y=Field::ourGoalPost_R.y;yoppRobot[oppPlayer.at(i)].pos.loc,loc); + bool value=true; + for(int j=0;jourRobot[RobotTriangle.at(j)].pos.loc,ROBOT_RADIUS); + Vector2D inter1,inter2; + circle.intersection(seg,&inter1,&inter2); + if((inter1.x!=0 && inter1.y!=0) || (inter2.x!=0 && inter2.y!=0)) + value=false; + } + if(value) + count++; + } + if(/*maxAngle(vertex1.y-Field::ourGoalPost_R.y)/(vertex1.x-Field::ourGoalPost_R.x)*(pos.x-vertex1.x)+vertex1.y) + secondCon=true; + return firstCon && secondCon; +} +Position PlayKickoffOpp::KickerPositioning(Vector2D oppKicker){ + Line2D line(wm->ball.pos.loc,oppKicker); + Circle2D circle(wm->ball.pos.loc,oppKicker.dist(wm->ball.pos.loc)); + Vector2D firstIntersect,secondIntersect; + Position pos; + circle.intersection(line,&firstIntersect,&secondIntersect); + if(firstIntersect!=oppKicker) + pos.loc=firstIntersect; + else if(secondIntersect!=oppKicker) + pos.loc=secondIntersect; + pos.dir=oppKicker.dir().radian()*-1; + return pos; +} +void PlayKickoffOpp::findOppKickerId(){ + QList oppPlayer=wm->kn->ActiveOppAgents(); + double minDist=wm->oppRobot[oppPlayer.at(0)].pos.loc.dist(wm->ball.pos.loc); + for(int i=0;iwm->oppRobot[oppPlayer.at(i)].pos.loc.dist(wm->ball.pos.loc)){ + minDist=wm->oppRobot[oppPlayer.at(i)].pos.loc.dist(wm->ball.pos.loc); + kickerId=oppPlayer.at(i); + } } } -void PlayKickoffOpp::setPositions() -{ - Position leftDefPos,rightDefPos,goaliePos; - int leftID = -1, rightID = -1 , midID = -1; - bool leftNav, rightNav; - - if( wm->ourRobot[tDefenderLeft->getID()].Role == AgentRole::DefenderLeft ) - leftID = tDefenderLeft->getID(); - - if( wm->ourRobot[tDefenderRight->getID()].Role == AgentRole::DefenderRight ) - rightID = tDefenderRight->getID(); - - if( leftChecker > 100 || leftID == -1 ) - midID = rightID; - - if( rightChecker > 100 || rightID == -1) - midID = leftID; - - zonePositions(leftID,rightID,midID,goaliePos,leftDefPos,leftNav,rightDefPos,rightNav); - - tGolie->setIdlePosition(goaliePos); - tDefenderLeft->setIdlePosition(leftDefPos); - tDefenderLeft->setUseNav(leftNav); - tDefenderRight->setIdlePosition(rightDefPos); - tDefenderRight->setUseNav(rightNav); +void PlayKickoffOpp::Positioning(int RobotID){ + Vector2D CenterOfField; + CenterOfField.x=0; + CenterOfField.y=0; + Segment2D defenderRightLine(Field::ourGoalPost_R,CenterOfField); + Segment2D defenderLeftLine(Field::ourGoalPost_L,CenterOfField); + Segment2D midAttackerLine(Field::ourGoalCenter,CenterOfField); + Position firstIntersection,secondInterSection; + Circle2D circleOfCenter(CenterOfField,Field::centerCircle_R); + Circle2D circleOfDefense(Field::ourGoalCenter,abs(Field::ourDefPost_L.y-Field::ourDefPost_R.y)); + if(wm->ourRobot[RobotID].Role==AgentRole::DefenderLeft){ + Line2D positionLine(CenterOfField,Field::ourGoalPost_L); + circleOfDefense.intersection(positionLine,&firstIntersection.loc,&secondInterSection.loc); + if(firstIntersection.loc.x>secondInterSection.loc.x){ + tDefenderLeft->setUseNav(false); + firstIntersection.dir=defenderLeftLine.direction().radian(); + tDefenderLeft->setIdlePosition(firstIntersection); + } + else{ + secondInterSection.dir=defenderLeftLine.direction().radian(); + tDefenderLeft->setUseNav(false); + tDefenderLeft->setIdlePosition(secondInterSection); + } - if( leftID != -1) - { - if( (wm->ourRobot[leftID].pos.loc - leftDefPos.loc).length() > 250 ) - leftChecker++; - else - leftChecker = 0; } + else if(wm->ourRobot[RobotID].Role==AgentRole::DefenderRight){ + Line2D positionLine(CenterOfField,Field::ourGoalPost_R); + circleOfDefense.intersection(positionLine,&firstIntersection.loc,&secondInterSection.loc); + if(firstIntersection.loc.x>secondInterSection.loc.x){ + firstIntersection.dir=defenderRightLine.direction().radian(); + tDefenderRight->setUseNav(false); + tDefenderRight->setIdlePosition(firstIntersection); + } + else{ + secondInterSection.dir=defenderRightLine.direction().radian(); + tDefenderRight->setUseNav(false); + tDefenderRight->setIdlePosition(secondInterSection); + } - if( rightID != -1) - { - if( (wm->ourRobot[rightID].pos.loc - rightDefPos.loc).length() > 250 ) - rightChecker++; - else - rightChecker = 0; } + else if(wm->ourRobot[RobotID].Role==AgentRole::AttackerLeft){ + Position ourKickerPos=KickerPositioning(wm->oppRobot[kickerId].pos.loc); + tAttackerLeft->setUseNav(true); + tAttackerLeft->setIdlePosition(ourKickerPos); - QList opps = wm->kn->ActiveOppAgents(); - opps.removeOne(wm->ref_goalie_opp); - QList nearest2Ball = wm->kn->findNearestOppositeTo(wm->ball.pos.loc); - if( nearest2Ball.size() != 0) - opps.removeOne(nearest2Ball.at(0)); - - QList nearest; - int i = 0; - Line2D toCenter(Vector2D(0,0),ALLOW_NEAR_BALL_RANGE); - Circle2D cir; - Vector2D first,second,main; - Position leftPos,rightPos; - int numberOfIntersection; - - toCenter.assign(wm->ball.pos.loc , Field::ourGoalCenter); - cir.assign(wm->ball.pos.loc,ALLOW_NEAR_BALL_RANGE); - numberOfIntersection = cir.intersection(toCenter,&first,&second); - if( numberOfIntersection == 2) - { - if( wm->kn->IsInsideOurField(first)) - main = first; - else - main = second; } - else if(numberOfIntersection == 1) - main = first; - - tAttackerMid->setIdlePosition(main); - - Circle2D secondCircle(main,(2.5)*ROBOT_RADIUS); - cir.intersection(secondCircle,&leftPos.loc,&rightPos.loc); - - if( tAttackerLeft->getID() != -1) - { - nearest.clear(); - i = 0; - nearest = wm->kn->findNearestOppositeTo(opps,Vector2D(0,Field::MinY/2)); - while( ikn->IsInsideSecureArea(wm->oppRobot[nearest.at(i)].pos.loc,wm->ball.pos.loc) - /*|| (wm->oppRobot[nearest.at(i)].pos.loc-Vector2D(0,Field::MinY/2)).length()>1000*/) - nearest.removeAt(i); - else - i++; - } - while( !nearest.isEmpty() ) - { - int indexOfOpp = nearest.takeFirst(); - Line2D tmp(wm->oppRobot[indexOfOpp].pos.loc,Field::ourGoalCenter); - Line2D fixedLine(Vector2D(-2*ROBOT_RADIUS,Field::MinY), Vector2D(-2*ROBOT_RADIUS,Field::MaxY)); - Vector2D interSection = tmp.intersection(fixedLine); - if( !wm->kn->IsInsideSecureArea(interSection,wm->ball.pos.loc) ) - { - Position pos; - pos.loc = interSection; - pos.dir = (wm->oppRobot[indexOfOpp].pos.loc-Field::ourGoalCenter).dir().degree()*AngleDeg::DEG2RAD; - if( wm->ourRobot[tAttackerLeft->getID()].Role == AgentRole::AttackerLeft) - { - if( !wm->kn->isOccupied(tAttackerLeft->getID(), pos.loc) ) - { - rightPos = pos; - opps.removeOne(indexOfOpp); - break; - } - } - } - } - tAttackerLeft->setIdlePosition(rightPos); + else if(wm->ourRobot[RobotID].Role==AgentRole::AttackerRight || wm->ourRobot[RobotID].Role==AgentRole::AttackerMid){ + QList oppPlayer=wm->kn->ActiveOppAgents(); + Position man2manSimulate1,man2manSimulate2; + int first=maximumGoalChanceID(oppPlayer); + man2manSimulate1.loc.y=wm->oppRobot[first].pos.loc.y; + man2manSimulate1.loc.x=-1*wm->oppRobot[first].pos.loc.x; + AngleDeg degree1; + degree1=wm->oppRobot[first].pos.loc.dir().radian()+(AngleDeg::PI)*2-1; + man2manSimulate1.dir=degree1.degree(); + oppPlayer.removeOne(first); + int second=maximumGoalChanceID(oppPlayer); + man2manSimulate2.loc.y=wm->oppRobot[second].pos.loc.y; + man2manSimulate2.loc.x=-1*wm->oppRobot[second].pos.loc.x; + AngleDeg degree2; + degree2=wm->oppRobot[second].pos.loc.dir().radian()+(AngleDeg::PI)*2+1; + man2manSimulate2.dir=degree2.degree(); + qDebug()<<"First"<ourRobot[tAttackerMid->getID()].pos.loc.y>wm->ourRobot[tAttackerRight->getID()].pos.loc.y){ + tAttackerMid->setIdlePosition(man2manSimulate1); + tAttackerRight->setIdlePosition(man2manSimulate2); + /*}else{ + tAttackerRight->setIdlePosition(man2manSimulate1); + tAttackerMid->setIdlePosition(man2manSimulate2); + }*/ + // maximumGoalChanceID(oppPlayer); + } + else if(wm->ourRobot[RobotID].Role==AgentRole::Golie){ + Vector2D goalie; + goalie.x=Field::ourGoalCenter.x+90; + goalie.y=Field::ourGoalCenter.y; + tGolie->setIdlePosition(goalie); } +} - if( tAttackerRight->getID() != -1) - { - nearest.clear(); - nearest = wm->kn->findNearestOppositeTo(opps,Vector2D(0,Field::MaxY/2)); - i = 0; - while( ikn->IsInsideSecureArea(wm->oppRobot[nearest.at(i)].pos.loc,wm->ball.pos.loc) - /*|| (wm->oppRobot[nearest.at(i)].pos.loc -Vector2D(0,Field::MaxY/2)).length()>1000*/) - nearest.removeAt(i); - else - i++; - } - while( !nearest.isEmpty() ) - { - int indexOfOpp = nearest.takeFirst(); - Line2D tmp(wm->oppRobot[indexOfOpp].pos.loc,Field::ourGoalCenter); - Line2D fixedLine(Vector2D(-2*ROBOT_RADIUS,Field::MinY), Vector2D(-2*ROBOT_RADIUS,Field::MaxY)); - Vector2D interSection = tmp.intersection(fixedLine); - if( !wm->kn->IsInsideSecureArea(interSection,wm->ball.pos.loc) ) - { - Position pos; - pos.loc = interSection; - pos.dir = (wm->oppRobot[indexOfOpp].pos.loc-Field::ourGoalCenter).dir().degree()*AngleDeg::DEG2RAD; - if( wm->ourRobot[tAttackerRight->getID()].Role == AgentRole::AttackerRight) - { - if( !wm->kn->isOccupied(tAttackerRight->getID(), pos.loc) ) - { - leftPos = pos; - opps.removeOne(indexOfOpp); - break; - } +void PlayKickoffOpp::execute(){ + findOppKickerId(); + Vector2D CenterOfField; + Position center; + center.loc=CenterOfField; + CenterOfField.x=0; + CenterOfField.y=0; + QList ourCurrentPlayer=wm->kn->ActiveAgents(); + for(int i=0;iourRobot[i].Status=AgentStatus::Idle; + } + initRole(); + for(int i=0;icmgs.canKickBall()){ + int counter=0; + tAttackerLeft->setUseNav(true); + tAttackerMid->setUseNav(true); + tAttackerRight->setUseNav(true); + QList oppPlayer=wm->kn->ActiveOppAgents(); + for(int i=0;ioppRobot[oppPlayer.at(i)].pos.dir; + if(wm->kn->IsInsideCircle(wm->oppRobot[oppPlayer.at(i)].pos.loc,CenterOfField,Field::centerCircle_R+3000) + &&!wm->kn->IsReadyForKick(wm->oppRobot[oppPlayer.at(i)].pos,center,wm->ball.pos.loc)){ + counter++; + Vector2D defense; + if(counter==1){ + defense.x=wm->oppRobot[oppPlayer.at(i)].pos.loc.x-ROBOT_RADIUS-100; + defense.y=wm->oppRobot[oppPlayer.at(i)].pos.loc.y; + tAttackerLeft->setIdlePosition(defense); + }else if(counter==2){ + defense.x=wm->oppRobot[oppPlayer.at(i)].pos.loc.x-ROBOT_RADIUS-100; + defense.y=wm->oppRobot[oppPlayer.at(i)].pos.loc.y; + tAttackerRight->setIdlePosition(defense); } } } - tAttackerRight->setIdlePosition(leftPos); - } + counter==0; + + } } -void PlayKickoffOpp::execute() -{ - QList activeAgents=wm->kn->ActiveAgents(); - initRole(); - for(int i=0;i oppPlayer); + bool isInsideTriangle(Vector2D pos,Vector2D vertex1); + Position KickerPositioning(Vector2D oppKicker); + void findOppKickerId(); }; #endif // PLAYKICKOFFOPP_H diff --git a/src/ai/play/playkickoffour.cpp b/src/ai/play/playkickoffour.cpp old mode 100644 new mode 100755 index 521a9a3..cb1844b --- a/src/ai/play/playkickoffour.cpp +++ b/src/ai/play/playkickoffour.cpp @@ -140,7 +140,7 @@ void PlayKickoffOur::execute() setPositions(); - if( wm->cmgs.canKickBall() ) + if( wm->cmgs.gameOn()) wm->ourRobot[tAttackerMid->getID()].Status = AgentStatus::Kicking; } diff --git a/src/ai/play/playkickoffour.h b/src/ai/play/playkickoffour.h old mode 100644 new mode 100755 diff --git a/src/ai/play/playlearning.cpp b/src/ai/play/playlearning.cpp old mode 100644 new mode 100755 diff --git a/src/ai/play/playlearning.h b/src/ai/play/playlearning.h old mode 100644 new mode 100755 diff --git a/src/ai/play/playpenaltyopp.cpp b/src/ai/play/playpenaltyopp.cpp old mode 100644 new mode 100755 index 50b877f..1ffefda --- a/src/ai/play/playpenaltyopp.cpp +++ b/src/ai/play/playpenaltyopp.cpp @@ -6,6 +6,7 @@ PlayPenaltyOpp::PlayPenaltyOpp(WorldModel *worldmodel, QObject *parent) : tGoalie=new TacticGoalie(wm); tDefenderRight=new TacticDefender(wm); tDefenderLeft=new TacticDefender(wm); + tDefenderMid=new TacticDefender(wm); tAttackerMid = new TacticAttacker(wm); tAttackerRight = new TacticAttacker(wm); tAttackerLeft = new TacticAttacker(wm); @@ -14,9 +15,9 @@ PlayPenaltyOpp::PlayPenaltyOpp(WorldModel *worldmodel, QObject *parent) : int PlayPenaltyOpp::enterCondition() { if(wm->cmgs.theirPenaltyKick()) - return 100; + return 100;//100 else - return 0; + return 0;//0 } void PlayPenaltyOpp::setTactics(int index) @@ -40,6 +41,8 @@ void PlayPenaltyOpp::setTactics(int index) case AgentRole::AttackerRight: tactics[index] = tAttackerRight; break; + case AgentRole::DefenderMid: + tactics[index] = tDefenderMid; default: break; } @@ -47,62 +50,149 @@ void PlayPenaltyOpp::setTactics(int index) void PlayPenaltyOpp::setPositions() { - Position goaliePos,leftDefPos,rightDefPos; - bool leftNav, rightNav; - zonePositions(tDefenderLeft->getID(),tDefenderRight->getID(),-1,goaliePos,leftDefPos,leftNav,rightDefPos,rightNav); + Position goaliePos,leftDefPos,rightDefPos,MidDefPos,rightAttackerPos,leftAttackerPos,midAttackerPos; + if(wm->ball.vel.loc.length()<0.2){ + int kickerId; + if(wm->kn->findNearestOppositeTo(wm->ball.pos.loc).length()!=0){ + kickerId=wm->kn->findNearestOppositeTo(wm->ball.pos.loc).at(0); + Line2D shot(wm->ball.pos.loc,wm->oppRobot[kickerId].pos.loc); + Vector2D GL,GR; + GL=Field::ourGoalPost_L; + GR=Field::ourGoalPost_R; + if(Field::ourGoalPost_L.y>0){ + GL.y+=200; + } + else{ + GL.y-=200; + } + if(Field::ourGoalPost_R.y>0){ + GR.y+=200; + } + else{ + GR.y-=200; + } + Segment2D gLine(GL,GR); + goaliePos.loc=gLine.intersection(shot); + if(gLine.contains(goaliePos.loc)==false){ + goaliePos.loc=Field::ourGoalCenter; + } + goaliePos.dir=(wm->ball.pos.loc-goaliePos.loc).dir().radian(); + } + else{ + goaliePos.loc=Field::ourGoalCenter; + } + // + } + else{ + Vector2D f; + Vector2D a; + f.x=wm->ball.pos.loc.x+wm->ball.vel.loc.x; + f.y=wm->ball.pos.loc.y+wm->ball.vel.loc.y; + Line2D shot(wm->ball.pos.loc,f); + Segment2D gLine(Field::ourGoalPost_L,Field::ourGoalPost_R); + a=gLine.intersection(shot); + if(gLine.contains(a)){ + goaliePos.loc=a; + } + else{ + goaliePos.loc=Field::ourGoalCenter; + } + goaliePos.dir=(wm->ball.pos.loc-goaliePos.loc).dir().radian(); + } + if(wm->ball.pos.loc.dist(Field::ourGoalCenter)>450){ + if(wm->ourRobot[tGoalie->getID()].pos.loc.dist(goaliePos.loc)>100){ + if(goaliePos.loc.y>Field::ourGoalCenter.y){ + goaliePos.loc.y+=20; + } + if(goaliePos.loc.ysetIdlePosition(goaliePos); + wm->debug_pos.append(goaliePos.loc); + //wm->debug_pos.append(goaliePos.loc); arminTest + + MidDefPos.loc.x=(4*Field::ourGoalCenter.x+Field::oppGoalCenter.x)/5; + MidDefPos.loc.y=(4*Field::ourGoalCenter.y+Field::oppGoalCenter.y)/5; + tDefenderMid->setIdlePosition(MidDefPos); + + leftDefPos.loc.x=(4*Field::ourGoalCenter.x+Field::oppGoalCenter.x)/5; + leftDefPos.loc.y=+500; tDefenderLeft->setIdlePosition(leftDefPos); + + rightDefPos.loc.x=(4*Field::ourGoalCenter.x+Field::oppGoalCenter.x)/5; + rightDefPos.loc.y=-500; tDefenderRight->setIdlePosition(rightDefPos); - tGoalie->setIdlePosition(goaliePos); - tAttackerMid->setIdlePosition(Field::oppPenaltyParallelLineCenter); - tAttackerRight->setIdlePosition(Vector2D(Field::oppPenaltyParallelLineCenter.x, - Field::oppPenaltyParallelLineCenter.y - (Field::MaxY*0.75))); - tAttackerLeft->setIdlePosition(Vector2D(Field::oppPenaltyParallelLineCenter.x, - Field::oppPenaltyParallelLineCenter.y + (Field::MaxY*0.75))); + rightAttackerPos.loc.x=(2*Field::ourGoalCenter.x+Field::oppGoalCenter.x)/3; + rightAttackerPos.loc.y=-1500; + tAttackerRight->setIdlePosition(rightAttackerPos); + + leftAttackerPos.loc.x=(2*Field::ourGoalCenter.x+Field::oppGoalCenter.x)/3; + leftAttackerPos.loc.y=+1500; + tAttackerLeft->setIdlePosition(leftAttackerPos); + + midAttackerPos.loc.x=(2*Field::ourGoalCenter.x+Field::oppGoalCenter.x)/3; + midAttackerPos.loc.y=0; + tAttackerMid->setIdlePosition(midAttackerPos); + + + //wm->debug_pos.append(goaliePos.loc); } void PlayPenaltyOpp::initRole() { - QList activeAgents=wm->kn->ActiveAgents(); - - - activeAgents.removeOne(wm->ref_goalie_our); + QList activeAgents=wm->kn->ActiveAgents(); - wm->ourRobot[wm->ref_goalie_our].Role = AgentRole::Golie; + if(wm->ourRobot[wm->ref_goalie_our].isValid){ + activeAgents.removeOne(wm->ref_goalie_our); + wm->ourRobot[wm->ref_goalie_our].Role = AgentRole::Golie; + } switch (activeAgents.length()) { case 1: - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderRight; + //wm->ourRobot[wm->kn->ActiveAgents().at(0)].Role=Golie; + wm->ourRobot[activeAgents.at(0)].Role=DefenderMid; break; case 2: - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderRight; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderLeft; + //wm->ourRobot[wm->kn->ActiveAgents().at(0)].Role=Golie; + wm->ourRobot[activeAgents.at(0)].Role=DefenderRight; + wm->ourRobot[activeAgents.at(1)].Role=DefenderLeft; break; case 3: - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderRight; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderLeft; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::AttackerMid; + //wm->ourRobot[wm->kn->ActiveAgents().at(0)].Role=Golie; + wm->ourRobot[activeAgents.at(0)].Role=DefenderMid; + wm->ourRobot[activeAgents.at(1)].Role=DefenderRight; + wm->ourRobot[activeAgents.at(2)].Role=DefenderLeft; break; case 4: - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderRight; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderLeft; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::AttackerLeft; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::AttackerRight; + //wm->ourRobot[wm->kn->ActiveAgents().at(0)].Role=Golie; + wm->ourRobot[activeAgents.at(0)].Role=DefenderMid; + wm->ourRobot[activeAgents.at(1)].Role=DefenderRight; + wm->ourRobot[activeAgents.at(2)].Role=DefenderLeft; + wm->ourRobot[activeAgents.at(3)].Role=AttackerMid; break; case 5: - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderRight; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderLeft; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::AttackerMid; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::AttackerLeft; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::AttackerRight; + //wm->ourRobot[wm->kn->ActiveAgents().at(0)].Role=Golie; + wm->ourRobot[activeAgents.at(0)].Role=DefenderMid; + wm->ourRobot[activeAgents.at(1)].Role=DefenderRight; + wm->ourRobot[activeAgents.at(2)].Role=DefenderLeft; + wm->ourRobot[activeAgents.at(3)].Role=AttackerRight; + wm->ourRobot[activeAgents.at(4)].Role=AttackerLeft; + break; + default: break; } + + } void PlayPenaltyOpp::execute() { + QList activeAgents=wm->kn->ActiveAgents(); initRole(); @@ -117,6 +207,8 @@ void PlayPenaltyOpp::execute() int index = activeAgents.takeFirst(); setTactics(index); } - + wm->debug_pos.clear(); setPositions(); + + //qDebug()<<"FUCK"; } diff --git a/src/ai/play/playpenaltyopp.h b/src/ai/play/playpenaltyopp.h old mode 100644 new mode 100755 index b749f93..38c1bd7 --- a/src/ai/play/playpenaltyopp.h +++ b/src/ai/play/playpenaltyopp.h @@ -19,6 +19,7 @@ class PlayPenaltyOpp : public Play private: TacticDefender* tDefenderLeft; TacticDefender* tDefenderRight; + TacticDefender* tDefenderMid; TacticGoalie* tGoalie; TacticAttacker* tAttackerMid; TacticAttacker* tAttackerRight; diff --git a/src/ai/play/playpenaltyour.cpp b/src/ai/play/playpenaltyour.cpp old mode 100644 new mode 100755 diff --git a/src/ai/play/playpenaltyour.h b/src/ai/play/playpenaltyour.h old mode 100644 new mode 100755 diff --git a/src/ai/play/playpreparing.cpp b/src/ai/play/playpreparing.cpp old mode 100644 new mode 100755 diff --git a/src/ai/play/playpreparing.h b/src/ai/play/playpreparing.h old mode 100644 new mode 100755 diff --git a/src/ai/play/playstop.cpp b/src/ai/play/playstop.cpp old mode 100644 new mode 100755 index af9b77c..30373d6 --- a/src/ai/play/playstop.cpp +++ b/src/ai/play/playstop.cpp @@ -3,14 +3,14 @@ PlayStop::PlayStop(WorldModel *worldmodel, QObject *parent) : Play("PlayStop", worldmodel, parent) { - tGolie=new TacticGoalie(wm); - - tDefenderLeft=new TacticDefender(wm); - tDefenderRight=new TacticDefender(wm); - - tStopMid=new TacticStop(wm); - tStopLeft=new TacticStop(wm); - tStopRight=new TacticStop(wm); + tGoalie = new TacticGoalie(wm); + tDefenderLeft = new TacticDefender(wm); + tDefenderRight = new TacticDefender(wm); + tStopMid = new TacticStop(wm); + tStopLeft = new TacticStop(wm); + tStopRight = new TacticStop(wm); + tAttackerLeft = new TacticAttacker(wm); + tAttackerRight = new TacticAttacker(wm); leftChecker = 0; rightChecker = 0; @@ -18,72 +18,47 @@ PlayStop::PlayStop(WorldModel *worldmodel, QObject *parent) : int PlayStop::enterCondition() { - if(wm->gs == STATE_Stop) + /*if(wm->gs == STATE_Stop) return 100; else if(wm->cmgs.canMove() && wm->cmgs.gameOn()==false && wm->cmgs.allowedNearBall()==false) return 10; else - return 0; - // return 20000; -} - -bool PlayStop::collisionwithDefenders(Vector2D center, Vector2D left, Vector2D right) -{ - if( ((center-wm->ourRobot[tDefenderLeft->getID()].pos.loc).length() < 2*ROBOT_RADIUS) - || - ((left-wm->ourRobot[tDefenderLeft->getID()].pos.loc).length() < 2*ROBOT_RADIUS) - || - ((right-wm->ourRobot[tDefenderLeft->getID()].pos.loc).length() < 2*ROBOT_RADIUS) - || - ((center-wm->ourRobot[tDefenderRight->getID()].pos.loc).length() < 2*ROBOT_RADIUS) - || - ((left-wm->ourRobot[tDefenderRight->getID()].pos.loc).length() < 2*ROBOT_RADIUS) - || - ((right-wm->ourRobot[tDefenderRight->getID()].pos.loc).length() < 2*ROBOT_RADIUS) - ) - return true; - - return false; -} - -bool PlayStop::oneOfDefendersIsInPenalty(Vector2D leftPos, Vector2D midPos, Vector2D rightPos) -{ - if( wm->kn->IsInsideGolieArea(leftPos) || wm->kn->IsInsideGolieArea(midPos) || wm->kn->IsInsideGolieArea(rightPos)) - return true; - - return false; + return 0;*/ + return 0; } void PlayStop::initRole() { - QList activeAgents=wm->kn->ActiveAgents(); - activeAgents.removeOne(wm->ref_goalie_our); + QList actives = wm->kn->ActiveAgents(); + actives.removeOne(wm->ref_goalie_our); wm->ourRobot[wm->ref_goalie_our].Role = AgentRole::Golie; - switch (activeAgents.length()) { + switch (actives.length()) { case 1: - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderRight; + wm->ourRobot[actives.takeFirst()].Role = AgentRole::DefenderLeft; break; case 2: - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderRight; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderLeft; + wm->ourRobot[actives.takeFirst()].Role = AgentRole::DefenderLeft; + wm->ourRobot[actives.takeFirst()].Role = AgentRole::DefenderRight; break; case 3: - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderRight; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderLeft; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::AttackerMid; + wm->ourRobot[actives.takeFirst()].Role = AgentRole::DefenderLeft; + wm->ourRobot[actives.takeFirst()].Role = AgentRole::DefenderRight; + wm->ourRobot[actives.takeFirst()].Role = AgentRole::AttackerMid; break; case 4: - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderRight; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderLeft; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::AttackerLeft; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::AttackerRight; + wm->ourRobot[actives.takeFirst()].Role = AgentRole::DefenderLeft; + wm->ourRobot[actives.takeFirst()].Role = AgentRole::DefenderRight; + wm->ourRobot[actives.takeFirst()].Role = AgentRole::AttackerMid; + wm->ourRobot[actives.takeFirst()].Role = AgentRole::AttackerLeft; break; case 5: - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderRight; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::DefenderLeft; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::AttackerMid; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::AttackerLeft; - wm->ourRobot[activeAgents.takeFirst()].Role = AgentRole::AttackerRight; + wm->ourRobot[actives.takeFirst()].Role = AgentRole::DefenderLeft; + wm->ourRobot[actives.takeFirst()].Role = AgentRole::DefenderRight; + wm->ourRobot[actives.takeFirst()].Role = AgentRole::AttackerMid; + wm->ourRobot[actives.takeFirst()].Role = AgentRole::AttackerLeft; + wm->ourRobot[actives.takeFirst()].Role = AgentRole::AttackerRight; + break; + default: break; } } @@ -94,7 +69,7 @@ void PlayStop::setTactics(int index) switch (wm->ourRobot[index].Role) { case AgentRole::Golie: - tactics[index] = tGolie; + tactics[index] = tGoalie; break; case AgentRole::DefenderLeft: tactics[index] = tDefenderLeft; @@ -181,117 +156,113 @@ void PlayStop::setPositions() rightChecker = 0; } - tGolie->setIdlePosition(goaliePos); + tGoalie->setIdlePosition(goaliePos); - if(wm->kn->IsInsideGolieArea(wm->ball.pos.loc) ) - { - tStopLeft->setStopPosition(Vector2D(Field::MinX/2.0,Field::ourGoalPost_L.y+200)); - tStopRight->setStopPosition(Vector2D(Field::MinX/2.0,Field::ourGoalPost_R.y-200)); - tStopMid->setStopPosition(Vector2D(Field::MinX/2.0,Field::ourGoalCenter.y)); - } - else if( wm->kn->IsInsideNearArea(wm->ball.pos.loc) ) + if (wm->kn->IsInsideGolieArea(wm->ball.pos.loc)) { - Vector2D candidateL_1, candidateL_2, mainL; - - Circle2D cir_l(Field::defenceLineLinear_L,Field::goalCircle_R+ROBOT_RADIUS); - Line2D thirty_l(Field::defenceLineLinear_L,AngleDeg(30)); - cir_l.intersection(thirty_l,&candidateL_1,&candidateL_2); - if( wm->kn->IsInsideField(candidateL_1) && !wm->kn->IsInsideGolieArea(candidateL_1) ) - mainL = candidateL_1; - else - mainL = candidateL_2; - - tStopLeft->setStopPosition(Vector2D(mainL.x,sign(wm->ball.pos.loc.y)*mainL.y)); - tStopMid->setStopPosition(Vector2D(Field::MinX+300,-sign(wm->ball.pos.loc.y)*1400)); - tStopRight->setStopPosition(Vector2D(mainL.x,-sign(wm->ball.pos.loc.y)*mainL.y)); + tStopMid->setStopPosition({Field::ourGoalCenter.x + 2250, 0}); + tStopLeft->setStopPosition({Field::ourGoalCenter.x + 2250, 1250}); + tStopRight->setStopPosition({Field::ourGoalCenter.x + 2250, -1250}); } - else + else if (wm->ball.pos.loc.x < Field::ourGoalCenter.x + (Field::MaxX * 2) / 3) { - Vector2D finalPos,notImportant,leftPos,rightPos; - - Circle2D robotCircle(wm->ball.pos.loc,ALLOW_NEAR_BALL_RANGE); - Segment2D line2Goal(wm->ball.pos.loc,Field::ourGoalCenter); - robotCircle.intersection(line2Goal,&finalPos,¬Important); - - Circle2D secondCircle(finalPos,(2.5)*ROBOT_RADIUS); - robotCircle.intersection(secondCircle,&leftPos,&rightPos); - - if( !wm->kn->IsInsideField(leftPos) ) + Segment2D seg(Field::ourGoalCenter, wm->ball.pos.loc); + Circle2D ballcir(wm->ball.pos.loc, ALLOW_NEAR_BALL_RANGE); + Vector2D fdot, sdot; + ballcir.intersection(seg, &fdot, &sdot); + + Circle2D goalieCir (Field::ourGoalCenter, 1300); + Line2D linetest (Field::ourGoalCenter, wm->ball.pos.loc); + if (wm->kn->IsInsideGolieArea(fdot)) { - leftPos = finalPos; - finalPos = rightPos; - - Vector2D leftPos2,rightPos2; - Circle2D secondCircle(finalPos,(2.5)*ROBOT_RADIUS); - robotCircle.intersection(secondCircle,&leftPos2,&rightPos2); - - if( leftPos.dist(leftPos2) < leftPos.dist(rightPos2) ) - rightPos = rightPos2; - else - rightPos = leftPos2; - + goalieCir.intersection(linetest, &fdot, &sdot); + if (fdot.x < sdot.x) + fdot = sdot; } - else if( !wm->kn->IsInsideField(rightPos) ) - { - rightPos = finalPos; - finalPos = leftPos; - Vector2D leftPos2,rightPos2; - Circle2D secondCircle(finalPos,(2.5)*ROBOT_RADIUS); - robotCircle.intersection(secondCircle,&leftPos2,&rightPos2); + tStopMid->setStopPosition(fdot); - if( rightPos.dist(leftPos2) < rightPos.dist(rightPos2) ) - leftPos = rightPos2; - else - leftPos = leftPos2; - } + tactics[tStopLeft->getID()] = tAttackerLeft; + tactics[tStopRight->getID()] = tAttackerRight; - if( collisionwithDefenders(finalPos,leftPos,rightPos) || oneOfDefendersIsInPenalty(leftPos,finalPos,rightPos) ) + Marking def; + def.setWorldModel(wm); //?? + bool isMatched; + QList opp = wm->kn->ActiveOppAgents(); + QList our; + our.append(tAttackerLeft->getID()); + our.append(tAttackerRight->getID()); + QList m2m = def.findMarking(our , opp, isMatched); + if (isMatched) { - if( wm->kn->IsInsideRect(wm->ball.pos.loc,Vector2D(Field::MinX,Field::MaxY),Vector2D(0,0.25*Field::MaxY)) - || - wm->kn->IsInsideRect(wm->ball.pos.loc,Vector2D(Field::MinX,0.25*Field::MinY),Vector2D(0,Field::MinY)) ) + for (int i = 0; i < m2m.size(); i++) { - Vector2D candidateL_1, candidateL_2, mainL; - - Circle2D cir_l(Field::defenceLineLinear_L,Field::goalCircle_R+ROBOT_RADIUS); - Line2D thirty_l(Field::defenceLineLinear_L,AngleDeg(30)); - cir_l.intersection(thirty_l,&candidateL_1,&candidateL_2); - if( wm->kn->IsInsideField(candidateL_1) && !wm->kn->IsInsideGolieArea(candidateL_1) ) - mainL = candidateL_1; - else - mainL = candidateL_2; - - tStopLeft->setStopPosition(Vector2D(mainL.x,sign(wm->ball.pos.loc.y)*mainL.y)); - tStopMid->setStopPosition(Vector2D(Field::ourPenaltySpot.x+200,Field::ourPenaltySpot.y)); - tStopRight->setStopPosition(Vector2D(mainL.x,-sign(wm->ball.pos.loc.y)*mainL.y)); - } - else - { - //tStopLeft->setStopPosition(Vector2D(wm->ourRobot[tDefenderLeft->getID()].pos.loc.x - // , wm->ourRobot[tDefenderLeft->getID()].pos.loc.y+5*ROBOT_RADIUS)); - finalPos = Vector2D(wm->ourRobot[tDefenderLeft->getID()].pos.loc.x, - 0.5*(wm->ourRobot[tDefenderLeft->getID()].pos.loc.y+wm->ourRobot[tDefenderRight->getID()].pos.loc.y) - ); - tStopLeft->setStopPosition(Vector2D(finalPos.x,finalPos.y+4.5*ROBOT_RADIUS)); - tStopMid->setStopPosition(Vector2D(finalPos.x,finalPos.y-6.5*ROBOT_RADIUS)); - tStopRight->setStopPosition(Vector2D(finalPos.x,finalPos.y-4.5*ROBOT_RADIUS)); + wm->ourRobot[m2m.at(i).ourI].Status = AgentStatus::BlockingRobot; + + switch (wm->ourRobot[m2m.at(i).ourI].Role) { + case AgentRole::DefenderLeft: + tDefenderLeft->setPlayerToKeep(m2m.at(i).oppI); + break; + case AgentRole::DefenderRight: + tDefenderRight->setPlayerToKeep(m2m.at(i).oppI); + break; + case AgentRole::AttackerLeft: + tAttackerLeft->setPlayerToKeep(m2m.at(i).oppI); + break; + case AgentRole::AttackerRight: + tAttackerRight->setPlayerToKeep(m2m.at(i).oppI); + break; + default: + break; + } } } - else - { - tStopLeft->setStopPosition(leftPos); - tStopMid->setStopPosition(finalPos); - tStopRight->setStopPosition(rightPos); - } + } + else if (wm->ball.pos.loc.x < Field::ourGoalCenter.x + (Field::MaxX * 2)* 2 / 3) + { + Vector2D fPosAttMid, fPosAttLeft, fPosAttRight, sec; + double slope, degree, deltaa; + slope = (wm->ball.pos.loc.y - Field::ourGoalCenter.y) / (wm->ball.pos.loc.x - Field::ourGoalCenter.x); + degree = atan(slope); + deltaa = 2 * asin( ROBOT_RADIUS / ALLOW_NEAR_BALL_RANGE ); + AngleDeg deg(degree * 57.32), delta(deltaa * 57.32); + AngleDeg leftAttDeg, rightAttDeg; + leftAttDeg = operator -(deg, delta); + rightAttDeg = operator +(deg, delta); + Line2D leftAttLine(wm->ball.pos.loc, leftAttDeg.degree() - 1.5); + Line2D rightAttLine(wm->ball.pos.loc, rightAttDeg.degree() + 1.5); + Circle2D cir(wm->ball.pos.loc, ALLOW_NEAR_BALL_RANGE); + cir.intersection(leftAttLine, &fPosAttLeft, &sec); + if (sec.x < fPosAttLeft.x) + fPosAttLeft = sec; + cir.intersection(rightAttLine, &fPosAttRight, &sec); + if (sec.x < fPosAttRight.x) + fPosAttRight = sec; + + tStopLeft->setStopPosition(fPosAttLeft); + tStopRight->setStopPosition(fPosAttRight); + + Segment2D seg(Field::ourGoalCenter, wm->ball.pos.loc); + Circle2D ballcir(wm->ball.pos.loc, ALLOW_NEAR_BALL_RANGE); + Vector2D fdot, sdot; + ballcir.intersection(seg, &fdot, &sdot); + tStopMid->setStopPosition(fdot); + } + else if (Field::ourGoalCenter.x + (Field::MaxX * 2)* 2 / 3 < wm->ball.pos.loc.x) + { + Segment2D seg(Field::ourGoalCenter, wm->ball.pos.loc); + Circle2D ballcir(wm->ball.pos.loc, ALLOW_NEAR_BALL_RANGE); + Vector2D fdot, sdot; + ballcir.intersection(seg, &fdot, &sdot); + tStopMid->setStopPosition(fdot); + + tStopLeft->setStopPosition({wm->ball.pos.loc.x - 2250, 1250}); + tStopRight->setStopPosition({wm->ball.pos.loc.x - 2250, -1250}); } } void PlayStop::execute() { - wm->passPoints.clear(); - wm->debug_pos.clear(); - QList activeAgents=wm->kn->ActiveAgents(); for(int i=0;i + +class PlayStop_Hejazi : public Play +{ +public: + explicit PlayStop_Hejazi(WorldModel *worldmodel, QObject *parent = 0); + virtual void execute(); + virtual void initRole(); + PlayStop_Hejazi(); +}; + +#endif // PLAYSTOP_HEJAZI_H diff --git a/src/ai/play/playtest.cpp b/src/ai/play/playtest.cpp old mode 100644 new mode 100755 index 51df22f..e494431 --- a/src/ai/play/playtest.cpp +++ b/src/ai/play/playtest.cpp @@ -1,14 +1,14 @@ #include "playtest.h" PlayTest::PlayTest(WorldModel *worldmodel, QObject *parent) : Play("PlayTest", worldmodel, parent) -{////////////////////////////////// - test = new TacticTest(wm); - test2 = new TacticTest2(wm); - /////////////////////////////////// +{ + tTest = new TacticTest(wm); + tTest2 = new TacticTest(wm); } int PlayTest::enterCondition() { + //return 20000; return 0; } @@ -17,10 +17,15 @@ void PlayTest::initRole() } void PlayTest::execute() -{//---//////////////////////////////////////////////////// - - tactics[0] = test; - tactics[1] = test; - tactics[2] = test; - +{ +// std::cout << wm->kn->ActiveAgents()[0] << std::endl; +// wm->debug_pos.clear(); +// wm->debug_pos.append(wm->ourRobot[1].pos.loc); +// wm->debug_pos.append(wm->ourRobot[0].pos.loc); + tactics[4] = tTest; +// for(int i=0;ikn->ActiveAgents().length();i++){ +// tactics[wm->kn->ActiveAgents()[i]] = tTest; +// } + //wm->debug_pos.clear(); + //wm->debug_pos.append(Vector2D (0,0)); } diff --git a/src/ai/play/playtest.h b/src/ai/play/playtest.h old mode 100644 new mode 100755 index 106b915..6ea392a --- a/src/ai/play/playtest.h +++ b/src/ai/play/playtest.h @@ -11,12 +11,8 @@ class PlayTest : public Play virtual void execute(); virtual void initRole(); virtual int enterCondition(); - - //////////////////////////// private: - int flag=0; - TacticTest *test; - TacticTest2 *test2; - /////////////////////////// + TacticTest* tTest; + TacticTest* tTest2; }; #endif // PLAYTEST_H diff --git a/src/ai/play/playtest2.cpp b/src/ai/play/playtest2.cpp old mode 100644 new mode 100755 index 0c70527..f79a93f --- a/src/ai/play/playtest2.cpp +++ b/src/ai/play/playtest2.cpp @@ -3,11 +3,7 @@ PlayTest2::PlayTest2(WorldModel *worldmodel, QObject *parent) : Play("PlayTest2", worldmodel, parent) { - // Goaler. - tGolie = new TacticGoalie(wm); - tTF = new TacticTestFriction(wm); - thalt = new TacticHalt(wm); - tTest = new TacticTest(wm); + tTest = new TacticTest2(wm); } int PlayTest2::enterCondition() @@ -15,15 +11,125 @@ int PlayTest2::enterCondition() return 0; } +int PlayTest2::Parabola_intersection(Vector2D site1, Vector2D site2, double l, Vector2D *v1, Vector2D *v2) +{ + double a1, b1, c1; + double a2, b2, c2; + double a, b, c; + double delta; + + a1 = 0.5 / (site1.y - l); + b1 = site1.x / (l - site1.y); + c1 = ( 0.5 * (site1.y + l) ) + ( 0.5 * site1.x * site1.x / (site1.y -l) ); + //cout << a1 << "||" << b1 << "||" << c1 << endl; + + a2 = 0.5 / (site2.y - l); + b2 = site2.x / (l - site2.y); + c2 = ( 0.5 * (site2.y + l) ) + ( 0.5 * site2.x * site2.x / (site2.y -l) ); + //cout << a2 << "||" << b2 << "||" << c2 << endl; + + a = a1 - a2; + b = b1 - b2; + c = c1 - c2; + //cout << a << "||" << b << "||" << c << endl; + + delta = b * b - 4 * a * c; + + if (a == 0) + { + if (b == 0) + return 0; + else + { + v1->x = (-1) * c / b; + v1->y = a1 * v1->x * v1->x + b1 * v1->x + c1; + + return 1; + } + } + else + { + if (delta > 0) + { + v1->x = ( (-1) * b - sqrt(delta) ) / (2 * a); + v1->y = a1 * v1->x * v1->x + b1 * v1->x + c1; + v2->x = ( (-1) * b + sqrt(delta) ) / (2 * a); + v2->y = a1 * v2->x * v2->x + b1 * v2->x + c1; + + return 2; + } + else if (delta == 0) + { + v1->x = ((-1) * b) / (2 * a); + v1->y = a1 * v1->x * v1->x + b1 * v1->x + c1; + + return 1; + } + else + return 0; + } +} + void PlayTest2::initRole() { } + void PlayTest2::execute() { -// tactics[wm->ref_goalie_our] = tGolie; - tactics[3] = tTest; - qDebug()<<"Ball Speed is "<ball.vel.loc.length(); + if(wm->gs == STATE_Stop){ + tactics[wm->ref_goalie_our] = tTest; + //step1 + if(wm->kn->ActiveAgents().size() == 3){ + tactics[wm->kn->ActiveAgents()[0]] = tTest; + tactics[wm->kn->ActiveAgents()[1]] = tTest; + tactics[wm->kn->ActiveAgents()[2]] = tTest; + } + if(wm->kn->ActiveAgents().size() == 4){ + tactics[wm->kn->ActiveAgents()[0]] = tTest; + tactics[wm->kn->ActiveAgents()[1]] = tTest; + tactics[wm->kn->ActiveAgents()[2]] = tTest; + tactics[wm->kn->ActiveAgents()[3]] = tTest; + } + if(wm->kn->ActiveAgents().size() == 5){ + tactics[wm->kn->ActiveAgents()[0]] = tTest; + tactics[wm->kn->ActiveAgents()[1]] = tTest; + tactics[wm->kn->ActiveAgents()[2]] = tTest; + tactics[wm->kn->ActiveAgents()[3]] = tTest; + tactics[wm->kn->ActiveAgents()[4]] = tTest; + } + if(wm->kn->ActiveAgents().size() == 6){ + tactics[wm->kn->ActiveAgents()[0]] = tTest; + tactics[wm->kn->ActiveAgents()[1]] = tTest; + tactics[wm->kn->ActiveAgents()[2]] = tTest; + tactics[wm->kn->ActiveAgents()[3]] = tTest; + tactics[wm->kn->ActiveAgents()[4]] = tTest; + tactics[wm->kn->ActiveAgents()[5]] = tTest; + } + } + if(wm->gs == STATE_Halt){ + for(int i = 0 ; i < wm->kn->ActiveAgents().size() ; i++){ + tactics[i] = new TacticHalt(wm); + } + } + if(wm->gs == STATE_Free_kick_Opp){ + tactics[wm->ref_goalie_our] = tTest; + } + if(wm->gs == STATE_Free_kick_Our){ + tactics[0] = (Tactic*) (new TacticTest(wm)); + } + for(int i=0;ikn->ActiveAgents().length();i++){ + tactics[wm->kn->ActiveAgents()[i]] = tTest; + } + wm->debug_pos.clear(); +// if(wm->ball.isValid){ +// wm->debug_pos.append(wm->ball.pos.loc); +// qDebug()<<"x :"<ball.pos.loc.x; +// qDebug()<<"y :"<ball.pos.loc.y<<"\n\n"; +// } } +//Vector2D PlayTest2::generatePos(int radius,double alpha){ +// return Vector2D(wm->ball.pos.loc.x + radius*std::sin() +//} diff --git a/src/ai/play/playtest2.h b/src/ai/play/playtest2.h old mode 100644 new mode 100755 index 1a5d002..f4e06b4 --- a/src/ai/play/playtest2.h +++ b/src/ai/play/playtest2.h @@ -3,6 +3,11 @@ #include "play.h" #include "QDebug" +<<<<<<< HEAD +#include "tactic/tactichalt.h" +======= +#include +>>>>>>> 4bde963eede2897a0748e0221474ee6c1450efde class PlayTest2 : public Play { @@ -10,16 +15,14 @@ class PlayTest2 : public Play public: explicit PlayTest2(WorldModel *worldmodel, QObject *parent = 0); virtual void execute(); - //virtual Tactic* getTactic(int id); + virtual void initRole(); virtual int enterCondition(); private: - TacticGoalie* tGolie; - TacticTestFriction* tTF; - TacticHalt* thalt; - TacticTest* tTest; - + TacticTest2* tTest; virtual void initRole(); + TacticTest2* tTest; + int Parabola_intersection (Vector2D, Vector2D, double, Vector2D *, Vector2D *); }; #endif // PLAYTEST2_H diff --git a/src/ai/positioning.cpp b/src/ai/positioning.cpp old mode 100644 new mode 100755 diff --git a/src/ai/positioning.h b/src/ai/positioning.h old mode 100644 new mode 100755 diff --git a/src/ai/robotcommand.h b/src/ai/robotcommand.h old mode 100644 new mode 100755 diff --git a/src/ai/skill.cpp b/src/ai/skill.cpp old mode 100644 new mode 100755 diff --git a/src/ai/skill.h b/src/ai/skill.h old mode 100644 new mode 100755 diff --git a/src/ai/skill/shootball.cpp b/src/ai/skill/shootball.cpp new file mode 100755 index 0000000..d46d812 --- /dev/null +++ b/src/ai/skill/shootball.cpp @@ -0,0 +1,2 @@ +#include "shootball.h" + diff --git a/src/ai/skill/shootball.h b/src/ai/skill/shootball.h new file mode 100755 index 0000000..42a85f9 --- /dev/null +++ b/src/ai/skill/shootball.h @@ -0,0 +1,22 @@ +#ifndef SHOOTBALL_H +#define SHOOTBALL_H +#include +#include "skill.h" + +//class shootBall : public Skill +//{ +// Q_OBJECT +//public: +// shootBall(); +// explicit shootBall(WorldModel* wm, QObject *parent = 0); +// bool execute(RobotCommand& rc); +//private: +// bool targetMove; +// Vector2D* _target; +// /*! +// is ball shooted or not. +// */ +// bool ballShooted; +//}; + +#endif // SHOOTBALL_H diff --git a/src/ai/skill/skillkick.cpp b/src/ai/skill/skillkick.cpp old mode 100644 new mode 100755 index ce0e7f5..1341b7a --- a/src/ai/skill/skillkick.cpp +++ b/src/ai/skill/skillkick.cpp @@ -8,116 +8,118 @@ SkillKick::SkillKick(WorldModel* wm, QObject *parent) : bool SkillKick::execute(RobotCommand &rc) { - //locating behind the ball... - - Vector2D goal; - - Vector2D ball2target; - - ball2target=this->_Target - wm->ball.pos.loc; - - ball2target.setLength(ROBOT_RADIUS+8); - - goal=wm->ball.pos.loc - ball2target; - - // Vector2D checkingPoint; - - // ball2target.setLength(2*ROBOT_RADIUS+20); - - // checkingPoint=wm->ball.pos.loc - ball2target; - - // Segment2D *kicker2chekingPoint=new Segment2D(wm->ourRobot[index].pos.loc,checkingPoint); - - // Circle2D checkingCircle(wm->ball.pos.loc,ROBOT_RADIUS*2); - - - Circle2D checkingCircle(wm->ball.pos.loc,ROBOT_RADIUS); - Segment2D *kicker2goal=new Segment2D(wm->ourRobot[index].pos.loc,goal); - - if( checkingCircle.HasIntersection( *kicker2goal ) ) - { - ball2target.setLength(200+200); - Vector2D temp1=goal+(-ball2target).rotatedVector(60); - Vector2D temp2=goal+(-ball2target).rotatedVector(-60); - if((wm->ourRobot[index].pos.loc-temp1).length2()<(wm->ourRobot[index].pos.loc-temp2).length2()) - { - goal=temp1; - } - else - { - goal=temp2; - } - } - - rc.fin_pos.loc=goal; - - rc.fin_pos.dir=ball2target.dir().radian(); - - - - - //kicking... - - if( wm->isSim ) - { - //simulatuion - Vector2D centerofrarecircle; - ball2target.setLength(ROBOT_RADIUS+10); - centerofrarecircle=wm->ball.pos.loc-ball2target; - Circle2D rearCircle(centerofrarecircle,20); - Circle2D ballCircle(wm->ball.pos.loc,ROBOT_RADIUS+50); - if( wm->ball.isValid&& - ballCircle.contains(wm->ourRobot[index].pos.loc)&& - rearCircle.contains(wm->ourRobot[index].pos.loc)//&& - // fabs((ball2target.dir().degree())-((wm->ourRobot[index].pos.dir)*180/M_PI))<3 - ) - { - if( !isShoot ) - rc.kickspeedx = 3.5; - else - rc.kickspeedx = 8; - } - } - else - { - // real: - - if( !wm->useShootSensor ) - { - //without kicking sensor - Vector2D centerofrarecircle; - ball2target.setLength(ROBOT_RADIUS+10); - centerofrarecircle=wm->ball.pos.loc-ball2target; - Circle2D rearCircle(centerofrarecircle,20); - Circle2D ballCircle(wm->ball.pos.loc,ROBOT_RADIUS+20); - if( wm->ball.isValid&& - ballCircle.contains(wm->ourRobot[index].pos.loc)&& - rearCircle.contains(wm->ourRobot[index].pos.loc)//&& - // fabs((ball2target.dir().degree())-((wm->ourRobot[index].pos.dir)*180/M_PI))<3 - ) - { - if( !isShoot ) - rc.kickspeedx = 30; - else - rc.kickspeedx = 100; - } - } - else - { - //with kicking sensor - if( ((wm->ball.pos.loc-wm->ourRobot[index].pos.loc).length()<500) && (fabs((ball2target.dir().degree())-((wm->ourRobot[index].pos.dir)*180/M_PI))<90 || fabs((ball2target.dir().degree())-((wm->ourRobot[index].pos.dir)*180/M_PI))>270) ) - { - if( !isShoot ) - rc.kickspeedx = 140; - else - rc.kickspeedx = 200; - // if(passFlag) - // { - // rc.kickspeedx=sqrt(2*10*lossFactor*(this->_Target-wm->ourRobot[index].pos.loc).length()); - // } - } - } - } +/*cod khodam*/ + +// //locating behind the ball... + +// Vector2D goal; + +// Vector2D ball2target; + +// ball2target=this->_Target - wm->ball.pos.loc; + +// ball2target.setLength(ROBOT_RADIUS+8); + +// goal=wm->ball.pos.loc - ball2target; + +// // Vector2D checkingPoint; + +// // ball2target.setLength(2*ROBOT_RADIUS+20); + +// // checkingPoint=wm->ball.pos.loc - ball2target; + +// // Segment2D *kicker2chekingPoint=new Segment2D(wm->ourRobot[index].pos.loc,checkingPoint); + +// // Circle2D checkingCircle(wm->ball.pos.loc,ROBOT_RADIUS*2); + + +// Circle2D checkingCircle(wm->ball.pos.loc,ROBOT_RADIUS); +// Segment2D *kicker2goal=new Segment2D(wm->ourRobot[index].pos.loc,goal); + +// if( checkingCircle.HasIntersection( *kicker2goal ) ) +// { +// ball2target.setLength(200+200); +// Vector2D temp1=goal+(-ball2target).rotatedVector(60); +// Vector2D temp2=goal+(-ball2target).rotatedVector(-60); +// if((wm->ourRobot[index].pos.loc-temp1).length2()<(wm->ourRobot[index].pos.loc-temp2).length2()) +// { +// goal=temp1; +// } +// else +// { +// goal=temp2; +// } +// } + +// rc.fin_pos.loc=goal; + +// rc.fin_pos.dir=ball2target.dir().radian(); + + + + +// //kicking... + +// if( wm->isSim ) +// { +// //simulatuion +// Vector2D centerofrarecircle; +// ball2target.setLength(ROBOT_RADIUS+10); +// centerofrarecircle=wm->ball.pos.loc-ball2target; +// Circle2D rearCircle(centerofrarecircle,20); +// Circle2D ballCircle(wm->ball.pos.loc,ROBOT_RADIUS+50); +// if( wm->ball.isValid&& +// ballCircle.contains(wm->ourRobot[index].pos.loc)&& +// rearCircle.contains(wm->ourRobot[index].pos.loc)//&& +// // fabs((ball2target.dir().degree())-((wm->ourRobot[index].pos.dir)*180/M_PI))<3 +// ) +// { +// if( !isShoot ) +// rc.kickspeedx = 3.5; +// else +// rc.kickspeedx = 8; +// } +// } +// else +// { +// // real: + +// if( !wm->useShootSensor ) +// { +// //without kicking sensor +// Vector2D centerofrarecircle; +// ball2target.setLength(ROBOT_RADIUS+10); +// centerofrarecircle=wm->ball.pos.loc-ball2target; +// Circle2D rearCircle(centerofrarecircle,20); +// Circle2D ballCircle(wm->ball.pos.loc,ROBOT_RADIUS+20); +// if( wm->ball.isValid&& +// ballCircle.contains(wm->ourRobot[index].pos.loc)&& +// rearCircle.contains(wm->ourRobot[index].pos.loc)//&& +// // fabs((ball2target.dir().degree())-((wm->ourRobot[index].pos.dir)*180/M_PI))<3 +// ) +// { +// if( !isShoot ) +// rc.kickspeedx = 30; +// else +// rc.kickspeedx = 100; +// } +// } +// else +// { +// //with kicking sensor +// if( ((wm->ball.pos.loc-wm->ourRobot[index].pos.loc).length()<500) && (fabs((ball2target.dir().degree())-((wm->ourRobot[index].pos.dir)*180/M_PI))<90 || fabs((ball2target.dir().degree())-((wm->ourRobot[index].pos.dir)*180/M_PI))>270) ) +// { +// if( !isShoot ) +// rc.kickspeedx = 140; +// else +// rc.kickspeedx = 200; +// // if(passFlag) +// // { +// // rc.kickspeedx=sqrt(2*10*lossFactor*(this->_Target-wm->ourRobot[index].pos.loc).length()); +// // } +// } +// } +// } } diff --git a/src/ai/skill/skillkick.cpp.autosave b/src/ai/skill/skillkick.cpp.autosave new file mode 100755 index 0000000..c2dff8c --- /dev/null +++ b/src/ai/skill/skillkick.cpp.autosave @@ -0,0 +1,1598 @@ +#include "skillkick.h" + +SkillKick::SkillKick(WorldModel* wm, QObject *parent) : + Skill(wm, parent) +{ + isShoot = true; +} + +bool SkillKick:: +execute(RobotCommand &rc) +{ +/*cod khodam*/ + +// //locating behind the ball... + +// Vector2D goal; + +// Vector2D ball2target; + +// ball2target=this->_Target - wm->ball.pos.loc; + +// ball2target.setLength(ROBOT_RADIUS+8); + +// goal=wm->ball.pos.loc - ball2target; + +// // Vector2D checkingPoint; + +// // ball2target.setLength(2*ROBOT_RADIUS+20); + +// // checkingPoint=wm->ball.pos.loc - ball2target; + +// // Segment2D *kicker2chekingPoint=new Segment2D(wm->ourRobot[index].pos.loc,checkingPoint); + +// // Circle2D checkingCircle(wm->ball.pos.loc,ROBOT_RADIUS*2); + + +// Circle2D checkingCircle(wm->ball.pos.loc,ROBOT_RADIUS); +// Segment2D *kicker2goal=new Segment2D(wm->ourRobot[index].pos.loc,goal); + +// if( checkingCircle.HasIntersection( *kicker2goal ) ) +// { +// ball2target.setLength(200+200); +// Vector2D temp1=goal+(-ball2target).rotatedVector(60); +// Vector2D temp2=goal+(-ball2target).rotatedVector(-60); +// if((wm->ourRobot[index].pos.loc-temp1).length2()<(wm->ourRobot[index].pos.loc-temp2).length2()) +// { +// goal=temp1; +// } +// else +// { +// goal=temp2; +// } +// } + +// rc.fin_pos.loc=goal; + +// rc.fin_pos.dir=ball2target.dir().radian(); + + + + +// //kicking... + +// if( wm->isSim ) +// { +// //simulatuion +// Vector2D centerofrarecircle; +// ball2target.setLength(ROBOT_RADIUS+10); +// centerofrarecircle=wm->ball.pos.loc-ball2target; +// Circle2D rearCircle(centerofrarecircle,20); +// Circle2D ballCircle(wm->ball.pos.loc,ROBOT_RADIUS+50); +// if( wm->ball.isValid&& +// ballCircle.contains(wm->ourRobot[index].pos.loc)&& +// rearCircle.contains(wm->ourRobot[index].pos.loc)//&& +// // fabs((ball2target.dir().degree())-((wm->ourRobot[index].pos.dir)*180/M_PI))<3 +// ) +// { +// if( !isShoot ) +// rc.kickspeedx = 3.5; +// else +// rc.kickspeedx = 8; +// } +// } +// else +// { +// // real: + +// if( !wm->useShootSensor ) +// { +// //without kicking sensor +// Vector2D centerofrarecircle; +// ball2target.setLength(ROBOT_RADIUS+10); +// centerofrarecircle=wm->ball.pos.loc-ball2target; +// Circle2D rearCircle(centerofrarecircle,20); +// Circle2D ballCircle(wm->ball.pos.loc,ROBOT_RADIUS+20); +// if( wm->ball.isValid&& +// ballCircle.contains(wm->ourRobot[index].pos.loc)&& +// rearCircle.contains(wm->ourRobot[index].pos.loc)//&& +// // fabs((ball2target.dir().degree())-((wm->ourRobot[index].pos.dir)*180/M_PI))<3 +// ) +// { +// if( !isShoot ) +// rc.kickspeedx = 30; +// else +// rc.kickspeedx = 100; +// } +// } +// else +// { +// //with kicking sensor +// if( ((wm->ball.pos.loc-wm->ourRobot[index].pos.loc).length()<500) && (fabs((ball2target.dir().degree())-((wm->ourRobot[index].pos.dir)*180/M_PI))<90 || fabs((ball2target.dir().degree())-((wm->ourRobot[index].pos.dir)*180/M_PI))>270) ) +// { +// if( !isShoot ) +// rc.kickspeedx = 140; +// else +// rc.kickspeedx = 200; +// // if(passFlag) +// // { +// // rc.kickspeedx=sqrt(2*10*lossFactor*(this->_Target-wm->ourRobot[index].pos.loc).length()); +// // } +// } +// } +// } + +} + + + + + + + + +// Vector2D S=wm->oppRobot[0].pos.loc-target;//-wm->oppRobot[0].pos.loc; +// S.setDir(wm->ourRobot[0].pos.dir*(180/M_PI)); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +// // // 1 && 2 + +//// if(wm->ball.vel.loc.length()<0.05) +//// { +//// if((wm->ball.pos.loc-wm->ourRobot[0].pos.loc).length2()>(wm->ball.pos.loc-wm->ourRobot[1].pos.loc).length2()) +//// { +//// kicker0=false; +//// receiver0=true; + +//// kicker1=true; +//// receiver1=false; +//// } + +//// else if((wm->ball.pos.loc-wm->ourRobot[0].pos.loc).length2()<(wm->ball.pos.loc-wm->ourRobot[1].pos.loc).length2()) +//// { +//// kicker0=true; +//// receiver0=false; + +//// kicker1=false; +//// receiver1=true; +//// } + + +//// } + + + + +//// if(index==0) +//// { +//// if(kicker0) +//// { +//// //locating behind the ball... + +//// Vector2D ball2target; + + + +//// Vector2D target=wm->ourRobot[1].pos.loc;//{2470,0}; + +//// ball2target=target-wm->ball.pos.loc; + +//// ball2target.setLength(95); + + +//// rc.fin_pos.loc=wm->ball.pos.loc - ball2target; + +//// rc.fin_pos.dir=ball2target.dir().radian(); + + + +//// /////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +//// // kicking + +//// if( wm->isSim ) +//// { +//// //simulation: +//// Vector2D A; +//// ball2target.setLength(115); +//// A=wm->ball.pos.loc-ball2target; +//// Circle2D C2(A,120); +//// Circle2D C(wm->ball.pos.loc,ROBOT_RADIUS+20); +//// if( wm->ball.isValid&& +//// C.contains(wm->ourRobot[index].pos.loc)&& +//// C2.contains(wm->ourRobot[index].pos.loc)&& +//// (fabs(((wm->ourRobot[1].pos.loc-wm->ourRobot[index].pos.loc).dir().degree())-(ball2target.dir().degree())<10)) +//// ) +//// { +//// rc.kickspeedx=5; +//// receiver0=false; +//// kicker0=false; + +//// } +//// } +//// else +//// { +//// //real: +//// Vector2D A; +//// vec2goal.setLength(115); +//// A=wm->ball.pos.loc-vec2goal; +//// Circle2D C2(A,120); +//// Circle2D C(wm->ball.pos.loc,ROBOT_RADIUS+15); +//// if( wm->ball.isValid&& +//// C.contains(wm->ourRobot[0].pos.loc)&& +//// C2.contains(wm->ourRobot[0].pos.loc) +//// ) +//// { +//// rc.kickspeedx=10; +//// } +//// } +//// } + +//// else if(receiver0) +//// { +//RecievingPass + + +// Vector2D robot2ball=wm->ball.pos.loc-wm->ourRobot[index].pos.loc; +// rc.fin_pos.dir=robot2ball.dir().radian(); + +// rc.fin_pos.loc=wm->ourRobot[index].pos.loc;//{0,0}; +// //rc.maxSpeed=3; + + +// if (wm->ball.vel.loc.length()>0.1) +// { +// Vector2D goal; +// Vector2D Ballpos=wm->ball.pos.loc; +// Ball2C = new Line2D(Ballpos , wm->ball.vel.loc.dir().degree()); +// Vector2D A,B; + +// ballvel.setDir(wm->ball.vel.loc.dir().degree()); + + +// if(fabs(ballvel.dir().degree()-last_ballvel.dir().degree())>10) +// { + +// C0.assign(wm->ourRobot[0].pos.loc,ROBOT_RADIUS+500); + +// } + +// last_ballvel.setDir(ballvel.dir().degree()); + + + +// C0.intersection(*Ball2C,&A,&B); + +// if( C0.HasIntersection(*Ball2C)) +// { + +// if((Ballpos-A).length2()>(Ballpos-B).length2()) +// { +// goal=A; +// } + +// else +// { +// goal=B; +// } + +// rc.fin_pos.loc=goal; +// rc.fin_pos.dir=(wm->ball.vel.loc.dir().radian()+M_PI);//tttarget.dir().radian();// + + +// } + + + +// } +// //////////////////////////////////////////////////////////////////////////////// +// //change decision +// //Circle2D CD(wm->ourRobot[index].pos.loc,C0.radius()+300); +// if((wm->ourRobot[index].pos.loc-wm->ball.pos.loc).length()<150) +// { +// kicker0=true; +// receiver0=false; + +// kicker1=false; +// receiver1=true; +// } + +//// ///////////////////////////////////////////////////////////////////////////////// +//// } + + +//// else if(!kicker0 && !receiver0)//kicker no!!!! receiver no!!!>>>>.... +//// { +//// Vector2D robot2ball=wm->ball.pos.loc-wm->ourRobot[index].pos.loc; +//// rc.fin_pos.dir=robot2ball.dir().radian(); + +//// rc.fin_pos.loc=wm->ourRobot[index].pos.loc;//{0,0}; +//// } + +//// } + +// else if(index==1) +// { +// if(kicker1) +// { +// //locating behind the ball... + +// Vector2D ball2target; + + +// Vector2D target=wm->ourRobot[0].pos.loc;//{2470,0}; + +// ball2target=target-wm->ball.pos.loc; + +// ball2target.setLength(95); + + + +// rc.fin_pos.loc=wm->ball.pos.loc - ball2target; + +// rc.fin_pos.dir=ball2target.dir().radian(); + + + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +// kicking + + +//real: +// Vector2D A; +// vec2goal.setLength(115); +// A=wm->ball.pos.loc-vec2goal; +// Circle2D C2(A,120); +// Circle2D C(wm->ball.pos.loc,ROBOT_RADIUS+15); +// if( wm->ball.isValid&& +// C.contains(wm->ourRobot[0].pos.loc)&& +// C2.contains(wm->ourRobot[0].pos.loc) +// ) +// { +// rc.kickspeedx=10; +// } + + + +// //simulation: +// Vector2D A; +// ball2target.setLength(115); +// A=wm->ball.pos.loc-ball2target; +// Circle2D C2(A,120); +// Circle2D C(wm->ball.pos.loc,ROBOT_RADIUS+20); +// if( wm->ball.isValid&& +// C.contains(wm->ourRobot[index].pos.loc)&& +// C2.contains(wm->ourRobot[index].pos.loc)&& +// (fabs(((wm->ourRobot[0].pos.loc-wm->ourRobot[index].pos.loc).dir().degree())-(ball2target.dir().degree())<5)) +// ) + +// { +// //qDebug()<<","<ourRobot[0].pos.loc-wm->ourRobot[index].pos.loc).dir().degree())-(ball2target.dir().degree())); +// rc.kickspeedx=5; +// kicker1=false; +// receiver1=false; + +// } +// } + + +// else if(receiver1) +// { +// //RecievingPass + +// //rc.maxSpeed=2; + + +// Vector2D robot2ball=wm->ball.pos.loc-wm->ourRobot[index].pos.loc; +// rc.fin_pos.dir=robot2ball.dir().radian(); + +// rc.fin_pos.loc=wm->ourRobot[index].pos.loc;//{0,0};// + + +// if (wm->ball.vel.loc.length()>0.1) +// { +// Vector2D goal; +// Vector2D Ballpos=wm->ball.pos.loc; +// Ball2C = new Line2D(Ballpos , wm->ball.vel.loc.dir().degree()); +// Vector2D A,B; + +// ballvel.setDir(wm->ball.vel.loc.dir().degree()); + + +// if(fabs(ballvel.dir().degree()-last_ballvel.dir().degree())>10) +// { + +// C1.assign(wm->ourRobot[index].pos.loc,ROBOT_RADIUS+500); + +// } + +// last_ballvel.setDir(ballvel.dir().degree()); + + + +// C1.intersection(*Ball2C,&A,&B); + +// if( C1.HasIntersection(*Ball2C)) +// { +// if((Ballpos-A).length2()>(Ballpos-B).length2()) +// { +// goal=A; +// } + +// else +// { +// goal=B; +// } + +// rc.fin_pos.loc=goal; +// rc.fin_pos.dir=(wm->ball.vel.loc.dir().radian()+M_PI); + + +// } + + + +// } + +// //////////////////////////////////////////////////////////////////////////////// +// //change decision +// //Circle2D CD(wm->ourRobot[index].pos.loc,100); +// if((wm->ourRobot[index].pos.loc-wm->ball.pos.loc).length()<150) +// { + + +// kicker0=false; +// receiver0=true; + +// kicker1=true; +// receiver1=false; +// } + +// ///////////////////////////////////////////////////////////////////////////////// + + +// } + + + +// else if(!kicker1 && !receiver1)//kicker no!!!! receiver no!!!>>>>.... +// { +// Vector2D robot2ball=wm->ball.pos.loc-wm->ourRobot[index].pos.loc; +// rc.fin_pos.dir=robot2ball.dir().radian(); + +// rc.fin_pos.loc=wm->ourRobot[index].pos.loc;//{0,0}; +// } + +// } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +// //......WON touch..... + + + + +// if(index==0) +// { +// if(true) +// { + +// //locating behind the ball... + +// Vector2D ball2target; + +// Vector2D target=wm->ourRobot[1].pos.loc;//{2470,0}; + +// ball2target=target-wm->ball.pos.loc; + +// ball2target.setLength(95); + +// rc.fin_pos.loc=wm->ball.pos.loc - ball2target; + +// rc.fin_pos.dir=ball2target.dir().radian(); + + + + + +// // kicking + +// //simulation: +// Vector2D A; +// ball2target.setLength(115); +// A=wm->ball.pos.loc-ball2target; +// Circle2D C2(A,120); +// Circle2D C(wm->ball.pos.loc,ROBOT_RADIUS+20); +// if( wm->ball.isValid&& +// C.contains(wm->ourRobot[index].pos.loc)&& +// C2.contains(wm->ourRobot[index].pos.loc)&& +// (fabs(((wm->ourRobot[1].pos.loc-wm->ourRobot[index].pos.loc).dir().degree())-(ball2target.dir().degree())<3)) +// ) +// { +// rc.kickspeedx=5; +// } + + + + + +// } + + +// } + + + + + +// if(index==1) +// { + + + +// // qDebug()<ourRobot[index].pos.dir; + + +// if(true) +// { + +// //locating in the safe position to recieve the pass + +// rc.maxSpeed=3; + + +// Vector2D target={-3000,0}; + +// Vector2D robot2target=target-wm->ourRobot[index].pos.loc; +// rc.fin_pos.dir=robot2target.dir().radian(); + +// rc.fin_pos.loc=wm->ourRobot[index].pos.loc;//{0,0};// + + +// if (wm->ball.vel.loc.length()>0.1) +// { +// Vector2D goal; +// Vector2D Ballpos=wm->ball.pos.loc; +// Ball2C = new Line2D(Ballpos , wm->ball.vel.loc.dir().degree()); +// Vector2D A,B; + +// ballvel.setDir(wm->ball.vel.loc.dir().degree()); + + +// if(fabs(ballvel.dir().degree()-last_ballvel.dir().degree())>10) +// { + +// C1.assign(wm->ourRobot[index].pos.loc,ROBOT_RADIUS+500); + +// } + +// last_ballvel.setDir(ballvel.dir().degree()); + + + +// C1.intersection(*Ball2C,&A,&B); + +// if( C1.HasIntersection(*Ball2C)) +// { +// if((Ballpos-A).length2()>(Ballpos-B).length2()) +// { +// goal=A; +// } + +// else +// { +// goal=B; +// } + +// rc.fin_pos.loc=goal; + + +// } + +// } + + + +// //simulation: + +// Vector2D ball2target; + +// target={-3000,0};//wm->ourRobot[1].pos.loc;// +// ball2target=target-wm->ball.pos.loc; + + + + +// Vector2D A; +// ball2target.setLength(115); +// A=wm->ball.pos.loc-ball2target; +// Circle2D C2(A,120); +// Circle2D C(wm->ball.pos.loc,ROBOT_RADIUS+20); +// if( +// wm->ball.isValid&& +// C.contains(wm->ourRobot[index].pos.loc)&& +// C2.contains(wm->ourRobot[index].pos.loc)&& +// (fabs(((target-wm->ourRobot[index].pos.loc).dir().radian())-(wm->ourRobot[index].pos.dir))<0.02*M_PI) +// ) + +// { + + + +// rc.kickspeedx=10; + +// } + + + +// } + + +// } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +// // // 1 && 2 && 3 + +// // if(wm->ball.vel.loc.length()<0.05) +// // { +// //// if((wm->ball.pos.loc-wm->ourRobot[0].pos.loc).length2()>(wm->ball.pos.loc-wm->ourRobot[1].pos.loc).length2()) +// //// { +// //// kicker0=false; +// //// receiver0=true; + +// //// kicker1=true; +// //// receiver1=false; +// //// } + +// //// else if((wm->ball.pos.loc-wm->ourRobot[0].pos.loc).length2()<(wm->ball.pos.loc-wm->ourRobot[1].pos.loc).length2()) +// //// { +// //// kicker0=true; +// //// receiver0=false; + +// //// kicker1=false; +// //// receiver1=true; +// //// } + + +// // kicker0=true; +// // receiver0=false; + +// // kicker1=false; +// // receiver1=true; + +// // kicker2=false; +// // receiver2=false; + + + + +// // } + + + + +// // if(index==0) +// // { +// // if(kicker0) +// // { +// // //locating behind the ball... + +// // Vector2D ball2target; + +// // Vector2D target=wm->ourRobot[1].pos.loc;//{2470,0}; + +// // ball2target=target-wm->ball.pos.loc; + +// // ball2target.setLength(95); + +// // rc.fin_pos.loc=wm->ball.pos.loc - ball2target; + +// // rc.fin_pos.dir=ball2target.dir().radian(); + +// // /////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +// // // kicking + + +// // //real: +// // // Vector2D A; +// // // vec2goal.setLength(115); +// // // A=wm->ball.pos.loc-vec2goal; +// // // Circle2D C2(A,120); +// // // Circle2D C(wm->ball.pos.loc,ROBOT_RADIUS+15); +// // // if( wm->ball.isValid&& +// // // C.contains(wm->ourRobot[0].pos.loc)&& +// // // C2.contains(wm->ourRobot[0].pos.loc) +// // // ) +// // // { +// // // rc.kickspeedx=10; +// // // } + + + +// // //simulation: +// // Vector2D A; +// // ball2target.setLength(115); +// // A=wm->ball.pos.loc-ball2target; +// // Circle2D C2(A,120); +// // Circle2D C(wm->ball.pos.loc,ROBOT_RADIUS+20); +// // if( wm->ball.isValid&& +// // C.contains(wm->ourRobot[index].pos.loc)&& +// // C2.contains(wm->ourRobot[index].pos.loc)&& +// // (fabs(((wm->ourRobot[1].pos.loc-wm->ourRobot[index].pos.loc).dir().degree())-(ball2target.dir().degree())<10)) +// // ) +// // { +// // rc.kickspeedx=5; +// // receiver0=false; +// // kicker0=false; + +// // } + + +// // } + +// // else if(receiver0) +// // { +// // //RecievingPass + + +// // Vector2D ball2target; +// // Vector2D target=wm->ourRobot[1].pos.loc;//{2470,0}; +// // ball2target=target-wm->ball.pos.loc; +// // Vector2D robot2ball=wm->ball.pos.loc-wm->ourRobot[index].pos.loc; + + +// // //rc.fin_pos.dir=robot2ball.dir().radian(); + +// // rc.fin_pos.dir=ball2target.dir().radian(); + +// // rc.fin_pos.loc=wm->ourRobot[index].pos.loc;//{0,0}; +// // //rc.maxSpeed=3; + + +// // if (wm->ball.vel.loc.length()>0.1) +// // { +// // Vector2D goal; +// // Vector2D Ballpos=wm->ball.pos.loc; +// // Ball2C = new Line2D(Ballpos , wm->ball.vel.loc.dir().degree()); +// // Vector2D A,B; + +// // ballvel.setDir(wm->ball.vel.loc.dir().degree()); + + +// // if(fabs(ballvel.dir().degree()-last_ballvel.dir().degree())>10) +// // { + +// // C0.assign(wm->ourRobot[0].pos.loc,ROBOT_RADIUS+500); + +// // } + +// // last_ballvel.setDir(ballvel.dir().degree()); + + + +// // C0.intersection(*Ball2C,&A,&B); + +// // if( C0.HasIntersection(*Ball2C)) +// // { + +// // if((Ballpos-A).length2()>(Ballpos-B).length2()) +// // { +// // goal=A; +// // } + +// // else +// // { +// // goal=B; +// // } + +// // rc.fin_pos.loc=goal; +// // rc.fin_pos.dir=(wm->ball.vel.loc.dir().radian()+M_PI);//tttarget.dir().radian();// + + +// // } + + + +// // } +// // //////////////////////////////////////////////////////////////////////////////// +// // //change decision +// // //Circle2D CD(wm->ourRobot[index].pos.loc,C0.radius()+300); +// // if((wm->ourRobot[index].pos.loc-wm->ball.pos.loc).length()<300) +// // { +// // kicker0=true; +// // receiver0=false; + +// // kicker1=false; +// // receiver1=true; + +// // kicker2=false; +// // receiver2=false; +// // } + +// // ///////////////////////////////////////////////////////////////////////////////// +// // } + + +// // else if(!kicker0 && !receiver0)//kicker no!!!! receiver no!!!>>>>.... +// // { +// // Vector2D robot2ball=wm->ball.pos.loc-wm->ourRobot[index].pos.loc; +// // rc.fin_pos.dir=robot2ball.dir().radian(); + +// // rc.fin_pos.loc=wm->ourRobot[index].pos.loc;//{0,0}; +// // } + +// // } + +// // else if(index==1) +// // { +// // if(kicker1) +// // { +// // //locating behind the ball... + +// // Vector2D ball2target; + +// // Vector2D target=wm->ourRobot[2].pos.loc;//{2470,0}; + +// // ball2target=target-wm->ball.pos.loc; + +// // ball2target.setLength(95); + +// // rc.fin_pos.loc=wm->ball.pos.loc - ball2target; + +// // rc.fin_pos.dir=ball2target.dir().radian(); + +// // /////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +// // // kicking + + +// // //real: +// // // Vector2D A; +// // // vec2goal.setLength(115); +// // // A=wm->ball.pos.loc-vec2goal; +// // // Circle2D C2(A,120); +// // // Circle2D C(wm->ball.pos.loc,ROBOT_RADIUS+15); +// // // if( wm->ball.isValid&& +// // // C.contains(wm->ourRobot[0].pos.loc)&& +// // // C2.contains(wm->ourRobot[0].pos.loc) +// // // ) +// // // { +// // // rc.kickspeedx=10; +// // // } + + + +// // //simulation: +// // Vector2D A; +// // ball2target.setLength(115); +// // A=wm->ball.pos.loc-ball2target; +// // Circle2D C2(A,120); +// // Circle2D C(wm->ball.pos.loc,ROBOT_RADIUS+20); +// // if( wm->ball.isValid&& +// // C.contains(wm->ourRobot[index].pos.loc)&& +// // C2.contains(wm->ourRobot[index].pos.loc)&& +// // (fabs(((wm->ourRobot[2].pos.loc-wm->ourRobot[index].pos.loc).dir().degree())-(ball2target.dir().degree())<5)) +// // ) + +// // { +// // rc.kickspeedx=5; +// // kicker1=false; +// // receiver1=false; + +// // } +// // } + + +// // else if(receiver1) +// // { +// // //RecievingPass + +// // //rc.maxSpeed=2; + +// // Vector2D ball2target; +// // Vector2D target=wm->ourRobot[0].pos.loc;//{2470,0}; +// // ball2target=target-wm->ball.pos.loc; +// // Vector2D robot2ball=wm->ball.pos.loc-wm->ourRobot[index].pos.loc; +// // //rc.fin_pos.dir=robot2ball.dir().radian(); + +// // rc.fin_pos.loc=wm->ourRobot[index].pos.loc;//{0,0};// + +// // rc.fin_pos.dir=robot2ball.dir().radian(); + + +// // if (wm->ball.vel.loc.length()>0.1) +// // { +// // Vector2D goal; +// // Vector2D Ballpos=wm->ball.pos.loc; +// // Ball2C = new Line2D(Ballpos , wm->ball.vel.loc.dir().degree()); +// // Vector2D A,B; + +// // ballvel.setDir(wm->ball.vel.loc.dir().degree()); + + +// // if(fabs(ballvel.dir().degree()-last_ballvel.dir().degree())>10) +// // { + +// // C1.assign(wm->ourRobot[index].pos.loc,ROBOT_RADIUS+500); + +// // } + +// // last_ballvel.setDir(ballvel.dir().degree()); + + + +// // C1.intersection(*Ball2C,&A,&B); + +// // if( C1.HasIntersection(*Ball2C)) +// // { +// // if((Ballpos-A).length2()>(Ballpos-B).length2()) +// // { +// // goal=A; +// // } + +// // else +// // { +// // goal=B; +// // } + +// // rc.fin_pos.loc=goal; +// // rc.fin_pos.dir=(wm->ball.vel.loc.dir().radian()+M_PI); + + +// // } + + + +// // } + +// // //////////////////////////////////////////////////////////////////////////////// +// // //change decision +// // //Circle2D CD(wm->ourRobot[index].pos.loc,100); +// // if((wm->ourRobot[index].pos.loc-wm->ball.pos.loc).length()<300) +// // { +// // kicker0=false; +// // receiver0=false; + +// // kicker1=true; +// // receiver1=false; + +// // kicker2=false; +// // receiver2=true; +// // } + +// // ///////////////////////////////////////////////////////////////////////////////// + + +// // } + + + +// // else if(!kicker1 && !receiver1)//kicker no!!!! receiver no!!!>>>>.... +// // { +// // Vector2D robot2ball=wm->ball.pos.loc-wm->ourRobot[index].pos.loc; +// // rc.fin_pos.dir=robot2ball.dir().radian(); + +// // rc.fin_pos.loc=wm->ourRobot[index].pos.loc;//{0,0}; +// // } + +// // } + + + + + +// // else if(index==2) +// // { +// // if(kicker2) +// // { +// // //locating behind the ball... + +// // Vector2D ball2target; + +// // Vector2D target=wm->ourRobot[0].pos.loc;//{2470,0}; + +// // ball2target=target-wm->ball.pos.loc; + +// // ball2target.setLength(95); + +// // rc.fin_pos.loc=wm->ball.pos.loc - ball2target; + +// // rc.fin_pos.dir=ball2target.dir().radian(); + +// // /////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +// // // kicking + + +// // //real: +// // // Vector2D A; +// // // vec2goal.setLength(115); +// // // A=wm->ball.pos.loc-vec2goal; +// // // Circle2D C2(A,120); +// // // Circle2D C(wm->ball.pos.loc,ROBOT_RADIUS+15); +// // // if( wm->ball.isValid&& +// // // C.contains(wm->ourRobot[0].pos.loc)&& +// // // C2.contains(wm->ourRobot[0].pos.loc) +// // // ) +// // // { +// // // rc.kickspeedx=10; +// // // } + + + +// // //simulation: +// // Vector2D A; +// // ball2target.setLength(115); +// // A=wm->ball.pos.loc-ball2target; +// // Circle2D C2(A,120); +// // Circle2D C(wm->ball.pos.loc,ROBOT_RADIUS+20); +// // if( wm->ball.isValid&& +// // C.contains(wm->ourRobot[index].pos.loc)&& +// // C2.contains(wm->ourRobot[index].pos.loc)&& +// // (fabs(((wm->ourRobot[0].pos.loc-wm->ourRobot[index].pos.loc).dir().degree())-(ball2target.dir().degree())<5)) +// // ) + +// // { +// // rc.kickspeedx=5; +// // kicker2=false; +// // receiver2=false; + +// // } +// // } + + +// // else if(receiver2) +// // { +// // //RecievingPass + +// // //rc.maxSpeed=2; + + +// // Vector2D ball2target; +// // Vector2D target=wm->ourRobot[0].pos.loc;//{2470,0}; +// // ball2target=target-wm->ball.pos.loc; + + +// // Vector2D robot2ball=wm->ball.pos.loc-wm->ourRobot[index].pos.loc; +// // //rc.fin_pos.dir=robot2ball.dir().radian(); + +// // rc.fin_pos.dir=robot2ball.dir().radian(); + +// // rc.fin_pos.loc=wm->ourRobot[index].pos.loc;//{0,0};// + + +// // if (wm->ball.vel.loc.length()>0.1) +// // { +// // Vector2D goal; +// // Vector2D Ballpos=wm->ball.pos.loc; +// // Ball2C = new Line2D(Ballpos , wm->ball.vel.loc.dir().degree()); +// // Vector2D A,B; + +// // ballvel.setDir(wm->ball.vel.loc.dir().degree()); + + +// // if(fabs(ballvel.dir().degree()-last_ballvel.dir().degree())>10) +// // { + +// // C1.assign(wm->ourRobot[index].pos.loc,ROBOT_RADIUS+500); + +// // } + +// // last_ballvel.setDir(ballvel.dir().degree()); + + + +// // C1.intersection(*Ball2C,&A,&B); + +// // if( C1.HasIntersection(*Ball2C)) +// // { +// // if((Ballpos-A).length2()>(Ballpos-B).length2()) +// // { +// // goal=A; +// // } + +// // else +// // { +// // goal=B; +// // } + +// // rc.fin_pos.loc=goal; +// // rc.fin_pos.dir=(wm->ball.vel.loc.dir().radian()+M_PI); + + +// // } + + + +// // } + +// // //////////////////////////////////////////////////////////////////////////////// +// // //change decision +// // //Circle2D CD(wm->ourRobot[index].pos.loc,100); +// // if((wm->ourRobot[index].pos.loc-wm->ball.pos.loc).length()<300) +// // { +// // kicker0=false; +// // receiver0=true; + +// // kicker1=false; +// // receiver1=false; + +// // kicker2=true; +// // receiver2=false; +// // } + +// // ///////////////////////////////////////////////////////////////////////////////// + + +// // } + + + +// // else if(!kicker2 && !receiver2)//kicker no!!!! receiver no!!!>>>>.... +// // { +// // Vector2D robot2ball=wm->ball.pos.loc-wm->ourRobot[index].pos.loc; +// // rc.fin_pos.dir=robot2ball.dir().radian(); + +// // rc.fin_pos.loc=wm->ourRobot[index].pos.loc;//{0,0}; +// // } + +// // } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +// // /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////* + +// // //locating behind the ball... + +// // Vector2D vec2goal; + +// // Vector2D target=wm->ourRobot[1].pos.loc;//{2470,0}; + +// // vec2goal=target-wm->ball.pos.loc; + +// // vec2goal.setLength(95); + +// // rc.fin_pos.loc=wm->ball.pos.loc - vec2goal; + +// // rc.fin_pos.dir=vec2goal.dir().radian(); + + +// // /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////* +// //// Circle2D C(wm->ball.pos.loc,ROBOT_RADIUS+25); +// //// if( C.contains(wm->ourRobot[0].pos.loc) && ( (wm->ourRobot[0].pos.loc-target).length2()>(wm->ball.pos.loc-target).length2() ) +// //// ) +// //// { +// //// rc.kickspeedx=3; +// //// } + +// // //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////* + +// // //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////** +// //// kicking +// // //real: +// // // Vector2D A; +// // // vec2goal.setLength(115); +// // // A=wm->ball.pos.loc-vec2goal; +// // // Circle2D C2(A,120); +// // // Circle2D C(wm->ball.pos.loc,ROBOT_RADIUS+15); +// // // if( wm->ball.isValid&& +// // // C.contains(wm->ourRobot[0].pos.loc)&& +// // // C2.contains(wm->ourRobot[0].pos.loc) +// // // ) +// // // { +// // // rc.kickspeedx=10; +// // // } + + + +// // //simulation: +// // Vector2D A; +// // vec2goal.setLength(107); +// // A=wm->ball.pos.loc-vec2goal; +// // Circle2D C2(A,120); +// // Circle2D C(wm->ball.pos.loc,ROBOT_RADIUS+20); +// // if( wm->ball.isValid&& +// // C.contains(wm->ourRobot[index].pos.loc)&& +// // C2.contains(wm->ourRobot[index].pos.loc)&& +// // (fabs(((wm->ourRobot[1].pos.loc-wm->ourRobot[index].pos.loc).dir().degree())-(vec2goal.dir().degree())<3)) +// // ) +// // { +// // rc.kickspeedx=6; +// // } + + + + + + + +// // ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////** + +// // //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*** + +// // // Vector2D A,A1,A2; + +// // // vec2goal.setLength(100); + +// // // A=wm->ball.pos.loc-vec2goal; + +// // // A1=A.rotatedVector(90); +// // // A2=A.rotatedVector(-90); + + +// // // qDebug()<<"A:"<ball.pos.loc,ROBOT_RADIUS+60000); +// // // Circle2D C1(A1,300); +// // // Circle2D C2(A2,300); + +// // // if( (C1.contains(wm->ourRobot[0].pos.loc)) && (C2.contains(wm->ourRobot[0].pos.loc)) )//(C.contains(wm->ourRobot[0].pos.loc))) ) +// // // { +// // // rc.kickspeedx=10; +// // // qDebug()<<"shoot"; +// // // } + + +// // //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*** + + +// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // /// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // /// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// //// //following ball... + + +// //// if(wm->ball.isValid && wm->ball.vel.loc.length()>0.15 )//&& (wm->ourRobot[0].pos.loc-wm->ball.pos.loc).length()>115 ) +// //// { +// //// double delta=0; +// //// rc.maxSpeed=2.5; + +// //// Vector2D Ballpos=wm->ball.pos.loc; +// //// Vector2D Ballvel=wm->ball.vel.loc; + +// //// Ballvel.setLength(130); +// //// Vector2D A=Ballvel.rotatedVector(delta); + +// //// Vector2D goal=Ballpos+A; + +// //// if((wm->ourRobot[0].pos.loc-goal).length()<15) +// //// { +// //// rc.maxSpeed=wm->ball.vel.loc.length(); +// //// } + +// //// //qDebug()<<"V:"<ball.pos.loc-wm->ourRobot[0].pos.loc).dir().radian(); + +// //// } + +// ////// qDebug()<<"ball angel:"<ball.pos.loc-wm->ourRobot[0].pos.loc; +// //// rc.fin_pos.dir=robot2ball.dir().radian(); + +// //// rc.fin_pos.loc={2470,0}; + + +// //// if (wm->ball.vel.loc.length()>0.1) +// //// { +// //// Vector2D goal; +// //// Vector2D Ballpos=wm->ball.pos.loc; +// //// Ball2C = new Line2D(Ballpos , wm->ball.vel.loc.dir().degree()); +// //// Vector2D A,B; + +// //// ballvel.setDir(wm->ball.vel.loc.dir().degree()); + + +// //// if(fabs(ballvel.dir().degree()-last_ballvel.dir().degree())>10) +// //// { + +// //// C.assign(wm->ourRobot[0].pos.loc,ROBOT_RADIUS+300); + +// //// } + +// //// last_ballvel.setDir(ballvel.dir().degree()); + + + +// //// C.intersection(*Ball2C,&A,&B); + +// //// if( C.HasIntersection(*Ball2C)) +// //// { +// //// if((Ballpos-A).length2()>(Ballpos-B).length2()) +// //// { +// //// goal=B; +// //// } + +// //// else +// //// { +// //// goal=A; +// //// } + +// //// rc.fin_pos.loc=goal; +// //// rc.fin_pos.dir=(wm->ball.vel.loc.dir().radian()+M_PI);//tttarget.dir().radian();// + + +// //// } + + + +// //// } +// // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // /// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // /// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // /// +// // /// + +// //// //sth like one touch... + + +// ////// Vector2D vec2goal; + +// //// target={2480,2790};//wm->ourRobot[1].pos.loc;// + +// //// vec2goal=target-wm->ball.pos.loc; + +// //// vec2goal.setLength(95); + + + + + + + + + + +// //// Vector2D robot2ball=wm->ball.pos.loc-wm->ourRobot[0].pos.loc; +// //// rc.fin_pos.dir=robot2ball.dir().radian(); + +// //// rc.fin_pos.loc={2470,0}; + +// //// target={1500,0}; + + +// //// if (wm->ball.vel.loc.length()>0.1) +// //// { +// //// Vector2D goal; +// //// Vector2D Ballpos=wm->ball.pos.loc; +// //// Ball2C = new Line2D(Ballpos , wm->ball.vel.loc.dir().degree()); +// //// Vector2D A,B; + +// //// ballvel.setDir(wm->ball.vel.loc.dir().degree()); + + +// //// if(fabs(ballvel.dir().degree()-last_ballvel.dir().degree())>15) +// //// { + +// //// C.assign(wm->ourRobot[0].pos.loc,ROBOT_RADIUS+200); + +// //// } + +// //// last_ballvel.setDir(ballvel.dir().degree()); + + + +// //// C.intersection(*Ball2C,&A,&B); + +// //// if( C.HasIntersection(*Ball2C)) +// //// { +// //// if((target-A).length2()>(target-B).length2()) +// //// { +// //// goal=A; +// //// } + +// //// else +// //// { +// //// goal=B; +// //// } + + +// //// rc.fin_pos.loc=goal - vec2goal; + +// //// rc.fin_pos.dir=vec2goal.dir().radian(); + + +// //// } + + + +// //// } + + + +//} + + + + +void SkillKick::setTarget(const Vector2D &Target) +{ + _Target=Target; +} + +void SkillKick::setKickType(bool isShoot) +{ + this->isShoot = isShoot; +} diff --git a/src/ai/skill/skillkick.h b/src/ai/skill/skillkick.h old mode 100644 new mode 100755 diff --git a/src/ai/skill/skillonetouch.cpp b/src/ai/skill/skillonetouch.cpp old mode 100644 new mode 100755 diff --git a/src/ai/skill/skillonetouch.h b/src/ai/skill/skillonetouch.h old mode 100644 new mode 100755 diff --git a/src/ai/skill/skillpassreceive.cpp b/src/ai/skill/skillpassreceive.cpp old mode 100644 new mode 100755 diff --git a/src/ai/skill/skillpassreceive.h b/src/ai/skill/skillpassreceive.h old mode 100644 new mode 100755 diff --git a/src/ai/skill/skilltest.cpp b/src/ai/skill/skilltest.cpp old mode 100644 new mode 100755 diff --git a/src/ai/skill/skilltest.h b/src/ai/skill/skilltest.h old mode 100644 new mode 100755 diff --git a/src/ai/soccer.cpp b/src/ai/soccer.cpp old mode 100644 new mode 100755 diff --git a/src/ai/soccer.h b/src/ai/soccer.h old mode 100644 new mode 100755 diff --git a/src/ai/tactic.cpp b/src/ai/tactic.cpp old mode 100644 new mode 100755 diff --git a/src/ai/tactic.h b/src/ai/tactic.h old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tacticattacker.cpp b/src/ai/tactic/tacticattacker.cpp old mode 100644 new mode 100755 index 53f0e58..29490b9 --- a/src/ai/tactic/tacticattacker.cpp +++ b/src/ai/tactic/tacticattacker.cpp @@ -19,10 +19,12 @@ RobotCommand TacticAttacker::getCommand() if(!wm->ourRobot[id].isValid) return rc; rc.maxSpeed = 4; + AngleDeg degree=30+AngleDeg::PI; + // qDebug()<ourRobot[id].Status == AgentStatus::FollowingBall) { // tANDp target = findTarget(); - Vector2D passSenderPos = wm->ourRobot[kickerID].pos.loc; Vector2D OneTouchKickerPos = wm->ourRobot[this->id].pos.loc; Vector2D passSender2OneTouchKicker = OneTouchKickerPos-passSenderPos; @@ -68,7 +70,7 @@ RobotCommand TacticAttacker::getCommand() } rc.fin_pos = kickPos; - rc.useNav = true; + rc.useNav = UseNav; } else { @@ -88,7 +90,7 @@ RobotCommand TacticAttacker::getCommand() else if(wm->ourRobot[id].Status == AgentStatus::RecievingPass) { rc.fin_pos = idlePosition; - rc.useNav = true; + rc.useNav = UseNav; rc.isBallObs = true; rc.isKickObs = true; } @@ -141,7 +143,7 @@ RobotCommand TacticAttacker::getCommand() rc.fin_pos = final; } - rc.useNav = true; + rc.useNav = UseNav; rc.isBallObs = true; rc.isKickObs = true; } @@ -150,7 +152,7 @@ RobotCommand TacticAttacker::getCommand() this->holdKickPos = false; rc.fin_pos = idlePosition; - rc.useNav = true; + rc.useNav = UseNav; rc.isBallObs = true; rc.isKickObs = true; @@ -541,3 +543,9 @@ bool TacticAttacker::isFree(int index) } return true; } +bool TacticAttacker::getUseNav(){ + return UseNav; +} +void TacticAttacker::setUseNav(bool input){ + UseNav=input; +} diff --git a/src/ai/tactic/tacticattacker.h b/src/ai/tactic/tacticattacker.h old mode 100644 new mode 100755 index 8d25c85..1b1502c --- a/src/ai/tactic/tacticattacker.h +++ b/src/ai/tactic/tacticattacker.h @@ -38,7 +38,8 @@ class TacticAttacker : public Tactic void setKickerID(int id); bool everyOneInTheirPos; - + void setUseNav(bool input); + bool getUseNav(); private: bool isFree(int index); @@ -55,7 +56,7 @@ class TacticAttacker : public Tactic bool holdKickPos; Position kickPos; int kickerID; - + bool UseNav=true; protected: bool canKick; }; diff --git a/src/ai/tactic/tacticballtracker.cpp b/src/ai/tactic/tacticballtracker.cpp old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tacticballtracker.h b/src/ai/tactic/tacticballtracker.h old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tacticblocker.cpp b/src/ai/tactic/tacticblocker.cpp old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tacticblocker.h b/src/ai/tactic/tacticblocker.h old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tacticcircle.cpp b/src/ai/tactic/tacticcircle.cpp old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tacticcircle.h b/src/ai/tactic/tacticcircle.h old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tacticcontrol.cpp b/src/ai/tactic/tacticcontrol.cpp old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tacticcontrol.h b/src/ai/tactic/tacticcontrol.h old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tacticdefender.cpp b/src/ai/tactic/tacticdefender.cpp old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tacticdefender.h b/src/ai/tactic/tacticdefender.h old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tacticfixedpos.cpp b/src/ai/tactic/tacticfixedpos.cpp old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tacticfixedpos.h b/src/ai/tactic/tacticfixedpos.h old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tacticformation.cpp b/src/ai/tactic/tacticformation.cpp old mode 100644 new mode 100755 index 3e43a72..d5d6ebd --- a/src/ai/tactic/tacticformation.cpp +++ b/src/ai/tactic/tacticformation.cpp @@ -25,7 +25,7 @@ RobotCommand TacticFormation::getCommand() { qDebug()<<"append it"; if( this->leaderID == 0 ) - wm->debug_pos.append(wm->ourRobot[leaderID].pos.loc); + //wm->debug_pos.append(wm->ourRobot[leaderID].pos.loc); path.append(wm->ourRobot[leaderID].pos); } diff --git a/src/ai/tactic/tacticformation.h b/src/ai/tactic/tacticformation.h old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tacticgoalie.cpp b/src/ai/tactic/tacticgoalie.cpp old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tacticgoalie.h b/src/ai/tactic/tacticgoalie.h old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tactichalt.cpp b/src/ai/tactic/tactichalt.cpp old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tactichalt.h b/src/ai/tactic/tactichalt.h old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tactickicklearning.cpp b/src/ai/tactic/tactickicklearning.cpp old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tactickicklearning.h b/src/ai/tactic/tactickicklearning.h old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tacticpenaltykicker.cpp b/src/ai/tactic/tacticpenaltykicker.cpp old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tacticpenaltykicker.h b/src/ai/tactic/tacticpenaltykicker.h old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tacticpreparing.cpp b/src/ai/tactic/tacticpreparing.cpp old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tacticpreparing.h b/src/ai/tactic/tacticpreparing.h old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tacticstop.cpp b/src/ai/tactic/tacticstop.cpp old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tacticstop.h b/src/ai/tactic/tacticstop.h old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tactictechnical.cpp b/src/ai/tactic/tactictechnical.cpp old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tactictechnical.h b/src/ai/tactic/tactictechnical.h old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tactictest.cpp b/src/ai/tactic/tactictest.cpp old mode 100644 new mode 100755 index 1420b6f..8d37314 --- a/src/ai/tactic/tactictest.cpp +++ b/src/ai/tactic/tactictest.cpp @@ -1,17 +1,140 @@ #include "tactictest.h" +#include TacticTest::TacticTest(WorldModel *worldmodel, QObject *parent) : Tactic("TacticTest", worldmodel, parent) { - sTest = new SkillKick(wm); } + RobotCommand TacticTest::getCommand() { RobotCommand rc; - if(!wm->ourRobot[id].isValid) return rc; +<<<<<<< HEAD +<<<<<<< HEAD + if(!wm->ourRobot[id].isValid) + return rc; + rc.fin_pos.loc.x = -3000; + rc.fin_pos.loc.y = 0; + rc.useNav = true; + rc.maxSpeed = 3; + qDebug() << wm->ourRobot[4].pos.loc.x <<" - " << wm->ourRobot[4].pos.loc.y; + return rc; +// /* +// * TAMARIN GHABL - sTest->execute(rc); +// rc0.maxSpeed = 3; +// rc0.useNav = true; +// rc1.maxSpeed = 3; +// rc1.useNav = true; +// if((id == 0)&&(firstPos1 == false)){ +// rc0.fin_pos.loc = Vector2D(-2000,1000); +// firstPos1 = true; +// } +// else if((id == 1)&&(firstPos2 == false)){ +// rc1.fin_pos.loc = Vector2D(-2000,-1000); +// firstPos2 = true; +// } +// else if((id == 0)&&(firstPos1 == true)&&(active == true)&&(firstPos2 == true)){ +// rc0.fin_pos.loc.x = wm->ourRobot[1].pos.loc.x; +// if(std::abs(wm->ourRobot[0].pos.loc.x - wm->ourRobot[0].pos.loc.x) < 20){ +// active = false; +// } +// } +// else if((id == 1)&&(firstPos2 == true)&&(active == false)&&(firstPos1 == true)){ +// rc1.fin_pos.loc = Vector2D(-wm->ourRobot[0].pos.loc.x,-1000); +// if(std::abs(wm->ourRobot[1].pos.loc.x - (-wm->ourRobot[0].pos.loc.x)) < 20){ +// active = true; +// } +// } +// if(id == 0) +// return rc0; +// if(id == 1) +// return rc1; - return rc; -} +// */ +// //Step1 +// qDebug() << "fskdfj"; + +// if(!wm->ourRobot[id].isValid) return rc; +//// // wm->debug_pos.clear(); +//// // wm->debug_pos.append(wm->ourRobot[1].pos.loc); +//// // wm->debug_pos.append(wm->ourRobot[0].pos.loc); +//// // Vector2D p2 = Field::ourGoalCenter; +//// // Vector2D p1 = wm->ball.pos.loc; +//// // Segment2D ballViewMidSeg(p2,p1); +//// static double rad = 90; +//// double khata = 0.2; +//// if((id == 0) && (kicked == false)){ +//// Ray2D ray(wm->ourRobot[1].pos.loc,wm->ball.pos.loc); +//// Circle2D cir(wm->ball.pos.loc,rad); +//// Vector2D* v1 = new Vector2D(); +//// Vector2D* v2 = new Vector2D(); +//// cir.intersection(ray,v1,v2); +//// if(v1->dist(wm->ourRobot[1].pos.loc) > v2->dist(wm->ourRobot[1].pos.loc)){ +//// rc.fin_pos.loc = *v1; +//// rc.useNav = true; +//// rc.maxSpeed = 3; +//// Ray2D rayInvert(wm->ball.pos.loc,wm->ourRobot[1].pos.loc); +//// rc.fin_pos.dir = rayInvert.dir().radian(); +//// rc.isBallObs = true; +//// if(wm->ourRobot[0].pos.loc.dist(*v1) < 150){ +//// rc.maxSpeed = 3; +//// rc.isBallObs = false; +//// if(((std::abs(wm->ourRobot[0].pos.dir - rayInvert.dir().radian()) < khata) || +//// (((M_PI*2) - std::abs(wm->ourRobot[0].pos.dir - rayInvert.dir().radian())) < khata)) && (wm->ourRobot[0].pos.loc.dist(wm->ball.pos.loc) < 110)){ +//// rc.kickspeedx = 4; +//// rc.kickspeedz = 1; +//// kicked = true; +//// } +//// } +//// } +//// else{ +//// rc.fin_pos.loc = *v2; +//// rc.useNav = true; +//// rc.maxSpeed = 3; +//// rc.isBallObs = true; +//// if(wm->ourRobot[0].pos.loc.dist(*v2) < 150){ +//// rc.maxSpeed = 3; +//// rc.isBallObs = false; +//// Ray2D rayInvert(wm->ball.pos.loc,wm->ourRobot[1].pos.loc); +//// rc.fin_pos.dir = rayInvert.dir().radian(); +//// double rand = ((double) std::rand() / (RAND_MAX)); +//// std::cout << (wm->ourRobot[0].pos.loc.dir() - rayInvert.dir()).radian() << std::endl; +//// if(((std::abs(wm->ourRobot[0].pos.dir - rayInvert.dir().radian()) < khata) || +//// (((M_PI*2) - std::abs(wm->ourRobot[0].pos.dir - rayInvert.dir().radian())) < khata)) && (wm->ourRobot[0].pos.loc.dist(wm->ball.pos.loc) < 110)){ +//// rc.kickspeedx = 4; +//// rc.kickspeedz = 1; +//// kicked = true; +//// } +//// } +//// } +//// } +//// if((id == 1) && (kicked == true)){ +//// AngleDeg angSefr(0); +//// Line2D ray(wm->ourRobot[1].pos.loc,angSefr); +//// Vector2D jabejaSorat(wm->ball.vel.loc.x - wm->ball.pos.loc.x,wm->ball.vel.loc.y - wm->ball.pos.loc.y); +//// Line2D ray2(wm->ball.pos.loc,jabejaSorat); +//// Vector2D javab = ray.intersection(ray2); +//// rc.fin_pos.loc.x = javab.x; +//// rc.fin_pos.loc.y = javab.y; +//// rc.fin_pos.dir = (*(new Ray2D(wm->oppRobot[1].pos.loc,Field::ourGoalCenter))).dir().radian(); +//// rc.maxSpeed = 6; +//// rc.useNav = true; +//// if(wm->ourRobot[1].pos.loc.dist(wm->ball.pos.loc) < 700) +//// kicked = false; +//// } +//// if((id == 1) && (kicked == false)){ +//// rc.fin_pos.loc.x = wm->ourRobot[1].pos.loc.x; +//// rc.fin_pos.loc.y = wm->ourRobot[1].pos.loc.y; +//// } +//// if((id == 0) && (kicked == true)){ +//// rc.fin_pos.loc.x = wm->ourRobot[0].pos.loc.x; +//// rc.fin_pos.loc.y = wm->ourRobot[0].pos.loc.y; +//// } +// rc.fin_pos.loc.x = -2800; +// rc.fin_pos.loc.y = 0; +// rc.useNav = true; +// rc.maxSpeed = 2; +// qDebug()<<"i am here"; +// return rc; diff --git a/src/ai/tactic/tactictest.h b/src/ai/tactic/tactictest.h old mode 100644 new mode 100755 index 3b2f8cb..6e02d3b --- a/src/ai/tactic/tactictest.h +++ b/src/ai/tactic/tactictest.h @@ -4,14 +4,17 @@ #define DangerDist 300 class TacticTest : public Tactic { +private: + Vector2D* finalPos; Q_OBJECT public: + static bool kicked; + int flag=0; + int flag1=0; + int flag2=0; + int flag3=0; explicit TacticTest(WorldModel *worldmodel, QObject *parent = 0); virtual RobotCommand getCommand(); - -private: - Skill *sTest; - }; -#endif // TACTICTEST_H +#endif // diff --git a/src/ai/tactic/tactictest2.cpp b/src/ai/tactic/tactictest2.cpp old mode 100644 new mode 100755 index 40fcffd..20a5e57 --- a/src/ai/tactic/tactictest2.cpp +++ b/src/ai/tactic/tactictest2.cpp @@ -1,12 +1,768 @@ #include "tactictest2.h" + +Vector2D* TacticTest2::getFinalPos() +{ + return &finalPos; +} + +void TacticTest2::setFinalPos(Vector2D value) +{ + finalPos = value; +} + +int TacticTest2::getBallVelocity() const +{ + return ballVelocity; +} + +void TacticTest2::setBallVelocity(int value) +{ + ballVelocity = value; +} TacticTest2::TacticTest2(WorldModel *worldmodel, QObject *parent) : Tactic("TacticTest2", worldmodel, parent) { } + RobotCommand TacticTest2::getCommand() { RobotCommand rc; if(!wm->ourRobot[id].isValid) return rc; + Vector2D p2 = Field::ourGoalCenter; + Vector2D p1 = wm->ball.pos.loc; + Segment2D ballViewMidSeg(p2,p1); + //goal keeper + if(id == wm->ref_goalie_our){ + if(wm->ball.vel.loc.r() < 0.1){ + rc.fin_pos.loc = Field::ourGoalCenter; + rc.fin_pos.dir = ballViewMidSeg.direction().radian(); + rc.maxSpeed = 2; + return rc; + } + rc.useNav = true; + rc.maxSpeed = 3; + Ray2D seg(wm->ball.pos.loc,wm->ball.vel.loc.dir()); + rc.fin_pos.loc = seg.intersection(Field::leftLine); + // rc.fin_pos.dir = seg.direction().deg2rad(seg.direction().degree()); + if((rc.fin_pos.loc.y < Field::ourGoalPost_L.y+5) && (rc.fin_pos.loc.y > Field::ourGoalPost_R.y-5) && (rc.fin_pos.loc.x = Field::ourGoalPost_L.x)) + return rc; + else + rc.fin_pos.loc = Field::ourGoalCenter; + rc.maxSpeed = 2; + return rc; + } + double ang = 7; + AngleDeg zaveEkhtelaf(30); +// Vector2D p2 = Field::ourGoalPost_L; +// Vector2D p3 = Field::ourGoalPost_R; + + /* + Segment2D SegBallView1(wm->ball.pos.loc,Field::ourDefPost_R); + Segment2D SegBallView2(wm->ball.pos.loc,Field::ourDefPost_L);*/ +// ballViewMidSeg.direction().; +/* Segment2D ballViewBotLine(p1,p3); + Segment2D ballViewTopLine(p1,p2)*/; + if(id == wm->kn->ActiveAgents()[1]){ + Segment2D* seg; + if(wm->ball.vel.loc.r() > 0.1){ + seg = new Segment2D(p2,Field::goalCircle_R + 200,*(new AngleDeg(ballViewMidSeg.direction().degree() + 1))); + rc.useNav = true; + rc.maxSpeed = 6; + + } + else{ + seg = new Segment2D(p2,Field::goalCircle_R + 200,*(new AngleDeg(ballViewMidSeg.direction().degree() + ang))); + rc.useNav = true; + rc.maxSpeed = 4; + } + rc.fin_pos.loc = seg->terminal(); + rc.fin_pos.dir = seg->direction().radian(); + rc.maxSpeed = 4; + } + if(id == wm->kn->ActiveAgents()[2]){ + Segment2D* seg; + if(wm->ball.vel.loc.r() > 0.1){ + seg = new Segment2D(p2,Field::goalCircle_R + 200,*(new AngleDeg(ballViewMidSeg.direction().degree() - 1))); + rc.useNav = true; + rc.maxSpeed = 6; + } + else{ + seg = new Segment2D(p2,Field::goalCircle_R + 200,*(new AngleDeg(ballViewMidSeg.direction().degree()- ang))); + rc.useNav = true; + rc.maxSpeed = 4; + } + rc.fin_pos.loc = seg->terminal(); + rc.fin_pos.dir = seg->direction().radian(); + } + if(wm->kn->ActiveAgents().size() > 3){ + if(id == wm->kn->ActiveAgents()[3]){ + Segment2D* seg; + if(wm->ball.vel.loc.r() > 0.1){ + Segment2D seg2(p2,wm->ball.pos.loc); + if(seg2.length() > Field::goalCircle_R + 300){ + seg = new Segment2D(p2,seg2.length() - 500,*(new AngleDeg(ballViewMidSeg.direction().degree()))); + } + else{ + seg = new Segment2D(p2,Field::goalCircle_R + 300,*(new AngleDeg(ballViewMidSeg.direction().degree()))); + } + rc.useNav = true; + rc.maxSpeed = 6; + + } + else{ + Segment2D seg2(p2,wm->ball.pos.loc); + if(seg2.length() > Field::goalCircle_R + 300){ + seg = new Segment2D(p2,seg2.length() - 500,*(new AngleDeg(ballViewMidSeg.direction().degree()))); + } + else{ + seg = new Segment2D(p2,Field::goalCircle_R + 300,*(new AngleDeg(ballViewMidSeg.direction().degree()))); + } + rc.useNav = true; + rc.maxSpeed = 4; + } + rc.fin_pos.loc = seg->terminal(); + rc.fin_pos.dir = seg->direction().radian(); + rc.maxSpeed = 4; + } + } + if(wm->kn->ActiveAgents().size() == 5){ + if(id == wm->kn->ActiveAgents()[4]){ + Segment2D* seg; + if(wm->ball.vel.loc.r() > 0.1){ + Segment2D seg2(p2,wm->ball.pos.loc); + if(seg2.length() > Field::goalCircle_R + 500){ + Segment2D seg5(wm->ball.pos.loc,p2); + Segment2D seg4(wm->ball.pos.loc , 500 , seg5.direction() - zaveEkhtelaf); + rc.fin_pos.loc = seg4.terminal(); + Segment2D seg3(seg4.terminal(),wm->ball.pos.loc); + rc.fin_pos.dir = seg3.direction().radian(); + } + else{ + seg = new Segment2D(p2,Field::goalCircle_R + 300,*(new AngleDeg(ballViewMidSeg.direction().degree() - 2*ang))); + rc.fin_pos.loc = seg->terminal(); + rc.fin_pos.dir = seg->direction().radian(); + } + rc.useNav = true; + rc.maxSpeed = 6; + + } + else{ + Segment2D seg2(p2,wm->ball.pos.loc); + if(seg2.length() > Field::goalCircle_R + 500){ + Segment2D seg5(wm->ball.pos.loc,p2); + Segment2D seg4(wm->ball.pos.loc , 500 , seg5.direction() - zaveEkhtelaf); + rc.fin_pos.loc = seg4.terminal(); + Segment2D seg3(seg4.terminal(),wm->ball.pos.loc); + rc.fin_pos.dir = seg3.direction().radian(); + } + else{ + seg = new Segment2D(p2,Field::goalCircle_R + 300,*(new AngleDeg(ballViewMidSeg.direction().degree() - 2*ang))); + rc.fin_pos.loc = seg->terminal(); + rc.fin_pos.dir = seg->direction().radian(); + } + rc.useNav = true; + rc.maxSpeed = 4; + } + rc.maxSpeed = 4; + } + } + if(wm->kn->ActiveAgents().size() == 6){ + Vector2D* j1 = new Vector2D(); + Vector2D* j2 = new Vector2D(); + if((id == wm->kn->ActiveAgents()[4]) || (id == wm->kn->ActiveAgents()[5])){ + Segment2D* seg; + if(wm->ball.vel.loc.r() > 0.1){ + Segment2D seg2(p2,wm->ball.pos.loc); + if(seg2.length() > Field::goalCircle_R + 500){ + Segment2D seg5(wm->ball.pos.loc,p2); + Segment2D seg4(wm->ball.pos.loc , 500 , seg5.direction() - zaveEkhtelaf); + rc.fin_pos.loc = seg4.terminal(); + Segment2D seg3(seg4.terminal(),wm->ball.pos.loc); + rc.fin_pos.dir = seg3.direction().radian(); + /* + Circle2D cir1(p2,Field::goalCircle_R + 600 + (((seg2.length() - Field::goalCircle_R - 500)/3)*2)); + Circle2D cir2(wm->ball.pos.loc,200 + ((seg2.length() - Field::goalCircle_R - 500)/3)); + cir1.intersection(cir2,j1,j2); + std::cout << "j21 x" << j2->x << std::endl; + rc.fin_pos.loc = *j1; + Segment2D seg3(*j1,wm->ball.pos.loc); + rc.fin_pos.dir = seg3.direction().radian();*/ + } + else{ + seg = new Segment2D(p2,Field::goalCircle_R + 300,*(new AngleDeg(ballViewMidSeg.direction().degree() + 2*ang))); + rc.fin_pos.loc = seg->terminal(); + rc.fin_pos.dir = seg->direction().radian(); + } + rc.useNav = true; + rc.maxSpeed = 6; + + } + else{ + Segment2D seg2(p2,wm->ball.pos.loc); + if(seg2.length() > Field::goalCircle_R + 500){ + Segment2D seg5(wm->ball.pos.loc,p2); + Segment2D seg4(wm->ball.pos.loc , 500 , seg5.direction() - zaveEkhtelaf); + rc.fin_pos.loc = seg4.terminal(); + Segment2D seg3(seg4.terminal(),wm->ball.pos.loc); + rc.fin_pos.dir = seg3.direction().radian(); + /* + Circle2D cir1(p2,Field::goalCircle_R + 600 + (((seg2.length() - Field::goalCircle_R - 500)/3)*2)); + Circle2D cir2(wm->ball.pos.loc,200 + ((seg2.length() - Field::goalCircle_R - 500)/3)); + cir1.intersection(cir2,j1,j2); + std::cout << "j22 x" << j2->x << std::endl; + rc.fin_pos.loc = *j1; + Segment2D seg3(*j1,wm->ball.pos.loc); + rc.fin_pos.dir = seg3.direction().radian();*/ + } + else{ + seg = new Segment2D(p2,Field::goalCircle_R + 300,*(new AngleDeg(ballViewMidSeg.direction().degree() + 2*ang))); + rc.fin_pos.loc = seg->terminal(); + rc.fin_pos.dir = seg->direction().radian(); + } + rc.useNav = true; + rc.maxSpeed = 4; + } + rc.maxSpeed = 4; + } + if(id == wm->kn->ActiveAgents()[5]){ + Segment2D* seg; + if(wm->ball.vel.loc.r() > 0.1){ + Segment2D seg2(p2,wm->ball.pos.loc); + if(seg2.length() > Field::goalCircle_R + 500){ + Segment2D seg5(wm->ball.pos.loc,p2); + Segment2D seg4(wm->ball.pos.loc , 500 , seg5.direction() + zaveEkhtelaf); + rc.fin_pos.loc = seg4.terminal(); + Segment2D seg3(seg4.terminal(),wm->ball.pos.loc); + rc.fin_pos.dir = seg3.direction().radian(); + // std::cout << "x : " << j2->x << std::endl; +// std::cout << "y : " << j2->y << std::endl; +// rc.fin_pos.loc = *j2; +// std::cout << "1x : " << j2->x << std::endl; +// std::cout << "1y : " << j2->y << std::endl; +//// std::cout << "fasele do dayere" << cir1.center().dist(cir2.center()) << " jame shoaha" << (cir1.radius() + cir2.radius()) << std::endl; +// Segment2D seg3(*j2,wm->ball.pos.loc); +// rc.fin_pos.dir = seg3.direction().radian(); + } + else{ + seg = new Segment2D(p2,Field::goalCircle_R + 300,*(new AngleDeg(ballViewMidSeg.direction().degree() - 2*ang))); + rc.fin_pos.loc = seg->terminal(); + rc.fin_pos.dir = seg->direction().radian(); + } + rc.useNav = true; + rc.maxSpeed = 6; + + } + else{ + Segment2D seg2(p2,wm->ball.pos.loc); + if(seg2.length() > Field::goalCircle_R + 500){ + Segment2D seg5(wm->ball.pos.loc,p2); + Segment2D seg4(wm->ball.pos.loc , 500 , seg5.direction() + zaveEkhtelaf); + rc.fin_pos.loc = seg4.terminal(); + Segment2D seg3(seg4.terminal(),wm->ball.pos.loc); + rc.fin_pos.dir = seg3.direction().radian(); + // std::cout << "2x : " << j2->x << std::endl; +// std::cout << "2y : " << j2->y << std::endl; +//// std::cout << "fasele do dayere" << cir1.center().dist(cir2.center()) << " jame shoaha" << (cir1.radius() + cir2.radius()) << std::endl; +// rc.fin_pos.loc = *j2; +// Segment2D seg3(*j2,wm->ball.pos.loc); +// rc.fin_pos.dir = seg3.direction().radian(); + } + else{ + seg = new Segment2D(p2,Field::goalCircle_R + 300,*(new AngleDeg(ballViewMidSeg.direction().degree() - 2*ang))); + rc.fin_pos.loc = seg->terminal(); + rc.fin_pos.dir = seg->direction().radian(); + } + rc.useNav = true; + rc.maxSpeed = 4; + } + rc.maxSpeed = 4; + } + } + + + + + + + + + + + + + + + + + qDebug() << ballViewMidSeg.direction().radian(); + if((ballViewMidSeg.direction().radian() > 1.1)&& (id == 4) && (wm->kn->ActiveAgents().size() == 6)){ + Segment2D* seg; + if(wm->ball.vel.loc.r() > 0.1){ + Segment2D seg2(p2,wm->ball.pos.loc); + if(seg2.length() > Field::goalCircle_R + 500){ + Segment2D seg5(wm->ball.pos.loc,p2); + Segment2D seg4(wm->ball.pos.loc , 500 , seg5.direction() + zaveEkhtelaf + zaveEkhtelaf); + rc.fin_pos.loc = seg4.terminal(); + Segment2D seg3(seg4.terminal(),wm->ball.pos.loc); + rc.fin_pos.dir = seg3.direction().radian(); + // std::cout << "x : " << j2->x << std::endl; +// std::cout << "y : " << j2->y << std::endl; +// rc.fin_pos.loc = *j2; +// std::cout << "1x : " << j2->x << std::endl; +// std::cout << "1y : " << j2->y << std::endl; +//// std::cout << "fasele do dayere" << cir1.center().dist(cir2.center()) << " jame shoaha" << (cir1.radius() + cir2.radius()) << std::endl; +// Segment2D seg3(*j2,wm->ball.pos.loc); +// rc.fin_pos.dir = seg3.direction().radian(); + } + else{ + seg = new Segment2D(p2,Field::goalCircle_R + 300,*(new AngleDeg(ballViewMidSeg.direction().degree() + 2*ang))); + rc.fin_pos.loc = seg->terminal(); + rc.fin_pos.dir = seg->direction().radian(); + } + rc.useNav = true; + rc.maxSpeed = 6; + + } + else{ + Segment2D seg2(p2,wm->ball.pos.loc); + if(seg2.length() > Field::goalCircle_R + 500){ + Segment2D seg5(wm->ball.pos.loc,p2); + Segment2D seg4(wm->ball.pos.loc , 500 , seg5.direction() + zaveEkhtelaf + zaveEkhtelaf); + rc.fin_pos.loc = seg4.terminal(); + Segment2D seg3(seg4.terminal(),wm->ball.pos.loc); + rc.fin_pos.dir = seg3.direction().radian(); + // std::cout << "2x : " << j2->x << std::endl; +// std::cout << "2y : " << j2->y << std::endl; +//// std::cout << "fasele do dayere" << cir1.center().dist(cir2.center()) << " jame shoaha" << (cir1.radius() + cir2.radius()) << std::endl; +// rc.fin_pos.loc = *j2; +// Segment2D seg3(*j2,wm->ball.pos.loc); +// rc.fin_pos.dir = seg3.direction().radian(); + } + else{ + seg = new Segment2D(p2,Field::goalCircle_R + 300,*(new AngleDeg(ballViewMidSeg.direction().degree() + 2*ang))); + rc.fin_pos.loc = seg->terminal(); + rc.fin_pos.dir = seg->direction().radian(); + } + rc.useNav = true; + rc.maxSpeed = 4; + } + rc.maxSpeed = 4; + } + + + + + + + + + + + + + + + + + + + + + + + if((ballViewMidSeg.direction().radian() < -1.1)&& (id == 5) && (wm->kn->ActiveAgents().size() == 6)){ + Segment2D* seg; + if(wm->ball.vel.loc.r() > 0.1){ + Segment2D seg2(p2,wm->ball.pos.loc); + if(seg2.length() > Field::goalCircle_R + 500){ + Segment2D seg5(wm->ball.pos.loc,p2); + Segment2D seg4(wm->ball.pos.loc , 500 , seg5.direction() - zaveEkhtelaf - zaveEkhtelaf); + rc.fin_pos.loc = seg4.terminal(); + Segment2D seg3(seg4.terminal(),wm->ball.pos.loc); + rc.fin_pos.dir = seg3.direction().radian(); + // std::cout << "x : " << j2->x << std::endl; +// std::cout << "y : " << j2->y << std::endl; +// rc.fin_pos.loc = *j2; +// std::cout << "1x : " << j2->x << std::endl; +// std::cout << "1y : " << j2->y << std::endl; +//// std::cout << "fasele do dayere" << cir1.center().dist(cir2.center()) << " jame shoaha" << (cir1.radius() + cir2.radius()) << std::endl; +// Segment2D seg3(*j2,wm->ball.pos.loc); +// rc.fin_pos.dir = seg3.direction().radian(); + } + else{ + seg = new Segment2D(p2,Field::goalCircle_R + 300,*(new AngleDeg(ballViewMidSeg.direction().degree() - 2*ang))); + rc.fin_pos.loc = seg->terminal(); + rc.fin_pos.dir = seg->direction().radian(); + } + rc.useNav = true; + rc.maxSpeed = 6; + + } + else{ + Segment2D seg2(p2,wm->ball.pos.loc); + if(seg2.length() > Field::goalCircle_R + 500){ + Segment2D seg5(wm->ball.pos.loc,p2); + Segment2D seg4(wm->ball.pos.loc , 500 , seg5.direction() - zaveEkhtelaf - zaveEkhtelaf); + rc.fin_pos.loc = seg4.terminal(); + Segment2D seg3(seg4.terminal(),wm->ball.pos.loc); + rc.fin_pos.dir = seg3.direction().radian(); + // std::cout << "2x : " << j2->x << std::endl; +// std::cout << "2y : " << j2->y << std::endl; +//// std::cout << "fasele do dayere" << cir1.center().dist(cir2.center()) << " jame shoaha" << (cir1.radius() + cir2.radius()) << std::endl; +// rc.fin_pos.loc = *j2; +// Segment2D seg3(*j2,wm->ball.pos.loc); +// rc.fin_pos.dir = seg3.direction().radian(); + } + else{ + seg = new Segment2D(p2,Field::goalCircle_R + 300,*(new AngleDeg(ballViewMidSeg.direction().degree() - 2*ang))); + rc.fin_pos.loc = seg->terminal(); + rc.fin_pos.dir = seg->direction().radian(); + } + rc.useNav = true; + rc.maxSpeed = 4; + } + rc.maxSpeed = 4; + } +// Vector2D* p4; +// Segment2D* S1; +// if(ballViewBotLine.length() < ballViewTopLine.length()){ +// AngleDeg A1(ballViewMidSeg.direction().degree() + 90); +// Line2D l1(p3,A1); +// p4 = &ballViewBotLine.intersection(l1); +// S1 = new Segment2D(p3,&p4); +// int ScaleNum = (S1->length()/(2*robotSize)); +// AngleDeg A2(-ballViewBotLine.direction().degree()); +// Segment2D MainTriBot(p1,ScaleNum*ballViewBotLine,A2); + +<<<<<<< HEAD +// } +// else{ +// AngleDeg A1(ballViewMidSeg.direction().degree() + 90); +// Line2D l1(p2,A1); +// p4 = &ballViewBotLine.intersection(l1); +// S1 = new Segment2D(p2,&p4); +// int ScaleNum = (S1->length()/(2*robotSize)); +// AngleDeg A2(-ballViewTopLine.direction().degree()); +// Segment2D MainTriTop(p1,ScaleNum*ballViewBotLine,A2); +// } +======= + if(id==5){ //3 + Circle2D ballArea(wm->ball.pos.loc,300); + Circle2D ballShoutArea(wm->ball.pos.loc,ROBOT_RADIUS-40); + //Line2D shutLine(wm->ball.pos.loc,Field::ourGoalCenter); + Line2D shutLine(wm->ball.pos.loc,Field::ourGoalCenter); + Vector2D f1,f2,r; + Vector2D s1,s2,rf; + ballArea.intersection(shutLine,&f1,&f2); + if(Field::ourGoalCenter.dist(f1)>Field::ourGoalCenter.dist(f2)){ + r=f1; + } + else{ + r=f2; + } + if(r.dist(wm->ourRobot[id].pos.loc)>200 && flag==0){ + rc.fin_pos.loc=r; + wm->debug_pos.append(r); + rc.maxSpeed=2; + rc.useNav=true; + rc.isBallObs=true; + qDebug()<<"ba navigatione roshan mire poshtesh"; +// //flag1=0; + + } + else{ + qDebug()<<"reside poshtesh"; + rc.fin_pos.loc=r; + rc.maxSpeed=1; + rc.useNav=true; + rc.isBallObs=true; + //if(((wm->ourRobot[id].pos.dir)-(wm->ball.pos.loc-Field::ourGoalCenter).dir().radian())<0.9){ + qDebug()<<"zavie ro ok karde flag ro 1 mikone "; + flag=1; + //} + } + ballShoutArea.intersection(shutLine,&s1,&s2); + if(Field::ourGoalCenter.dist(s1)>Field::ourGoalCenter.dist(s2)){ + rf=s1; + } + else{ + rf=s2; + } + if(flag==1){ + qDebug()<<"ba sorate yek az posht be tup nazdik mishe"; + rc.maxSpeed=0.5; +//// if(wm->ourRobot[id].pos.loc.dist(wm->ball.pos.loc)>400){ +//// flag=0; +//// } + rc.fin_pos.loc=rf; + wm->debug_pos.append(rf); + rc.useNav=false; + } + if(wm->ourRobot[id].pos.loc.dist(rf)ball.isValid && ((wm->ourRobot[id].pos.dir)-(wm->ball.pos.loc-Field::ourGoalCenter).dir().radian())<1){ + qDebug()<<"dasture shut !"; + rc.kickspeedx=100; + //} + rc.useNav=false; + //rc.isBallObs=false; + //rc.isKickObs=true; +// flag=0; + + } + rc.fin_pos.dir=(Field::ourGoalCenter-wm->ball.pos.loc).dir().radian(); + } + if(id==4){ + //way.append(wm->ball.pos.dir); + Position goaliePos; + if(wm->ball.vel.loc.length()<0.3){ + int kickerId; + QList opp = wm->kn->findNearestTo(wm->ball.pos.loc); + for(int i=0;iball.pos.loc,wm->ourRobot[kickerId].pos.loc); + Segment2D gLine(Field::ourGoalPost_L,Field::ourGoalPost_R); + goaliePos.loc=gLine.intersection(shot); + if(gLine.contains(goaliePos.loc)==false){ + goaliePos.loc=Field::ourGoalCenter; + } + goaliePos.dir=(wm->ball.pos.loc-goaliePos.loc).dir().radian(); + } + else{ + goaliePos.loc=Field::ourGoalCenter; + } + // + } + else{ + qDebug()<<"else !!!!!"; + Vector2D f; + Vector2D a; + Vector2D sum; + Vector2D avg; + sum.x=0; + sum.y=0; + f.x=wm->ball.pos.loc.x+wm->ball.vel.loc.x; + f.y=wm->ball.pos.loc.y+wm->ball.vel.loc.y; + + //avg.x=way.at(0).x+way.at(1).x+way.at(2).x; + //avg.y=way.at(0).y+way.at(1).y+way.at(2).y; + Line2D shot(wm->ball.pos.loc,f); + Vector2D GL,GR; + GL=Field::ourGoalPost_L; + GR=Field::ourGoalPost_R; + if(Field::ourGoalPost_L.y>0){ + GL.y+=100; + } + else{ + GL.y-=100; + } + if(Field::ourGoalPost_R.y>0){ + GR.y+=100; + } + else{ + GR.y-=100; + } + Segment2D gLine(GL,GR); + a=gLine.intersection(shot); + if(gLine.contains(a)){ + goaliePos.loc=a; + } + else{ + goaliePos.loc=Field::ourGoalCenter; + } +// if(goaliePos.loc.dist(Field::ourGoalCenter)<150){ + if(wm->ball.pos.loc.dist(Field::ourGoalCenter)>450){ + if(wm->ourRobot[id].pos.loc.dist(goaliePos.loc)>100){ + if(goaliePos.loc.y>Field::ourGoalCenter.y){ + goaliePos.loc.y+=50; + } + if(goaliePos.loc.yball.pos.loc-goaliePos.loc).dir().radian(); + rc.fin_pos.loc=goaliePos.loc; + rc.fin_pos.dir=goaliePos.dir; + wm->debug_pos.append(goaliePos.loc); + rc.useNav=false; + rc.maxSpeed=4; + } + +<<<<<<< HEAD + //wm->debug_pos.append(Field::ourGoalCenter); + //wm->debug_pos.append(Field::ourGoalPost_L); + //wm->debug_pos.append(Field::ourGoalPost_R); +>>>>>>> d766c95da96dc8ee70e0992aefe4e0a62d783e28 +======= + if(id==5){ //3 + Circle2D ballArea(wm->ball.pos.loc,300); + Circle2D ballShoutArea(wm->ball.pos.loc,ROBOT_RADIUS-40); + //Line2D shutLine(wm->ball.pos.loc,Field::ourGoalCenter); + Line2D shutLine(wm->ball.pos.loc,Field::ourGoalCenter); + Vector2D f1,f2,r; + Vector2D s1,s2,rf; + ballArea.intersection(shutLine,&f1,&f2); + if(Field::ourGoalCenter.dist(f1)>Field::ourGoalCenter.dist(f2)){ + r=f1; + } + else{ + r=f2; + } + if(r.dist(wm->ourRobot[id].pos.loc)>200 && flag==0){ + rc.fin_pos.loc=r; + wm->debug_pos.append(r); + rc.maxSpeed=2; + rc.useNav=true; + rc.isBallObs=true; + qDebug()<<"ba navigatione roshan mire poshtesh"; +// //flag1=0; + + } + else{ + qDebug()<<"reside poshtesh"; + rc.fin_pos.loc=r; + rc.maxSpeed=1; + rc.useNav=true; + rc.isBallObs=true; + //if(((wm->ourRobot[id].pos.dir)-(wm->ball.pos.loc-Field::ourGoalCenter).dir().radian())<0.9){ + qDebug()<<"zavie ro ok karde flag ro 1 mikone "; + flag=1; + //} + } + ballShoutArea.intersection(shutLine,&s1,&s2); + if(Field::ourGoalCenter.dist(s1)>Field::ourGoalCenter.dist(s2)){ + rf=s1; + } + else{ + rf=s2; + } + if(flag==1){ + qDebug()<<"ba sorate yek az posht be tup nazdik mishe"; + rc.maxSpeed=0.5; +//// if(wm->ourRobot[id].pos.loc.dist(wm->ball.pos.loc)>400){ +//// flag=0; +//// } + rc.fin_pos.loc=rf; + wm->debug_pos.append(rf); + rc.useNav=false; + } + if(wm->ourRobot[id].pos.loc.dist(rf)ball.isValid && ((wm->ourRobot[id].pos.dir)-(wm->ball.pos.loc-Field::ourGoalCenter).dir().radian())<1){ + qDebug()<<"dasture shut !"; + rc.kickspeedx=100; + //} + rc.useNav=false; + //rc.isBallObs=false; + //rc.isKickObs=true; +// flag=0; + + } + rc.fin_pos.dir=(Field::ourGoalCenter-wm->ball.pos.loc).dir().radian(); + } + if(id==4){ + //way.append(wm->ball.pos.dir); + Position goaliePos; + if(wm->ball.vel.loc.length()<0.3){ + int kickerId; + QList opp = wm->kn->findNearestTo(wm->ball.pos.loc); + for(int i=0;iball.pos.loc,wm->ourRobot[kickerId].pos.loc); + Segment2D gLine(Field::ourGoalPost_L,Field::ourGoalPost_R); + goaliePos.loc=gLine.intersection(shot); + if(gLine.contains(goaliePos.loc)==false){ + goaliePos.loc=Field::ourGoalCenter; + } + goaliePos.dir=(wm->ball.pos.loc-goaliePos.loc).dir().radian(); + } + else{ + goaliePos.loc=Field::ourGoalCenter; + } + // + } + else{ + qDebug()<<"else !!!!!"; + Vector2D f; + Vector2D a; + Vector2D sum; + Vector2D avg; + sum.x=0; + sum.y=0; + f.x=wm->ball.pos.loc.x+wm->ball.vel.loc.x; + f.y=wm->ball.pos.loc.y+wm->ball.vel.loc.y; + + //avg.x=way.at(0).x+way.at(1).x+way.at(2).x; + //avg.y=way.at(0).y+way.at(1).y+way.at(2).y; + Line2D shot(wm->ball.pos.loc,f); + Vector2D GL,GR; + GL=Field::ourGoalPost_L; + GR=Field::ourGoalPost_R; + if(Field::ourGoalPost_L.y>0){ + GL.y+=100; + } + else{ + GL.y-=100; + } + if(Field::ourGoalPost_R.y>0){ + GR.y+=100; + } + else{ + GR.y-=100; + } + Segment2D gLine(GL,GR); + a=gLine.intersection(shot); + if(gLine.contains(a)){ + goaliePos.loc=a; + } + else{ + goaliePos.loc=Field::ourGoalCenter; + } +// if(goaliePos.loc.dist(Field::ourGoalCenter)<150){ + if(wm->ball.pos.loc.dist(Field::ourGoalCenter)>450){ + if(wm->ourRobot[id].pos.loc.dist(goaliePos.loc)>100){ + if(goaliePos.loc.y>Field::ourGoalCenter.y){ + goaliePos.loc.y+=50; + } + if(goaliePos.loc.yball.pos.loc-goaliePos.loc).dir().radian(); + rc.fin_pos.loc=goaliePos.loc; + rc.fin_pos.dir=goaliePos.dir; + wm->debug_pos.append(goaliePos.loc); + rc.useNav=false; + rc.maxSpeed=4; + } + //wm->debug_pos.append(Field::ourGoalCenter); + //wm->debug_pos.append(Field::ourGoalPost_L); + //wm->debug_pos.append(Field::ourGoalPost_R); + rc.fin_pos.loc = Vector2D(1300,100); + rc.maxSpeed = 2; + rc.useNav = true; +>>>>>>> 4bde963eede2897a0748e0221474ee6c1450efde return rc; + //baraye rahati dayere tarif mikonim. } diff --git a/src/ai/tactic/tactictest2.h b/src/ai/tactic/tactictest2.h old mode 100644 new mode 100755 index a60e6b9..858d7f2 --- a/src/ai/tactic/tactictest2.h +++ b/src/ai/tactic/tactictest2.h @@ -6,10 +6,27 @@ class TacticTest2: public Tactic { +private: + Vector2D finalPos; + int ballVelocity; Q_OBJECT public: + int flag=0; + int flag1=0; + QList way; explicit TacticTest2(WorldModel *worldmodel, QObject *parent = 0); virtual RobotCommand getCommand(); +<<<<<<< HEAD +<<<<<<< HEAD + Vector2D* getFinalPos(); + void setFinalPos(Vector2D value); + int getBallVelocity() const; + void setBallVelocity(int value); +======= +>>>>>>> d766c95da96dc8ee70e0992aefe4e0a62d783e28 +======= +private: +>>>>>>> 4bde963eede2897a0748e0221474ee6c1450efde }; #endif // TACTICTEST2_H diff --git a/src/ai/tactic/tactictestfriction.cpp b/src/ai/tactic/tactictestfriction.cpp old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tactictestfriction.h b/src/ai/tactic/tactictestfriction.h old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tactictestkickprecision.cpp b/src/ai/tactic/tactictestkickprecision.cpp old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tactictestkickprecision.h b/src/ai/tactic/tactictestkickprecision.h old mode 100644 new mode 100755 diff --git a/src/ai/tactic/tacticteststandingforwardenemy.cpp b/src/ai/tactic/tacticteststandingforwardenemy.cpp new file mode 100755 index 0000000..eb78de2 --- /dev/null +++ b/src/ai/tactic/tacticteststandingforwardenemy.cpp @@ -0,0 +1,48 @@ +#include "tacticteststandingforwardenemy.h" + + +int TacticTestStandingForwardEnemy::getDistance() const +{ + return distance; +} + +void TacticTestStandingForwardEnemy::setDistance(int value) +{ + distance = value; +} + +int TacticTestStandingForwardEnemy::getOppRobotIndex() const +{ + return OppRobotIndex; +} + +void TacticTestStandingForwardEnemy::setOppRobotIndex(int value) +{ + OppRobotIndex = value; +} +TacticTestStandingForwardEnemy::TacticTestStandingForwardEnemy(WorldModel *worldmodel, QObject *parent) : + Tactic("TacticTest", worldmodel, parent) +{ +} + +RobotCommand TacticTestStandingForwardEnemy::getCommand(){ + RobotCommand rc; + if(!wm->ourRobot[id].isValid) + return rc; + rcsc::Segment2D line(wm->oppRobot[OppRobotIndex].pos.loc,Field::ourGoalCenter); + rcsc::Circle2D circle(wm->oppRobot[OppRobotIndex].pos.loc,distance); + Vector2D* v1 = new Vector2D(); + Vector2D* v2 = new Vector2D(); + circle.intersection(line,v1,v2); + if((v1->x != 0) && (v1->y != 0)){ + rc.fin_pos.loc.x = v1->x; + rc.fin_pos.loc.y = v1->y; + } + if((v2->x != 0) && (v2->y != 0)){ + rc.fin_pos.loc.x = v2->x; + rc.fin_pos.loc.y = v2->y; + } + rc.useNav = true; + rc.maxSpeed = 3; + return rc; +} diff --git a/src/ai/tactic/tacticteststandingforwardenemy.h b/src/ai/tactic/tacticteststandingforwardenemy.h new file mode 100755 index 0000000..9f81bfd --- /dev/null +++ b/src/ai/tactic/tacticteststandingforwardenemy.h @@ -0,0 +1,25 @@ +#ifndef TACTICTESTSTANDINGFORWARDENEMY_H +#define TACTICTESTSTANDINGFORWARDENEMY_H +#include "tactic.h" +#define DangerDist 300 +#include "geom.h" +#include "constants.h" + +class TacticTestStandingForwardEnemy : public Tactic +{ +private: + //distanse between enemy and ally robot + int distance; + int OppRobotIndex; + Q_OBJECT +public: + TacticTestStandingForwardEnemy(); + explicit TacticTestStandingForwardEnemy(WorldModel *worldmodel, QObject *parent = 0); + virtual RobotCommand getCommand(); + int getDistance() const; + void setDistance(int value); + int getOppRobotIndex() const; + void setOppRobotIndex(int value); +}; + +#endif // TACTICTESTSTANDINGFORWARDENEMY_H diff --git a/src/ai/tactic/taticgoliealihejazi.cpp b/src/ai/tactic/taticgoliealihejazi.cpp new file mode 100755 index 0000000..b161aef --- /dev/null +++ b/src/ai/tactic/taticgoliealihejazi.cpp @@ -0,0 +1,16 @@ +#include "taticgoliealihejazi.h" + +taticgoliealihejazi::taticgoliealihejazi(WorldModel *worldmodel, QObject *parent) : + Tactic("TacticTest", worldmodel, parent) +{ +} + +RobotCommand taticgoliealihejazi::getCommand() +{ + RobotCommand rc; + if(wm->ball.vel.loc.dist(*new Vector2D(0,0)) < 40){ + rc.fin_pos.loc = Vector2D(0,0); + } + return rc; +} + diff --git a/src/ai/tactic/taticgoliealihejazi.h b/src/ai/tactic/taticgoliealihejazi.h new file mode 100755 index 0000000..9924f5c --- /dev/null +++ b/src/ai/tactic/taticgoliealihejazi.h @@ -0,0 +1,13 @@ +#ifndef TATICGOLIEALIHEJAZI_H +#define TATICGOLIEALIHEJAZI_H +#include "tactic.h" + +class taticgoliealihejazi : public Tactic +{ + Q_OBJECT +public: + explicit taticgoliealihejazi(WorldModel *worldmodel, QObject *parent = 0); + virtual RobotCommand getCommand(); +}; + +#endif // TATICGOLIEALIHEJAZI_H diff --git a/src/ai/tactics.h b/src/ai/tactics.h old mode 100644 new mode 100755 index 50d9d2b..ec1f6f8 --- a/src/ai/tactics.h +++ b/src/ai/tactics.h @@ -21,5 +21,7 @@ #include "tactic/tacticcontrol.h" #include "tactic/tactickicklearning.h" #include "tactic/tacticformation.h" +//seyed ali hejazi +#include "tactic/tacticteststandingforwardenemy.h" #endif // TACTICS_H diff --git a/src/etc/base.h b/src/etc/base.h old mode 100644 new mode 100755 diff --git a/src/etc/constants.cpp b/src/etc/constants.cpp old mode 100644 new mode 100755 index 19a91de..7254c39 --- a/src/etc/constants.cpp +++ b/src/etc/constants.cpp @@ -88,6 +88,7 @@ void setup_consts(QString field_size) goalCircleDEF_R = goalCircle_R + centerCircle_R/2 + 200; // Ours. + //armin sadreddin ourGoalCenter = Vector2D(MinX, 0); ourGoalPost_L = Vector2D(MinX, 500); ourGoalPost_R = Vector2D(MinX, -500); diff --git a/src/etc/constants.h b/src/etc/constants.h old mode 100644 new mode 100755 diff --git a/src/etc/settings.h b/src/etc/settings.h old mode 100644 new mode 100755 diff --git a/src/formation/formation.cpp b/src/formation/formation.cpp old mode 100644 new mode 100755 diff --git a/src/formation/formation.h b/src/formation/formation.h old mode 100644 new mode 100755 diff --git a/src/formation/formation_bpn.cpp b/src/formation/formation_bpn.cpp old mode 100644 new mode 100755 diff --git a/src/formation/formation_bpn.h b/src/formation/formation_bpn.h old mode 100644 new mode 100755 diff --git a/src/formation/formation_cdt.cpp b/src/formation/formation_cdt.cpp old mode 100644 new mode 100755 diff --git a/src/formation/formation_cdt.h b/src/formation/formation_cdt.h old mode 100644 new mode 100755 diff --git a/src/formation/formation_dt.cpp b/src/formation/formation_dt.cpp old mode 100644 new mode 100755 diff --git a/src/formation/formation_dt.h b/src/formation/formation_dt.h old mode 100644 new mode 100755 diff --git a/src/formation/formation_knn.cpp b/src/formation/formation_knn.cpp old mode 100644 new mode 100755 diff --git a/src/formation/formation_knn.h b/src/formation/formation_knn.h old mode 100644 new mode 100755 diff --git a/src/formation/formation_ngnet.cpp b/src/formation/formation_ngnet.cpp old mode 100644 new mode 100755 diff --git a/src/formation/formation_ngnet.h b/src/formation/formation_ngnet.h old mode 100644 new mode 100755 diff --git a/src/formation/formation_rbf.cpp b/src/formation/formation_rbf.cpp old mode 100644 new mode 100755 diff --git a/src/formation/formation_rbf.h b/src/formation/formation_rbf.h old mode 100644 new mode 100755 diff --git a/src/formation/formation_sbsp.cpp b/src/formation/formation_sbsp.cpp old mode 100644 new mode 100755 diff --git a/src/formation/formation_sbsp.h b/src/formation/formation_sbsp.h old mode 100644 new mode 100755 diff --git a/src/formation/formation_static.cpp b/src/formation/formation_static.cpp old mode 100644 new mode 100755 diff --git a/src/formation/formation_static.h b/src/formation/formation_static.h old mode 100644 new mode 100755 diff --git a/src/formation/formation_uva.cpp b/src/formation/formation_uva.cpp old mode 100644 new mode 100755 diff --git a/src/formation/formation_uva.h b/src/formation/formation_uva.h old mode 100644 new mode 100755 diff --git a/src/formation/sample_data.cpp b/src/formation/sample_data.cpp old mode 100644 new mode 100755 diff --git a/src/formation/sample_data.h b/src/formation/sample_data.h old mode 100644 new mode 100755 diff --git a/src/formation_tools/formation_dt.cpp b/src/formation_tools/formation_dt.cpp old mode 100644 new mode 100755 diff --git a/src/formation_tools/formation_dt.h b/src/formation_tools/formation_dt.h old mode 100644 new mode 100755 diff --git a/src/formation_tools/formationdata.cpp b/src/formation_tools/formationdata.cpp old mode 100644 new mode 100755 diff --git a/src/formation_tools/formationdata.h b/src/formation_tools/formationdata.h old mode 100644 new mode 100755 diff --git a/src/formation_tools/formationparser.cpp b/src/formation_tools/formationparser.cpp old mode 100644 new mode 100755 diff --git a/src/formation_tools/formationparser.h b/src/formation_tools/formationparser.h old mode 100644 new mode 100755 diff --git a/src/geom/angle_deg.cpp b/src/geom/angle_deg.cpp old mode 100644 new mode 100755 diff --git a/src/geom/angle_deg.h b/src/geom/angle_deg.h old mode 100644 new mode 100755 diff --git a/src/geom/circle_2d.cpp b/src/geom/circle_2d.cpp old mode 100644 new mode 100755 diff --git a/src/geom/circle_2d.h b/src/geom/circle_2d.h old mode 100644 new mode 100755 diff --git a/src/geom/composite_region_2d.cpp b/src/geom/composite_region_2d.cpp old mode 100644 new mode 100755 diff --git a/src/geom/composite_region_2d.h b/src/geom/composite_region_2d.h old mode 100644 new mode 100755 diff --git a/src/geom/convex_hull.cpp b/src/geom/convex_hull.cpp old mode 100644 new mode 100755 diff --git a/src/geom/convex_hull.h b/src/geom/convex_hull.h old mode 100644 new mode 100755 diff --git a/src/geom/delaunay_triangulation.cpp b/src/geom/delaunay_triangulation.cpp old mode 100644 new mode 100755 diff --git a/src/geom/delaunay_triangulation.h b/src/geom/delaunay_triangulation.h old mode 100644 new mode 100755 diff --git a/src/geom/geom.h b/src/geom/geom.h old mode 100644 new mode 100755 diff --git a/src/geom/line_2d.cpp b/src/geom/line_2d.cpp old mode 100644 new mode 100755 diff --git a/src/geom/line_2d.h b/src/geom/line_2d.h old mode 100644 new mode 100755 diff --git a/src/geom/matrix_2d.cpp b/src/geom/matrix_2d.cpp old mode 100644 new mode 100755 diff --git a/src/geom/matrix_2d.h b/src/geom/matrix_2d.h old mode 100644 new mode 100755 diff --git a/src/geom/polygon_2d.cpp b/src/geom/polygon_2d.cpp old mode 100644 new mode 100755 diff --git a/src/geom/polygon_2d.h b/src/geom/polygon_2d.h old mode 100644 new mode 100755 diff --git a/src/geom/ray_2d.cpp b/src/geom/ray_2d.cpp old mode 100644 new mode 100755 diff --git a/src/geom/ray_2d.h b/src/geom/ray_2d.h old mode 100644 new mode 100755 diff --git a/src/geom/rect_2d.cpp b/src/geom/rect_2d.cpp old mode 100644 new mode 100755 diff --git a/src/geom/rect_2d.h b/src/geom/rect_2d.h old mode 100644 new mode 100755 diff --git a/src/geom/region_2d.h b/src/geom/region_2d.h old mode 100644 new mode 100755 diff --git a/src/geom/sector_2d.cpp b/src/geom/sector_2d.cpp old mode 100644 new mode 100755 diff --git a/src/geom/sector_2d.h b/src/geom/sector_2d.h old mode 100644 new mode 100755 diff --git a/src/geom/segment_2d.cpp b/src/geom/segment_2d.cpp old mode 100644 new mode 100755 diff --git a/src/geom/segment_2d.h b/src/geom/segment_2d.h old mode 100644 new mode 100755 diff --git a/src/geom/size_2d.h b/src/geom/size_2d.h old mode 100644 new mode 100755 diff --git a/src/geom/triangle_2d.cpp b/src/geom/triangle_2d.cpp old mode 100644 new mode 100755 diff --git a/src/geom/triangle_2d.h b/src/geom/triangle_2d.h old mode 100644 new mode 100755 diff --git a/src/geom/triangulation.h b/src/geom/triangulation.h old mode 100644 new mode 100755 diff --git a/src/geom/vector_2d.cpp b/src/geom/vector_2d.cpp old mode 100644 new mode 100755 diff --git a/src/geom/vector_2d.h b/src/geom/vector_2d.h old mode 100644 new mode 100755 diff --git a/src/geom/voronoi_diagram.cpp b/src/geom/voronoi_diagram.cpp old mode 100644 new mode 100755 diff --git a/src/geom/voronoi_diagram.h b/src/geom/voronoi_diagram.h old mode 100644 new mode 100755 diff --git a/src/geom2/shape2d.cpp b/src/geom2/shape2d.cpp old mode 100644 new mode 100755 diff --git a/src/geom2/shape2d.h b/src/geom2/shape2d.h old mode 100644 new mode 100755 diff --git a/src/kn2cssl_new.pro b/src/kn2cssl_new.pro old mode 100644 new mode 100755 index c498e74..99c0aae --- a/src/kn2cssl_new.pro +++ b/src/kn2cssl_new.pro @@ -172,6 +172,7 @@ SOURCES += main.cpp \ ai/play/freeKicks/freekick9.cpp \ ai/play/freeKicks/freekick10.cpp \ ai/play/freeKicks/freekick11.cpp \ + ai/play/freeKicks/freekicktest1.cpp\ ai/play/freeKicks/freekick47.cpp \ etc/constants.cpp \ ssl/sslvision_single.cpp \ @@ -209,7 +210,17 @@ SOURCES += main.cpp \ ai/skill/skillpassreceive.cpp \ ai/skill/skillonetouch.cpp \ ai/tactic/tacticformation.cpp \ - ai/play/playformations.cpp + ai/play/playformations.cpp \ +<<<<<<< HEAD + ai/tactic/tacticteststandingforwardenemy.cpp \ + ai/play/playhw2_1.cpp \ + ai/play/mantomandefense.cpp \ + ai/tactic/taticgoliealihejazi.cpp \ + ai/skill/shootball.cpp \ + ai/play/playstop_hejazi.cpp \ + ai/play/freeKicks/freekicktest2.cpp +======= +>>>>>>> 4bde963eede2897a0748e0221474ee6c1450efde HEADERS += \ etc/settings.h \ @@ -317,6 +328,7 @@ HEADERS += \ ai/play/freeKicks/freekick9.h \ ai/play/freeKicks/freekick10.h \ ai/play/freeKicks/freekick11.h \ + ai/play/freeKicks/freekicktest1.h\ ai/play/freeKicks/freekick47.h \ ssl/sslvision_single.h \ ssl/sslvision_double.h \ @@ -354,7 +366,17 @@ HEADERS += \ ai/skill/skillpassreceive.h \ ai/skill/skillonetouch.h \ ai/tactic/tacticformation.h \ - ai/play/playformations.h + ai/play/playformations.h \ +<<<<<<< HEAD + ai/tactic/tacticteststandingforwardenemy.h \ + ai/play/playhw2_1.h \ + ai/play/mantomandefense.h \ + ai/tactic/taticgoliealihejazi.h \ + ai/skill/shootball.h \ + ai/play/playstop_hejazi.h \ + ai/play/freeKicks/freekicktest2.h +======= +>>>>>>> 4bde963eede2897a0748e0221474ee6c1450efde FORMS += ui/mainwindow.ui diff --git a/src/kn2cssl_new.pro.user.18 b/src/kn2cssl_new.pro.user.18 new file mode 100644 index 0000000..e193252 --- /dev/null +++ b/src/kn2cssl_new.pro.user.18 @@ -0,0 +1,271 @@ + + + + + + EnvironmentId + {a58473ed-b6ed-4db1-a972-6f88c31ab903} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.5.0 GCC 64bit + Desktop Qt 5.5.0 GCC 64bit + qt.55.gcc_64_kit + 0 + 0 + 0 + + /home/sadra/Desktop/kn2cPrograms/build-kn2cssl_new-Desktop_Qt_5_5_0_GCC_64bit-Debug + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + true + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + -j4 -l4 + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + + Qt4ProjectManager.Qt4BuildConfiguration + 2 + true + + + /home/sadra/Desktop/kn2cPrograms/build-kn2cssl_new-Desktop_Qt_5_5_0_GCC_64bit-Release + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + true + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + 2 + + + 0 + Deploy + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy locally + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + kn2cssl_new + + Qt4ProjectManager.Qt4RunConfiguration:/home/sadra/Desktop/kn2cPrograms/src/kn2cssl_new.pro + + kn2cssl_new.pro + false + false + + 3768 + false + true + false + false + true + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.FileVersion + 18 + + + Version + 18 + + diff --git a/src/kn2cssl_new.pro.user.a075b2b b/src/kn2cssl_new.pro.user.a075b2b new file mode 100644 index 0000000..4ab1656 --- /dev/null +++ b/src/kn2cssl_new.pro.user.a075b2b @@ -0,0 +1,260 @@ + + + + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + true + 1 + true + 0 + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.2.1 GCC 64bit + Desktop Qt 5.2.1 GCC 64bit + qt.521.gcc_64.essentials_kit + 0 + 0 + 0 + + /home/arminsadreddin/ssl-main-code/Robotic/kn2cPrograms/build-kn2cssl_new-Desktop_Qt_5_2_1_GCC_64bit-Debug + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + true + + false + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + + Qt4ProjectManager.Qt4BuildConfiguration + 2 + true + + + /home/arminsadreddin/ssl-main-code/Robotic/kn2cPrograms/build-kn2cssl_new-Desktop_Qt_5_2_1_GCC_64bit-Release + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + true + + false + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + 2 + + + 0 + Deploy + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy locally + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + kn2cssl_new + + Qt4ProjectManager.Qt4RunConfiguration:/home/arminsadreddin/ssl-main-code/Robotic/kn2cPrograms/src/kn2cssl_new.pro + + kn2cssl_new.pro + false + false + + 3768 + true + false + false + false + true + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.EnvironmentId + {a075b2b7-f436-4b42-b1f9-98e0216d7710} + + + ProjectExplorer.Project.Updater.FileVersion + 15 + + diff --git a/src/kn2cssl_new.pro.user.a58473e b/src/kn2cssl_new.pro.user.a58473e new file mode 100644 index 0000000..83c4924 --- /dev/null +++ b/src/kn2cssl_new.pro.user.a58473e @@ -0,0 +1,260 @@ + + + + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + true + 1 + true + 0 + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.2.1 GCC 64bit + Desktop Qt 5.2.1 GCC 64bit + qt.521.gcc_64.essentials_kit + 0 + 0 + 0 + + /home/sadra/Desktop/kn2cPrograms/build-kn2cssl_new-Desktop_Qt_5_2_1_GCC_64bit-Debug + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + true + + false + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + -j4 -l4 + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + + Qt4ProjectManager.Qt4BuildConfiguration + 2 + true + + + /home/sadra/Desktop/kn2cPrograms/build-kn2cssl_new-Desktop_Qt_5_2_1_GCC_64bit-Release + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + true + + false + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + 2 + + + 0 + Deploy + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy locally + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + kn2cssl_new + + Qt4ProjectManager.Qt4RunConfiguration:/home/sadra/Desktop/kn2cPrograms/src/kn2cssl_new.pro + + kn2cssl_new.pro + false + false + + 3768 + true + false + false + false + true + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.EnvironmentId + {a58473ed-b6ed-4db1-a972-6f88c31ab903} + + + ProjectExplorer.Project.Updater.FileVersion + 15 + + diff --git a/src/logplayer/ai_logplayer.cpp b/src/logplayer/ai_logplayer.cpp old mode 100644 new mode 100755 diff --git a/src/logplayer/ai_logplayer.h b/src/logplayer/ai_logplayer.h old mode 100644 new mode 100755 diff --git a/src/logplayer/logplayer.cpp b/src/logplayer/logplayer.cpp old mode 100644 new mode 100755 diff --git a/src/logplayer/logplayer.h b/src/logplayer/logplayer.h old mode 100644 new mode 100755 diff --git a/src/logplayer/referee_logplayer.cpp b/src/logplayer/referee_logplayer.cpp old mode 100644 new mode 100755 diff --git a/src/logplayer/referee_logplayer.h b/src/logplayer/referee_logplayer.h old mode 100644 new mode 100755 diff --git a/src/logplayer/vision_logplayer.cpp b/src/logplayer/vision_logplayer.cpp old mode 100644 new mode 100755 diff --git a/src/logplayer/vision_logplayer.h b/src/logplayer/vision_logplayer.h old mode 100644 new mode 100755 diff --git a/src/main.cpp b/src/main.cpp old mode 100644 new mode 100755 diff --git a/src/output/agent.cpp b/src/output/agent.cpp new file mode 100644 index 0000000..e49032a --- /dev/null +++ b/src/output/agent.cpp @@ -0,0 +1,108 @@ +#include "agent.h" +#include "worldmodel.h" + +Agent::Agent() : + Robot() +{ + wm = 0; + id = -1; +} + +void Agent::setID(int id) +{ + this->id = id; + nav.setID(id); +} + +void Agent::setWorldModel(WorldModel *wm) +{ + this->wm = wm; + nav.setWorldModel(wm); +} + +void Agent::setOutputBuffer(OutputBuffer *outputBuffer) +{ + this->outputBuffer = outputBuffer; +} + +void Agent::SendCommand(RobotCommand rc) +{ + if(!wm->ourRobot[id].isValid) return; + + if( id == 0 ) wm->debug_pos.clear(); + ControllerInput ci = nav.calc(rc); + if( id == 0 ) + { + wm->debug_pos.append(ci.mid_pos.loc); + wm->debug_pos.append(ci.cur_pos.loc); + } + + ControllerResult co = ctrl.calc(ci); + + // Real Game Packet + RobotData reRD; + reRD.RID = id; + reRD.M0 = co.msR.M0; + reRD.M1 = co.msR.M1; + reRD.M2 = co.msR.M2; + reRD.M3 = co.msR.M3; + reRD.KCK = (quint8) rc.kickspeedx; + reRD.CHP = (quint8) rc.kickspeedz; + + outputBuffer->wpck.AddRobot(reRD); + + + // grSim Packet + grRobotData grRD; + grRD.rid = id; + grRD.velx = co.rs.VX; + grRD.vely = co.rs.VY; + grRD.velw = co.rs.VW; + grRD.wheel1 = co.msS.M0; + grRD.wheel2 = co.msS.M1; + grRD.wheel3 = co.msS.M2; + grRD.wheel4 = co.msS.M3; + grRD.kickspeedx = rc.kickspeedx; + grRD.kickspeedz = rc.kickspeedz; + grRD.spinner = 0; + if( grSimPacketIsValid(grRD) ) + outputBuffer->grpck.AddRobot(grRD); +} + +void Agent::Halt() +{ + // Real Game Packet + RobotData reRD; + reRD.RID = id; + reRD.M0 = 0; + reRD.M1 = 0; + reRD.M2 = 0; + reRD.M3 = 0; + reRD.KCK = 0; + reRD.CHP = 0; + outputBuffer->wpck.AddRobot(reRD); + // grSim Packet + grRobotData grRD; + grRD.rid=id; + grRD.velx = 0; + grRD.vely = 0; + grRD.velw = 0; + grRD.wheel1=0; + grRD.wheel2=0; + grRD.wheel3=0; + grRD.wheel4=0; + grRD.kickspeedx=0; + grRD.kickspeedz=0; + grRD.spinner=0; + outputBuffer->grpck.AddRobot(grRD); +} + +bool Agent::grSimPacketIsValid(grRobotData grRD) +{ + if( !isnan(grRD.velx) && !isnan(grRD.vely) && !isnan(grRD.velw) && + !isnan(grRD.wheel1) && !isnan(grRD.wheel2) && !isnan(grRD.wheel3) && !isnan(grRD.wheel4) ) + return true; + return false; + +} + diff --git a/src/output/agent.h b/src/output/agent.h new file mode 100644 index 0000000..1919a2b --- /dev/null +++ b/src/output/agent.h @@ -0,0 +1,94 @@ +#ifndef AGENT_H +#define AGENT_H + +#include +#include "robot.h" +#include "robotcommand.h" +#include "navigation.h" + +enum AgentStatus +{ + Idle, + Passing, + Kicking, + Chiping, + FollowingBall, + BlockingBall, + BlockingRobot, + RecievingPass, + OneTouch +}; + +enum AgentRole +{ + NoRole = 0, + ArcMid, + ArcLeft, + ArcRight, + FixedPositionLeft, + FixedPositionRight, + FixedPositionMid, + AttackerLeft, + AttackerRight, + AttackerMid, + Blocker, + DefenderLeft, + DefenderRight, + DefenderMid, + Golie +}; + +enum AgentRegion +{ + NoRegion, + Left, + Center, + Right +}; + +struct Marking_Struct +{ + int ourI; + int oppI; +}; + +struct Positioning_Struct +{ + int ourI; + Vector2D loc; +}; + +class WorldModel; + +class Agent : public Robot +{ + Q_OBJECT +public: + explicit Agent(); + void setID(int id); + void setWorldModel(WorldModel *wm); + void setOutputBuffer(OutputBuffer *outputBuffer); + + void SendCommand(RobotCommand rc); + void Halt(); + + AgentRole Role; + AgentStatus Status; + AgentRegion Region; + + RobotData rd; //received data from robot + Position vel2; //speed from motors speed received from robot + +private: + int id; + Controller ctrl; + Navigation nav; + OutputBuffer *outputBuffer; + WorldModel *wm; + + bool grSimPacketIsValid(grRobotData grRD); + bool controllerResultIsValid(ControllerResult co); + +}; + +#endif // AGENT_H diff --git a/src/output/controller.cpp b/src/output/controller.cpp index f05fc3a..2a29674 100644 --- a/src/output/controller.cpp +++ b/src/output/controller.cpp @@ -1,6 +1,5 @@ #include "controller.h" #include "constants.h" -#include "math.h" #define ROBOTRADIUS 0.090 #define SpeedToRPMR 5000 @@ -14,12 +13,14 @@ Controller::Controller(QObject *parent) : timer.start(); + err0 = {0,0}; err1 = {0,0}; u1 = {0,0}; derived0 = {0,0}; derived1 = {0,0}; integral = {0,0}; + last_setpoint = {0,0}; wu1 = 0; wu1_last = 0; @@ -46,13 +47,14 @@ ControllerResult Controller::calc(ControllerInput &ci) //ctrlresult.rs = calcRobotSpeed_test(ci); //qDebug() << "id" << ci.id << "timer" << time; - // ctrlresult.msR = calcReal(ctrlresult.rs); - ctrlresult.msS = calcSimul(ctrlresult.rs,ci); + ctrlresult.msR = calcReal(ctrlresult.rs); + ctrlresult.msS = calcSimul(ctrlresult.rs); return ctrlresult; } RobotSpeed Controller::calcRobotSpeed_main(ControllerInput &ci) { +<<<<<<< HEAD RobotSpeed setpoint; Vector2D speed_sp; @@ -61,24 +63,24 @@ RobotSpeed Controller::calcRobotSpeed_main(ControllerInput &ci) // //! Test -// if(fabs(Vector2D(ci.cur_pos.loc-Vector2D( 2400,-2000)).r()) < 1000 ) -// //if(ci.cur_pos.loc.x > -1000) -// wu1=0; -// if(fabs(Vector2D(ci.cur_pos.loc-Vector2D( 2400, 2000)).r()) < 1000 ) -// //if(ci.cur_pos.loc.x < -3800) -// wu1=1; + if(fabs(Vector2D(ci.cur_pos.loc-Vector2D( 2400,-2000)).r()) < 1000 ) + //if(ci.cur_pos.loc.x > -1000) + wu1=0; + if(fabs(Vector2D(ci.cur_pos.loc-Vector2D( 2400, 2000)).r()) < 1000 ) + //if(ci.cur_pos.loc.x < -3800) + wu1=1; -// ci.mid_pos.loc.x = 2400; -// ci.mid_pos.dir = M_PI; + ci.mid_pos.loc.x = 2400; + ci.mid_pos.dir = M_PI; -// if(wu1==0) -// ci.mid_pos.loc.y = 2860; -// //setpoint.VX = -2; -// else -// //setpoint.VX = 2; -// ci.mid_pos.loc.y = -2860; + if(wu1==0) + ci.mid_pos.loc.y = 2860; + //setpoint.VX = -2; + else + //setpoint.VX = 2; + ci.mid_pos.loc.y = -2860; // //! test @@ -226,21 +228,400 @@ RobotSpeed Controller::calcRobotSpeed_main(ControllerInput &ci) // setpoint.VY=0; // setpoint.VW=0; return setpoint; +======= + //double time = timer.elapsed()/1000; + //timer.restart(); + /******************************Linear Speed Controller************************************/ + err1 = (ci.mid_pos.loc - ci.cur_pos.loc)*.001; + +// if(ci.maxSpeed == 3) +// ci.maxSpeed == 4; + + + ///! +// if((ci.mid_pos.loc - last_setpoint ).length() > 30) +// { +//// qDebug() <<"L"< 1.5) + { + kp = fabs(err1.length()); + ki = 0.01; + kd = 3; + integral = integral + err1*AI_TIMER/1000.0 ; + } + else /*if(err > .04)*/ + { + integral.scale(0); + if(ci.fin_pos.loc == ci.mid_pos.loc) + { + kp = 5-2*fabs(ci.cur_vel.loc.length());fabs(err1.length())+2.9;////day2//f + if((ci.mid_pos.loc - last_setpoint ).length() > 30) + { + ki=.3; + } + last_setpoint = ci.mid_pos.loc; + } + else + { + kp = 4; + } + kd = 3; + + } + + + + + derived1 = (ci.cur_vel.loc - derived0)*0.1; + derived0 = ci.cur_vel.loc; + + + + LinearSpeed = err1*kp + integral*ki*err - derived1*kd; + + +// ////////////////////////////////////////day2 + double diff_angel = ci.cur_vel.dir - LinearSpeed.dir().radian(); + if (diff_angel > M_PI) diff_angel -= 2 * M_PI; + if (diff_angel < -M_PI) diff_angel += 2 * M_PI; + if(fabs(diff_angel) > M_PI*0.7) + { + LinearSpeed = LinearSpeed_past + (LinearSpeed - LinearSpeed_past)*0.01;//*50/(ci.mid_pos.loc - last_setpoint).length(); + + if(ci.id==8) + qDebug()<<"filter"<<(ci.mid_pos.loc - last_setpoint).length(); + } + LinearSpeed_past = LinearSpeed ; +// ////////////////////////////////////////day2 + + if(LinearSpeed.length()>ci.maxSpeed) + { + LinearSpeed.setLength(ci.maxSpeed); + } + + if(ci.id == 8) + qDebug()< M_PI) werr1 -= 2 * M_PI; + if (werr1 < -M_PI) werr1 += 2 * M_PI; + + double werr = fabs(werr1); + + + //wki=0.003*fabs(werr0); + //wintegral = wintegral + werr1*AI_TIMER; + + wkp=1*fabs(werr0);//0.3; + wkd=1; + if(werr<.3 + 10*fabs(ci.cur_vel.dir)) + { + wintegral=0; + //wintegral = wintegral - 3*werr1*AI_TIMER; + + wkp=0.4; + wkd=0.003; + } + + + + //if(ci.id == 3) + //qDebug()<MAXROTATIONSPEED) + { + wintegral = wintegral - werr1*AI_TIMER; + wu1=MAXROTATIONSPEED*sign(wu1); + } + + RotationSpeed = wu1; + + + double alpha = ci.cur_pos.dir ;+atan(RotationSpeed*0.187); + //alpha is the corrected angel whitch handle the problem + //of nonlinear relation of rotational movement and linear movement + + + + + RotLinearSpeed.x = LinearSpeed.x * cos(alpha) + LinearSpeed.y * sin(alpha); + RotLinearSpeed.y = -LinearSpeed.x * sin(alpha) + LinearSpeed.y * cos(alpha); + + RobotSpeed ans; + + ans.VX = RotLinearSpeed.x; + ans.VY = RotLinearSpeed.y; + ans.VW = RotationSpeed ; + + if(werr <0.07 /*&& err1.length()<.015*/) ans.VW=0;//maximum priscision in angel for robot becuse of it/s phisic's limits is 0.07 rad + + + if(err1.length()<.02) + { + ans.VX=0; + ans.VY=0; + } + + return ans; } +RobotSpeed Controller::calcRobotSpeed_adjt(ControllerInput &ci) +{ + float RotationSpeed; + RotationSpeed = wu1; + Vector2D RotLinearSpeed; + switch(stateCTRL) + { + case 0://jelo + RotationSpeed = 0; + werr1 = ((Vector2D(1500,0)-ci.cur_pos.loc).dir().radian()) - ci.cur_pos.dir; + if (werr1 > M_PI) werr1 -= 2 * M_PI; + if (werr1 < -M_PI) werr1 += 2 * M_PI; + RotLinearSpeed = Vector2D(1.5,0);//sorate robot jelo + if((Vector2D(1500,0) - ci.cur_pos.loc).length()>500 && fabs(werr1)>M_PI/2.0) + { + stateCTRL = 3; + } + break; + case 1://aghab + RotationSpeed = 0; + werr1 = ((Vector2D(1500,0)-ci.cur_pos.loc).dir().radian()) - ci.cur_pos.dir; + if (werr1 > M_PI) werr1 -= 2 * M_PI; + if (werr1 < -M_PI) werr1 += 2 * M_PI; + RotLinearSpeed = Vector2D(-.3,0);//sorate robot aghab + if((Vector2D(1500,0) - ci.cur_pos.loc).length()>500&& fabs(werr1) M_PI) werr1 -= 2 * M_PI; + if (werr1 < -M_PI) werr1 += 2 * M_PI; + + if(werr1<-(M_PI/18.0)) + { + RotationSpeed = -1; + } + else if(werr1>(M_PI/18.0)) + { + RotationSpeed = 1; + } + else + { + RotationSpeed = 0; + stateCTRL = 0; + } + + break; + case 3://charkhesh + RotLinearSpeed = Vector2D(0,0); + werr1 = ((Vector2D(1200,0)-ci.cur_pos.loc).dir().radian() + M_PI) - ci.cur_pos.dir; + if (werr1 > M_PI) werr1 -= 2 * M_PI; + if (werr1 < -M_PI) werr1 += 2 * M_PI; + + if(werr1<-(M_PI/18.0)) + { + RotationSpeed = -1; + } + else if(werr1>(M_PI/18.0)) + { + RotationSpeed = 1; + } + else + { + RotationSpeed = 0; + stateCTRL = 1; + } + break; + } + + + RobotSpeed ans; + + ans.VX = RotLinearSpeed.x; + ans.VY = RotLinearSpeed.y; + ans.VW = RotationSpeed; + + return ans; +>>>>>>> 4bde963eede2897a0748e0221474ee6c1450efde +} -MotorSpeed Controller::calcSimul(RobotSpeed rs, ControllerInput &ci) +RobotSpeed Controller::calcRobotSpeed_test(ControllerInput &ci) { - double motor[4][1],rotate[4][3],speed[3][1]; + float RotationSpeed; + + double ap=1; + double am=1; + double am2=1; + double t0; + //double t1,t2; + double s0; + double s3; + double s1; + double v,dt,s,sp,vb; + double tp; + double t2p; + double t3; + /******************************Linear Speed Controller************************************/ Vector2D RotLinearSpeed; - RotLinearSpeed.x = rs.VX * cos(ci.cur_pos.dir) + rs.VY * sin(ci.cur_pos.dir); - RotLinearSpeed.y = -rs.VX * sin(ci.cur_pos.dir) + rs.VY * cos(ci.cur_pos.dir); + err0 = err1; + err1 = (ci.fin_pos.loc - ci.cur_pos.loc)*.001; + + t0 = -ci.cur_vel.loc.length()/ap; + s0 = -ci.cur_vel.loc.length()*t0/2; + s3 = pow(ci.fin_vel.loc.length(),2)/(2*am); + v = 0;//sqrt(s1*2*ap); + tp = (v/ap)+t0; + t3 = (v/am) + tp; + t2p = t3 - (ci.fin_vel.loc.length()/am); + + if(v>ci.maxSpeed) + { + s = err1.length() + s0 + s3; + sp = s * pow((v-ci.maxSpeed)/v,2); + dt = sp/ci.maxSpeed; + t3 = t3 + dt; + t2p = t2p + dt; + } + + double dist; + vb=ci.maxSpeed/2.0; + if (ci.cur_vel.loc.length()dist) + { + t0 = -ci.cur_vel.loc.length()/ap; + + s0 = -ci.cur_vel.loc.length()*t0/2; + s3 = pow(ci.fin_vel.loc.length(),2)/(2*am); + s1 = (err1.length()+s0+s3)/(1+ap/am); + v = sqrt(s1*2*ap); + tp = (v/ap)+t0; + t3 = (v/am) + tp; + t2p = t3 - (ci.fin_vel.loc.length()/am); + //t2 = t2p; + double Sm = (pow(v,2)-pow(ci.fin_vel.loc.length(),2))/(2.0*am); + u1.setLength(sqrt(2.0*ap*((err1.length()-Sm))+pow(v,2))); + + } + + if(u1.length()>ci.maxSpeed) + { + u1.setLength(ci.maxSpeed); + } + Vector2D LinearSpeed; + + LinearSpeed = u1; + + RotLinearSpeed.x = LinearSpeed.x * cos(ci.cur_pos.dir) + LinearSpeed.y * sin(ci.cur_pos.dir); + RotLinearSpeed.y = -LinearSpeed.x * sin(ci.cur_pos.dir) + LinearSpeed.y * cos(ci.cur_pos.dir); + RotationSpeed=0; + RobotSpeed result; + + result.VX = RotLinearSpeed.x; + result.VY = RotLinearSpeed.y; + result.VW = RotationSpeed; + + out << err1.y <<" "<< LinearSpeed.x <<" "<< LinearSpeed.y << endl; + return result; +} + +MotorSpeed Controller::calcReal(RobotSpeed rs) +{ + double motor[4][1],rotate[4][3],speed[3][1]; + + speed[0][0] = -rs.VX; + speed[1][0] = -rs.VY; + speed[2][0] = -rs.VW; + + rotate[0][0] = cos( 0.18716 * M_PI);//cos(M_PI /4.0);//-sin(rangle + M_PI);//7/4 + rotate[1][0] = sin( M_PI / 4.0 );//-cos(0.22 * M_PI);//-sin(rangle - M_PI / 3);//0.218 + rotate[2][0] = -cos( M_PI / 4.0 );//-sin(0.22 * M_PI);//-sin(rangle + M_PI / 3);//0.78 + rotate[3][0] = -cos( 0.18716 * M_PI);//cos(M_PI /4.0);//-sin(rangle + M_PI);//5/4 + rotate[0][1] = -sin(0.18716 * M_PI );//cos(M_PI /4.0);//cos(rangle + M_PI);//7/4 + rotate[1][1] = cos(M_PI / 4.0 );//- sin(0.22 * M_PI);// cos(rangle - M_PI / 3);//0.218 + rotate[2][1] = sin(M_PI / 4.0);//cos(0.22 * M_PI);//cos(rangle + M_PI / 3);//0.187 + rotate[3][1] = -sin(0.18716 * M_PI);//-cos(M_PI /4.0);//cos(rangle + M_PI);//5/4 + + rotate[0][2] = -ROBOTRADIUS; + rotate[1][2] = -ROBOTRADIUS; + rotate[2][2] = -ROBOTRADIUS; + rotate[3][2] = -ROBOTRADIUS; + + motor[0][0] = (rotate[0][0] * speed[0][0] + rotate[0][1] * speed[1][0])*SpeedToRPM + rotate[0][2] * speed[2][0]*SpeedToRPMR; + motor[1][0] = (rotate[1][0] * speed[0][0] + rotate[1][1] * speed[1][0])*SpeedToRPM + rotate[1][2] * speed[2][0]*SpeedToRPMR; + motor[2][0] = (rotate[2][0] * speed[0][0] + rotate[2][1] * speed[1][0])*SpeedToRPM + rotate[2][2] * speed[2][0]*SpeedToRPMR; + motor[3][0] = (rotate[3][0] * speed[0][0] + rotate[3][1] * speed[1][0])*SpeedToRPM + rotate[3][2] * speed[2][0]*SpeedToRPMR; + + MotorSpeed result; + + result.M0 = (motor[0][0]); + result.M1 = (motor[1][0]); + result.M2 = (motor[2][0]); + result.M3 = (motor[3][0]); + + return result; +} + +MotorSpeed Controller::calcSimul(RobotSpeed rs) +{ + double motor[4][1],rotate[4][3],speed[3][1]; - speed[0][0] = RotLinearSpeed.x/10; - speed[1][0] = RotLinearSpeed.y/10; - speed[2][0] = rs.VW/10; + speed[0][0] = rs.VX; + speed[1][0] = rs.VY; + speed[2][0] = rs.VW; rotate[0][0] = sin(M_PI / 3);//-sin(rangle - M_PI / 3); rotate[1][0] = sin(3 * M_PI / 4);//-sin(rangle + M_PI / 3); diff --git a/src/output/controller.h b/src/output/controller.h index 5062fd5..4193952 100644 --- a/src/output/controller.h +++ b/src/output/controller.h @@ -18,7 +18,11 @@ class Controller : public QObject QTime timer; RobotSpeed calcRobotSpeed_main(ControllerInput &ci); - MotorSpeed calcSimul(RobotSpeed rs, ControllerInput &ci); + RobotSpeed calcRobotSpeed_adjt(ControllerInput &ci); + RobotSpeed calcRobotSpeed_test(ControllerInput &ci); + + MotorSpeed calcReal(RobotSpeed rs); + MotorSpeed calcSimul(RobotSpeed rs); private: @@ -34,14 +38,6 @@ class Controller : public QObject double wu1,wu1_last,wintegral,werr0,werr1; double wderived0,wderived1; - - ///////////////////////////////////////////////////////////////new controller - double wp,wi,wd; - Vector2D p,i,d,i_near,i_far; - int fault_counter; - /////////////////////////////////////////////////////////////// - - int stateCTRL; ofstream out; diff --git a/src/output/controller_struct.h b/src/output/controller_struct.h index 3f585d1..f0a68e5 100644 --- a/src/output/controller_struct.h +++ b/src/output/controller_struct.h @@ -17,7 +17,6 @@ struct ControllerInput int id; Position cur_pos; Position cur_vel; - Position last_vel; Position mid_pos; Position mid_vel; diff --git a/src/output/grpacket.cpp b/src/output/grpacket.cpp old mode 100644 new mode 100755 diff --git a/src/output/grpacket.h b/src/output/grpacket.h old mode 100644 new mode 100755 diff --git a/src/output/grsim.cpp b/src/output/grsim.cpp old mode 100644 new mode 100755 diff --git a/src/output/grsim.h b/src/output/grsim.h old mode 100644 new mode 100755 diff --git a/src/output/outputbuffer.h b/src/output/outputbuffer.h old mode 100644 new mode 100755 diff --git a/src/output/transmitter.cpp b/src/output/transmitter.cpp old mode 100644 new mode 100755 diff --git a/src/output/transmitter.h b/src/output/transmitter.h old mode 100644 new mode 100755 diff --git a/src/output/wpacket.cpp b/src/output/wpacket.cpp index e98a235..17f98c7 100644 --- a/src/output/wpacket.cpp +++ b/src/output/wpacket.cpp @@ -22,14 +22,11 @@ QByteArray WPacket::GetPacket() for(int i=0; i<_rdata.size(); i++) { - _rdata[i].Vx_sp = qToBigEndian(_rdata[i].Vx_sp); - _rdata[i].Vy_sp = qToBigEndian(_rdata[i].Vy_sp); - _rdata[i].Wr_sp = qToBigEndian(_rdata[i].Wr_sp); - _rdata[i].Vx = qToBigEndian(_rdata[i].Vx); - _rdata[i].Vy = qToBigEndian(_rdata[i].Vy); - _rdata[i].Wr = qToBigEndian(_rdata[i].Wr); - _rdata[i].alpha = qToBigEndian(_rdata[i].alpha); - rd.append((const char*)&(_rdata[i]), 18); //sizeof(RobotData); + _rdata[i].M0 = qToBigEndian(_rdata[i].M0); + _rdata[i].M1 = qToBigEndian(_rdata[i].M1); + _rdata[i].M2 = qToBigEndian(_rdata[i].M2); + _rdata[i].M3 = qToBigEndian(_rdata[i].M3); + rd.append((const char*)&(_rdata[i]), 11); //sizeof(RobotData); } unsigned char checksum=0; diff --git a/src/output/wpacket.h b/src/output/wpacket.h index 236d775..c0be0d0 100644 --- a/src/output/wpacket.h +++ b/src/output/wpacket.h @@ -29,16 +29,6 @@ struct SendPacketHeader struct RobotData { unsigned char RID; // robot id - signed short int Vx_sp; - signed short int Vy_sp; - signed short int Wr_sp; - signed short int Vx; - signed short int Vy; - signed short int Wr; - signed short int alpha; - unsigned char KICK; // kick options - unsigned char CHIP; // CHIP & SPIN #SCCCCCCC - unsigned char SPIN; signed short int M0; // motor 1 signed short int M1; // motor 2 signed short int M2; // motor 3 @@ -48,16 +38,12 @@ struct RobotData RobotData() : RID(0xFF), - Vx_sp(0), - Vy_sp(0), - Wr_sp(0), - Vx(0), - Vy(0), - Wr(0), - alpha(0), - KICK(0), - CHIP(0), - SPIN(0) + M0(0), + M1(0), + M2(0), + M3(0), + KCK(0), + CHP(0) { } }; #pragma pack(pop) /* restore original alignment from stack */ diff --git a/src/proto/Ball_message.pb.cc b/src/proto/Ball_message.pb.cc index 03079e5..2e96c91 100644 --- a/src/proto/Ball_message.pb.cc +++ b/src/proto/Ball_message.pb.cc @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -15,81 +16,106 @@ #include #include // @@protoc_insertion_point(includes) +class Ball_messageDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +Ball_messageDefaultTypeInternal _Ball_message_default_instance_; namespace { -const ::google::protobuf::Descriptor* Ball_message_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - Ball_message_reflection_ = NULL; +::google::protobuf::Metadata file_level_metadata[1]; } // namespace -void protobuf_AssignDesc_Ball_5fmessage_2eproto() { - protobuf_AddDesc_Ball_5fmessage_2eproto(); - const ::google::protobuf::FileDescriptor* file = - ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( - "Ball_message.proto"); - GOOGLE_CHECK(file != NULL); - Ball_message_descriptor_ = file->message_type(0); - static const int Ball_message_offsets_[3] = { +const ::google::protobuf::uint32* protobuf_Offsets_Ball_5fmessage_2eproto() GOOGLE_ATTRIBUTE_COLD; +const ::google::protobuf::uint32* protobuf_Offsets_Ball_5fmessage_2eproto() { + static const ::google::protobuf::uint32 offsets[] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ball_message, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ball_message, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ball_message, isvalid_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ball_message, position_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ball_message, velocity_), + 2, + 0, + 1, }; - Ball_message_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - Ball_message_descriptor_, - Ball_message::default_instance_, - Ball_message_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ball_message, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ball_message, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(Ball_message)); + return offsets; } +static const ::google::protobuf::internal::MigrationSchema schemas[] = { + { 0, 7, sizeof(Ball_message)}, +}; + +static const ::google::protobuf::internal::DefaultInstanceData file_default_instances[] = { + {reinterpret_cast(&_Ball_message_default_instance_), NULL}, +}; + namespace { -GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); -inline void protobuf_AssignDescriptorsOnce() { - ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, - &protobuf_AssignDesc_Ball_5fmessage_2eproto); +void protobuf_AssignDescriptors() { + protobuf_AddDesc_Ball_5fmessage_2eproto(); + ::google::protobuf::MessageFactory* factory = NULL; + AssignDescriptors( + "Ball_message.proto", schemas, file_default_instances, protobuf_Offsets_Ball_5fmessage_2eproto(), factory, + file_level_metadata, NULL, NULL); } +void protobuf_AssignDescriptorsOnce() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); +} + +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - Ball_message_descriptor_, &Ball_message::default_instance()); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1); } } // namespace void protobuf_ShutdownFile_Ball_5fmessage_2eproto() { - delete Ball_message::default_instance_; - delete Ball_message_reflection_; + _Ball_message_default_instance_.Shutdown(); + delete file_level_metadata[0].reflection; } -void protobuf_AddDesc_Ball_5fmessage_2eproto() { - static bool already_here = false; - if (already_here) return; - already_here = true; +void protobuf_InitDefaults_Ball_5fmessage_2eproto_impl() { GOOGLE_PROTOBUF_VERIFY_VERSION; - ::protobuf_AddDesc_position_5fmessage_2eproto(); + ::protobuf_InitDefaults_position_5fmessage_2eproto(); + ::google::protobuf::internal::InitProtobufDefaults(); + _Ball_message_default_instance_.DefaultConstruct(); + _Ball_message_default_instance_.get_mutable()->position_ = const_cast< ::position_message*>( + ::position_message::internal_default_instance()); + _Ball_message_default_instance_.get_mutable()->velocity_ = const_cast< ::position_message*>( + ::position_message::internal_default_instance()); +} + +void protobuf_InitDefaults_Ball_5fmessage_2eproto() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_InitDefaults_Ball_5fmessage_2eproto_impl); +} +void protobuf_AddDesc_Ball_5fmessage_2eproto_impl() { + protobuf_InitDefaults_Ball_5fmessage_2eproto(); + static const char descriptor[] = { + "\n\022Ball_message.proto\032\026position_message.p" + "roto\"i\n\014Ball_message\022\017\n\007isValid\030\001 \002(\010\022#\n" + "\010position\030\002 \002(\0132\021.position_message\022#\n\010ve" + "locity\030\003 \002(\0132\021.position_message" + }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - "\n\022Ball_message.proto\032\026position_message.p" - "roto\"i\n\014Ball_message\022\017\n\007isValid\030\001 \002(\010\022#\n" - "\010position\030\002 \002(\0132\021.position_message\022#\n\010ve" - "locity\030\003 \002(\0132\021.position_message", 151); + descriptor, 151); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "Ball_message.proto", &protobuf_RegisterTypes); - Ball_message::default_instance_ = new Ball_message(); - Ball_message::default_instance_->InitAsDefaultInstance(); + ::protobuf_AddDesc_position_5fmessage_2eproto(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_Ball_5fmessage_2eproto); } +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_Ball_5fmessage_2eproto_once_); +void protobuf_AddDesc_Ball_5fmessage_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_Ball_5fmessage_2eproto_once_, + &protobuf_AddDesc_Ball_5fmessage_2eproto_impl); +} // Force AddDescriptors() to be called at static initialization time. struct StaticDescriptorInitializer_Ball_5fmessage_2eproto { StaticDescriptorInitializer_Ball_5fmessage_2eproto() { @@ -99,43 +125,56 @@ struct StaticDescriptorInitializer_Ball_5fmessage_2eproto { // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int Ball_message::kIsValidFieldNumber; const int Ball_message::kPositionFieldNumber; const int Ball_message::kVelocityFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 Ball_message::Ball_message() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_Ball_5fmessage_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:Ball_message) } - -void Ball_message::InitAsDefaultInstance() { - position_ = const_cast< ::position_message*>(&::position_message::default_instance()); - velocity_ = const_cast< ::position_message*>(&::position_message::default_instance()); -} - Ball_message::Ball_message(const Ball_message& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from.has_position()) { + position_ = new ::position_message(*from.position_); + } else { + position_ = NULL; + } + if (from.has_velocity()) { + velocity_ = new ::position_message(*from.velocity_); + } else { + velocity_ = NULL; + } + isvalid_ = from.isvalid_; + // @@protoc_insertion_point(copy_constructor:Ball_message) } void Ball_message::SharedCtor() { _cached_size_ = 0; - isvalid_ = false; - position_ = NULL; - velocity_ = NULL; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); + ::memset(&position_, 0, reinterpret_cast(&isvalid_) - + reinterpret_cast(&position_) + sizeof(isvalid_)); } Ball_message::~Ball_message() { + // @@protoc_insertion_point(destructor:Ball_message) SharedDtor(); } void Ball_message::SharedDtor() { - if (this != default_instance_) { + if (this != internal_default_instance()) { delete position_; + } + if (this != internal_default_instance()) { delete velocity_; } } @@ -147,88 +186,90 @@ void Ball_message::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* Ball_message::descriptor() { protobuf_AssignDescriptorsOnce(); - return Ball_message_descriptor_; + return file_level_metadata[0].descriptor; } const Ball_message& Ball_message::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_Ball_5fmessage_2eproto(); - return *default_instance_; + protobuf_InitDefaults_Ball_5fmessage_2eproto(); + return *internal_default_instance(); } -Ball_message* Ball_message::default_instance_ = NULL; - -Ball_message* Ball_message::New() const { - return new Ball_message; +Ball_message* Ball_message::New(::google::protobuf::Arena* arena) const { + Ball_message* n = new Ball_message; + if (arena != NULL) { + arena->Own(n); + } + return n; } void Ball_message::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - isvalid_ = false; +// @@protoc_insertion_point(message_clear_start:Ball_message) + if (_has_bits_[0 / 32] & 3u) { if (has_position()) { - if (position_ != NULL) position_->::position_message::Clear(); + GOOGLE_DCHECK(position_ != NULL); + position_->::position_message::Clear(); } if (has_velocity()) { - if (velocity_ != NULL) velocity_->::position_message::Clear(); + GOOGLE_DCHECK(velocity_ != NULL); + velocity_->::position_message::Clear(); } } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + isvalid_ = false; + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool Ball_message::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:Ball_message) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required bool isValid = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + if (tag == 8u) { + set_has_isvalid(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( input, &isvalid_))); - set_has_isvalid(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(18)) goto parse_position; break; } // required .position_message position = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_position: + if (tag == 18u) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_position())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(26)) goto parse_velocity; break; } // required .position_message velocity = 3; case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_velocity: + if (tag == 26u) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_velocity())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectAtEnd()) return true; break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -236,12 +277,18 @@ bool Ball_message::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:Ball_message) return true; +failure: + // @@protoc_insertion_point(parse_failure:Ball_message) + return false; #undef DO_ } void Ball_message::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:Ball_message) // required bool isValid = 1; if (has_isvalid()) { ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->isvalid(), output); @@ -250,23 +297,26 @@ void Ball_message::SerializeWithCachedSizes( // required .position_message position = 2; if (has_position()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, this->position(), output); + 2, *this->position_, output); } // required .position_message velocity = 3; if (has_velocity()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, this->velocity(), output); + 3, *this->velocity_, output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:Ball_message) } -::google::protobuf::uint8* Ball_message::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* Ball_message::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:Ball_message) // required bool isValid = 1; if (has_isvalid()) { target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->isvalid(), target); @@ -275,94 +325,124 @@ ::google::protobuf::uint8* Ball_message::SerializeWithCachedSizesToArray( // required .position_message position = 2; if (has_position()) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 2, this->position(), target); + InternalWriteMessageNoVirtualToArray( + 2, *this->position_, false, target); } // required .position_message velocity = 3; if (has_velocity()) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 3, this->velocity(), target); + InternalWriteMessageNoVirtualToArray( + 3, *this->velocity_, false, target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:Ball_message) return target; } -int Ball_message::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // required bool isValid = 1; - if (has_isvalid()) { - total_size += 1 + 1; - } +size_t Ball_message::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:Ball_message) + size_t total_size = 0; + if (has_position()) { // required .position_message position = 2; - if (has_position()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->position()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->position_); + } + if (has_velocity()) { // required .position_message velocity = 3; - if (has_velocity()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->velocity()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->velocity_); + } + if (has_isvalid()) { + // required bool isValid = 1; + total_size += 1 + 1; } - if (!unknown_fields().empty()) { + + return total_size; +} +size_t Ball_message::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Ball_message) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( unknown_fields()); } + if (((_has_bits_[0] & 0x00000007) ^ 0x00000007) == 0) { // All required fields are present. + // required .position_message position = 2; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->position_); + + // required .position_message velocity = 3; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->velocity_); + + // required bool isValid = 1; + total_size += 1 + 1; + + } else { + total_size += RequiredFieldsByteSizeFallback(); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void Ball_message::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:Ball_message) + GOOGLE_DCHECK_NE(&from, this); const Ball_message* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Ball_message) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Ball_message) MergeFrom(*source); } } void Ball_message::MergeFrom(const Ball_message& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_isvalid()) { - set_isvalid(from.isvalid()); - } +// @@protoc_insertion_point(class_specific_merge_from_start:Ball_message) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._has_bits_[0 / 32] & 7u) { if (from.has_position()) { mutable_position()->::position_message::MergeFrom(from.position()); } if (from.has_velocity()) { mutable_velocity()->::position_message::MergeFrom(from.velocity()); } + if (from.has_isvalid()) { + set_isvalid(from.isvalid()); + } } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void Ball_message::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Ball_message) if (&from == this) return; Clear(); MergeFrom(from); } void Ball_message::CopyFrom(const Ball_message& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Ball_message) if (&from == this) return; Clear(); MergeFrom(from); @@ -370,35 +450,151 @@ void Ball_message::CopyFrom(const Ball_message& from) { bool Ball_message::IsInitialized() const { if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false; - if (has_position()) { - if (!this->position().IsInitialized()) return false; + if (!this->position_->IsInitialized()) return false; } if (has_velocity()) { - if (!this->velocity().IsInitialized()) return false; + if (!this->velocity_->IsInitialized()) return false; } return true; } void Ball_message::Swap(Ball_message* other) { - if (other != this) { - std::swap(isvalid_, other->isvalid_); - std::swap(position_, other->position_); - std::swap(velocity_, other->velocity_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void Ball_message::InternalSwap(Ball_message* other) { + std::swap(position_, other->position_); + std::swap(velocity_, other->velocity_); + std::swap(isvalid_, other->isvalid_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata Ball_message::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = Ball_message_descriptor_; - metadata.reflection = Ball_message_reflection_; - return metadata; + return file_level_metadata[0]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// Ball_message + +// required bool isValid = 1; +bool Ball_message::has_isvalid() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +void Ball_message::set_has_isvalid() { + _has_bits_[0] |= 0x00000004u; +} +void Ball_message::clear_has_isvalid() { + _has_bits_[0] &= ~0x00000004u; +} +void Ball_message::clear_isvalid() { + isvalid_ = false; + clear_has_isvalid(); +} +bool Ball_message::isvalid() const { + // @@protoc_insertion_point(field_get:Ball_message.isValid) + return isvalid_; +} +void Ball_message::set_isvalid(bool value) { + set_has_isvalid(); + isvalid_ = value; + // @@protoc_insertion_point(field_set:Ball_message.isValid) +} + +// required .position_message position = 2; +bool Ball_message::has_position() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void Ball_message::set_has_position() { + _has_bits_[0] |= 0x00000001u; +} +void Ball_message::clear_has_position() { + _has_bits_[0] &= ~0x00000001u; +} +void Ball_message::clear_position() { + if (position_ != NULL) position_->::position_message::Clear(); + clear_has_position(); +} +const ::position_message& Ball_message::position() const { + // @@protoc_insertion_point(field_get:Ball_message.position) + return position_ != NULL ? *position_ + : *::position_message::internal_default_instance(); +} +::position_message* Ball_message::mutable_position() { + set_has_position(); + if (position_ == NULL) { + position_ = new ::position_message; + } + // @@protoc_insertion_point(field_mutable:Ball_message.position) + return position_; +} +::position_message* Ball_message::release_position() { + // @@protoc_insertion_point(field_release:Ball_message.position) + clear_has_position(); + ::position_message* temp = position_; + position_ = NULL; + return temp; +} +void Ball_message::set_allocated_position(::position_message* position) { + delete position_; + position_ = position; + if (position) { + set_has_position(); + } else { + clear_has_position(); + } + // @@protoc_insertion_point(field_set_allocated:Ball_message.position) +} + +// required .position_message velocity = 3; +bool Ball_message::has_velocity() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +void Ball_message::set_has_velocity() { + _has_bits_[0] |= 0x00000002u; +} +void Ball_message::clear_has_velocity() { + _has_bits_[0] &= ~0x00000002u; +} +void Ball_message::clear_velocity() { + if (velocity_ != NULL) velocity_->::position_message::Clear(); + clear_has_velocity(); +} +const ::position_message& Ball_message::velocity() const { + // @@protoc_insertion_point(field_get:Ball_message.velocity) + return velocity_ != NULL ? *velocity_ + : *::position_message::internal_default_instance(); +} +::position_message* Ball_message::mutable_velocity() { + set_has_velocity(); + if (velocity_ == NULL) { + velocity_ = new ::position_message; + } + // @@protoc_insertion_point(field_mutable:Ball_message.velocity) + return velocity_; +} +::position_message* Ball_message::release_velocity() { + // @@protoc_insertion_point(field_release:Ball_message.velocity) + clear_has_velocity(); + ::position_message* temp = velocity_; + velocity_ = NULL; + return temp; +} +void Ball_message::set_allocated_velocity(::position_message* velocity) { + delete velocity_; + velocity_ = velocity; + if (velocity) { + set_has_velocity(); + } else { + clear_has_velocity(); + } + // @@protoc_insertion_point(field_set_allocated:Ball_message.velocity) } +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) diff --git a/src/proto/Ball_message.pb.h b/src/proto/Ball_message.pb.h index 059e7d0..371acec 100644 --- a/src/proto/Ball_message.pb.h +++ b/src/proto/Ball_message.pb.h @@ -8,35 +8,41 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 2005000 +#if GOOGLE_PROTOBUF_VERSION < 3001000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. #endif +#include +#include #include +#include #include -#include -#include +#include // IWYU pragma: export +#include // IWYU pragma: export #include #include "position_message.pb.h" // @@protoc_insertion_point(includes) +class Ball_message; +class Ball_messageDefaultTypeInternal; +extern Ball_messageDefaultTypeInternal _Ball_message_default_instance_; +class position_message; +class position_messageDefaultTypeInternal; +extern position_messageDefaultTypeInternal _position_message_default_instance_; // Internal implementation detail -- do not call these. -void protobuf_AddDesc_Ball_5fmessage_2eproto(); -void protobuf_AssignDesc_Ball_5fmessage_2eproto(); -void protobuf_ShutdownFile_Ball_5fmessage_2eproto(); - -class Ball_message; +void protobuf_AddDesc_Ball_5fmessage_2eproto(); +void protobuf_InitDefaults_Ball_5fmessage_2eproto(); // =================================================================== -class Ball_message : public ::google::protobuf::Message { +class Ball_message : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:Ball_message) */ { public: Ball_message(); virtual ~Ball_message(); @@ -49,149 +55,177 @@ class Ball_message : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const Ball_message& default_instance(); + static inline const Ball_message* internal_default_instance() { + return reinterpret_cast( + &_Ball_message_default_instance_); + } + void Swap(Ball_message* other); // implements Message ---------------------------------------------- - Ball_message* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline Ball_message* New() const PROTOBUF_FINAL { return New(NULL); } + + Ball_message* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const Ball_message& from); void MergeFrom(const Ball_message& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(Ball_message* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // required bool isValid = 1; - inline bool has_isvalid() const; - inline void clear_isvalid(); + bool has_isvalid() const; + void clear_isvalid(); static const int kIsValidFieldNumber = 1; - inline bool isvalid() const; - inline void set_isvalid(bool value); + bool isvalid() const; + void set_isvalid(bool value); // required .position_message position = 2; - inline bool has_position() const; - inline void clear_position(); + bool has_position() const; + void clear_position(); static const int kPositionFieldNumber = 2; - inline const ::position_message& position() const; - inline ::position_message* mutable_position(); - inline ::position_message* release_position(); - inline void set_allocated_position(::position_message* position); + const ::position_message& position() const; + ::position_message* mutable_position(); + ::position_message* release_position(); + void set_allocated_position(::position_message* position); // required .position_message velocity = 3; - inline bool has_velocity() const; - inline void clear_velocity(); + bool has_velocity() const; + void clear_velocity(); static const int kVelocityFieldNumber = 3; - inline const ::position_message& velocity() const; - inline ::position_message* mutable_velocity(); - inline ::position_message* release_velocity(); - inline void set_allocated_velocity(::position_message* velocity); + const ::position_message& velocity() const; + ::position_message* mutable_velocity(); + ::position_message* release_velocity(); + void set_allocated_velocity(::position_message* velocity); // @@protoc_insertion_point(class_scope:Ball_message) private: - inline void set_has_isvalid(); - inline void clear_has_isvalid(); - inline void set_has_position(); - inline void clear_has_position(); - inline void set_has_velocity(); - inline void clear_has_velocity(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + void set_has_isvalid(); + void clear_has_isvalid(); + void set_has_position(); + void clear_has_position(); + void set_has_velocity(); + void clear_has_velocity(); + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; ::position_message* position_; ::position_message* velocity_; bool isvalid_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; - - friend void protobuf_AddDesc_Ball_5fmessage_2eproto(); - friend void protobuf_AssignDesc_Ball_5fmessage_2eproto(); + friend void protobuf_InitDefaults_Ball_5fmessage_2eproto_impl(); + friend void protobuf_AddDesc_Ball_5fmessage_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_Ball_5fmessage_2eproto(); friend void protobuf_ShutdownFile_Ball_5fmessage_2eproto(); - void InitAsDefaultInstance(); - static Ball_message* default_instance_; }; // =================================================================== // =================================================================== +#if !PROTOBUF_INLINE_NOT_IN_HEADERS // Ball_message // required bool isValid = 1; inline bool Ball_message::has_isvalid() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return (_has_bits_[0] & 0x00000004u) != 0; } inline void Ball_message::set_has_isvalid() { - _has_bits_[0] |= 0x00000001u; + _has_bits_[0] |= 0x00000004u; } inline void Ball_message::clear_has_isvalid() { - _has_bits_[0] &= ~0x00000001u; + _has_bits_[0] &= ~0x00000004u; } inline void Ball_message::clear_isvalid() { isvalid_ = false; clear_has_isvalid(); } inline bool Ball_message::isvalid() const { + // @@protoc_insertion_point(field_get:Ball_message.isValid) return isvalid_; } inline void Ball_message::set_isvalid(bool value) { set_has_isvalid(); isvalid_ = value; + // @@protoc_insertion_point(field_set:Ball_message.isValid) } // required .position_message position = 2; inline bool Ball_message::has_position() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return (_has_bits_[0] & 0x00000001u) != 0; } inline void Ball_message::set_has_position() { - _has_bits_[0] |= 0x00000002u; + _has_bits_[0] |= 0x00000001u; } inline void Ball_message::clear_has_position() { - _has_bits_[0] &= ~0x00000002u; + _has_bits_[0] &= ~0x00000001u; } inline void Ball_message::clear_position() { if (position_ != NULL) position_->::position_message::Clear(); clear_has_position(); } inline const ::position_message& Ball_message::position() const { - return position_ != NULL ? *position_ : *default_instance_->position_; + // @@protoc_insertion_point(field_get:Ball_message.position) + return position_ != NULL ? *position_ + : *::position_message::internal_default_instance(); } inline ::position_message* Ball_message::mutable_position() { set_has_position(); - if (position_ == NULL) position_ = new ::position_message; + if (position_ == NULL) { + position_ = new ::position_message; + } + // @@protoc_insertion_point(field_mutable:Ball_message.position) return position_; } inline ::position_message* Ball_message::release_position() { + // @@protoc_insertion_point(field_release:Ball_message.position) clear_has_position(); ::position_message* temp = position_; position_ = NULL; @@ -205,31 +239,38 @@ inline void Ball_message::set_allocated_position(::position_message* position) { } else { clear_has_position(); } + // @@protoc_insertion_point(field_set_allocated:Ball_message.position) } // required .position_message velocity = 3; inline bool Ball_message::has_velocity() const { - return (_has_bits_[0] & 0x00000004u) != 0; + return (_has_bits_[0] & 0x00000002u) != 0; } inline void Ball_message::set_has_velocity() { - _has_bits_[0] |= 0x00000004u; + _has_bits_[0] |= 0x00000002u; } inline void Ball_message::clear_has_velocity() { - _has_bits_[0] &= ~0x00000004u; + _has_bits_[0] &= ~0x00000002u; } inline void Ball_message::clear_velocity() { if (velocity_ != NULL) velocity_->::position_message::Clear(); clear_has_velocity(); } inline const ::position_message& Ball_message::velocity() const { - return velocity_ != NULL ? *velocity_ : *default_instance_->velocity_; + // @@protoc_insertion_point(field_get:Ball_message.velocity) + return velocity_ != NULL ? *velocity_ + : *::position_message::internal_default_instance(); } inline ::position_message* Ball_message::mutable_velocity() { set_has_velocity(); - if (velocity_ == NULL) velocity_ = new ::position_message; + if (velocity_ == NULL) { + velocity_ = new ::position_message; + } + // @@protoc_insertion_point(field_mutable:Ball_message.velocity) return velocity_; } inline ::position_message* Ball_message::release_velocity() { + // @@protoc_insertion_point(field_release:Ball_message.velocity) clear_has_velocity(); ::position_message* temp = velocity_; velocity_ = NULL; @@ -243,19 +284,13 @@ inline void Ball_message::set_allocated_velocity(::position_message* velocity) { } else { clear_has_velocity(); } + // @@protoc_insertion_point(field_set_allocated:Ball_message.velocity) } +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) -#ifndef SWIG -namespace google { -namespace protobuf { - - -} // namespace google -} // namespace protobuf -#endif // SWIG // @@protoc_insertion_point(global_scope) diff --git a/src/proto/RobotCommand_message.pb.cc b/src/proto/RobotCommand_message.pb.cc index 5cbc3b2..76323cb 100644 --- a/src/proto/RobotCommand_message.pb.cc +++ b/src/proto/RobotCommand_message.pb.cc @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -15,24 +16,23 @@ #include #include // @@protoc_insertion_point(includes) +class RobotCommand_messageDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +RobotCommand_messageDefaultTypeInternal _RobotCommand_message_default_instance_; namespace { -const ::google::protobuf::Descriptor* RobotCommand_message_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - RobotCommand_message_reflection_ = NULL; +::google::protobuf::Metadata file_level_metadata[1]; } // namespace -void protobuf_AssignDesc_RobotCommand_5fmessage_2eproto() { - protobuf_AddDesc_RobotCommand_5fmessage_2eproto(); - const ::google::protobuf::FileDescriptor* file = - ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( - "RobotCommand_message.proto"); - GOOGLE_CHECK(file != NULL); - RobotCommand_message_descriptor_ = file->message_type(0); - static const int RobotCommand_message_offsets_[8] = { +const ::google::protobuf::uint32* protobuf_Offsets_RobotCommand_5fmessage_2eproto() GOOGLE_ATTRIBUTE_COLD; +const ::google::protobuf::uint32* protobuf_Offsets_RobotCommand_5fmessage_2eproto() { + static const ::google::protobuf::uint32 offsets[] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RobotCommand_message, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RobotCommand_message, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RobotCommand_message, fin_pos_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RobotCommand_message, fin_vel_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RobotCommand_message, maxspeed_), @@ -41,63 +41,94 @@ void protobuf_AssignDesc_RobotCommand_5fmessage_2eproto() { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RobotCommand_message, usenav_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RobotCommand_message, isballobs_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RobotCommand_message, iskickobs_), + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, }; - RobotCommand_message_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - RobotCommand_message_descriptor_, - RobotCommand_message::default_instance_, - RobotCommand_message_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RobotCommand_message, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RobotCommand_message, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(RobotCommand_message)); + return offsets; } +static const ::google::protobuf::internal::MigrationSchema schemas[] = { + { 0, 12, sizeof(RobotCommand_message)}, +}; + +static const ::google::protobuf::internal::DefaultInstanceData file_default_instances[] = { + {reinterpret_cast(&_RobotCommand_message_default_instance_), NULL}, +}; + namespace { -GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); -inline void protobuf_AssignDescriptorsOnce() { - ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, - &protobuf_AssignDesc_RobotCommand_5fmessage_2eproto); +void protobuf_AssignDescriptors() { + protobuf_AddDesc_RobotCommand_5fmessage_2eproto(); + ::google::protobuf::MessageFactory* factory = NULL; + AssignDescriptors( + "RobotCommand_message.proto", schemas, file_default_instances, protobuf_Offsets_RobotCommand_5fmessage_2eproto(), factory, + file_level_metadata, NULL, NULL); +} + +void protobuf_AssignDescriptorsOnce() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); } +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - RobotCommand_message_descriptor_, &RobotCommand_message::default_instance()); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1); } } // namespace void protobuf_ShutdownFile_RobotCommand_5fmessage_2eproto() { - delete RobotCommand_message::default_instance_; - delete RobotCommand_message_reflection_; + _RobotCommand_message_default_instance_.Shutdown(); + delete file_level_metadata[0].reflection; } -void protobuf_AddDesc_RobotCommand_5fmessage_2eproto() { - static bool already_here = false; - if (already_here) return; - already_here = true; +void protobuf_InitDefaults_RobotCommand_5fmessage_2eproto_impl() { GOOGLE_PROTOBUF_VERIFY_VERSION; - ::protobuf_AddDesc_position_5fmessage_2eproto(); + ::protobuf_InitDefaults_position_5fmessage_2eproto(); + ::google::protobuf::internal::InitProtobufDefaults(); + _RobotCommand_message_default_instance_.DefaultConstruct(); + _RobotCommand_message_default_instance_.get_mutable()->fin_pos_ = const_cast< ::position_message*>( + ::position_message::internal_default_instance()); + _RobotCommand_message_default_instance_.get_mutable()->fin_vel_ = const_cast< ::position_message*>( + ::position_message::internal_default_instance()); +} + +void protobuf_InitDefaults_RobotCommand_5fmessage_2eproto() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_InitDefaults_RobotCommand_5fmessage_2eproto_impl); +} +void protobuf_AddDesc_RobotCommand_5fmessage_2eproto_impl() { + protobuf_InitDefaults_RobotCommand_5fmessage_2eproto(); + static const char descriptor[] = { + "\n\032RobotCommand_message.proto\032\026position_m" + "essage.proto\"\316\001\n\024RobotCommand_message\022\"\n" + "\007fin_pos\030\001 \002(\0132\021.position_message\022\"\n\007fin" + "_vel\030\002 \002(\0132\021.position_message\022\020\n\010maxSpee" + "d\030\003 \002(\002\022\022\n\nkickspeedx\030\004 \002(\002\022\022\n\nkickspeed" + "z\030\005 \002(\002\022\016\n\006useNav\030\006 \002(\010\022\021\n\tisBallObs\030\007 \002" + "(\010\022\021\n\tisKickObs\030\010 \002(\010" + }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - "\n\032RobotCommand_message.proto\032\026position_m" - "essage.proto\"\316\001\n\024RobotCommand_message\022\"\n" - "\007fin_pos\030\001 \002(\0132\021.position_message\022\"\n\007fin" - "_vel\030\002 \002(\0132\021.position_message\022\020\n\010maxSpee" - "d\030\003 \002(\002\022\022\n\nkickspeedx\030\004 \002(\002\022\022\n\nkickspeed" - "z\030\005 \002(\002\022\016\n\006useNav\030\006 \002(\010\022\021\n\tisBallObs\030\007 \002" - "(\010\022\021\n\tisKickObs\030\010 \002(\010", 261); + descriptor, 261); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "RobotCommand_message.proto", &protobuf_RegisterTypes); - RobotCommand_message::default_instance_ = new RobotCommand_message(); - RobotCommand_message::default_instance_->InitAsDefaultInstance(); + ::protobuf_AddDesc_position_5fmessage_2eproto(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_RobotCommand_5fmessage_2eproto); } +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_RobotCommand_5fmessage_2eproto_once_); +void protobuf_AddDesc_RobotCommand_5fmessage_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_RobotCommand_5fmessage_2eproto_once_, + &protobuf_AddDesc_RobotCommand_5fmessage_2eproto_impl); +} // Force AddDescriptors() to be called at static initialization time. struct StaticDescriptorInitializer_RobotCommand_5fmessage_2eproto { StaticDescriptorInitializer_RobotCommand_5fmessage_2eproto() { @@ -107,7 +138,7 @@ struct StaticDescriptorInitializer_RobotCommand_5fmessage_2eproto { // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int RobotCommand_message::kFinPosFieldNumber; const int RobotCommand_message::kFinVelFieldNumber; const int RobotCommand_message::kMaxSpeedFieldNumber; @@ -116,44 +147,54 @@ const int RobotCommand_message::kKickspeedzFieldNumber; const int RobotCommand_message::kUseNavFieldNumber; const int RobotCommand_message::kIsBallObsFieldNumber; const int RobotCommand_message::kIsKickObsFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 RobotCommand_message::RobotCommand_message() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_RobotCommand_5fmessage_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:RobotCommand_message) } - -void RobotCommand_message::InitAsDefaultInstance() { - fin_pos_ = const_cast< ::position_message*>(&::position_message::default_instance()); - fin_vel_ = const_cast< ::position_message*>(&::position_message::default_instance()); -} - RobotCommand_message::RobotCommand_message(const RobotCommand_message& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from.has_fin_pos()) { + fin_pos_ = new ::position_message(*from.fin_pos_); + } else { + fin_pos_ = NULL; + } + if (from.has_fin_vel()) { + fin_vel_ = new ::position_message(*from.fin_vel_); + } else { + fin_vel_ = NULL; + } + ::memcpy(&maxspeed_, &from.maxspeed_, + reinterpret_cast(&iskickobs_) - + reinterpret_cast(&maxspeed_) + sizeof(iskickobs_)); + // @@protoc_insertion_point(copy_constructor:RobotCommand_message) } void RobotCommand_message::SharedCtor() { _cached_size_ = 0; - fin_pos_ = NULL; - fin_vel_ = NULL; - maxspeed_ = 0; - kickspeedx_ = 0; - kickspeedz_ = 0; - usenav_ = false; - isballobs_ = false; - iskickobs_ = false; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); + ::memset(&fin_pos_, 0, reinterpret_cast(&iskickobs_) - + reinterpret_cast(&fin_pos_) + sizeof(iskickobs_)); } RobotCommand_message::~RobotCommand_message() { + // @@protoc_insertion_point(destructor:RobotCommand_message) SharedDtor(); } void RobotCommand_message::SharedDtor() { - if (this != default_instance_) { + if (this != internal_default_instance()) { delete fin_pos_; + } + if (this != internal_default_instance()) { delete fin_vel_; } } @@ -165,173 +206,158 @@ void RobotCommand_message::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* RobotCommand_message::descriptor() { protobuf_AssignDescriptorsOnce(); - return RobotCommand_message_descriptor_; + return file_level_metadata[0].descriptor; } const RobotCommand_message& RobotCommand_message::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_RobotCommand_5fmessage_2eproto(); - return *default_instance_; + protobuf_InitDefaults_RobotCommand_5fmessage_2eproto(); + return *internal_default_instance(); } -RobotCommand_message* RobotCommand_message::default_instance_ = NULL; - -RobotCommand_message* RobotCommand_message::New() const { - return new RobotCommand_message; +RobotCommand_message* RobotCommand_message::New(::google::protobuf::Arena* arena) const { + RobotCommand_message* n = new RobotCommand_message; + if (arena != NULL) { + arena->Own(n); + } + return n; } void RobotCommand_message::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { +// @@protoc_insertion_point(message_clear_start:RobotCommand_message) + if (_has_bits_[0 / 32] & 3u) { if (has_fin_pos()) { - if (fin_pos_ != NULL) fin_pos_->::position_message::Clear(); + GOOGLE_DCHECK(fin_pos_ != NULL); + fin_pos_->::position_message::Clear(); } if (has_fin_vel()) { - if (fin_vel_ != NULL) fin_vel_->::position_message::Clear(); + GOOGLE_DCHECK(fin_vel_ != NULL); + fin_vel_->::position_message::Clear(); } - maxspeed_ = 0; - kickspeedx_ = 0; - kickspeedz_ = 0; - usenav_ = false; - isballobs_ = false; - iskickobs_ = false; } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + if (_has_bits_[0 / 32] & 252u) { + ::memset(&maxspeed_, 0, reinterpret_cast(&iskickobs_) - + reinterpret_cast(&maxspeed_) + sizeof(iskickobs_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool RobotCommand_message::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:RobotCommand_message) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required .position_message fin_pos = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + if (tag == 10u) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_fin_pos())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(18)) goto parse_fin_vel; break; } // required .position_message fin_vel = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_fin_vel: + if (tag == 18u) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_fin_vel())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(29)) goto parse_maxSpeed; break; } // required float maxSpeed = 3; case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_maxSpeed: + if (tag == 29u) { + set_has_maxspeed(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &maxspeed_))); - set_has_maxspeed(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(37)) goto parse_kickspeedx; break; } // required float kickspeedx = 4; case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_kickspeedx: + if (tag == 37u) { + set_has_kickspeedx(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &kickspeedx_))); - set_has_kickspeedx(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(45)) goto parse_kickspeedz; break; } // required float kickspeedz = 5; case 5: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_kickspeedz: + if (tag == 45u) { + set_has_kickspeedz(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &kickspeedz_))); - set_has_kickspeedz(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(48)) goto parse_useNav; break; } // required bool useNav = 6; case 6: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_useNav: + if (tag == 48u) { + set_has_usenav(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( input, &usenav_))); - set_has_usenav(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(56)) goto parse_isBallObs; break; } // required bool isBallObs = 7; case 7: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_isBallObs: + if (tag == 56u) { + set_has_isballobs(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( input, &isballobs_))); - set_has_isballobs(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(64)) goto parse_isKickObs; break; } // required bool isKickObs = 8; case 8: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_isKickObs: + if (tag == 64u) { + set_has_iskickobs(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( input, &iskickobs_))); - set_has_iskickobs(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectAtEnd()) return true; break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -339,22 +365,28 @@ bool RobotCommand_message::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:RobotCommand_message) return true; +failure: + // @@protoc_insertion_point(parse_failure:RobotCommand_message) + return false; #undef DO_ } void RobotCommand_message::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:RobotCommand_message) // required .position_message fin_pos = 1; if (has_fin_pos()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, this->fin_pos(), output); + 1, *this->fin_pos_, output); } // required .position_message fin_vel = 2; if (has_fin_vel()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, this->fin_vel(), output); + 2, *this->fin_vel_, output); } // required float maxSpeed = 3; @@ -387,26 +419,29 @@ void RobotCommand_message::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteBool(8, this->iskickobs(), output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:RobotCommand_message) } -::google::protobuf::uint8* RobotCommand_message::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* RobotCommand_message::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:RobotCommand_message) // required .position_message fin_pos = 1; if (has_fin_pos()) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 1, this->fin_pos(), target); + InternalWriteMessageNoVirtualToArray( + 1, *this->fin_pos_, false, target); } // required .position_message fin_vel = 2; if (has_fin_vel()) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 2, this->fin_vel(), target); + InternalWriteMessageNoVirtualToArray( + 2, *this->fin_vel_, false, target); } // required float maxSpeed = 3; @@ -439,88 +474,132 @@ ::google::protobuf::uint8* RobotCommand_message::SerializeWithCachedSizesToArray target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(8, this->iskickobs(), target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:RobotCommand_message) return target; } -int RobotCommand_message::ByteSize() const { - int total_size = 0; +size_t RobotCommand_message::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:RobotCommand_message) + size_t total_size = 0; - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_fin_pos()) { // required .position_message fin_pos = 1; - if (has_fin_pos()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->fin_pos()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->fin_pos_); + } + if (has_fin_vel()) { // required .position_message fin_vel = 2; - if (has_fin_vel()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->fin_vel()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->fin_vel_); + } + if (has_maxspeed()) { // required float maxSpeed = 3; - if (has_maxspeed()) { - total_size += 1 + 4; - } + total_size += 1 + 4; + } + if (has_kickspeedx()) { // required float kickspeedx = 4; - if (has_kickspeedx()) { - total_size += 1 + 4; - } + total_size += 1 + 4; + } + if (has_kickspeedz()) { // required float kickspeedz = 5; - if (has_kickspeedz()) { - total_size += 1 + 4; - } + total_size += 1 + 4; + } + if (has_usenav()) { // required bool useNav = 6; - if (has_usenav()) { - total_size += 1 + 1; - } + total_size += 1 + 1; + } + if (has_isballobs()) { // required bool isBallObs = 7; - if (has_isballobs()) { - total_size += 1 + 1; - } + total_size += 1 + 1; + } + if (has_iskickobs()) { // required bool isKickObs = 8; - if (has_iskickobs()) { - total_size += 1 + 1; - } - + total_size += 1 + 1; } - if (!unknown_fields().empty()) { + + return total_size; +} +size_t RobotCommand_message::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:RobotCommand_message) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( unknown_fields()); } + if (((_has_bits_[0] & 0x000000ff) ^ 0x000000ff) == 0) { // All required fields are present. + // required .position_message fin_pos = 1; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->fin_pos_); + + // required .position_message fin_vel = 2; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->fin_vel_); + + // required float maxSpeed = 3; + total_size += 1 + 4; + + // required float kickspeedx = 4; + total_size += 1 + 4; + + // required float kickspeedz = 5; + total_size += 1 + 4; + + // required bool useNav = 6; + total_size += 1 + 1; + + // required bool isBallObs = 7; + total_size += 1 + 1; + + // required bool isKickObs = 8; + total_size += 1 + 1; + + } else { + total_size += RequiredFieldsByteSizeFallback(); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void RobotCommand_message::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:RobotCommand_message) + GOOGLE_DCHECK_NE(&from, this); const RobotCommand_message* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:RobotCommand_message) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:RobotCommand_message) MergeFrom(*source); } } void RobotCommand_message::MergeFrom(const RobotCommand_message& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { +// @@protoc_insertion_point(class_specific_merge_from_start:RobotCommand_message) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._has_bits_[0 / 32] & 255u) { if (from.has_fin_pos()) { mutable_fin_pos()->::position_message::MergeFrom(from.fin_pos()); } @@ -546,16 +625,17 @@ void RobotCommand_message::MergeFrom(const RobotCommand_message& from) { set_iskickobs(from.iskickobs()); } } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void RobotCommand_message::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:RobotCommand_message) if (&from == this) return; Clear(); MergeFrom(from); } void RobotCommand_message::CopyFrom(const RobotCommand_message& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:RobotCommand_message) if (&from == this) return; Clear(); MergeFrom(from); @@ -563,40 +643,276 @@ void RobotCommand_message::CopyFrom(const RobotCommand_message& from) { bool RobotCommand_message::IsInitialized() const { if ((_has_bits_[0] & 0x000000ff) != 0x000000ff) return false; - if (has_fin_pos()) { - if (!this->fin_pos().IsInitialized()) return false; + if (!this->fin_pos_->IsInitialized()) return false; } if (has_fin_vel()) { - if (!this->fin_vel().IsInitialized()) return false; + if (!this->fin_vel_->IsInitialized()) return false; } return true; } void RobotCommand_message::Swap(RobotCommand_message* other) { - if (other != this) { - std::swap(fin_pos_, other->fin_pos_); - std::swap(fin_vel_, other->fin_vel_); - std::swap(maxspeed_, other->maxspeed_); - std::swap(kickspeedx_, other->kickspeedx_); - std::swap(kickspeedz_, other->kickspeedz_); - std::swap(usenav_, other->usenav_); - std::swap(isballobs_, other->isballobs_); - std::swap(iskickobs_, other->iskickobs_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void RobotCommand_message::InternalSwap(RobotCommand_message* other) { + std::swap(fin_pos_, other->fin_pos_); + std::swap(fin_vel_, other->fin_vel_); + std::swap(maxspeed_, other->maxspeed_); + std::swap(kickspeedx_, other->kickspeedx_); + std::swap(kickspeedz_, other->kickspeedz_); + std::swap(usenav_, other->usenav_); + std::swap(isballobs_, other->isballobs_); + std::swap(iskickobs_, other->iskickobs_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata RobotCommand_message::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = RobotCommand_message_descriptor_; - metadata.reflection = RobotCommand_message_reflection_; - return metadata; + return file_level_metadata[0]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// RobotCommand_message + +// required .position_message fin_pos = 1; +bool RobotCommand_message::has_fin_pos() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void RobotCommand_message::set_has_fin_pos() { + _has_bits_[0] |= 0x00000001u; +} +void RobotCommand_message::clear_has_fin_pos() { + _has_bits_[0] &= ~0x00000001u; +} +void RobotCommand_message::clear_fin_pos() { + if (fin_pos_ != NULL) fin_pos_->::position_message::Clear(); + clear_has_fin_pos(); +} +const ::position_message& RobotCommand_message::fin_pos() const { + // @@protoc_insertion_point(field_get:RobotCommand_message.fin_pos) + return fin_pos_ != NULL ? *fin_pos_ + : *::position_message::internal_default_instance(); +} +::position_message* RobotCommand_message::mutable_fin_pos() { + set_has_fin_pos(); + if (fin_pos_ == NULL) { + fin_pos_ = new ::position_message; + } + // @@protoc_insertion_point(field_mutable:RobotCommand_message.fin_pos) + return fin_pos_; +} +::position_message* RobotCommand_message::release_fin_pos() { + // @@protoc_insertion_point(field_release:RobotCommand_message.fin_pos) + clear_has_fin_pos(); + ::position_message* temp = fin_pos_; + fin_pos_ = NULL; + return temp; +} +void RobotCommand_message::set_allocated_fin_pos(::position_message* fin_pos) { + delete fin_pos_; + fin_pos_ = fin_pos; + if (fin_pos) { + set_has_fin_pos(); + } else { + clear_has_fin_pos(); + } + // @@protoc_insertion_point(field_set_allocated:RobotCommand_message.fin_pos) +} + +// required .position_message fin_vel = 2; +bool RobotCommand_message::has_fin_vel() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +void RobotCommand_message::set_has_fin_vel() { + _has_bits_[0] |= 0x00000002u; +} +void RobotCommand_message::clear_has_fin_vel() { + _has_bits_[0] &= ~0x00000002u; +} +void RobotCommand_message::clear_fin_vel() { + if (fin_vel_ != NULL) fin_vel_->::position_message::Clear(); + clear_has_fin_vel(); +} +const ::position_message& RobotCommand_message::fin_vel() const { + // @@protoc_insertion_point(field_get:RobotCommand_message.fin_vel) + return fin_vel_ != NULL ? *fin_vel_ + : *::position_message::internal_default_instance(); +} +::position_message* RobotCommand_message::mutable_fin_vel() { + set_has_fin_vel(); + if (fin_vel_ == NULL) { + fin_vel_ = new ::position_message; + } + // @@protoc_insertion_point(field_mutable:RobotCommand_message.fin_vel) + return fin_vel_; +} +::position_message* RobotCommand_message::release_fin_vel() { + // @@protoc_insertion_point(field_release:RobotCommand_message.fin_vel) + clear_has_fin_vel(); + ::position_message* temp = fin_vel_; + fin_vel_ = NULL; + return temp; +} +void RobotCommand_message::set_allocated_fin_vel(::position_message* fin_vel) { + delete fin_vel_; + fin_vel_ = fin_vel; + if (fin_vel) { + set_has_fin_vel(); + } else { + clear_has_fin_vel(); + } + // @@protoc_insertion_point(field_set_allocated:RobotCommand_message.fin_vel) +} + +// required float maxSpeed = 3; +bool RobotCommand_message::has_maxspeed() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +void RobotCommand_message::set_has_maxspeed() { + _has_bits_[0] |= 0x00000004u; +} +void RobotCommand_message::clear_has_maxspeed() { + _has_bits_[0] &= ~0x00000004u; +} +void RobotCommand_message::clear_maxspeed() { + maxspeed_ = 0; + clear_has_maxspeed(); +} +float RobotCommand_message::maxspeed() const { + // @@protoc_insertion_point(field_get:RobotCommand_message.maxSpeed) + return maxspeed_; +} +void RobotCommand_message::set_maxspeed(float value) { + set_has_maxspeed(); + maxspeed_ = value; + // @@protoc_insertion_point(field_set:RobotCommand_message.maxSpeed) +} + +// required float kickspeedx = 4; +bool RobotCommand_message::has_kickspeedx() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +void RobotCommand_message::set_has_kickspeedx() { + _has_bits_[0] |= 0x00000008u; +} +void RobotCommand_message::clear_has_kickspeedx() { + _has_bits_[0] &= ~0x00000008u; +} +void RobotCommand_message::clear_kickspeedx() { + kickspeedx_ = 0; + clear_has_kickspeedx(); +} +float RobotCommand_message::kickspeedx() const { + // @@protoc_insertion_point(field_get:RobotCommand_message.kickspeedx) + return kickspeedx_; +} +void RobotCommand_message::set_kickspeedx(float value) { + set_has_kickspeedx(); + kickspeedx_ = value; + // @@protoc_insertion_point(field_set:RobotCommand_message.kickspeedx) +} + +// required float kickspeedz = 5; +bool RobotCommand_message::has_kickspeedz() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +void RobotCommand_message::set_has_kickspeedz() { + _has_bits_[0] |= 0x00000010u; +} +void RobotCommand_message::clear_has_kickspeedz() { + _has_bits_[0] &= ~0x00000010u; +} +void RobotCommand_message::clear_kickspeedz() { + kickspeedz_ = 0; + clear_has_kickspeedz(); +} +float RobotCommand_message::kickspeedz() const { + // @@protoc_insertion_point(field_get:RobotCommand_message.kickspeedz) + return kickspeedz_; +} +void RobotCommand_message::set_kickspeedz(float value) { + set_has_kickspeedz(); + kickspeedz_ = value; + // @@protoc_insertion_point(field_set:RobotCommand_message.kickspeedz) +} + +// required bool useNav = 6; +bool RobotCommand_message::has_usenav() const { + return (_has_bits_[0] & 0x00000020u) != 0; +} +void RobotCommand_message::set_has_usenav() { + _has_bits_[0] |= 0x00000020u; +} +void RobotCommand_message::clear_has_usenav() { + _has_bits_[0] &= ~0x00000020u; +} +void RobotCommand_message::clear_usenav() { + usenav_ = false; + clear_has_usenav(); +} +bool RobotCommand_message::usenav() const { + // @@protoc_insertion_point(field_get:RobotCommand_message.useNav) + return usenav_; +} +void RobotCommand_message::set_usenav(bool value) { + set_has_usenav(); + usenav_ = value; + // @@protoc_insertion_point(field_set:RobotCommand_message.useNav) +} + +// required bool isBallObs = 7; +bool RobotCommand_message::has_isballobs() const { + return (_has_bits_[0] & 0x00000040u) != 0; +} +void RobotCommand_message::set_has_isballobs() { + _has_bits_[0] |= 0x00000040u; +} +void RobotCommand_message::clear_has_isballobs() { + _has_bits_[0] &= ~0x00000040u; +} +void RobotCommand_message::clear_isballobs() { + isballobs_ = false; + clear_has_isballobs(); +} +bool RobotCommand_message::isballobs() const { + // @@protoc_insertion_point(field_get:RobotCommand_message.isBallObs) + return isballobs_; +} +void RobotCommand_message::set_isballobs(bool value) { + set_has_isballobs(); + isballobs_ = value; + // @@protoc_insertion_point(field_set:RobotCommand_message.isBallObs) +} + +// required bool isKickObs = 8; +bool RobotCommand_message::has_iskickobs() const { + return (_has_bits_[0] & 0x00000080u) != 0; +} +void RobotCommand_message::set_has_iskickobs() { + _has_bits_[0] |= 0x00000080u; +} +void RobotCommand_message::clear_has_iskickobs() { + _has_bits_[0] &= ~0x00000080u; +} +void RobotCommand_message::clear_iskickobs() { + iskickobs_ = false; + clear_has_iskickobs(); +} +bool RobotCommand_message::iskickobs() const { + // @@protoc_insertion_point(field_get:RobotCommand_message.isKickObs) + return iskickobs_; +} +void RobotCommand_message::set_iskickobs(bool value) { + set_has_iskickobs(); + iskickobs_ = value; + // @@protoc_insertion_point(field_set:RobotCommand_message.isKickObs) } +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) diff --git a/src/proto/RobotCommand_message.pb.h b/src/proto/RobotCommand_message.pb.h index 6a1acc5..4d8ee31 100644 --- a/src/proto/RobotCommand_message.pb.h +++ b/src/proto/RobotCommand_message.pb.h @@ -8,35 +8,41 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 2005000 +#if GOOGLE_PROTOBUF_VERSION < 3001000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. #endif +#include +#include #include +#include #include -#include -#include +#include // IWYU pragma: export +#include // IWYU pragma: export #include #include "position_message.pb.h" // @@protoc_insertion_point(includes) +class RobotCommand_message; +class RobotCommand_messageDefaultTypeInternal; +extern RobotCommand_messageDefaultTypeInternal _RobotCommand_message_default_instance_; +class position_message; +class position_messageDefaultTypeInternal; +extern position_messageDefaultTypeInternal _position_message_default_instance_; // Internal implementation detail -- do not call these. -void protobuf_AddDesc_RobotCommand_5fmessage_2eproto(); -void protobuf_AssignDesc_RobotCommand_5fmessage_2eproto(); -void protobuf_ShutdownFile_RobotCommand_5fmessage_2eproto(); - -class RobotCommand_message; +void protobuf_AddDesc_RobotCommand_5fmessage_2eproto(); +void protobuf_InitDefaults_RobotCommand_5fmessage_2eproto(); // =================================================================== -class RobotCommand_message : public ::google::protobuf::Message { +class RobotCommand_message : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:RobotCommand_message) */ { public: RobotCommand_message(); virtual ~RobotCommand_message(); @@ -49,128 +55,152 @@ class RobotCommand_message : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const RobotCommand_message& default_instance(); + static inline const RobotCommand_message* internal_default_instance() { + return reinterpret_cast( + &_RobotCommand_message_default_instance_); + } + void Swap(RobotCommand_message* other); // implements Message ---------------------------------------------- - RobotCommand_message* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline RobotCommand_message* New() const PROTOBUF_FINAL { return New(NULL); } + + RobotCommand_message* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const RobotCommand_message& from); void MergeFrom(const RobotCommand_message& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(RobotCommand_message* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // required .position_message fin_pos = 1; - inline bool has_fin_pos() const; - inline void clear_fin_pos(); + bool has_fin_pos() const; + void clear_fin_pos(); static const int kFinPosFieldNumber = 1; - inline const ::position_message& fin_pos() const; - inline ::position_message* mutable_fin_pos(); - inline ::position_message* release_fin_pos(); - inline void set_allocated_fin_pos(::position_message* fin_pos); + const ::position_message& fin_pos() const; + ::position_message* mutable_fin_pos(); + ::position_message* release_fin_pos(); + void set_allocated_fin_pos(::position_message* fin_pos); // required .position_message fin_vel = 2; - inline bool has_fin_vel() const; - inline void clear_fin_vel(); + bool has_fin_vel() const; + void clear_fin_vel(); static const int kFinVelFieldNumber = 2; - inline const ::position_message& fin_vel() const; - inline ::position_message* mutable_fin_vel(); - inline ::position_message* release_fin_vel(); - inline void set_allocated_fin_vel(::position_message* fin_vel); + const ::position_message& fin_vel() const; + ::position_message* mutable_fin_vel(); + ::position_message* release_fin_vel(); + void set_allocated_fin_vel(::position_message* fin_vel); // required float maxSpeed = 3; - inline bool has_maxspeed() const; - inline void clear_maxspeed(); + bool has_maxspeed() const; + void clear_maxspeed(); static const int kMaxSpeedFieldNumber = 3; - inline float maxspeed() const; - inline void set_maxspeed(float value); + float maxspeed() const; + void set_maxspeed(float value); // required float kickspeedx = 4; - inline bool has_kickspeedx() const; - inline void clear_kickspeedx(); + bool has_kickspeedx() const; + void clear_kickspeedx(); static const int kKickspeedxFieldNumber = 4; - inline float kickspeedx() const; - inline void set_kickspeedx(float value); + float kickspeedx() const; + void set_kickspeedx(float value); // required float kickspeedz = 5; - inline bool has_kickspeedz() const; - inline void clear_kickspeedz(); + bool has_kickspeedz() const; + void clear_kickspeedz(); static const int kKickspeedzFieldNumber = 5; - inline float kickspeedz() const; - inline void set_kickspeedz(float value); + float kickspeedz() const; + void set_kickspeedz(float value); // required bool useNav = 6; - inline bool has_usenav() const; - inline void clear_usenav(); + bool has_usenav() const; + void clear_usenav(); static const int kUseNavFieldNumber = 6; - inline bool usenav() const; - inline void set_usenav(bool value); + bool usenav() const; + void set_usenav(bool value); // required bool isBallObs = 7; - inline bool has_isballobs() const; - inline void clear_isballobs(); + bool has_isballobs() const; + void clear_isballobs(); static const int kIsBallObsFieldNumber = 7; - inline bool isballobs() const; - inline void set_isballobs(bool value); + bool isballobs() const; + void set_isballobs(bool value); // required bool isKickObs = 8; - inline bool has_iskickobs() const; - inline void clear_iskickobs(); + bool has_iskickobs() const; + void clear_iskickobs(); static const int kIsKickObsFieldNumber = 8; - inline bool iskickobs() const; - inline void set_iskickobs(bool value); + bool iskickobs() const; + void set_iskickobs(bool value); // @@protoc_insertion_point(class_scope:RobotCommand_message) private: - inline void set_has_fin_pos(); - inline void clear_has_fin_pos(); - inline void set_has_fin_vel(); - inline void clear_has_fin_vel(); - inline void set_has_maxspeed(); - inline void clear_has_maxspeed(); - inline void set_has_kickspeedx(); - inline void clear_has_kickspeedx(); - inline void set_has_kickspeedz(); - inline void clear_has_kickspeedz(); - inline void set_has_usenav(); - inline void clear_has_usenav(); - inline void set_has_isballobs(); - inline void clear_has_isballobs(); - inline void set_has_iskickobs(); - inline void clear_has_iskickobs(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + void set_has_fin_pos(); + void clear_has_fin_pos(); + void set_has_fin_vel(); + void clear_has_fin_vel(); + void set_has_maxspeed(); + void clear_has_maxspeed(); + void set_has_kickspeedx(); + void clear_has_kickspeedx(); + void set_has_kickspeedz(); + void clear_has_kickspeedz(); + void set_has_usenav(); + void clear_has_usenav(); + void set_has_isballobs(); + void clear_has_isballobs(); + void set_has_iskickobs(); + void clear_has_iskickobs(); + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; ::position_message* fin_pos_; ::position_message* fin_vel_; float maxspeed_; @@ -179,22 +209,18 @@ class RobotCommand_message : public ::google::protobuf::Message { bool usenav_; bool isballobs_; bool iskickobs_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(8 + 31) / 32]; - - friend void protobuf_AddDesc_RobotCommand_5fmessage_2eproto(); - friend void protobuf_AssignDesc_RobotCommand_5fmessage_2eproto(); + friend void protobuf_InitDefaults_RobotCommand_5fmessage_2eproto_impl(); + friend void protobuf_AddDesc_RobotCommand_5fmessage_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_RobotCommand_5fmessage_2eproto(); friend void protobuf_ShutdownFile_RobotCommand_5fmessage_2eproto(); - void InitAsDefaultInstance(); - static RobotCommand_message* default_instance_; }; // =================================================================== // =================================================================== +#if !PROTOBUF_INLINE_NOT_IN_HEADERS // RobotCommand_message // required .position_message fin_pos = 1; @@ -212,14 +238,20 @@ inline void RobotCommand_message::clear_fin_pos() { clear_has_fin_pos(); } inline const ::position_message& RobotCommand_message::fin_pos() const { - return fin_pos_ != NULL ? *fin_pos_ : *default_instance_->fin_pos_; + // @@protoc_insertion_point(field_get:RobotCommand_message.fin_pos) + return fin_pos_ != NULL ? *fin_pos_ + : *::position_message::internal_default_instance(); } inline ::position_message* RobotCommand_message::mutable_fin_pos() { set_has_fin_pos(); - if (fin_pos_ == NULL) fin_pos_ = new ::position_message; + if (fin_pos_ == NULL) { + fin_pos_ = new ::position_message; + } + // @@protoc_insertion_point(field_mutable:RobotCommand_message.fin_pos) return fin_pos_; } inline ::position_message* RobotCommand_message::release_fin_pos() { + // @@protoc_insertion_point(field_release:RobotCommand_message.fin_pos) clear_has_fin_pos(); ::position_message* temp = fin_pos_; fin_pos_ = NULL; @@ -233,6 +265,7 @@ inline void RobotCommand_message::set_allocated_fin_pos(::position_message* fin_ } else { clear_has_fin_pos(); } + // @@protoc_insertion_point(field_set_allocated:RobotCommand_message.fin_pos) } // required .position_message fin_vel = 2; @@ -250,14 +283,20 @@ inline void RobotCommand_message::clear_fin_vel() { clear_has_fin_vel(); } inline const ::position_message& RobotCommand_message::fin_vel() const { - return fin_vel_ != NULL ? *fin_vel_ : *default_instance_->fin_vel_; + // @@protoc_insertion_point(field_get:RobotCommand_message.fin_vel) + return fin_vel_ != NULL ? *fin_vel_ + : *::position_message::internal_default_instance(); } inline ::position_message* RobotCommand_message::mutable_fin_vel() { set_has_fin_vel(); - if (fin_vel_ == NULL) fin_vel_ = new ::position_message; + if (fin_vel_ == NULL) { + fin_vel_ = new ::position_message; + } + // @@protoc_insertion_point(field_mutable:RobotCommand_message.fin_vel) return fin_vel_; } inline ::position_message* RobotCommand_message::release_fin_vel() { + // @@protoc_insertion_point(field_release:RobotCommand_message.fin_vel) clear_has_fin_vel(); ::position_message* temp = fin_vel_; fin_vel_ = NULL; @@ -271,6 +310,7 @@ inline void RobotCommand_message::set_allocated_fin_vel(::position_message* fin_ } else { clear_has_fin_vel(); } + // @@protoc_insertion_point(field_set_allocated:RobotCommand_message.fin_vel) } // required float maxSpeed = 3; @@ -288,11 +328,13 @@ inline void RobotCommand_message::clear_maxspeed() { clear_has_maxspeed(); } inline float RobotCommand_message::maxspeed() const { + // @@protoc_insertion_point(field_get:RobotCommand_message.maxSpeed) return maxspeed_; } inline void RobotCommand_message::set_maxspeed(float value) { set_has_maxspeed(); maxspeed_ = value; + // @@protoc_insertion_point(field_set:RobotCommand_message.maxSpeed) } // required float kickspeedx = 4; @@ -310,11 +352,13 @@ inline void RobotCommand_message::clear_kickspeedx() { clear_has_kickspeedx(); } inline float RobotCommand_message::kickspeedx() const { + // @@protoc_insertion_point(field_get:RobotCommand_message.kickspeedx) return kickspeedx_; } inline void RobotCommand_message::set_kickspeedx(float value) { set_has_kickspeedx(); kickspeedx_ = value; + // @@protoc_insertion_point(field_set:RobotCommand_message.kickspeedx) } // required float kickspeedz = 5; @@ -332,11 +376,13 @@ inline void RobotCommand_message::clear_kickspeedz() { clear_has_kickspeedz(); } inline float RobotCommand_message::kickspeedz() const { + // @@protoc_insertion_point(field_get:RobotCommand_message.kickspeedz) return kickspeedz_; } inline void RobotCommand_message::set_kickspeedz(float value) { set_has_kickspeedz(); kickspeedz_ = value; + // @@protoc_insertion_point(field_set:RobotCommand_message.kickspeedz) } // required bool useNav = 6; @@ -354,11 +400,13 @@ inline void RobotCommand_message::clear_usenav() { clear_has_usenav(); } inline bool RobotCommand_message::usenav() const { + // @@protoc_insertion_point(field_get:RobotCommand_message.useNav) return usenav_; } inline void RobotCommand_message::set_usenav(bool value) { set_has_usenav(); usenav_ = value; + // @@protoc_insertion_point(field_set:RobotCommand_message.useNav) } // required bool isBallObs = 7; @@ -376,11 +424,13 @@ inline void RobotCommand_message::clear_isballobs() { clear_has_isballobs(); } inline bool RobotCommand_message::isballobs() const { + // @@protoc_insertion_point(field_get:RobotCommand_message.isBallObs) return isballobs_; } inline void RobotCommand_message::set_isballobs(bool value) { set_has_isballobs(); isballobs_ = value; + // @@protoc_insertion_point(field_set:RobotCommand_message.isBallObs) } // required bool isKickObs = 8; @@ -398,24 +448,19 @@ inline void RobotCommand_message::clear_iskickobs() { clear_has_iskickobs(); } inline bool RobotCommand_message::iskickobs() const { + // @@protoc_insertion_point(field_get:RobotCommand_message.isKickObs) return iskickobs_; } inline void RobotCommand_message::set_iskickobs(bool value) { set_has_iskickobs(); iskickobs_ = value; + // @@protoc_insertion_point(field_set:RobotCommand_message.isKickObs) } +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) -#ifndef SWIG -namespace google { -namespace protobuf { - - -} // namespace google -} // namespace protobuf -#endif // SWIG // @@protoc_insertion_point(global_scope) diff --git a/src/proto/Robot_message.pb.cc b/src/proto/Robot_message.pb.cc index 005b78b..43d2036 100644 --- a/src/proto/Robot_message.pb.cc +++ b/src/proto/Robot_message.pb.cc @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -15,27 +16,24 @@ #include #include // @@protoc_insertion_point(includes) +class Robot_messageDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +Robot_messageDefaultTypeInternal _Robot_message_default_instance_; namespace { -const ::google::protobuf::Descriptor* Robot_message_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - Robot_message_reflection_ = NULL; -const ::google::protobuf::EnumDescriptor* Robot_message_AgentStatus_descriptor_ = NULL; -const ::google::protobuf::EnumDescriptor* Robot_message_AgentRegion_descriptor_ = NULL; -const ::google::protobuf::EnumDescriptor* Robot_message_AgentRole_descriptor_ = NULL; +::google::protobuf::Metadata file_level_metadata[1]; +const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[3]; } // namespace -void protobuf_AssignDesc_Robot_5fmessage_2eproto() { - protobuf_AddDesc_Robot_5fmessage_2eproto(); - const ::google::protobuf::FileDescriptor* file = - ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( - "Robot_message.proto"); - GOOGLE_CHECK(file != NULL); - Robot_message_descriptor_ = file->message_type(0); - static const int Robot_message_offsets_[7] = { +const ::google::protobuf::uint32* protobuf_Offsets_Robot_5fmessage_2eproto() GOOGLE_ATTRIBUTE_COLD; +const ::google::protobuf::uint32* protobuf_Offsets_Robot_5fmessage_2eproto() { + static const ::google::protobuf::uint32 offsets[] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Robot_message, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Robot_message, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Robot_message, isvalid_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Robot_message, position_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Robot_message, velocity_), @@ -43,96 +41,123 @@ void protobuf_AssignDesc_Robot_5fmessage_2eproto() { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Robot_message, role_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Robot_message, region_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Robot_message, rc_), + 3, + 0, + 1, + 5, + 6, + 4, + 2, }; - Robot_message_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - Robot_message_descriptor_, - Robot_message::default_instance_, - Robot_message_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Robot_message, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Robot_message, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(Robot_message)); - Robot_message_AgentStatus_descriptor_ = Robot_message_descriptor_->enum_type(0); - Robot_message_AgentRegion_descriptor_ = Robot_message_descriptor_->enum_type(1); - Robot_message_AgentRole_descriptor_ = Robot_message_descriptor_->enum_type(2); + return offsets; } +static const ::google::protobuf::internal::MigrationSchema schemas[] = { + { 0, 11, sizeof(Robot_message)}, +}; + +static const ::google::protobuf::internal::DefaultInstanceData file_default_instances[] = { + {reinterpret_cast(&_Robot_message_default_instance_), NULL}, +}; + namespace { -GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); -inline void protobuf_AssignDescriptorsOnce() { - ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, - &protobuf_AssignDesc_Robot_5fmessage_2eproto); +void protobuf_AssignDescriptors() { + protobuf_AddDesc_Robot_5fmessage_2eproto(); + ::google::protobuf::MessageFactory* factory = NULL; + AssignDescriptors( + "Robot_message.proto", schemas, file_default_instances, protobuf_Offsets_Robot_5fmessage_2eproto(), factory, + file_level_metadata, file_level_enum_descriptors, NULL); } +void protobuf_AssignDescriptorsOnce() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); +} + +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - Robot_message_descriptor_, &Robot_message::default_instance()); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1); } } // namespace void protobuf_ShutdownFile_Robot_5fmessage_2eproto() { - delete Robot_message::default_instance_; - delete Robot_message_reflection_; + _Robot_message_default_instance_.Shutdown(); + delete file_level_metadata[0].reflection; } -void protobuf_AddDesc_Robot_5fmessage_2eproto() { - static bool already_here = false; - if (already_here) return; - already_here = true; +void protobuf_InitDefaults_Robot_5fmessage_2eproto_impl() { GOOGLE_PROTOBUF_VERIFY_VERSION; - ::protobuf_AddDesc_position_5fmessage_2eproto(); - ::protobuf_AddDesc_RobotCommand_5fmessage_2eproto(); + ::protobuf_InitDefaults_position_5fmessage_2eproto(); + ::protobuf_InitDefaults_RobotCommand_5fmessage_2eproto(); + ::google::protobuf::internal::InitProtobufDefaults(); + _Robot_message_default_instance_.DefaultConstruct(); + _Robot_message_default_instance_.get_mutable()->position_ = const_cast< ::position_message*>( + ::position_message::internal_default_instance()); + _Robot_message_default_instance_.get_mutable()->velocity_ = const_cast< ::position_message*>( + ::position_message::internal_default_instance()); + _Robot_message_default_instance_.get_mutable()->rc_ = const_cast< ::RobotCommand_message*>( + ::RobotCommand_message::internal_default_instance()); +} + +void protobuf_InitDefaults_Robot_5fmessage_2eproto() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_InitDefaults_Robot_5fmessage_2eproto_impl); +} +void protobuf_AddDesc_Robot_5fmessage_2eproto_impl() { + protobuf_InitDefaults_Robot_5fmessage_2eproto(); + static const char descriptor[] = { + "\n\023Robot_message.proto\032\026position_message." + "proto\032\032RobotCommand_message.proto\"\341\005\n\rRo" + "bot_message\022\017\n\007isValid\030\001 \002(\010\022#\n\010position" + "\030\002 \002(\0132\021.position_message\022#\n\010velocity\030\003 " + "\002(\0132\021.position_message\022*\n\006status\030\004 \001(\0162\032" + ".Robot_message.AgentStatus\022&\n\004role\030\005 \001(\016" + "2\030.Robot_message.AgentRole\022*\n\006region\030\006 \001" + "(\0162\032.Robot_message.AgentRegion\022!\n\002rc\030\007 \001" + "(\0132\025.RobotCommand_message\"\211\001\n\013AgentStatu" + "s\022\010\n\004Idle\020\001\022\013\n\007Passing\020\002\022\013\n\007Kicking\020\003\022\013\n" + "\007Chiping\020\004\022\021\n\rFollowingBall\020\005\022\020\n\014Blockin" + "gBall\020\006\022\021\n\rBlockingRobot\020\007\022\021\n\rRecievingP" + "ass\020\010\"<\n\013AgentRegion\022\014\n\010NoRegion\020\025\022\010\n\004Le" + "ft\020\026\022\n\n\006Center\020\027\022\t\n\005Right\020\030\"\207\002\n\tAgentRol" + "e\022\n\n\006NoRole\020\037\022\n\n\006ArcMid\020 \022\013\n\007ArcLeft\020!\022\014" + "\n\010ArcRight\020\"\022\025\n\021FixedPositionLeft\020#\022\026\n\022F" + "ixedPositionRight\020$\022\024\n\020FixedPositionMid\020" + "%\022\020\n\014AttackerLeft\020&\022\021\n\rAttackerRight\020\'\022\017" + "\n\013AttackerMid\020(\022\013\n\007Blocker\020)\022\020\n\014Defender" + "Left\020*\022\021\n\rDefenderRight\020+\022\017\n\013DefenderMid" + "\020,\022\t\n\005Golie\020-" + }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - "\n\023Robot_message.proto\032\026position_message." - "proto\032\032RobotCommand_message.proto\"\341\005\n\rRo" - "bot_message\022\017\n\007isValid\030\001 \002(\010\022#\n\010position" - "\030\002 \002(\0132\021.position_message\022#\n\010velocity\030\003 " - "\002(\0132\021.position_message\022*\n\006status\030\004 \001(\0162\032" - ".Robot_message.AgentStatus\022&\n\004role\030\005 \001(\016" - "2\030.Robot_message.AgentRole\022*\n\006region\030\006 \001" - "(\0162\032.Robot_message.AgentRegion\022!\n\002rc\030\007 \001" - "(\0132\025.RobotCommand_message\"\211\001\n\013AgentStatu" - "s\022\010\n\004Idle\020\001\022\013\n\007Passing\020\002\022\013\n\007Kicking\020\003\022\013\n" - "\007Chiping\020\004\022\021\n\rFollowingBall\020\005\022\020\n\014Blockin" - "gBall\020\006\022\021\n\rBlockingRobot\020\007\022\021\n\rRecievingP" - "ass\020\010\"<\n\013AgentRegion\022\014\n\010NoRegion\020\025\022\010\n\004Le" - "ft\020\026\022\n\n\006Center\020\027\022\t\n\005Right\020\030\"\207\002\n\tAgentRol" - "e\022\n\n\006NoRole\020\037\022\n\n\006ArcMid\020 \022\013\n\007ArcLeft\020!\022\014" - "\n\010ArcRight\020\"\022\025\n\021FixedPositionLeft\020#\022\026\n\022F" - "ixedPositionRight\020$\022\024\n\020FixedPositionMid\020" - "%\022\020\n\014AttackerLeft\020&\022\021\n\rAttackerRight\020\'\022\017" - "\n\013AttackerMid\020(\022\013\n\007Blocker\020)\022\020\n\014Defender" - "Left\020*\022\021\n\rDefenderRight\020+\022\017\n\013DefenderMid" - "\020,\022\t\n\005Golie\020-", 813); + descriptor, 813); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "Robot_message.proto", &protobuf_RegisterTypes); - Robot_message::default_instance_ = new Robot_message(); - Robot_message::default_instance_->InitAsDefaultInstance(); + ::protobuf_AddDesc_position_5fmessage_2eproto(); + ::protobuf_AddDesc_RobotCommand_5fmessage_2eproto(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_Robot_5fmessage_2eproto); } +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_Robot_5fmessage_2eproto_once_); +void protobuf_AddDesc_Robot_5fmessage_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_Robot_5fmessage_2eproto_once_, + &protobuf_AddDesc_Robot_5fmessage_2eproto_impl); +} // Force AddDescriptors() to be called at static initialization time. struct StaticDescriptorInitializer_Robot_5fmessage_2eproto { StaticDescriptorInitializer_Robot_5fmessage_2eproto() { protobuf_AddDesc_Robot_5fmessage_2eproto(); } } static_descriptor_initializer_Robot_5fmessage_2eproto_; - -// =================================================================== - const ::google::protobuf::EnumDescriptor* Robot_message_AgentStatus_descriptor() { protobuf_AssignDescriptorsOnce(); - return Robot_message_AgentStatus_descriptor_; + return file_level_enum_descriptors[0]; } bool Robot_message_AgentStatus_IsValid(int value) { - switch(value) { + switch (value) { case 1: case 2: case 3: @@ -147,7 +172,7 @@ bool Robot_message_AgentStatus_IsValid(int value) { } } -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const Robot_message_AgentStatus Robot_message::Idle; const Robot_message_AgentStatus Robot_message::Passing; const Robot_message_AgentStatus Robot_message::Kicking; @@ -159,13 +184,13 @@ const Robot_message_AgentStatus Robot_message::RecievingPass; const Robot_message_AgentStatus Robot_message::AgentStatus_MIN; const Robot_message_AgentStatus Robot_message::AgentStatus_MAX; const int Robot_message::AgentStatus_ARRAYSIZE; -#endif // _MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 const ::google::protobuf::EnumDescriptor* Robot_message_AgentRegion_descriptor() { protobuf_AssignDescriptorsOnce(); - return Robot_message_AgentRegion_descriptor_; + return file_level_enum_descriptors[1]; } bool Robot_message_AgentRegion_IsValid(int value) { - switch(value) { + switch (value) { case 21: case 22: case 23: @@ -176,7 +201,7 @@ bool Robot_message_AgentRegion_IsValid(int value) { } } -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const Robot_message_AgentRegion Robot_message::NoRegion; const Robot_message_AgentRegion Robot_message::Left; const Robot_message_AgentRegion Robot_message::Center; @@ -184,13 +209,13 @@ const Robot_message_AgentRegion Robot_message::Right; const Robot_message_AgentRegion Robot_message::AgentRegion_MIN; const Robot_message_AgentRegion Robot_message::AgentRegion_MAX; const int Robot_message::AgentRegion_ARRAYSIZE; -#endif // _MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 const ::google::protobuf::EnumDescriptor* Robot_message_AgentRole_descriptor() { protobuf_AssignDescriptorsOnce(); - return Robot_message_AgentRole_descriptor_; + return file_level_enum_descriptors[2]; } bool Robot_message_AgentRole_IsValid(int value) { - switch(value) { + switch (value) { case 31: case 32: case 33: @@ -212,7 +237,7 @@ bool Robot_message_AgentRole_IsValid(int value) { } } -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const Robot_message_AgentRole Robot_message::NoRole; const Robot_message_AgentRole Robot_message::ArcMid; const Robot_message_AgentRole Robot_message::ArcLeft; @@ -231,8 +256,11 @@ const Robot_message_AgentRole Robot_message::Golie; const Robot_message_AgentRole Robot_message::AgentRole_MIN; const Robot_message_AgentRole Robot_message::AgentRole_MAX; const int Robot_message::AgentRole_ARRAYSIZE; -#endif // _MSC_VER -#ifndef _MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int Robot_message::kIsValidFieldNumber; const int Robot_message::kPositionFieldNumber; const int Robot_message::kVelocityFieldNumber; @@ -240,45 +268,65 @@ const int Robot_message::kStatusFieldNumber; const int Robot_message::kRoleFieldNumber; const int Robot_message::kRegionFieldNumber; const int Robot_message::kRcFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 Robot_message::Robot_message() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_Robot_5fmessage_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:Robot_message) } - -void Robot_message::InitAsDefaultInstance() { - position_ = const_cast< ::position_message*>(&::position_message::default_instance()); - velocity_ = const_cast< ::position_message*>(&::position_message::default_instance()); - rc_ = const_cast< ::RobotCommand_message*>(&::RobotCommand_message::default_instance()); -} - Robot_message::Robot_message(const Robot_message& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from.has_position()) { + position_ = new ::position_message(*from.position_); + } else { + position_ = NULL; + } + if (from.has_velocity()) { + velocity_ = new ::position_message(*from.velocity_); + } else { + velocity_ = NULL; + } + if (from.has_rc()) { + rc_ = new ::RobotCommand_message(*from.rc_); + } else { + rc_ = NULL; + } + ::memcpy(&isvalid_, &from.isvalid_, + reinterpret_cast(&role_) - + reinterpret_cast(&isvalid_) + sizeof(role_)); + // @@protoc_insertion_point(copy_constructor:Robot_message) } void Robot_message::SharedCtor() { _cached_size_ = 0; - isvalid_ = false; - position_ = NULL; - velocity_ = NULL; + ::memset(&position_, 0, reinterpret_cast(&isvalid_) - + reinterpret_cast(&position_) + sizeof(isvalid_)); + region_ = 21; status_ = 1; role_ = 31; - region_ = 21; - rc_ = NULL; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); } Robot_message::~Robot_message() { + // @@protoc_insertion_point(destructor:Robot_message) SharedDtor(); } void Robot_message::SharedDtor() { - if (this != default_instance_) { + if (this != internal_default_instance()) { delete position_; + } + if (this != internal_default_instance()) { delete velocity_; + } + if (this != internal_default_instance()) { delete rc_; } } @@ -290,94 +338,96 @@ void Robot_message::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* Robot_message::descriptor() { protobuf_AssignDescriptorsOnce(); - return Robot_message_descriptor_; + return file_level_metadata[0].descriptor; } const Robot_message& Robot_message::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_Robot_5fmessage_2eproto(); - return *default_instance_; + protobuf_InitDefaults_Robot_5fmessage_2eproto(); + return *internal_default_instance(); } -Robot_message* Robot_message::default_instance_ = NULL; - -Robot_message* Robot_message::New() const { - return new Robot_message; +Robot_message* Robot_message::New(::google::protobuf::Arena* arena) const { + Robot_message* n = new Robot_message; + if (arena != NULL) { + arena->Own(n); + } + return n; } void Robot_message::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - isvalid_ = false; +// @@protoc_insertion_point(message_clear_start:Robot_message) + if (_has_bits_[0 / 32] & 7u) { if (has_position()) { - if (position_ != NULL) position_->::position_message::Clear(); + GOOGLE_DCHECK(position_ != NULL); + position_->::position_message::Clear(); } if (has_velocity()) { - if (velocity_ != NULL) velocity_->::position_message::Clear(); + GOOGLE_DCHECK(velocity_ != NULL); + velocity_->::position_message::Clear(); } - status_ = 1; - role_ = 31; - region_ = 21; if (has_rc()) { - if (rc_ != NULL) rc_->::RobotCommand_message::Clear(); + GOOGLE_DCHECK(rc_ != NULL); + rc_->::RobotCommand_message::Clear(); } } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + if (_has_bits_[0 / 32] & 120u) { + isvalid_ = false; + region_ = 21; + status_ = 1; + role_ = 31; + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool Robot_message::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:Robot_message) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required bool isValid = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + if (tag == 8u) { + set_has_isvalid(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( input, &isvalid_))); - set_has_isvalid(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(18)) goto parse_position; break; } // required .position_message position = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_position: + if (tag == 18u) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_position())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(26)) goto parse_velocity; break; } // required .position_message velocity = 3; case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_velocity: + if (tag == 26u) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_velocity())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(32)) goto parse_status; break; } // optional .Robot_message.AgentStatus status = 4; case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_status: + if (tag == 32u) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -388,17 +438,14 @@ bool Robot_message::MergePartialFromCodedStream( mutable_unknown_fields()->AddVarint(4, value); } } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(40)) goto parse_role; break; } // optional .Robot_message.AgentRole role = 5; case 5: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_role: + if (tag == 40u) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -409,17 +456,14 @@ bool Robot_message::MergePartialFromCodedStream( mutable_unknown_fields()->AddVarint(5, value); } } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(48)) goto parse_region; break; } // optional .Robot_message.AgentRegion region = 6; case 6: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_region: + if (tag == 48u) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -430,31 +474,28 @@ bool Robot_message::MergePartialFromCodedStream( mutable_unknown_fields()->AddVarint(6, value); } } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(58)) goto parse_rc; break; } // optional .RobotCommand_message rc = 7; case 7: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_rc: + if (tag == 58u) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_rc())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectAtEnd()) return true; break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -462,12 +503,18 @@ bool Robot_message::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:Robot_message) return true; +failure: + // @@protoc_insertion_point(parse_failure:Robot_message) + return false; #undef DO_ } void Robot_message::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:Robot_message) // required bool isValid = 1; if (has_isvalid()) { ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->isvalid(), output); @@ -476,13 +523,13 @@ void Robot_message::SerializeWithCachedSizes( // required .position_message position = 2; if (has_position()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, this->position(), output); + 2, *this->position_, output); } // required .position_message velocity = 3; if (has_velocity()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, this->velocity(), output); + 3, *this->velocity_, output); } // optional .Robot_message.AgentStatus status = 4; @@ -506,17 +553,20 @@ void Robot_message::SerializeWithCachedSizes( // optional .RobotCommand_message rc = 7; if (has_rc()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 7, this->rc(), output); + 7, *this->rc_, output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:Robot_message) } -::google::protobuf::uint8* Robot_message::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* Robot_message::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:Robot_message) // required bool isValid = 1; if (has_isvalid()) { target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->isvalid(), target); @@ -525,15 +575,15 @@ ::google::protobuf::uint8* Robot_message::SerializeWithCachedSizesToArray( // required .position_message position = 2; if (has_position()) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 2, this->position(), target); + InternalWriteMessageNoVirtualToArray( + 2, *this->position_, false, target); } // required .position_message velocity = 3; if (has_velocity()) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 3, this->velocity(), target); + InternalWriteMessageNoVirtualToArray( + 3, *this->velocity_, false, target); } // optional .Robot_message.AgentStatus status = 4; @@ -557,38 +607,81 @@ ::google::protobuf::uint8* Robot_message::SerializeWithCachedSizesToArray( // optional .RobotCommand_message rc = 7; if (has_rc()) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 7, this->rc(), target); + InternalWriteMessageNoVirtualToArray( + 7, *this->rc_, false, target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:Robot_message) return target; } -int Robot_message::ByteSize() const { - int total_size = 0; +size_t Robot_message::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:Robot_message) + size_t total_size = 0; - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_position()) { + // required .position_message position = 2; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->position_); + } + + if (has_velocity()) { + // required .position_message velocity = 3; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->velocity_); + } + + if (has_isvalid()) { // required bool isValid = 1; - if (has_isvalid()) { - total_size += 1 + 1; - } + total_size += 1 + 1; + } + + return total_size; +} +size_t Robot_message::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Robot_message) + size_t total_size = 0; + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + if (((_has_bits_[0] & 0x0000000b) ^ 0x0000000b) == 0) { // All required fields are present. // required .position_message position = 2; - if (has_position()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->position()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->position_); // required .position_message velocity = 3; - if (has_velocity()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->velocity_); + + // required bool isValid = 1; + total_size += 1 + 1; + + } else { + total_size += RequiredFieldsByteSizeFallback(); + } + // optional .RobotCommand_message rc = 7; + if (has_rc()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->rc_); + } + + if (_has_bits_[0 / 32] & 112u) { + // optional .Robot_message.AgentRegion region = 6; + if (has_region()) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->velocity()); + ::google::protobuf::internal::WireFormatLite::EnumSize(this->region()); } // optional .Robot_message.AgentStatus status = 4; @@ -603,121 +696,346 @@ int Robot_message::ByteSize() const { ::google::protobuf::internal::WireFormatLite::EnumSize(this->role()); } - // optional .Robot_message.AgentRegion region = 6; - if (has_region()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->region()); - } - - // optional .RobotCommand_message rc = 7; - if (has_rc()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->rc()); - } - - } - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void Robot_message::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:Robot_message) + GOOGLE_DCHECK_NE(&from, this); const Robot_message* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Robot_message) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Robot_message) MergeFrom(*source); } } void Robot_message::MergeFrom(const Robot_message& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_isvalid()) { - set_isvalid(from.isvalid()); - } +// @@protoc_insertion_point(class_specific_merge_from_start:Robot_message) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._has_bits_[0 / 32] & 127u) { if (from.has_position()) { mutable_position()->::position_message::MergeFrom(from.position()); } if (from.has_velocity()) { mutable_velocity()->::position_message::MergeFrom(from.velocity()); } - if (from.has_status()) { - set_status(from.status()); + if (from.has_rc()) { + mutable_rc()->::RobotCommand_message::MergeFrom(from.rc()); } - if (from.has_role()) { - set_role(from.role()); + if (from.has_isvalid()) { + set_isvalid(from.isvalid()); } if (from.has_region()) { set_region(from.region()); } - if (from.has_rc()) { - mutable_rc()->::RobotCommand_message::MergeFrom(from.rc()); + if (from.has_status()) { + set_status(from.status()); + } + if (from.has_role()) { + set_role(from.role()); } } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void Robot_message::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Robot_message) if (&from == this) return; Clear(); MergeFrom(from); } void Robot_message::CopyFrom(const Robot_message& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Robot_message) if (&from == this) return; Clear(); MergeFrom(from); } bool Robot_message::IsInitialized() const { - if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false; - + if ((_has_bits_[0] & 0x0000000b) != 0x0000000b) return false; if (has_position()) { - if (!this->position().IsInitialized()) return false; + if (!this->position_->IsInitialized()) return false; } if (has_velocity()) { - if (!this->velocity().IsInitialized()) return false; + if (!this->velocity_->IsInitialized()) return false; } if (has_rc()) { - if (!this->rc().IsInitialized()) return false; + if (!this->rc_->IsInitialized()) return false; } return true; } void Robot_message::Swap(Robot_message* other) { - if (other != this) { - std::swap(isvalid_, other->isvalid_); - std::swap(position_, other->position_); - std::swap(velocity_, other->velocity_); - std::swap(status_, other->status_); - std::swap(role_, other->role_); - std::swap(region_, other->region_); - std::swap(rc_, other->rc_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void Robot_message::InternalSwap(Robot_message* other) { + std::swap(position_, other->position_); + std::swap(velocity_, other->velocity_); + std::swap(rc_, other->rc_); + std::swap(isvalid_, other->isvalid_); + std::swap(region_, other->region_); + std::swap(status_, other->status_); + std::swap(role_, other->role_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata Robot_message::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = Robot_message_descriptor_; - metadata.reflection = Robot_message_reflection_; - return metadata; + return file_level_metadata[0]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// Robot_message + +// required bool isValid = 1; +bool Robot_message::has_isvalid() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +void Robot_message::set_has_isvalid() { + _has_bits_[0] |= 0x00000008u; +} +void Robot_message::clear_has_isvalid() { + _has_bits_[0] &= ~0x00000008u; +} +void Robot_message::clear_isvalid() { + isvalid_ = false; + clear_has_isvalid(); +} +bool Robot_message::isvalid() const { + // @@protoc_insertion_point(field_get:Robot_message.isValid) + return isvalid_; +} +void Robot_message::set_isvalid(bool value) { + set_has_isvalid(); + isvalid_ = value; + // @@protoc_insertion_point(field_set:Robot_message.isValid) +} + +// required .position_message position = 2; +bool Robot_message::has_position() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void Robot_message::set_has_position() { + _has_bits_[0] |= 0x00000001u; +} +void Robot_message::clear_has_position() { + _has_bits_[0] &= ~0x00000001u; +} +void Robot_message::clear_position() { + if (position_ != NULL) position_->::position_message::Clear(); + clear_has_position(); +} +const ::position_message& Robot_message::position() const { + // @@protoc_insertion_point(field_get:Robot_message.position) + return position_ != NULL ? *position_ + : *::position_message::internal_default_instance(); +} +::position_message* Robot_message::mutable_position() { + set_has_position(); + if (position_ == NULL) { + position_ = new ::position_message; + } + // @@protoc_insertion_point(field_mutable:Robot_message.position) + return position_; +} +::position_message* Robot_message::release_position() { + // @@protoc_insertion_point(field_release:Robot_message.position) + clear_has_position(); + ::position_message* temp = position_; + position_ = NULL; + return temp; +} +void Robot_message::set_allocated_position(::position_message* position) { + delete position_; + position_ = position; + if (position) { + set_has_position(); + } else { + clear_has_position(); + } + // @@protoc_insertion_point(field_set_allocated:Robot_message.position) +} + +// required .position_message velocity = 3; +bool Robot_message::has_velocity() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +void Robot_message::set_has_velocity() { + _has_bits_[0] |= 0x00000002u; +} +void Robot_message::clear_has_velocity() { + _has_bits_[0] &= ~0x00000002u; +} +void Robot_message::clear_velocity() { + if (velocity_ != NULL) velocity_->::position_message::Clear(); + clear_has_velocity(); +} +const ::position_message& Robot_message::velocity() const { + // @@protoc_insertion_point(field_get:Robot_message.velocity) + return velocity_ != NULL ? *velocity_ + : *::position_message::internal_default_instance(); +} +::position_message* Robot_message::mutable_velocity() { + set_has_velocity(); + if (velocity_ == NULL) { + velocity_ = new ::position_message; + } + // @@protoc_insertion_point(field_mutable:Robot_message.velocity) + return velocity_; +} +::position_message* Robot_message::release_velocity() { + // @@protoc_insertion_point(field_release:Robot_message.velocity) + clear_has_velocity(); + ::position_message* temp = velocity_; + velocity_ = NULL; + return temp; +} +void Robot_message::set_allocated_velocity(::position_message* velocity) { + delete velocity_; + velocity_ = velocity; + if (velocity) { + set_has_velocity(); + } else { + clear_has_velocity(); + } + // @@protoc_insertion_point(field_set_allocated:Robot_message.velocity) +} + +// optional .Robot_message.AgentStatus status = 4; +bool Robot_message::has_status() const { + return (_has_bits_[0] & 0x00000020u) != 0; +} +void Robot_message::set_has_status() { + _has_bits_[0] |= 0x00000020u; +} +void Robot_message::clear_has_status() { + _has_bits_[0] &= ~0x00000020u; +} +void Robot_message::clear_status() { + status_ = 1; + clear_has_status(); +} +::Robot_message_AgentStatus Robot_message::status() const { + // @@protoc_insertion_point(field_get:Robot_message.status) + return static_cast< ::Robot_message_AgentStatus >(status_); +} +void Robot_message::set_status(::Robot_message_AgentStatus value) { + assert(::Robot_message_AgentStatus_IsValid(value)); + set_has_status(); + status_ = value; + // @@protoc_insertion_point(field_set:Robot_message.status) +} + +// optional .Robot_message.AgentRole role = 5; +bool Robot_message::has_role() const { + return (_has_bits_[0] & 0x00000040u) != 0; +} +void Robot_message::set_has_role() { + _has_bits_[0] |= 0x00000040u; +} +void Robot_message::clear_has_role() { + _has_bits_[0] &= ~0x00000040u; +} +void Robot_message::clear_role() { + role_ = 31; + clear_has_role(); +} +::Robot_message_AgentRole Robot_message::role() const { + // @@protoc_insertion_point(field_get:Robot_message.role) + return static_cast< ::Robot_message_AgentRole >(role_); +} +void Robot_message::set_role(::Robot_message_AgentRole value) { + assert(::Robot_message_AgentRole_IsValid(value)); + set_has_role(); + role_ = value; + // @@protoc_insertion_point(field_set:Robot_message.role) +} + +// optional .Robot_message.AgentRegion region = 6; +bool Robot_message::has_region() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +void Robot_message::set_has_region() { + _has_bits_[0] |= 0x00000010u; +} +void Robot_message::clear_has_region() { + _has_bits_[0] &= ~0x00000010u; +} +void Robot_message::clear_region() { + region_ = 21; + clear_has_region(); +} +::Robot_message_AgentRegion Robot_message::region() const { + // @@protoc_insertion_point(field_get:Robot_message.region) + return static_cast< ::Robot_message_AgentRegion >(region_); +} +void Robot_message::set_region(::Robot_message_AgentRegion value) { + assert(::Robot_message_AgentRegion_IsValid(value)); + set_has_region(); + region_ = value; + // @@protoc_insertion_point(field_set:Robot_message.region) +} + +// optional .RobotCommand_message rc = 7; +bool Robot_message::has_rc() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +void Robot_message::set_has_rc() { + _has_bits_[0] |= 0x00000004u; +} +void Robot_message::clear_has_rc() { + _has_bits_[0] &= ~0x00000004u; +} +void Robot_message::clear_rc() { + if (rc_ != NULL) rc_->::RobotCommand_message::Clear(); + clear_has_rc(); +} +const ::RobotCommand_message& Robot_message::rc() const { + // @@protoc_insertion_point(field_get:Robot_message.rc) + return rc_ != NULL ? *rc_ + : *::RobotCommand_message::internal_default_instance(); +} +::RobotCommand_message* Robot_message::mutable_rc() { + set_has_rc(); + if (rc_ == NULL) { + rc_ = new ::RobotCommand_message; + } + // @@protoc_insertion_point(field_mutable:Robot_message.rc) + return rc_; +} +::RobotCommand_message* Robot_message::release_rc() { + // @@protoc_insertion_point(field_release:Robot_message.rc) + clear_has_rc(); + ::RobotCommand_message* temp = rc_; + rc_ = NULL; + return temp; +} +void Robot_message::set_allocated_rc(::RobotCommand_message* rc) { + delete rc_; + rc_ = rc; + if (rc) { + set_has_rc(); + } else { + clear_has_rc(); + } + // @@protoc_insertion_point(field_set_allocated:Robot_message.rc) } +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) diff --git a/src/proto/Robot_message.pb.h b/src/proto/Robot_message.pb.h index 66ae584..3d64bee 100644 --- a/src/proto/Robot_message.pb.h +++ b/src/proto/Robot_message.pb.h @@ -8,33 +8,42 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 2005000 +#if GOOGLE_PROTOBUF_VERSION < 3001000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. #endif +#include +#include #include +#include #include -#include -#include +#include // IWYU pragma: export +#include // IWYU pragma: export #include #include #include "position_message.pb.h" #include "RobotCommand_message.pb.h" // @@protoc_insertion_point(includes) +class RobotCommand_message; +class RobotCommand_messageDefaultTypeInternal; +extern RobotCommand_messageDefaultTypeInternal _RobotCommand_message_default_instance_; +class Robot_message; +class Robot_messageDefaultTypeInternal; +extern Robot_messageDefaultTypeInternal _Robot_message_default_instance_; +class position_message; +class position_messageDefaultTypeInternal; +extern position_messageDefaultTypeInternal _position_message_default_instance_; // Internal implementation detail -- do not call these. -void protobuf_AddDesc_Robot_5fmessage_2eproto(); -void protobuf_AssignDesc_Robot_5fmessage_2eproto(); -void protobuf_ShutdownFile_Robot_5fmessage_2eproto(); - -class Robot_message; +void protobuf_AddDesc_Robot_5fmessage_2eproto(); +void protobuf_InitDefaults_Robot_5fmessage_2eproto(); enum Robot_message_AgentStatus { Robot_message_AgentStatus_Idle = 1, @@ -116,7 +125,7 @@ inline bool Robot_message_AgentRole_Parse( } // =================================================================== -class Robot_message : public ::google::protobuf::Message { +class Robot_message : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:Robot_message) */ { public: Robot_message(); virtual ~Robot_message(); @@ -129,54 +138,82 @@ class Robot_message : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const Robot_message& default_instance(); + static inline const Robot_message* internal_default_instance() { + return reinterpret_cast( + &_Robot_message_default_instance_); + } + void Swap(Robot_message* other); // implements Message ---------------------------------------------- - Robot_message* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline Robot_message* New() const PROTOBUF_FINAL { return New(NULL); } + + Robot_message* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const Robot_message& from); void MergeFrom(const Robot_message& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(Robot_message* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- typedef Robot_message_AgentStatus AgentStatus; - static const AgentStatus Idle = Robot_message_AgentStatus_Idle; - static const AgentStatus Passing = Robot_message_AgentStatus_Passing; - static const AgentStatus Kicking = Robot_message_AgentStatus_Kicking; - static const AgentStatus Chiping = Robot_message_AgentStatus_Chiping; - static const AgentStatus FollowingBall = Robot_message_AgentStatus_FollowingBall; - static const AgentStatus BlockingBall = Robot_message_AgentStatus_BlockingBall; - static const AgentStatus BlockingRobot = Robot_message_AgentStatus_BlockingRobot; - static const AgentStatus RecievingPass = Robot_message_AgentStatus_RecievingPass; + static const AgentStatus Idle = + Robot_message_AgentStatus_Idle; + static const AgentStatus Passing = + Robot_message_AgentStatus_Passing; + static const AgentStatus Kicking = + Robot_message_AgentStatus_Kicking; + static const AgentStatus Chiping = + Robot_message_AgentStatus_Chiping; + static const AgentStatus FollowingBall = + Robot_message_AgentStatus_FollowingBall; + static const AgentStatus BlockingBall = + Robot_message_AgentStatus_BlockingBall; + static const AgentStatus BlockingRobot = + Robot_message_AgentStatus_BlockingRobot; + static const AgentStatus RecievingPass = + Robot_message_AgentStatus_RecievingPass; static inline bool AgentStatus_IsValid(int value) { return Robot_message_AgentStatus_IsValid(value); } @@ -199,10 +236,14 @@ class Robot_message : public ::google::protobuf::Message { } typedef Robot_message_AgentRegion AgentRegion; - static const AgentRegion NoRegion = Robot_message_AgentRegion_NoRegion; - static const AgentRegion Left = Robot_message_AgentRegion_Left; - static const AgentRegion Center = Robot_message_AgentRegion_Center; - static const AgentRegion Right = Robot_message_AgentRegion_Right; + static const AgentRegion NoRegion = + Robot_message_AgentRegion_NoRegion; + static const AgentRegion Left = + Robot_message_AgentRegion_Left; + static const AgentRegion Center = + Robot_message_AgentRegion_Center; + static const AgentRegion Right = + Robot_message_AgentRegion_Right; static inline bool AgentRegion_IsValid(int value) { return Robot_message_AgentRegion_IsValid(value); } @@ -225,21 +266,36 @@ class Robot_message : public ::google::protobuf::Message { } typedef Robot_message_AgentRole AgentRole; - static const AgentRole NoRole = Robot_message_AgentRole_NoRole; - static const AgentRole ArcMid = Robot_message_AgentRole_ArcMid; - static const AgentRole ArcLeft = Robot_message_AgentRole_ArcLeft; - static const AgentRole ArcRight = Robot_message_AgentRole_ArcRight; - static const AgentRole FixedPositionLeft = Robot_message_AgentRole_FixedPositionLeft; - static const AgentRole FixedPositionRight = Robot_message_AgentRole_FixedPositionRight; - static const AgentRole FixedPositionMid = Robot_message_AgentRole_FixedPositionMid; - static const AgentRole AttackerLeft = Robot_message_AgentRole_AttackerLeft; - static const AgentRole AttackerRight = Robot_message_AgentRole_AttackerRight; - static const AgentRole AttackerMid = Robot_message_AgentRole_AttackerMid; - static const AgentRole Blocker = Robot_message_AgentRole_Blocker; - static const AgentRole DefenderLeft = Robot_message_AgentRole_DefenderLeft; - static const AgentRole DefenderRight = Robot_message_AgentRole_DefenderRight; - static const AgentRole DefenderMid = Robot_message_AgentRole_DefenderMid; - static const AgentRole Golie = Robot_message_AgentRole_Golie; + static const AgentRole NoRole = + Robot_message_AgentRole_NoRole; + static const AgentRole ArcMid = + Robot_message_AgentRole_ArcMid; + static const AgentRole ArcLeft = + Robot_message_AgentRole_ArcLeft; + static const AgentRole ArcRight = + Robot_message_AgentRole_ArcRight; + static const AgentRole FixedPositionLeft = + Robot_message_AgentRole_FixedPositionLeft; + static const AgentRole FixedPositionRight = + Robot_message_AgentRole_FixedPositionRight; + static const AgentRole FixedPositionMid = + Robot_message_AgentRole_FixedPositionMid; + static const AgentRole AttackerLeft = + Robot_message_AgentRole_AttackerLeft; + static const AgentRole AttackerRight = + Robot_message_AgentRole_AttackerRight; + static const AgentRole AttackerMid = + Robot_message_AgentRole_AttackerMid; + static const AgentRole Blocker = + Robot_message_AgentRole_Blocker; + static const AgentRole DefenderLeft = + Robot_message_AgentRole_DefenderLeft; + static const AgentRole DefenderRight = + Robot_message_AgentRole_DefenderRight; + static const AgentRole DefenderMid = + Robot_message_AgentRole_DefenderMid; + static const AgentRole Golie = + Robot_message_AgentRole_Golie; static inline bool AgentRole_IsValid(int value) { return Robot_message_AgentRole_IsValid(value); } @@ -264,149 +320,157 @@ class Robot_message : public ::google::protobuf::Message { // accessors ------------------------------------------------------- // required bool isValid = 1; - inline bool has_isvalid() const; - inline void clear_isvalid(); + bool has_isvalid() const; + void clear_isvalid(); static const int kIsValidFieldNumber = 1; - inline bool isvalid() const; - inline void set_isvalid(bool value); + bool isvalid() const; + void set_isvalid(bool value); // required .position_message position = 2; - inline bool has_position() const; - inline void clear_position(); + bool has_position() const; + void clear_position(); static const int kPositionFieldNumber = 2; - inline const ::position_message& position() const; - inline ::position_message* mutable_position(); - inline ::position_message* release_position(); - inline void set_allocated_position(::position_message* position); + const ::position_message& position() const; + ::position_message* mutable_position(); + ::position_message* release_position(); + void set_allocated_position(::position_message* position); // required .position_message velocity = 3; - inline bool has_velocity() const; - inline void clear_velocity(); + bool has_velocity() const; + void clear_velocity(); static const int kVelocityFieldNumber = 3; - inline const ::position_message& velocity() const; - inline ::position_message* mutable_velocity(); - inline ::position_message* release_velocity(); - inline void set_allocated_velocity(::position_message* velocity); + const ::position_message& velocity() const; + ::position_message* mutable_velocity(); + ::position_message* release_velocity(); + void set_allocated_velocity(::position_message* velocity); // optional .Robot_message.AgentStatus status = 4; - inline bool has_status() const; - inline void clear_status(); + bool has_status() const; + void clear_status(); static const int kStatusFieldNumber = 4; - inline ::Robot_message_AgentStatus status() const; - inline void set_status(::Robot_message_AgentStatus value); + ::Robot_message_AgentStatus status() const; + void set_status(::Robot_message_AgentStatus value); // optional .Robot_message.AgentRole role = 5; - inline bool has_role() const; - inline void clear_role(); + bool has_role() const; + void clear_role(); static const int kRoleFieldNumber = 5; - inline ::Robot_message_AgentRole role() const; - inline void set_role(::Robot_message_AgentRole value); + ::Robot_message_AgentRole role() const; + void set_role(::Robot_message_AgentRole value); // optional .Robot_message.AgentRegion region = 6; - inline bool has_region() const; - inline void clear_region(); + bool has_region() const; + void clear_region(); static const int kRegionFieldNumber = 6; - inline ::Robot_message_AgentRegion region() const; - inline void set_region(::Robot_message_AgentRegion value); + ::Robot_message_AgentRegion region() const; + void set_region(::Robot_message_AgentRegion value); // optional .RobotCommand_message rc = 7; - inline bool has_rc() const; - inline void clear_rc(); + bool has_rc() const; + void clear_rc(); static const int kRcFieldNumber = 7; - inline const ::RobotCommand_message& rc() const; - inline ::RobotCommand_message* mutable_rc(); - inline ::RobotCommand_message* release_rc(); - inline void set_allocated_rc(::RobotCommand_message* rc); + const ::RobotCommand_message& rc() const; + ::RobotCommand_message* mutable_rc(); + ::RobotCommand_message* release_rc(); + void set_allocated_rc(::RobotCommand_message* rc); // @@protoc_insertion_point(class_scope:Robot_message) private: - inline void set_has_isvalid(); - inline void clear_has_isvalid(); - inline void set_has_position(); - inline void clear_has_position(); - inline void set_has_velocity(); - inline void clear_has_velocity(); - inline void set_has_status(); - inline void clear_has_status(); - inline void set_has_role(); - inline void clear_has_role(); - inline void set_has_region(); - inline void clear_has_region(); - inline void set_has_rc(); - inline void clear_has_rc(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + void set_has_isvalid(); + void clear_has_isvalid(); + void set_has_position(); + void clear_has_position(); + void set_has_velocity(); + void clear_has_velocity(); + void set_has_status(); + void clear_has_status(); + void set_has_role(); + void clear_has_role(); + void set_has_region(); + void clear_has_region(); + void set_has_rc(); + void clear_has_rc(); + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; ::position_message* position_; + ::position_message* velocity_; + ::RobotCommand_message* rc_; bool isvalid_; + int region_; int status_; - ::position_message* velocity_; int role_; - int region_; - ::RobotCommand_message* rc_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(7 + 31) / 32]; - - friend void protobuf_AddDesc_Robot_5fmessage_2eproto(); - friend void protobuf_AssignDesc_Robot_5fmessage_2eproto(); + friend void protobuf_InitDefaults_Robot_5fmessage_2eproto_impl(); + friend void protobuf_AddDesc_Robot_5fmessage_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_Robot_5fmessage_2eproto(); friend void protobuf_ShutdownFile_Robot_5fmessage_2eproto(); - void InitAsDefaultInstance(); - static Robot_message* default_instance_; }; // =================================================================== // =================================================================== +#if !PROTOBUF_INLINE_NOT_IN_HEADERS // Robot_message // required bool isValid = 1; inline bool Robot_message::has_isvalid() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return (_has_bits_[0] & 0x00000008u) != 0; } inline void Robot_message::set_has_isvalid() { - _has_bits_[0] |= 0x00000001u; + _has_bits_[0] |= 0x00000008u; } inline void Robot_message::clear_has_isvalid() { - _has_bits_[0] &= ~0x00000001u; + _has_bits_[0] &= ~0x00000008u; } inline void Robot_message::clear_isvalid() { isvalid_ = false; clear_has_isvalid(); } inline bool Robot_message::isvalid() const { + // @@protoc_insertion_point(field_get:Robot_message.isValid) return isvalid_; } inline void Robot_message::set_isvalid(bool value) { set_has_isvalid(); isvalid_ = value; + // @@protoc_insertion_point(field_set:Robot_message.isValid) } // required .position_message position = 2; inline bool Robot_message::has_position() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return (_has_bits_[0] & 0x00000001u) != 0; } inline void Robot_message::set_has_position() { - _has_bits_[0] |= 0x00000002u; + _has_bits_[0] |= 0x00000001u; } inline void Robot_message::clear_has_position() { - _has_bits_[0] &= ~0x00000002u; + _has_bits_[0] &= ~0x00000001u; } inline void Robot_message::clear_position() { if (position_ != NULL) position_->::position_message::Clear(); clear_has_position(); } inline const ::position_message& Robot_message::position() const { - return position_ != NULL ? *position_ : *default_instance_->position_; + // @@protoc_insertion_point(field_get:Robot_message.position) + return position_ != NULL ? *position_ + : *::position_message::internal_default_instance(); } inline ::position_message* Robot_message::mutable_position() { set_has_position(); - if (position_ == NULL) position_ = new ::position_message; + if (position_ == NULL) { + position_ = new ::position_message; + } + // @@protoc_insertion_point(field_mutable:Robot_message.position) return position_; } inline ::position_message* Robot_message::release_position() { + // @@protoc_insertion_point(field_release:Robot_message.position) clear_has_position(); ::position_message* temp = position_; position_ = NULL; @@ -420,31 +484,38 @@ inline void Robot_message::set_allocated_position(::position_message* position) } else { clear_has_position(); } + // @@protoc_insertion_point(field_set_allocated:Robot_message.position) } // required .position_message velocity = 3; inline bool Robot_message::has_velocity() const { - return (_has_bits_[0] & 0x00000004u) != 0; + return (_has_bits_[0] & 0x00000002u) != 0; } inline void Robot_message::set_has_velocity() { - _has_bits_[0] |= 0x00000004u; + _has_bits_[0] |= 0x00000002u; } inline void Robot_message::clear_has_velocity() { - _has_bits_[0] &= ~0x00000004u; + _has_bits_[0] &= ~0x00000002u; } inline void Robot_message::clear_velocity() { if (velocity_ != NULL) velocity_->::position_message::Clear(); clear_has_velocity(); } inline const ::position_message& Robot_message::velocity() const { - return velocity_ != NULL ? *velocity_ : *default_instance_->velocity_; + // @@protoc_insertion_point(field_get:Robot_message.velocity) + return velocity_ != NULL ? *velocity_ + : *::position_message::internal_default_instance(); } inline ::position_message* Robot_message::mutable_velocity() { set_has_velocity(); - if (velocity_ == NULL) velocity_ = new ::position_message; + if (velocity_ == NULL) { + velocity_ = new ::position_message; + } + // @@protoc_insertion_point(field_mutable:Robot_message.velocity) return velocity_; } inline ::position_message* Robot_message::release_velocity() { + // @@protoc_insertion_point(field_release:Robot_message.velocity) clear_has_velocity(); ::position_message* temp = velocity_; velocity_ = NULL; @@ -458,100 +529,113 @@ inline void Robot_message::set_allocated_velocity(::position_message* velocity) } else { clear_has_velocity(); } + // @@protoc_insertion_point(field_set_allocated:Robot_message.velocity) } // optional .Robot_message.AgentStatus status = 4; inline bool Robot_message::has_status() const { - return (_has_bits_[0] & 0x00000008u) != 0; + return (_has_bits_[0] & 0x00000020u) != 0; } inline void Robot_message::set_has_status() { - _has_bits_[0] |= 0x00000008u; + _has_bits_[0] |= 0x00000020u; } inline void Robot_message::clear_has_status() { - _has_bits_[0] &= ~0x00000008u; + _has_bits_[0] &= ~0x00000020u; } inline void Robot_message::clear_status() { status_ = 1; clear_has_status(); } inline ::Robot_message_AgentStatus Robot_message::status() const { + // @@protoc_insertion_point(field_get:Robot_message.status) return static_cast< ::Robot_message_AgentStatus >(status_); } inline void Robot_message::set_status(::Robot_message_AgentStatus value) { assert(::Robot_message_AgentStatus_IsValid(value)); set_has_status(); status_ = value; + // @@protoc_insertion_point(field_set:Robot_message.status) } // optional .Robot_message.AgentRole role = 5; inline bool Robot_message::has_role() const { - return (_has_bits_[0] & 0x00000010u) != 0; + return (_has_bits_[0] & 0x00000040u) != 0; } inline void Robot_message::set_has_role() { - _has_bits_[0] |= 0x00000010u; + _has_bits_[0] |= 0x00000040u; } inline void Robot_message::clear_has_role() { - _has_bits_[0] &= ~0x00000010u; + _has_bits_[0] &= ~0x00000040u; } inline void Robot_message::clear_role() { role_ = 31; clear_has_role(); } inline ::Robot_message_AgentRole Robot_message::role() const { + // @@protoc_insertion_point(field_get:Robot_message.role) return static_cast< ::Robot_message_AgentRole >(role_); } inline void Robot_message::set_role(::Robot_message_AgentRole value) { assert(::Robot_message_AgentRole_IsValid(value)); set_has_role(); role_ = value; + // @@protoc_insertion_point(field_set:Robot_message.role) } // optional .Robot_message.AgentRegion region = 6; inline bool Robot_message::has_region() const { - return (_has_bits_[0] & 0x00000020u) != 0; + return (_has_bits_[0] & 0x00000010u) != 0; } inline void Robot_message::set_has_region() { - _has_bits_[0] |= 0x00000020u; + _has_bits_[0] |= 0x00000010u; } inline void Robot_message::clear_has_region() { - _has_bits_[0] &= ~0x00000020u; + _has_bits_[0] &= ~0x00000010u; } inline void Robot_message::clear_region() { region_ = 21; clear_has_region(); } inline ::Robot_message_AgentRegion Robot_message::region() const { + // @@protoc_insertion_point(field_get:Robot_message.region) return static_cast< ::Robot_message_AgentRegion >(region_); } inline void Robot_message::set_region(::Robot_message_AgentRegion value) { assert(::Robot_message_AgentRegion_IsValid(value)); set_has_region(); region_ = value; + // @@protoc_insertion_point(field_set:Robot_message.region) } // optional .RobotCommand_message rc = 7; inline bool Robot_message::has_rc() const { - return (_has_bits_[0] & 0x00000040u) != 0; + return (_has_bits_[0] & 0x00000004u) != 0; } inline void Robot_message::set_has_rc() { - _has_bits_[0] |= 0x00000040u; + _has_bits_[0] |= 0x00000004u; } inline void Robot_message::clear_has_rc() { - _has_bits_[0] &= ~0x00000040u; + _has_bits_[0] &= ~0x00000004u; } inline void Robot_message::clear_rc() { if (rc_ != NULL) rc_->::RobotCommand_message::Clear(); clear_has_rc(); } inline const ::RobotCommand_message& Robot_message::rc() const { - return rc_ != NULL ? *rc_ : *default_instance_->rc_; + // @@protoc_insertion_point(field_get:Robot_message.rc) + return rc_ != NULL ? *rc_ + : *::RobotCommand_message::internal_default_instance(); } inline ::RobotCommand_message* Robot_message::mutable_rc() { set_has_rc(); - if (rc_ == NULL) rc_ = new ::RobotCommand_message; + if (rc_ == NULL) { + rc_ = new ::RobotCommand_message; + } + // @@protoc_insertion_point(field_mutable:Robot_message.rc) return rc_; } inline ::RobotCommand_message* Robot_message::release_rc() { + // @@protoc_insertion_point(field_release:Robot_message.rc) clear_has_rc(); ::RobotCommand_message* temp = rc_; rc_ = NULL; @@ -565,30 +649,36 @@ inline void Robot_message::set_allocated_rc(::RobotCommand_message* rc) { } else { clear_has_rc(); } + // @@protoc_insertion_point(field_set_allocated:Robot_message.rc) } +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) + #ifndef SWIG namespace google { namespace protobuf { +template <> struct is_proto_enum< ::Robot_message_AgentStatus> : ::google::protobuf::internal::true_type {}; template <> inline const EnumDescriptor* GetEnumDescriptor< ::Robot_message_AgentStatus>() { return ::Robot_message_AgentStatus_descriptor(); } +template <> struct is_proto_enum< ::Robot_message_AgentRegion> : ::google::protobuf::internal::true_type {}; template <> inline const EnumDescriptor* GetEnumDescriptor< ::Robot_message_AgentRegion>() { return ::Robot_message_AgentRegion_descriptor(); } +template <> struct is_proto_enum< ::Robot_message_AgentRole> : ::google::protobuf::internal::true_type {}; template <> inline const EnumDescriptor* GetEnumDescriptor< ::Robot_message_AgentRole>() { return ::Robot_message_AgentRole_descriptor(); } -} // namespace google } // namespace protobuf +} // namespace google #endif // SWIG // @@protoc_insertion_point(global_scope) diff --git a/src/proto/grSim_Commands.pb.cc b/src/proto/grSim_Commands.pb.cc index e8e69b1..8bfc07d 100644 --- a/src/proto/grSim_Commands.pb.cc +++ b/src/proto/grSim_Commands.pb.cc @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -15,27 +16,25 @@ #include #include // @@protoc_insertion_point(includes) +class grSim_Robot_CommandDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +grSim_Robot_CommandDefaultTypeInternal _grSim_Robot_Command_default_instance_; +class grSim_CommandsDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +grSim_CommandsDefaultTypeInternal _grSim_Commands_default_instance_; namespace { -const ::google::protobuf::Descriptor* grSim_Robot_Command_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - grSim_Robot_Command_reflection_ = NULL; -const ::google::protobuf::Descriptor* grSim_Commands_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - grSim_Commands_reflection_ = NULL; +::google::protobuf::Metadata file_level_metadata[2]; } // namespace -void protobuf_AssignDesc_grSim_5fCommands_2eproto() { - protobuf_AddDesc_grSim_5fCommands_2eproto(); - const ::google::protobuf::FileDescriptor* file = - ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( - "grSim_Commands.proto"); - GOOGLE_CHECK(file != NULL); - grSim_Robot_Command_descriptor_ = file->message_type(0); - static const int grSim_Robot_Command_offsets_[12] = { +const ::google::protobuf::uint32* protobuf_Offsets_grSim_5fCommands_2eproto() GOOGLE_ATTRIBUTE_COLD; +const ::google::protobuf::uint32* protobuf_Offsets_grSim_5fCommands_2eproto() { + static const ::google::protobuf::uint32 offsets[] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_Robot_Command, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_Robot_Command, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_Robot_Command, id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_Robot_Command, kickspeedx_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_Robot_Command, kickspeedz_), @@ -48,88 +47,110 @@ void protobuf_AssignDesc_grSim_5fCommands_2eproto() { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_Robot_Command, wheel2_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_Robot_Command, wheel3_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_Robot_Command, wheel4_), - }; - grSim_Robot_Command_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - grSim_Robot_Command_descriptor_, - grSim_Robot_Command::default_instance_, - grSim_Robot_Command_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_Robot_Command, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_Robot_Command, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(grSim_Robot_Command)); - grSim_Commands_descriptor_ = file->message_type(1); - static const int grSim_Commands_offsets_[3] = { + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_Commands, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_Commands, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_Commands, timestamp_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_Commands, isteamyellow_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_Commands, robot_commands_), + 0, + 1, + 2, }; - grSim_Commands_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - grSim_Commands_descriptor_, - grSim_Commands::default_instance_, - grSim_Commands_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_Commands, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_Commands, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(grSim_Commands)); + return offsets; } +static const ::google::protobuf::internal::MigrationSchema schemas[] = { + { 0, 16, sizeof(grSim_Robot_Command)}, + { 28, 35, sizeof(grSim_Commands)}, +}; + +static const ::google::protobuf::internal::DefaultInstanceData file_default_instances[] = { + {reinterpret_cast(&_grSim_Robot_Command_default_instance_), NULL}, + {reinterpret_cast(&_grSim_Commands_default_instance_), NULL}, +}; + namespace { -GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); -inline void protobuf_AssignDescriptorsOnce() { - ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, - &protobuf_AssignDesc_grSim_5fCommands_2eproto); +void protobuf_AssignDescriptors() { + protobuf_AddDesc_grSim_5fCommands_2eproto(); + ::google::protobuf::MessageFactory* factory = NULL; + AssignDescriptors( + "grSim_Commands.proto", schemas, file_default_instances, protobuf_Offsets_grSim_5fCommands_2eproto(), factory, + file_level_metadata, NULL, NULL); } +void protobuf_AssignDescriptorsOnce() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); +} + +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - grSim_Robot_Command_descriptor_, &grSim_Robot_Command::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - grSim_Commands_descriptor_, &grSim_Commands::default_instance()); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 2); } } // namespace void protobuf_ShutdownFile_grSim_5fCommands_2eproto() { - delete grSim_Robot_Command::default_instance_; - delete grSim_Robot_Command_reflection_; - delete grSim_Commands::default_instance_; - delete grSim_Commands_reflection_; + _grSim_Robot_Command_default_instance_.Shutdown(); + delete file_level_metadata[0].reflection; + _grSim_Commands_default_instance_.Shutdown(); + delete file_level_metadata[1].reflection; } -void protobuf_AddDesc_grSim_5fCommands_2eproto() { - static bool already_here = false; - if (already_here) return; - already_here = true; +void protobuf_InitDefaults_grSim_5fCommands_2eproto_impl() { GOOGLE_PROTOBUF_VERIFY_VERSION; + ::google::protobuf::internal::InitProtobufDefaults(); + _grSim_Robot_Command_default_instance_.DefaultConstruct(); + _grSim_Commands_default_instance_.DefaultConstruct(); +} + +void protobuf_InitDefaults_grSim_5fCommands_2eproto() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_InitDefaults_grSim_5fCommands_2eproto_impl); +} +void protobuf_AddDesc_grSim_5fCommands_2eproto_impl() { + protobuf_InitDefaults_grSim_5fCommands_2eproto(); + static const char descriptor[] = { + "\n\024grSim_Commands.proto\"\352\001\n\023grSim_Robot_C" + "ommand\022\n\n\002id\030\001 \002(\r\022\022\n\nkickspeedx\030\002 \002(\002\022\022" + "\n\nkickspeedz\030\003 \002(\002\022\022\n\nveltangent\030\004 \002(\002\022\021" + "\n\tvelnormal\030\005 \002(\002\022\022\n\nvelangular\030\006 \002(\002\022\017\n" + "\007spinner\030\007 \002(\010\022\023\n\013wheelsspeed\030\010 \002(\010\022\016\n\006w" + "heel1\030\t \001(\002\022\016\n\006wheel2\030\n \001(\002\022\016\n\006wheel3\030\013 " + "\001(\002\022\016\n\006wheel4\030\014 \001(\002\"g\n\016grSim_Commands\022\021\n" + "\ttimestamp\030\001 \002(\001\022\024\n\014isteamyellow\030\002 \002(\010\022," + "\n\016robot_commands\030\003 \003(\0132\024.grSim_Robot_Com" + "mand" + }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - "\n\024grSim_Commands.proto\"\352\001\n\023grSim_Robot_C" - "ommand\022\n\n\002id\030\001 \002(\r\022\022\n\nkickspeedx\030\002 \002(\002\022\022" - "\n\nkickspeedz\030\003 \002(\002\022\022\n\nveltangent\030\004 \002(\002\022\021" - "\n\tvelnormal\030\005 \002(\002\022\022\n\nvelangular\030\006 \002(\002\022\017\n" - "\007spinner\030\007 \002(\010\022\023\n\013wheelsspeed\030\010 \002(\010\022\016\n\006w" - "heel1\030\t \001(\002\022\016\n\006wheel2\030\n \001(\002\022\016\n\006wheel3\030\013 " - "\001(\002\022\016\n\006wheel4\030\014 \001(\002\"g\n\016grSim_Commands\022\021\n" - "\ttimestamp\030\001 \002(\001\022\024\n\014isteamyellow\030\002 \002(\010\022," - "\n\016robot_commands\030\003 \003(\0132\024.grSim_Robot_Com" - "mand", 364); + descriptor, 364); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "grSim_Commands.proto", &protobuf_RegisterTypes); - grSim_Robot_Command::default_instance_ = new grSim_Robot_Command(); - grSim_Commands::default_instance_ = new grSim_Commands(); - grSim_Robot_Command::default_instance_->InitAsDefaultInstance(); - grSim_Commands::default_instance_->InitAsDefaultInstance(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_grSim_5fCommands_2eproto); } +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_grSim_5fCommands_2eproto_once_); +void protobuf_AddDesc_grSim_5fCommands_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_grSim_5fCommands_2eproto_once_, + &protobuf_AddDesc_grSim_5fCommands_2eproto_impl); +} // Force AddDescriptors() to be called at static initialization time. struct StaticDescriptorInitializer_grSim_5fCommands_2eproto { StaticDescriptorInitializer_grSim_5fCommands_2eproto() { @@ -139,7 +160,7 @@ struct StaticDescriptorInitializer_grSim_5fCommands_2eproto { // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int grSim_Robot_Command::kIdFieldNumber; const int grSim_Robot_Command::kKickspeedxFieldNumber; const int grSim_Robot_Command::kKickspeedzFieldNumber; @@ -152,46 +173,40 @@ const int grSim_Robot_Command::kWheel1FieldNumber; const int grSim_Robot_Command::kWheel2FieldNumber; const int grSim_Robot_Command::kWheel3FieldNumber; const int grSim_Robot_Command::kWheel4FieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 grSim_Robot_Command::grSim_Robot_Command() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_grSim_5fCommands_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:grSim_Robot_Command) } - -void grSim_Robot_Command::InitAsDefaultInstance() { -} - grSim_Robot_Command::grSim_Robot_Command(const grSim_Robot_Command& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::memcpy(&id_, &from.id_, + reinterpret_cast(&wheel4_) - + reinterpret_cast(&id_) + sizeof(wheel4_)); + // @@protoc_insertion_point(copy_constructor:grSim_Robot_Command) } void grSim_Robot_Command::SharedCtor() { _cached_size_ = 0; - id_ = 0u; - kickspeedx_ = 0; - kickspeedz_ = 0; - veltangent_ = 0; - velnormal_ = 0; - velangular_ = 0; - spinner_ = false; - wheelsspeed_ = false; - wheel1_ = 0; - wheel2_ = 0; - wheel3_ = 0; - wheel4_ = 0; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); + ::memset(&id_, 0, reinterpret_cast(&wheel4_) - + reinterpret_cast(&id_) + sizeof(wheel4_)); } grSim_Robot_Command::~grSim_Robot_Command() { + // @@protoc_insertion_point(destructor:grSim_Robot_Command) SharedDtor(); } void grSim_Robot_Command::SharedDtor() { - if (this != default_instance_) { - } } void grSim_Robot_Command::SetCachedSize(int size) const { @@ -201,243 +216,208 @@ void grSim_Robot_Command::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* grSim_Robot_Command::descriptor() { protobuf_AssignDescriptorsOnce(); - return grSim_Robot_Command_descriptor_; + return file_level_metadata[0].descriptor; } const grSim_Robot_Command& grSim_Robot_Command::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_grSim_5fCommands_2eproto(); - return *default_instance_; + protobuf_InitDefaults_grSim_5fCommands_2eproto(); + return *internal_default_instance(); } -grSim_Robot_Command* grSim_Robot_Command::default_instance_ = NULL; - -grSim_Robot_Command* grSim_Robot_Command::New() const { - return new grSim_Robot_Command; +grSim_Robot_Command* grSim_Robot_Command::New(::google::protobuf::Arena* arena) const { + grSim_Robot_Command* n = new grSim_Robot_Command; + if (arena != NULL) { + arena->Own(n); + } + return n; } void grSim_Robot_Command::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - id_ = 0u; - kickspeedx_ = 0; - kickspeedz_ = 0; - veltangent_ = 0; - velnormal_ = 0; - velangular_ = 0; - spinner_ = false; - wheelsspeed_ = false; - } - if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) { - wheel1_ = 0; - wheel2_ = 0; - wheel3_ = 0; - wheel4_ = 0; - } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); +// @@protoc_insertion_point(message_clear_start:grSim_Robot_Command) + if (_has_bits_[0 / 32] & 255u) { + ::memset(&id_, 0, reinterpret_cast(&wheelsspeed_) - + reinterpret_cast(&id_) + sizeof(wheelsspeed_)); + } + if (_has_bits_[8 / 32] & 3840u) { + ::memset(&wheel1_, 0, reinterpret_cast(&wheel4_) - + reinterpret_cast(&wheel1_) + sizeof(wheel4_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool grSim_Robot_Command::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:grSim_Robot_Command) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required uint32 id = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + if (tag == 8u) { + set_has_id(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( input, &id_))); - set_has_id(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(21)) goto parse_kickspeedx; break; } // required float kickspeedx = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_kickspeedx: + if (tag == 21u) { + set_has_kickspeedx(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &kickspeedx_))); - set_has_kickspeedx(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(29)) goto parse_kickspeedz; break; } // required float kickspeedz = 3; case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_kickspeedz: + if (tag == 29u) { + set_has_kickspeedz(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &kickspeedz_))); - set_has_kickspeedz(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(37)) goto parse_veltangent; break; } // required float veltangent = 4; case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_veltangent: + if (tag == 37u) { + set_has_veltangent(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &veltangent_))); - set_has_veltangent(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(45)) goto parse_velnormal; break; } // required float velnormal = 5; case 5: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_velnormal: + if (tag == 45u) { + set_has_velnormal(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &velnormal_))); - set_has_velnormal(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(53)) goto parse_velangular; break; } // required float velangular = 6; case 6: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_velangular: + if (tag == 53u) { + set_has_velangular(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &velangular_))); - set_has_velangular(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(56)) goto parse_spinner; break; } // required bool spinner = 7; case 7: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_spinner: + if (tag == 56u) { + set_has_spinner(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( input, &spinner_))); - set_has_spinner(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(64)) goto parse_wheelsspeed; break; } // required bool wheelsspeed = 8; case 8: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_wheelsspeed: + if (tag == 64u) { + set_has_wheelsspeed(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( input, &wheelsspeed_))); - set_has_wheelsspeed(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(77)) goto parse_wheel1; break; } // optional float wheel1 = 9; case 9: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_wheel1: + if (tag == 77u) { + set_has_wheel1(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &wheel1_))); - set_has_wheel1(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(85)) goto parse_wheel2; break; } // optional float wheel2 = 10; case 10: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_wheel2: + if (tag == 85u) { + set_has_wheel2(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &wheel2_))); - set_has_wheel2(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(93)) goto parse_wheel3; break; } // optional float wheel3 = 11; case 11: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_wheel3: + if (tag == 93u) { + set_has_wheel3(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &wheel3_))); - set_has_wheel3(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(101)) goto parse_wheel4; break; } // optional float wheel4 = 12; case 12: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_wheel4: + if (tag == 101u) { + set_has_wheel4(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &wheel4_))); - set_has_wheel4(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectAtEnd()) return true; break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -445,12 +425,18 @@ bool grSim_Robot_Command::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:grSim_Robot_Command) return true; +failure: + // @@protoc_insertion_point(parse_failure:grSim_Robot_Command) + return false; #undef DO_ } void grSim_Robot_Command::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:grSim_Robot_Command) // required uint32 id = 1; if (has_id()) { ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->id(), output); @@ -511,14 +497,17 @@ void grSim_Robot_Command::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteFloat(12, this->wheel4(), output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:grSim_Robot_Command) } -::google::protobuf::uint8* grSim_Robot_Command::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* grSim_Robot_Command::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:grSim_Robot_Command) // required uint32 id = 1; if (has_id()) { target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->id(), target); @@ -579,61 +568,102 @@ ::google::protobuf::uint8* grSim_Robot_Command::SerializeWithCachedSizesToArray( target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(12, this->wheel4(), target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:grSim_Robot_Command) return target; } -int grSim_Robot_Command::ByteSize() const { - int total_size = 0; +size_t grSim_Robot_Command::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:grSim_Robot_Command) + size_t total_size = 0; - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_id()) { // required uint32 id = 1; - if (has_id()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::UInt32Size( - this->id()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->id()); + } + if (has_kickspeedx()) { // required float kickspeedx = 2; - if (has_kickspeedx()) { - total_size += 1 + 4; - } + total_size += 1 + 4; + } + if (has_kickspeedz()) { // required float kickspeedz = 3; - if (has_kickspeedz()) { - total_size += 1 + 4; - } + total_size += 1 + 4; + } + if (has_veltangent()) { // required float veltangent = 4; - if (has_veltangent()) { - total_size += 1 + 4; - } + total_size += 1 + 4; + } + if (has_velnormal()) { // required float velnormal = 5; - if (has_velnormal()) { - total_size += 1 + 4; - } + total_size += 1 + 4; + } + if (has_velangular()) { // required float velangular = 6; - if (has_velangular()) { - total_size += 1 + 4; - } + total_size += 1 + 4; + } + if (has_spinner()) { // required bool spinner = 7; - if (has_spinner()) { - total_size += 1 + 1; - } + total_size += 1 + 1; + } + if (has_wheelsspeed()) { // required bool wheelsspeed = 8; - if (has_wheelsspeed()) { - total_size += 1 + 1; - } + total_size += 1 + 1; + } + + return total_size; +} +size_t grSim_Robot_Command::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:grSim_Robot_Command) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + if (((_has_bits_[0] & 0x000000ff) ^ 0x000000ff) == 0) { // All required fields are present. + // required uint32 id = 1; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->id()); + + // required float kickspeedx = 2; + total_size += 1 + 4; + + // required float kickspeedz = 3; + total_size += 1 + 4; + + // required float veltangent = 4; + total_size += 1 + 4; + + // required float velnormal = 5; + total_size += 1 + 4; + + // required float velangular = 6; + total_size += 1 + 4; + + // required bool spinner = 7; + total_size += 1 + 1; + + // required bool wheelsspeed = 8; + total_size += 1 + 1; + } else { + total_size += RequiredFieldsByteSizeFallback(); } - if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) { + if (_has_bits_[8 / 32] & 3840u) { // optional float wheel1 = 9; if (has_wheel1()) { total_size += 1 + 4; @@ -655,32 +685,33 @@ int grSim_Robot_Command::ByteSize() const { } } - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void grSim_Robot_Command::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:grSim_Robot_Command) + GOOGLE_DCHECK_NE(&from, this); const grSim_Robot_Command* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:grSim_Robot_Command) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:grSim_Robot_Command) MergeFrom(*source); } } void grSim_Robot_Command::MergeFrom(const grSim_Robot_Command& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { +// @@protoc_insertion_point(class_specific_merge_from_start:grSim_Robot_Command) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._has_bits_[0 / 32] & 255u) { if (from.has_id()) { set_id(from.id()); } @@ -706,7 +737,7 @@ void grSim_Robot_Command::MergeFrom(const grSim_Robot_Command& from) { set_wheelsspeed(from.wheelsspeed()); } } - if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) { + if (from._has_bits_[8 / 32] & 3840u) { if (from.has_wheel1()) { set_wheel1(from.wheel1()); } @@ -720,16 +751,17 @@ void grSim_Robot_Command::MergeFrom(const grSim_Robot_Command& from) { set_wheel4(from.wheel4()); } } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void grSim_Robot_Command::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:grSim_Robot_Command) if (&from == this) return; Clear(); MergeFrom(from); } void grSim_Robot_Command::CopyFrom(const grSim_Robot_Command& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:grSim_Robot_Command) if (&from == this) return; Clear(); MergeFrom(from); @@ -737,75 +769,370 @@ void grSim_Robot_Command::CopyFrom(const grSim_Robot_Command& from) { bool grSim_Robot_Command::IsInitialized() const { if ((_has_bits_[0] & 0x000000ff) != 0x000000ff) return false; - return true; } void grSim_Robot_Command::Swap(grSim_Robot_Command* other) { - if (other != this) { - std::swap(id_, other->id_); - std::swap(kickspeedx_, other->kickspeedx_); - std::swap(kickspeedz_, other->kickspeedz_); - std::swap(veltangent_, other->veltangent_); - std::swap(velnormal_, other->velnormal_); - std::swap(velangular_, other->velangular_); - std::swap(spinner_, other->spinner_); - std::swap(wheelsspeed_, other->wheelsspeed_); - std::swap(wheel1_, other->wheel1_); - std::swap(wheel2_, other->wheel2_); - std::swap(wheel3_, other->wheel3_); - std::swap(wheel4_, other->wheel4_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void grSim_Robot_Command::InternalSwap(grSim_Robot_Command* other) { + std::swap(id_, other->id_); + std::swap(kickspeedx_, other->kickspeedx_); + std::swap(kickspeedz_, other->kickspeedz_); + std::swap(veltangent_, other->veltangent_); + std::swap(velnormal_, other->velnormal_); + std::swap(velangular_, other->velangular_); + std::swap(spinner_, other->spinner_); + std::swap(wheelsspeed_, other->wheelsspeed_); + std::swap(wheel1_, other->wheel1_); + std::swap(wheel2_, other->wheel2_); + std::swap(wheel3_, other->wheel3_); + std::swap(wheel4_, other->wheel4_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata grSim_Robot_Command::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = grSim_Robot_Command_descriptor_; - metadata.reflection = grSim_Robot_Command_reflection_; - return metadata; + return file_level_metadata[0]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// grSim_Robot_Command + +// required uint32 id = 1; +bool grSim_Robot_Command::has_id() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void grSim_Robot_Command::set_has_id() { + _has_bits_[0] |= 0x00000001u; +} +void grSim_Robot_Command::clear_has_id() { + _has_bits_[0] &= ~0x00000001u; +} +void grSim_Robot_Command::clear_id() { + id_ = 0u; + clear_has_id(); +} +::google::protobuf::uint32 grSim_Robot_Command::id() const { + // @@protoc_insertion_point(field_get:grSim_Robot_Command.id) + return id_; +} +void grSim_Robot_Command::set_id(::google::protobuf::uint32 value) { + set_has_id(); + id_ = value; + // @@protoc_insertion_point(field_set:grSim_Robot_Command.id) } +// required float kickspeedx = 2; +bool grSim_Robot_Command::has_kickspeedx() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +void grSim_Robot_Command::set_has_kickspeedx() { + _has_bits_[0] |= 0x00000002u; +} +void grSim_Robot_Command::clear_has_kickspeedx() { + _has_bits_[0] &= ~0x00000002u; +} +void grSim_Robot_Command::clear_kickspeedx() { + kickspeedx_ = 0; + clear_has_kickspeedx(); +} +float grSim_Robot_Command::kickspeedx() const { + // @@protoc_insertion_point(field_get:grSim_Robot_Command.kickspeedx) + return kickspeedx_; +} +void grSim_Robot_Command::set_kickspeedx(float value) { + set_has_kickspeedx(); + kickspeedx_ = value; + // @@protoc_insertion_point(field_set:grSim_Robot_Command.kickspeedx) +} + +// required float kickspeedz = 3; +bool grSim_Robot_Command::has_kickspeedz() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +void grSim_Robot_Command::set_has_kickspeedz() { + _has_bits_[0] |= 0x00000004u; +} +void grSim_Robot_Command::clear_has_kickspeedz() { + _has_bits_[0] &= ~0x00000004u; +} +void grSim_Robot_Command::clear_kickspeedz() { + kickspeedz_ = 0; + clear_has_kickspeedz(); +} +float grSim_Robot_Command::kickspeedz() const { + // @@protoc_insertion_point(field_get:grSim_Robot_Command.kickspeedz) + return kickspeedz_; +} +void grSim_Robot_Command::set_kickspeedz(float value) { + set_has_kickspeedz(); + kickspeedz_ = value; + // @@protoc_insertion_point(field_set:grSim_Robot_Command.kickspeedz) +} + +// required float veltangent = 4; +bool grSim_Robot_Command::has_veltangent() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +void grSim_Robot_Command::set_has_veltangent() { + _has_bits_[0] |= 0x00000008u; +} +void grSim_Robot_Command::clear_has_veltangent() { + _has_bits_[0] &= ~0x00000008u; +} +void grSim_Robot_Command::clear_veltangent() { + veltangent_ = 0; + clear_has_veltangent(); +} +float grSim_Robot_Command::veltangent() const { + // @@protoc_insertion_point(field_get:grSim_Robot_Command.veltangent) + return veltangent_; +} +void grSim_Robot_Command::set_veltangent(float value) { + set_has_veltangent(); + veltangent_ = value; + // @@protoc_insertion_point(field_set:grSim_Robot_Command.veltangent) +} + +// required float velnormal = 5; +bool grSim_Robot_Command::has_velnormal() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +void grSim_Robot_Command::set_has_velnormal() { + _has_bits_[0] |= 0x00000010u; +} +void grSim_Robot_Command::clear_has_velnormal() { + _has_bits_[0] &= ~0x00000010u; +} +void grSim_Robot_Command::clear_velnormal() { + velnormal_ = 0; + clear_has_velnormal(); +} +float grSim_Robot_Command::velnormal() const { + // @@protoc_insertion_point(field_get:grSim_Robot_Command.velnormal) + return velnormal_; +} +void grSim_Robot_Command::set_velnormal(float value) { + set_has_velnormal(); + velnormal_ = value; + // @@protoc_insertion_point(field_set:grSim_Robot_Command.velnormal) +} + +// required float velangular = 6; +bool grSim_Robot_Command::has_velangular() const { + return (_has_bits_[0] & 0x00000020u) != 0; +} +void grSim_Robot_Command::set_has_velangular() { + _has_bits_[0] |= 0x00000020u; +} +void grSim_Robot_Command::clear_has_velangular() { + _has_bits_[0] &= ~0x00000020u; +} +void grSim_Robot_Command::clear_velangular() { + velangular_ = 0; + clear_has_velangular(); +} +float grSim_Robot_Command::velangular() const { + // @@protoc_insertion_point(field_get:grSim_Robot_Command.velangular) + return velangular_; +} +void grSim_Robot_Command::set_velangular(float value) { + set_has_velangular(); + velangular_ = value; + // @@protoc_insertion_point(field_set:grSim_Robot_Command.velangular) +} + +// required bool spinner = 7; +bool grSim_Robot_Command::has_spinner() const { + return (_has_bits_[0] & 0x00000040u) != 0; +} +void grSim_Robot_Command::set_has_spinner() { + _has_bits_[0] |= 0x00000040u; +} +void grSim_Robot_Command::clear_has_spinner() { + _has_bits_[0] &= ~0x00000040u; +} +void grSim_Robot_Command::clear_spinner() { + spinner_ = false; + clear_has_spinner(); +} +bool grSim_Robot_Command::spinner() const { + // @@protoc_insertion_point(field_get:grSim_Robot_Command.spinner) + return spinner_; +} +void grSim_Robot_Command::set_spinner(bool value) { + set_has_spinner(); + spinner_ = value; + // @@protoc_insertion_point(field_set:grSim_Robot_Command.spinner) +} + +// required bool wheelsspeed = 8; +bool grSim_Robot_Command::has_wheelsspeed() const { + return (_has_bits_[0] & 0x00000080u) != 0; +} +void grSim_Robot_Command::set_has_wheelsspeed() { + _has_bits_[0] |= 0x00000080u; +} +void grSim_Robot_Command::clear_has_wheelsspeed() { + _has_bits_[0] &= ~0x00000080u; +} +void grSim_Robot_Command::clear_wheelsspeed() { + wheelsspeed_ = false; + clear_has_wheelsspeed(); +} +bool grSim_Robot_Command::wheelsspeed() const { + // @@protoc_insertion_point(field_get:grSim_Robot_Command.wheelsspeed) + return wheelsspeed_; +} +void grSim_Robot_Command::set_wheelsspeed(bool value) { + set_has_wheelsspeed(); + wheelsspeed_ = value; + // @@protoc_insertion_point(field_set:grSim_Robot_Command.wheelsspeed) +} + +// optional float wheel1 = 9; +bool grSim_Robot_Command::has_wheel1() const { + return (_has_bits_[0] & 0x00000100u) != 0; +} +void grSim_Robot_Command::set_has_wheel1() { + _has_bits_[0] |= 0x00000100u; +} +void grSim_Robot_Command::clear_has_wheel1() { + _has_bits_[0] &= ~0x00000100u; +} +void grSim_Robot_Command::clear_wheel1() { + wheel1_ = 0; + clear_has_wheel1(); +} +float grSim_Robot_Command::wheel1() const { + // @@protoc_insertion_point(field_get:grSim_Robot_Command.wheel1) + return wheel1_; +} +void grSim_Robot_Command::set_wheel1(float value) { + set_has_wheel1(); + wheel1_ = value; + // @@protoc_insertion_point(field_set:grSim_Robot_Command.wheel1) +} + +// optional float wheel2 = 10; +bool grSim_Robot_Command::has_wheel2() const { + return (_has_bits_[0] & 0x00000200u) != 0; +} +void grSim_Robot_Command::set_has_wheel2() { + _has_bits_[0] |= 0x00000200u; +} +void grSim_Robot_Command::clear_has_wheel2() { + _has_bits_[0] &= ~0x00000200u; +} +void grSim_Robot_Command::clear_wheel2() { + wheel2_ = 0; + clear_has_wheel2(); +} +float grSim_Robot_Command::wheel2() const { + // @@protoc_insertion_point(field_get:grSim_Robot_Command.wheel2) + return wheel2_; +} +void grSim_Robot_Command::set_wheel2(float value) { + set_has_wheel2(); + wheel2_ = value; + // @@protoc_insertion_point(field_set:grSim_Robot_Command.wheel2) +} + +// optional float wheel3 = 11; +bool grSim_Robot_Command::has_wheel3() const { + return (_has_bits_[0] & 0x00000400u) != 0; +} +void grSim_Robot_Command::set_has_wheel3() { + _has_bits_[0] |= 0x00000400u; +} +void grSim_Robot_Command::clear_has_wheel3() { + _has_bits_[0] &= ~0x00000400u; +} +void grSim_Robot_Command::clear_wheel3() { + wheel3_ = 0; + clear_has_wheel3(); +} +float grSim_Robot_Command::wheel3() const { + // @@protoc_insertion_point(field_get:grSim_Robot_Command.wheel3) + return wheel3_; +} +void grSim_Robot_Command::set_wheel3(float value) { + set_has_wheel3(); + wheel3_ = value; + // @@protoc_insertion_point(field_set:grSim_Robot_Command.wheel3) +} + +// optional float wheel4 = 12; +bool grSim_Robot_Command::has_wheel4() const { + return (_has_bits_[0] & 0x00000800u) != 0; +} +void grSim_Robot_Command::set_has_wheel4() { + _has_bits_[0] |= 0x00000800u; +} +void grSim_Robot_Command::clear_has_wheel4() { + _has_bits_[0] &= ~0x00000800u; +} +void grSim_Robot_Command::clear_wheel4() { + wheel4_ = 0; + clear_has_wheel4(); +} +float grSim_Robot_Command::wheel4() const { + // @@protoc_insertion_point(field_get:grSim_Robot_Command.wheel4) + return wheel4_; +} +void grSim_Robot_Command::set_wheel4(float value) { + set_has_wheel4(); + wheel4_ = value; + // @@protoc_insertion_point(field_set:grSim_Robot_Command.wheel4) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int grSim_Commands::kTimestampFieldNumber; const int grSim_Commands::kIsteamyellowFieldNumber; const int grSim_Commands::kRobotCommandsFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 grSim_Commands::grSim_Commands() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_grSim_5fCommands_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:grSim_Commands) } - -void grSim_Commands::InitAsDefaultInstance() { -} - grSim_Commands::grSim_Commands(const grSim_Commands& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0), + robot_commands_(from.robot_commands_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::memcpy(×tamp_, &from.timestamp_, + reinterpret_cast(&isteamyellow_) - + reinterpret_cast(×tamp_) + sizeof(isteamyellow_)); + // @@protoc_insertion_point(copy_constructor:grSim_Commands) } void grSim_Commands::SharedCtor() { _cached_size_ = 0; - timestamp_ = 0; - isteamyellow_ = false; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); + ::memset(×tamp_, 0, reinterpret_cast(&isteamyellow_) - + reinterpret_cast(×tamp_) + sizeof(isteamyellow_)); } grSim_Commands::~grSim_Commands() { + // @@protoc_insertion_point(destructor:grSim_Commands) SharedDtor(); } void grSim_Commands::SharedDtor() { - if (this != default_instance_) { - } } void grSim_Commands::SetCachedSize(int size) const { @@ -815,87 +1142,88 @@ void grSim_Commands::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* grSim_Commands::descriptor() { protobuf_AssignDescriptorsOnce(); - return grSim_Commands_descriptor_; + return file_level_metadata[1].descriptor; } const grSim_Commands& grSim_Commands::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_grSim_5fCommands_2eproto(); - return *default_instance_; + protobuf_InitDefaults_grSim_5fCommands_2eproto(); + return *internal_default_instance(); } -grSim_Commands* grSim_Commands::default_instance_ = NULL; - -grSim_Commands* grSim_Commands::New() const { - return new grSim_Commands; +grSim_Commands* grSim_Commands::New(::google::protobuf::Arena* arena) const { + grSim_Commands* n = new grSim_Commands; + if (arena != NULL) { + arena->Own(n); + } + return n; } void grSim_Commands::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - timestamp_ = 0; - isteamyellow_ = false; - } +// @@protoc_insertion_point(message_clear_start:grSim_Commands) robot_commands_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + if (_has_bits_[0 / 32] & 3u) { + ::memset(×tamp_, 0, reinterpret_cast(&isteamyellow_) - + reinterpret_cast(×tamp_) + sizeof(isteamyellow_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool grSim_Commands::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:grSim_Commands) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required double timestamp = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) { + if (tag == 9u) { + set_has_timestamp(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( input, ×tamp_))); - set_has_timestamp(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(16)) goto parse_isteamyellow; break; } // required bool isteamyellow = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_isteamyellow: + if (tag == 16u) { + set_has_isteamyellow(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( input, &isteamyellow_))); - set_has_isteamyellow(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(26)) goto parse_robot_commands; break; } // repeated .grSim_Robot_Command robot_commands = 3; case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_robot_commands: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + if (tag == 26u) { + DO_(input->IncrementRecursionDepth()); + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( input, add_robot_commands())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(26)) goto parse_robot_commands; - if (input->ExpectAtEnd()) return true; + input->UnsafeDecrementRecursionDepth(); break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -903,12 +1231,18 @@ bool grSim_Commands::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:grSim_Commands) return true; +failure: + // @@protoc_insertion_point(parse_failure:grSim_Commands) + return false; #undef DO_ } void grSim_Commands::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:grSim_Commands) // required double timestamp = 1; if (has_timestamp()) { ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->timestamp(), output); @@ -920,19 +1254,22 @@ void grSim_Commands::SerializeWithCachedSizes( } // repeated .grSim_Robot_Command robot_commands = 3; - for (int i = 0; i < this->robot_commands_size(); i++) { + for (unsigned int i = 0, n = this->robot_commands_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 3, this->robot_commands(i), output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:grSim_Commands) } -::google::protobuf::uint8* grSim_Commands::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* grSim_Commands::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:grSim_Commands) // required double timestamp = 1; if (has_timestamp()) { target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->timestamp(), target); @@ -944,69 +1281,94 @@ ::google::protobuf::uint8* grSim_Commands::SerializeWithCachedSizesToArray( } // repeated .grSim_Robot_Command robot_commands = 3; - for (int i = 0; i < this->robot_commands_size(); i++) { + for (unsigned int i = 0, n = this->robot_commands_size(); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 3, this->robot_commands(i), target); + InternalWriteMessageNoVirtualToArray( + 3, this->robot_commands(i), false, target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:grSim_Commands) return target; } -int grSim_Commands::ByteSize() const { - int total_size = 0; +size_t grSim_Commands::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:grSim_Commands) + size_t total_size = 0; - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_timestamp()) { // required double timestamp = 1; - if (has_timestamp()) { - total_size += 1 + 8; - } + total_size += 1 + 8; + } + if (has_isteamyellow()) { // required bool isteamyellow = 2; - if (has_isteamyellow()) { - total_size += 1 + 1; - } - - } - // repeated .grSim_Robot_Command robot_commands = 3; - total_size += 1 * this->robot_commands_size(); - for (int i = 0; i < this->robot_commands_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->robot_commands(i)); + total_size += 1 + 1; } - if (!unknown_fields().empty()) { + return total_size; +} +size_t grSim_Commands::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:grSim_Commands) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( unknown_fields()); } + if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present. + // required double timestamp = 1; + total_size += 1 + 8; + + // required bool isteamyellow = 2; + total_size += 1 + 1; + + } else { + total_size += RequiredFieldsByteSizeFallback(); + } + // repeated .grSim_Robot_Command robot_commands = 3; + { + unsigned int count = this->robot_commands_size(); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->robot_commands(i)); + } + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void grSim_Commands::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:grSim_Commands) + GOOGLE_DCHECK_NE(&from, this); const grSim_Commands* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:grSim_Commands) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:grSim_Commands) MergeFrom(*source); } } void grSim_Commands::MergeFrom(const grSim_Commands& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(class_specific_merge_from_start:grSim_Commands) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); robot_commands_.MergeFrom(from.robot_commands_); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from._has_bits_[0 / 32] & 3u) { if (from.has_timestamp()) { set_timestamp(from.timestamp()); } @@ -1014,16 +1376,17 @@ void grSim_Commands::MergeFrom(const grSim_Commands& from) { set_isteamyellow(from.isteamyellow()); } } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void grSim_Commands::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:grSim_Commands) if (&from == this) return; Clear(); MergeFrom(from); } void grSim_Commands::CopyFrom(const grSim_Commands& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:grSim_Commands) if (&from == this) return; Clear(); MergeFrom(from); @@ -1031,32 +1394,110 @@ void grSim_Commands::CopyFrom(const grSim_Commands& from) { bool grSim_Commands::IsInitialized() const { if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; - - for (int i = 0; i < robot_commands_size(); i++) { - if (!this->robot_commands(i).IsInitialized()) return false; - } + if (!::google::protobuf::internal::AllAreInitialized(this->robot_commands())) return false; return true; } void grSim_Commands::Swap(grSim_Commands* other) { - if (other != this) { - std::swap(timestamp_, other->timestamp_); - std::swap(isteamyellow_, other->isteamyellow_); - robot_commands_.Swap(&other->robot_commands_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void grSim_Commands::InternalSwap(grSim_Commands* other) { + robot_commands_.UnsafeArenaSwap(&other->robot_commands_); + std::swap(timestamp_, other->timestamp_); + std::swap(isteamyellow_, other->isteamyellow_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata grSim_Commands::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = grSim_Commands_descriptor_; - metadata.reflection = grSim_Commands_reflection_; - return metadata; + return file_level_metadata[1]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// grSim_Commands + +// required double timestamp = 1; +bool grSim_Commands::has_timestamp() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void grSim_Commands::set_has_timestamp() { + _has_bits_[0] |= 0x00000001u; +} +void grSim_Commands::clear_has_timestamp() { + _has_bits_[0] &= ~0x00000001u; +} +void grSim_Commands::clear_timestamp() { + timestamp_ = 0; + clear_has_timestamp(); +} +double grSim_Commands::timestamp() const { + // @@protoc_insertion_point(field_get:grSim_Commands.timestamp) + return timestamp_; +} +void grSim_Commands::set_timestamp(double value) { + set_has_timestamp(); + timestamp_ = value; + // @@protoc_insertion_point(field_set:grSim_Commands.timestamp) +} + +// required bool isteamyellow = 2; +bool grSim_Commands::has_isteamyellow() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +void grSim_Commands::set_has_isteamyellow() { + _has_bits_[0] |= 0x00000002u; +} +void grSim_Commands::clear_has_isteamyellow() { + _has_bits_[0] &= ~0x00000002u; +} +void grSim_Commands::clear_isteamyellow() { + isteamyellow_ = false; + clear_has_isteamyellow(); +} +bool grSim_Commands::isteamyellow() const { + // @@protoc_insertion_point(field_get:grSim_Commands.isteamyellow) + return isteamyellow_; +} +void grSim_Commands::set_isteamyellow(bool value) { + set_has_isteamyellow(); + isteamyellow_ = value; + // @@protoc_insertion_point(field_set:grSim_Commands.isteamyellow) +} + +// repeated .grSim_Robot_Command robot_commands = 3; +int grSim_Commands::robot_commands_size() const { + return robot_commands_.size(); +} +void grSim_Commands::clear_robot_commands() { + robot_commands_.Clear(); +} +const ::grSim_Robot_Command& grSim_Commands::robot_commands(int index) const { + // @@protoc_insertion_point(field_get:grSim_Commands.robot_commands) + return robot_commands_.Get(index); +} +::grSim_Robot_Command* grSim_Commands::mutable_robot_commands(int index) { + // @@protoc_insertion_point(field_mutable:grSim_Commands.robot_commands) + return robot_commands_.Mutable(index); +} +::grSim_Robot_Command* grSim_Commands::add_robot_commands() { + // @@protoc_insertion_point(field_add:grSim_Commands.robot_commands) + return robot_commands_.Add(); +} +::google::protobuf::RepeatedPtrField< ::grSim_Robot_Command >* +grSim_Commands::mutable_robot_commands() { + // @@protoc_insertion_point(field_mutable_list:grSim_Commands.robot_commands) + return &robot_commands_; +} +const ::google::protobuf::RepeatedPtrField< ::grSim_Robot_Command >& +grSim_Commands::robot_commands() const { + // @@protoc_insertion_point(field_list:grSim_Commands.robot_commands) + return robot_commands_; } +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) diff --git a/src/proto/grSim_Commands.pb.h b/src/proto/grSim_Commands.pb.h index e051035..31c7e55 100644 --- a/src/proto/grSim_Commands.pb.h +++ b/src/proto/grSim_Commands.pb.h @@ -8,35 +8,40 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 2005000 +#if GOOGLE_PROTOBUF_VERSION < 3001000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. #endif +#include +#include #include +#include #include -#include -#include +#include // IWYU pragma: export +#include // IWYU pragma: export #include // @@protoc_insertion_point(includes) +class grSim_Commands; +class grSim_CommandsDefaultTypeInternal; +extern grSim_CommandsDefaultTypeInternal _grSim_Commands_default_instance_; +class grSim_Robot_Command; +class grSim_Robot_CommandDefaultTypeInternal; +extern grSim_Robot_CommandDefaultTypeInternal _grSim_Robot_Command_default_instance_; // Internal implementation detail -- do not call these. -void protobuf_AddDesc_grSim_5fCommands_2eproto(); -void protobuf_AssignDesc_grSim_5fCommands_2eproto(); -void protobuf_ShutdownFile_grSim_5fCommands_2eproto(); - -class grSim_Robot_Command; -class grSim_Commands; +void protobuf_AddDesc_grSim_5fCommands_2eproto(); +void protobuf_InitDefaults_grSim_5fCommands_2eproto(); // =================================================================== -class grSim_Robot_Command : public ::google::protobuf::Message { +class grSim_Robot_Command : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grSim_Robot_Command) */ { public: grSim_Robot_Command(); virtual ~grSim_Robot_Command(); @@ -49,160 +54,184 @@ class grSim_Robot_Command : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const grSim_Robot_Command& default_instance(); + static inline const grSim_Robot_Command* internal_default_instance() { + return reinterpret_cast( + &_grSim_Robot_Command_default_instance_); + } + void Swap(grSim_Robot_Command* other); // implements Message ---------------------------------------------- - grSim_Robot_Command* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline grSim_Robot_Command* New() const PROTOBUF_FINAL { return New(NULL); } + + grSim_Robot_Command* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const grSim_Robot_Command& from); void MergeFrom(const grSim_Robot_Command& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(grSim_Robot_Command* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // required uint32 id = 1; - inline bool has_id() const; - inline void clear_id(); + bool has_id() const; + void clear_id(); static const int kIdFieldNumber = 1; - inline ::google::protobuf::uint32 id() const; - inline void set_id(::google::protobuf::uint32 value); + ::google::protobuf::uint32 id() const; + void set_id(::google::protobuf::uint32 value); // required float kickspeedx = 2; - inline bool has_kickspeedx() const; - inline void clear_kickspeedx(); + bool has_kickspeedx() const; + void clear_kickspeedx(); static const int kKickspeedxFieldNumber = 2; - inline float kickspeedx() const; - inline void set_kickspeedx(float value); + float kickspeedx() const; + void set_kickspeedx(float value); // required float kickspeedz = 3; - inline bool has_kickspeedz() const; - inline void clear_kickspeedz(); + bool has_kickspeedz() const; + void clear_kickspeedz(); static const int kKickspeedzFieldNumber = 3; - inline float kickspeedz() const; - inline void set_kickspeedz(float value); + float kickspeedz() const; + void set_kickspeedz(float value); // required float veltangent = 4; - inline bool has_veltangent() const; - inline void clear_veltangent(); + bool has_veltangent() const; + void clear_veltangent(); static const int kVeltangentFieldNumber = 4; - inline float veltangent() const; - inline void set_veltangent(float value); + float veltangent() const; + void set_veltangent(float value); // required float velnormal = 5; - inline bool has_velnormal() const; - inline void clear_velnormal(); + bool has_velnormal() const; + void clear_velnormal(); static const int kVelnormalFieldNumber = 5; - inline float velnormal() const; - inline void set_velnormal(float value); + float velnormal() const; + void set_velnormal(float value); // required float velangular = 6; - inline bool has_velangular() const; - inline void clear_velangular(); + bool has_velangular() const; + void clear_velangular(); static const int kVelangularFieldNumber = 6; - inline float velangular() const; - inline void set_velangular(float value); + float velangular() const; + void set_velangular(float value); // required bool spinner = 7; - inline bool has_spinner() const; - inline void clear_spinner(); + bool has_spinner() const; + void clear_spinner(); static const int kSpinnerFieldNumber = 7; - inline bool spinner() const; - inline void set_spinner(bool value); + bool spinner() const; + void set_spinner(bool value); // required bool wheelsspeed = 8; - inline bool has_wheelsspeed() const; - inline void clear_wheelsspeed(); + bool has_wheelsspeed() const; + void clear_wheelsspeed(); static const int kWheelsspeedFieldNumber = 8; - inline bool wheelsspeed() const; - inline void set_wheelsspeed(bool value); + bool wheelsspeed() const; + void set_wheelsspeed(bool value); // optional float wheel1 = 9; - inline bool has_wheel1() const; - inline void clear_wheel1(); + bool has_wheel1() const; + void clear_wheel1(); static const int kWheel1FieldNumber = 9; - inline float wheel1() const; - inline void set_wheel1(float value); + float wheel1() const; + void set_wheel1(float value); // optional float wheel2 = 10; - inline bool has_wheel2() const; - inline void clear_wheel2(); + bool has_wheel2() const; + void clear_wheel2(); static const int kWheel2FieldNumber = 10; - inline float wheel2() const; - inline void set_wheel2(float value); + float wheel2() const; + void set_wheel2(float value); // optional float wheel3 = 11; - inline bool has_wheel3() const; - inline void clear_wheel3(); + bool has_wheel3() const; + void clear_wheel3(); static const int kWheel3FieldNumber = 11; - inline float wheel3() const; - inline void set_wheel3(float value); + float wheel3() const; + void set_wheel3(float value); // optional float wheel4 = 12; - inline bool has_wheel4() const; - inline void clear_wheel4(); + bool has_wheel4() const; + void clear_wheel4(); static const int kWheel4FieldNumber = 12; - inline float wheel4() const; - inline void set_wheel4(float value); + float wheel4() const; + void set_wheel4(float value); // @@protoc_insertion_point(class_scope:grSim_Robot_Command) private: - inline void set_has_id(); - inline void clear_has_id(); - inline void set_has_kickspeedx(); - inline void clear_has_kickspeedx(); - inline void set_has_kickspeedz(); - inline void clear_has_kickspeedz(); - inline void set_has_veltangent(); - inline void clear_has_veltangent(); - inline void set_has_velnormal(); - inline void clear_has_velnormal(); - inline void set_has_velangular(); - inline void clear_has_velangular(); - inline void set_has_spinner(); - inline void clear_has_spinner(); - inline void set_has_wheelsspeed(); - inline void clear_has_wheelsspeed(); - inline void set_has_wheel1(); - inline void clear_has_wheel1(); - inline void set_has_wheel2(); - inline void clear_has_wheel2(); - inline void set_has_wheel3(); - inline void clear_has_wheel3(); - inline void set_has_wheel4(); - inline void clear_has_wheel4(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + void set_has_id(); + void clear_has_id(); + void set_has_kickspeedx(); + void clear_has_kickspeedx(); + void set_has_kickspeedz(); + void clear_has_kickspeedz(); + void set_has_veltangent(); + void clear_has_veltangent(); + void set_has_velnormal(); + void clear_has_velnormal(); + void set_has_velangular(); + void clear_has_velangular(); + void set_has_spinner(); + void clear_has_spinner(); + void set_has_wheelsspeed(); + void clear_has_wheelsspeed(); + void set_has_wheel1(); + void clear_has_wheel1(); + void set_has_wheel2(); + void clear_has_wheel2(); + void set_has_wheel3(); + void clear_has_wheel3(); + void set_has_wheel4(); + void clear_has_wheel4(); + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; ::google::protobuf::uint32 id_; float kickspeedx_; float kickspeedz_; @@ -215,20 +244,15 @@ class grSim_Robot_Command : public ::google::protobuf::Message { float wheel2_; float wheel3_; float wheel4_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(12 + 31) / 32]; - - friend void protobuf_AddDesc_grSim_5fCommands_2eproto(); - friend void protobuf_AssignDesc_grSim_5fCommands_2eproto(); + friend void protobuf_InitDefaults_grSim_5fCommands_2eproto_impl(); + friend void protobuf_AddDesc_grSim_5fCommands_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_grSim_5fCommands_2eproto(); friend void protobuf_ShutdownFile_grSim_5fCommands_2eproto(); - void InitAsDefaultInstance(); - static grSim_Robot_Command* default_instance_; }; // ------------------------------------------------------------------- -class grSim_Commands : public ::google::protobuf::Message { +class grSim_Commands : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grSim_Commands) */ { public: grSim_Commands(); virtual ~grSim_Commands(); @@ -241,101 +265,121 @@ class grSim_Commands : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const grSim_Commands& default_instance(); + static inline const grSim_Commands* internal_default_instance() { + return reinterpret_cast( + &_grSim_Commands_default_instance_); + } + void Swap(grSim_Commands* other); // implements Message ---------------------------------------------- - grSim_Commands* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline grSim_Commands* New() const PROTOBUF_FINAL { return New(NULL); } + + grSim_Commands* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const grSim_Commands& from); void MergeFrom(const grSim_Commands& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(grSim_Commands* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // required double timestamp = 1; - inline bool has_timestamp() const; - inline void clear_timestamp(); + bool has_timestamp() const; + void clear_timestamp(); static const int kTimestampFieldNumber = 1; - inline double timestamp() const; - inline void set_timestamp(double value); + double timestamp() const; + void set_timestamp(double value); // required bool isteamyellow = 2; - inline bool has_isteamyellow() const; - inline void clear_isteamyellow(); + bool has_isteamyellow() const; + void clear_isteamyellow(); static const int kIsteamyellowFieldNumber = 2; - inline bool isteamyellow() const; - inline void set_isteamyellow(bool value); + bool isteamyellow() const; + void set_isteamyellow(bool value); // repeated .grSim_Robot_Command robot_commands = 3; - inline int robot_commands_size() const; - inline void clear_robot_commands(); + int robot_commands_size() const; + void clear_robot_commands(); static const int kRobotCommandsFieldNumber = 3; - inline const ::grSim_Robot_Command& robot_commands(int index) const; - inline ::grSim_Robot_Command* mutable_robot_commands(int index); - inline ::grSim_Robot_Command* add_robot_commands(); - inline const ::google::protobuf::RepeatedPtrField< ::grSim_Robot_Command >& - robot_commands() const; - inline ::google::protobuf::RepeatedPtrField< ::grSim_Robot_Command >* + const ::grSim_Robot_Command& robot_commands(int index) const; + ::grSim_Robot_Command* mutable_robot_commands(int index); + ::grSim_Robot_Command* add_robot_commands(); + ::google::protobuf::RepeatedPtrField< ::grSim_Robot_Command >* mutable_robot_commands(); + const ::google::protobuf::RepeatedPtrField< ::grSim_Robot_Command >& + robot_commands() const; // @@protoc_insertion_point(class_scope:grSim_Commands) private: - inline void set_has_timestamp(); - inline void clear_has_timestamp(); - inline void set_has_isteamyellow(); - inline void clear_has_isteamyellow(); + void set_has_timestamp(); + void clear_has_timestamp(); + void set_has_isteamyellow(); + void clear_has_isteamyellow(); - ::google::protobuf::UnknownFieldSet _unknown_fields_; + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; - double timestamp_; + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; ::google::protobuf::RepeatedPtrField< ::grSim_Robot_Command > robot_commands_; + double timestamp_; bool isteamyellow_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; - - friend void protobuf_AddDesc_grSim_5fCommands_2eproto(); - friend void protobuf_AssignDesc_grSim_5fCommands_2eproto(); + friend void protobuf_InitDefaults_grSim_5fCommands_2eproto_impl(); + friend void protobuf_AddDesc_grSim_5fCommands_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_grSim_5fCommands_2eproto(); friend void protobuf_ShutdownFile_grSim_5fCommands_2eproto(); - void InitAsDefaultInstance(); - static grSim_Commands* default_instance_; }; // =================================================================== // =================================================================== +#if !PROTOBUF_INLINE_NOT_IN_HEADERS // grSim_Robot_Command // required uint32 id = 1; @@ -353,11 +397,13 @@ inline void grSim_Robot_Command::clear_id() { clear_has_id(); } inline ::google::protobuf::uint32 grSim_Robot_Command::id() const { + // @@protoc_insertion_point(field_get:grSim_Robot_Command.id) return id_; } inline void grSim_Robot_Command::set_id(::google::protobuf::uint32 value) { set_has_id(); id_ = value; + // @@protoc_insertion_point(field_set:grSim_Robot_Command.id) } // required float kickspeedx = 2; @@ -375,11 +421,13 @@ inline void grSim_Robot_Command::clear_kickspeedx() { clear_has_kickspeedx(); } inline float grSim_Robot_Command::kickspeedx() const { + // @@protoc_insertion_point(field_get:grSim_Robot_Command.kickspeedx) return kickspeedx_; } inline void grSim_Robot_Command::set_kickspeedx(float value) { set_has_kickspeedx(); kickspeedx_ = value; + // @@protoc_insertion_point(field_set:grSim_Robot_Command.kickspeedx) } // required float kickspeedz = 3; @@ -397,11 +445,13 @@ inline void grSim_Robot_Command::clear_kickspeedz() { clear_has_kickspeedz(); } inline float grSim_Robot_Command::kickspeedz() const { + // @@protoc_insertion_point(field_get:grSim_Robot_Command.kickspeedz) return kickspeedz_; } inline void grSim_Robot_Command::set_kickspeedz(float value) { set_has_kickspeedz(); kickspeedz_ = value; + // @@protoc_insertion_point(field_set:grSim_Robot_Command.kickspeedz) } // required float veltangent = 4; @@ -419,11 +469,13 @@ inline void grSim_Robot_Command::clear_veltangent() { clear_has_veltangent(); } inline float grSim_Robot_Command::veltangent() const { + // @@protoc_insertion_point(field_get:grSim_Robot_Command.veltangent) return veltangent_; } inline void grSim_Robot_Command::set_veltangent(float value) { set_has_veltangent(); veltangent_ = value; + // @@protoc_insertion_point(field_set:grSim_Robot_Command.veltangent) } // required float velnormal = 5; @@ -441,11 +493,13 @@ inline void grSim_Robot_Command::clear_velnormal() { clear_has_velnormal(); } inline float grSim_Robot_Command::velnormal() const { + // @@protoc_insertion_point(field_get:grSim_Robot_Command.velnormal) return velnormal_; } inline void grSim_Robot_Command::set_velnormal(float value) { set_has_velnormal(); velnormal_ = value; + // @@protoc_insertion_point(field_set:grSim_Robot_Command.velnormal) } // required float velangular = 6; @@ -463,11 +517,13 @@ inline void grSim_Robot_Command::clear_velangular() { clear_has_velangular(); } inline float grSim_Robot_Command::velangular() const { + // @@protoc_insertion_point(field_get:grSim_Robot_Command.velangular) return velangular_; } inline void grSim_Robot_Command::set_velangular(float value) { set_has_velangular(); velangular_ = value; + // @@protoc_insertion_point(field_set:grSim_Robot_Command.velangular) } // required bool spinner = 7; @@ -485,11 +541,13 @@ inline void grSim_Robot_Command::clear_spinner() { clear_has_spinner(); } inline bool grSim_Robot_Command::spinner() const { + // @@protoc_insertion_point(field_get:grSim_Robot_Command.spinner) return spinner_; } inline void grSim_Robot_Command::set_spinner(bool value) { set_has_spinner(); spinner_ = value; + // @@protoc_insertion_point(field_set:grSim_Robot_Command.spinner) } // required bool wheelsspeed = 8; @@ -507,11 +565,13 @@ inline void grSim_Robot_Command::clear_wheelsspeed() { clear_has_wheelsspeed(); } inline bool grSim_Robot_Command::wheelsspeed() const { + // @@protoc_insertion_point(field_get:grSim_Robot_Command.wheelsspeed) return wheelsspeed_; } inline void grSim_Robot_Command::set_wheelsspeed(bool value) { set_has_wheelsspeed(); wheelsspeed_ = value; + // @@protoc_insertion_point(field_set:grSim_Robot_Command.wheelsspeed) } // optional float wheel1 = 9; @@ -529,11 +589,13 @@ inline void grSim_Robot_Command::clear_wheel1() { clear_has_wheel1(); } inline float grSim_Robot_Command::wheel1() const { + // @@protoc_insertion_point(field_get:grSim_Robot_Command.wheel1) return wheel1_; } inline void grSim_Robot_Command::set_wheel1(float value) { set_has_wheel1(); wheel1_ = value; + // @@protoc_insertion_point(field_set:grSim_Robot_Command.wheel1) } // optional float wheel2 = 10; @@ -551,11 +613,13 @@ inline void grSim_Robot_Command::clear_wheel2() { clear_has_wheel2(); } inline float grSim_Robot_Command::wheel2() const { + // @@protoc_insertion_point(field_get:grSim_Robot_Command.wheel2) return wheel2_; } inline void grSim_Robot_Command::set_wheel2(float value) { set_has_wheel2(); wheel2_ = value; + // @@protoc_insertion_point(field_set:grSim_Robot_Command.wheel2) } // optional float wheel3 = 11; @@ -573,11 +637,13 @@ inline void grSim_Robot_Command::clear_wheel3() { clear_has_wheel3(); } inline float grSim_Robot_Command::wheel3() const { + // @@protoc_insertion_point(field_get:grSim_Robot_Command.wheel3) return wheel3_; } inline void grSim_Robot_Command::set_wheel3(float value) { set_has_wheel3(); wheel3_ = value; + // @@protoc_insertion_point(field_set:grSim_Robot_Command.wheel3) } // optional float wheel4 = 12; @@ -595,11 +661,13 @@ inline void grSim_Robot_Command::clear_wheel4() { clear_has_wheel4(); } inline float grSim_Robot_Command::wheel4() const { + // @@protoc_insertion_point(field_get:grSim_Robot_Command.wheel4) return wheel4_; } inline void grSim_Robot_Command::set_wheel4(float value) { set_has_wheel4(); wheel4_ = value; + // @@protoc_insertion_point(field_set:grSim_Robot_Command.wheel4) } // ------------------------------------------------------------------- @@ -621,11 +689,13 @@ inline void grSim_Commands::clear_timestamp() { clear_has_timestamp(); } inline double grSim_Commands::timestamp() const { + // @@protoc_insertion_point(field_get:grSim_Commands.timestamp) return timestamp_; } inline void grSim_Commands::set_timestamp(double value) { set_has_timestamp(); timestamp_ = value; + // @@protoc_insertion_point(field_set:grSim_Commands.timestamp) } // required bool isteamyellow = 2; @@ -643,11 +713,13 @@ inline void grSim_Commands::clear_isteamyellow() { clear_has_isteamyellow(); } inline bool grSim_Commands::isteamyellow() const { + // @@protoc_insertion_point(field_get:grSim_Commands.isteamyellow) return isteamyellow_; } inline void grSim_Commands::set_isteamyellow(bool value) { set_has_isteamyellow(); isteamyellow_ = value; + // @@protoc_insertion_point(field_set:grSim_Commands.isteamyellow) } // repeated .grSim_Robot_Command robot_commands = 3; @@ -658,34 +730,34 @@ inline void grSim_Commands::clear_robot_commands() { robot_commands_.Clear(); } inline const ::grSim_Robot_Command& grSim_Commands::robot_commands(int index) const { + // @@protoc_insertion_point(field_get:grSim_Commands.robot_commands) return robot_commands_.Get(index); } inline ::grSim_Robot_Command* grSim_Commands::mutable_robot_commands(int index) { + // @@protoc_insertion_point(field_mutable:grSim_Commands.robot_commands) return robot_commands_.Mutable(index); } inline ::grSim_Robot_Command* grSim_Commands::add_robot_commands() { + // @@protoc_insertion_point(field_add:grSim_Commands.robot_commands) return robot_commands_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::grSim_Robot_Command >& -grSim_Commands::robot_commands() const { - return robot_commands_; -} inline ::google::protobuf::RepeatedPtrField< ::grSim_Robot_Command >* grSim_Commands::mutable_robot_commands() { + // @@protoc_insertion_point(field_mutable_list:grSim_Commands.robot_commands) return &robot_commands_; } +inline const ::google::protobuf::RepeatedPtrField< ::grSim_Robot_Command >& +grSim_Commands::robot_commands() const { + // @@protoc_insertion_point(field_list:grSim_Commands.robot_commands) + return robot_commands_; +} +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS +// ------------------------------------------------------------------- -// @@protoc_insertion_point(namespace_scope) - -#ifndef SWIG -namespace google { -namespace protobuf { +// @@protoc_insertion_point(namespace_scope) -} // namespace google -} // namespace protobuf -#endif // SWIG // @@protoc_insertion_point(global_scope) diff --git a/src/proto/grSim_Packet.pb.cc b/src/proto/grSim_Packet.pb.cc index b1cf8a6..6d995bc 100644 --- a/src/proto/grSim_Packet.pb.cc +++ b/src/proto/grSim_Packet.pb.cc @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -15,81 +16,106 @@ #include #include // @@protoc_insertion_point(includes) +class grSim_PacketDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +grSim_PacketDefaultTypeInternal _grSim_Packet_default_instance_; namespace { -const ::google::protobuf::Descriptor* grSim_Packet_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - grSim_Packet_reflection_ = NULL; +::google::protobuf::Metadata file_level_metadata[1]; } // namespace -void protobuf_AssignDesc_grSim_5fPacket_2eproto() { - protobuf_AddDesc_grSim_5fPacket_2eproto(); - const ::google::protobuf::FileDescriptor* file = - ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( - "grSim_Packet.proto"); - GOOGLE_CHECK(file != NULL); - grSim_Packet_descriptor_ = file->message_type(0); - static const int grSim_Packet_offsets_[2] = { +const ::google::protobuf::uint32* protobuf_Offsets_grSim_5fPacket_2eproto() GOOGLE_ATTRIBUTE_COLD; +const ::google::protobuf::uint32* protobuf_Offsets_grSim_5fPacket_2eproto() { + static const ::google::protobuf::uint32 offsets[] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_Packet, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_Packet, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_Packet, commands_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_Packet, replacement_), + 0, + 1, }; - grSim_Packet_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - grSim_Packet_descriptor_, - grSim_Packet::default_instance_, - grSim_Packet_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_Packet, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_Packet, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(grSim_Packet)); + return offsets; } +static const ::google::protobuf::internal::MigrationSchema schemas[] = { + { 0, 6, sizeof(grSim_Packet)}, +}; + +static const ::google::protobuf::internal::DefaultInstanceData file_default_instances[] = { + {reinterpret_cast(&_grSim_Packet_default_instance_), NULL}, +}; + namespace { -GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); -inline void protobuf_AssignDescriptorsOnce() { - ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, - &protobuf_AssignDesc_grSim_5fPacket_2eproto); +void protobuf_AssignDescriptors() { + protobuf_AddDesc_grSim_5fPacket_2eproto(); + ::google::protobuf::MessageFactory* factory = NULL; + AssignDescriptors( + "grSim_Packet.proto", schemas, file_default_instances, protobuf_Offsets_grSim_5fPacket_2eproto(), factory, + file_level_metadata, NULL, NULL); } +void protobuf_AssignDescriptorsOnce() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); +} + +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - grSim_Packet_descriptor_, &grSim_Packet::default_instance()); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1); } } // namespace void protobuf_ShutdownFile_grSim_5fPacket_2eproto() { - delete grSim_Packet::default_instance_; - delete grSim_Packet_reflection_; + _grSim_Packet_default_instance_.Shutdown(); + delete file_level_metadata[0].reflection; } -void protobuf_AddDesc_grSim_5fPacket_2eproto() { - static bool already_here = false; - if (already_here) return; - already_here = true; +void protobuf_InitDefaults_grSim_5fPacket_2eproto_impl() { GOOGLE_PROTOBUF_VERIFY_VERSION; - ::protobuf_AddDesc_grSim_5fCommands_2eproto(); - ::protobuf_AddDesc_grSim_5fReplacement_2eproto(); + ::protobuf_InitDefaults_grSim_5fCommands_2eproto(); + ::protobuf_InitDefaults_grSim_5fReplacement_2eproto(); + ::google::protobuf::internal::InitProtobufDefaults(); + _grSim_Packet_default_instance_.DefaultConstruct(); + _grSim_Packet_default_instance_.get_mutable()->commands_ = const_cast< ::grSim_Commands*>( + ::grSim_Commands::internal_default_instance()); + _grSim_Packet_default_instance_.get_mutable()->replacement_ = const_cast< ::grSim_Replacement*>( + ::grSim_Replacement::internal_default_instance()); +} + +void protobuf_InitDefaults_grSim_5fPacket_2eproto() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_InitDefaults_grSim_5fPacket_2eproto_impl); +} +void protobuf_AddDesc_grSim_5fPacket_2eproto_impl() { + protobuf_InitDefaults_grSim_5fPacket_2eproto(); + static const char descriptor[] = { + "\n\022grSim_Packet.proto\032\024grSim_Commands.pro" + "to\032\027grSim_Replacement.proto\"Z\n\014grSim_Pac" + "ket\022!\n\010commands\030\001 \001(\0132\017.grSim_Commands\022\'" + "\n\013replacement\030\002 \001(\0132\022.grSim_Replacement" + }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - "\n\022grSim_Packet.proto\032\024grSim_Commands.pro" - "to\032\027grSim_Replacement.proto\"Z\n\014grSim_Pac" - "ket\022!\n\010commands\030\001 \001(\0132\017.grSim_Commands\022\'" - "\n\013replacement\030\002 \001(\0132\022.grSim_Replacement", 159); + descriptor, 159); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "grSim_Packet.proto", &protobuf_RegisterTypes); - grSim_Packet::default_instance_ = new grSim_Packet(); - grSim_Packet::default_instance_->InitAsDefaultInstance(); + ::protobuf_AddDesc_grSim_5fCommands_2eproto(); + ::protobuf_AddDesc_grSim_5fReplacement_2eproto(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_grSim_5fPacket_2eproto); } +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_grSim_5fPacket_2eproto_once_); +void protobuf_AddDesc_grSim_5fPacket_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_grSim_5fPacket_2eproto_once_, + &protobuf_AddDesc_grSim_5fPacket_2eproto_impl); +} // Force AddDescriptors() to be called at static initialization time. struct StaticDescriptorInitializer_grSim_5fPacket_2eproto { StaticDescriptorInitializer_grSim_5fPacket_2eproto() { @@ -99,41 +125,54 @@ struct StaticDescriptorInitializer_grSim_5fPacket_2eproto { // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int grSim_Packet::kCommandsFieldNumber; const int grSim_Packet::kReplacementFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 grSim_Packet::grSim_Packet() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_grSim_5fPacket_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:grSim_Packet) } - -void grSim_Packet::InitAsDefaultInstance() { - commands_ = const_cast< ::grSim_Commands*>(&::grSim_Commands::default_instance()); - replacement_ = const_cast< ::grSim_Replacement*>(&::grSim_Replacement::default_instance()); -} - grSim_Packet::grSim_Packet(const grSim_Packet& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from.has_commands()) { + commands_ = new ::grSim_Commands(*from.commands_); + } else { + commands_ = NULL; + } + if (from.has_replacement()) { + replacement_ = new ::grSim_Replacement(*from.replacement_); + } else { + replacement_ = NULL; + } + // @@protoc_insertion_point(copy_constructor:grSim_Packet) } void grSim_Packet::SharedCtor() { _cached_size_ = 0; - commands_ = NULL; - replacement_ = NULL; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); + ::memset(&commands_, 0, reinterpret_cast(&replacement_) - + reinterpret_cast(&commands_) + sizeof(replacement_)); } grSim_Packet::~grSim_Packet() { + // @@protoc_insertion_point(destructor:grSim_Packet) SharedDtor(); } void grSim_Packet::SharedDtor() { - if (this != default_instance_) { + if (this != internal_default_instance()) { delete commands_; + } + if (this != internal_default_instance()) { delete replacement_; } } @@ -145,71 +184,76 @@ void grSim_Packet::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* grSim_Packet::descriptor() { protobuf_AssignDescriptorsOnce(); - return grSim_Packet_descriptor_; + return file_level_metadata[0].descriptor; } const grSim_Packet& grSim_Packet::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_grSim_5fPacket_2eproto(); - return *default_instance_; + protobuf_InitDefaults_grSim_5fPacket_2eproto(); + return *internal_default_instance(); } -grSim_Packet* grSim_Packet::default_instance_ = NULL; - -grSim_Packet* grSim_Packet::New() const { - return new grSim_Packet; +grSim_Packet* grSim_Packet::New(::google::protobuf::Arena* arena) const { + grSim_Packet* n = new grSim_Packet; + if (arena != NULL) { + arena->Own(n); + } + return n; } void grSim_Packet::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { +// @@protoc_insertion_point(message_clear_start:grSim_Packet) + if (_has_bits_[0 / 32] & 3u) { if (has_commands()) { - if (commands_ != NULL) commands_->::grSim_Commands::Clear(); + GOOGLE_DCHECK(commands_ != NULL); + commands_->::grSim_Commands::Clear(); } if (has_replacement()) { - if (replacement_ != NULL) replacement_->::grSim_Replacement::Clear(); + GOOGLE_DCHECK(replacement_ != NULL); + replacement_->::grSim_Replacement::Clear(); } } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool grSim_Packet::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:grSim_Packet) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional .grSim_Commands commands = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + if (tag == 10u) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_commands())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(18)) goto parse_replacement; break; } // optional .grSim_Replacement replacement = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_replacement: + if (tag == 18u) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_replacement())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectAtEnd()) return true; break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -217,98 +261,115 @@ bool grSim_Packet::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:grSim_Packet) return true; +failure: + // @@protoc_insertion_point(parse_failure:grSim_Packet) + return false; #undef DO_ } void grSim_Packet::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:grSim_Packet) // optional .grSim_Commands commands = 1; if (has_commands()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, this->commands(), output); + 1, *this->commands_, output); } // optional .grSim_Replacement replacement = 2; if (has_replacement()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, this->replacement(), output); + 2, *this->replacement_, output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:grSim_Packet) } -::google::protobuf::uint8* grSim_Packet::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* grSim_Packet::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:grSim_Packet) // optional .grSim_Commands commands = 1; if (has_commands()) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 1, this->commands(), target); + InternalWriteMessageNoVirtualToArray( + 1, *this->commands_, false, target); } // optional .grSim_Replacement replacement = 2; if (has_replacement()) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 2, this->replacement(), target); + InternalWriteMessageNoVirtualToArray( + 2, *this->replacement_, false, target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:grSim_Packet) return target; } -int grSim_Packet::ByteSize() const { - int total_size = 0; +size_t grSim_Packet::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:grSim_Packet) + size_t total_size = 0; - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + if (_has_bits_[0 / 32] & 3u) { // optional .grSim_Commands commands = 1; if (has_commands()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->commands()); + *this->commands_); } // optional .grSim_Replacement replacement = 2; if (has_replacement()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->replacement()); + *this->replacement_); } } - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void grSim_Packet::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:grSim_Packet) + GOOGLE_DCHECK_NE(&from, this); const grSim_Packet* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:grSim_Packet) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:grSim_Packet) MergeFrom(*source); } } void grSim_Packet::MergeFrom(const grSim_Packet& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { +// @@protoc_insertion_point(class_specific_merge_from_start:grSim_Packet) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._has_bits_[0 / 32] & 3u) { if (from.has_commands()) { mutable_commands()->::grSim_Commands::MergeFrom(from.commands()); } @@ -316,50 +377,143 @@ void grSim_Packet::MergeFrom(const grSim_Packet& from) { mutable_replacement()->::grSim_Replacement::MergeFrom(from.replacement()); } } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void grSim_Packet::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:grSim_Packet) if (&from == this) return; Clear(); MergeFrom(from); } void grSim_Packet::CopyFrom(const grSim_Packet& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:grSim_Packet) if (&from == this) return; Clear(); MergeFrom(from); } bool grSim_Packet::IsInitialized() const { - if (has_commands()) { - if (!this->commands().IsInitialized()) return false; + if (!this->commands_->IsInitialized()) return false; } if (has_replacement()) { - if (!this->replacement().IsInitialized()) return false; + if (!this->replacement_->IsInitialized()) return false; } return true; } void grSim_Packet::Swap(grSim_Packet* other) { - if (other != this) { - std::swap(commands_, other->commands_); - std::swap(replacement_, other->replacement_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void grSim_Packet::InternalSwap(grSim_Packet* other) { + std::swap(commands_, other->commands_); + std::swap(replacement_, other->replacement_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata grSim_Packet::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = grSim_Packet_descriptor_; - metadata.reflection = grSim_Packet_reflection_; - return metadata; + return file_level_metadata[0]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// grSim_Packet + +// optional .grSim_Commands commands = 1; +bool grSim_Packet::has_commands() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void grSim_Packet::set_has_commands() { + _has_bits_[0] |= 0x00000001u; +} +void grSim_Packet::clear_has_commands() { + _has_bits_[0] &= ~0x00000001u; +} +void grSim_Packet::clear_commands() { + if (commands_ != NULL) commands_->::grSim_Commands::Clear(); + clear_has_commands(); +} +const ::grSim_Commands& grSim_Packet::commands() const { + // @@protoc_insertion_point(field_get:grSim_Packet.commands) + return commands_ != NULL ? *commands_ + : *::grSim_Commands::internal_default_instance(); +} +::grSim_Commands* grSim_Packet::mutable_commands() { + set_has_commands(); + if (commands_ == NULL) { + commands_ = new ::grSim_Commands; + } + // @@protoc_insertion_point(field_mutable:grSim_Packet.commands) + return commands_; +} +::grSim_Commands* grSim_Packet::release_commands() { + // @@protoc_insertion_point(field_release:grSim_Packet.commands) + clear_has_commands(); + ::grSim_Commands* temp = commands_; + commands_ = NULL; + return temp; +} +void grSim_Packet::set_allocated_commands(::grSim_Commands* commands) { + delete commands_; + commands_ = commands; + if (commands) { + set_has_commands(); + } else { + clear_has_commands(); + } + // @@protoc_insertion_point(field_set_allocated:grSim_Packet.commands) +} + +// optional .grSim_Replacement replacement = 2; +bool grSim_Packet::has_replacement() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +void grSim_Packet::set_has_replacement() { + _has_bits_[0] |= 0x00000002u; +} +void grSim_Packet::clear_has_replacement() { + _has_bits_[0] &= ~0x00000002u; +} +void grSim_Packet::clear_replacement() { + if (replacement_ != NULL) replacement_->::grSim_Replacement::Clear(); + clear_has_replacement(); +} +const ::grSim_Replacement& grSim_Packet::replacement() const { + // @@protoc_insertion_point(field_get:grSim_Packet.replacement) + return replacement_ != NULL ? *replacement_ + : *::grSim_Replacement::internal_default_instance(); +} +::grSim_Replacement* grSim_Packet::mutable_replacement() { + set_has_replacement(); + if (replacement_ == NULL) { + replacement_ = new ::grSim_Replacement; + } + // @@protoc_insertion_point(field_mutable:grSim_Packet.replacement) + return replacement_; +} +::grSim_Replacement* grSim_Packet::release_replacement() { + // @@protoc_insertion_point(field_release:grSim_Packet.replacement) + clear_has_replacement(); + ::grSim_Replacement* temp = replacement_; + replacement_ = NULL; + return temp; +} +void grSim_Packet::set_allocated_replacement(::grSim_Replacement* replacement) { + delete replacement_; + replacement_ = replacement; + if (replacement) { + set_has_replacement(); + } else { + clear_has_replacement(); + } + // @@protoc_insertion_point(field_set_allocated:grSim_Packet.replacement) } +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) diff --git a/src/proto/grSim_Packet.pb.h b/src/proto/grSim_Packet.pb.h index 7012587..ede29a8 100644 --- a/src/proto/grSim_Packet.pb.h +++ b/src/proto/grSim_Packet.pb.h @@ -8,36 +8,54 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 2005000 +#if GOOGLE_PROTOBUF_VERSION < 3001000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. #endif +#include +#include #include +#include #include -#include -#include +#include // IWYU pragma: export +#include // IWYU pragma: export #include #include "grSim_Commands.pb.h" #include "grSim_Replacement.pb.h" // @@protoc_insertion_point(includes) +class grSim_BallReplacement; +class grSim_BallReplacementDefaultTypeInternal; +extern grSim_BallReplacementDefaultTypeInternal _grSim_BallReplacement_default_instance_; +class grSim_Commands; +class grSim_CommandsDefaultTypeInternal; +extern grSim_CommandsDefaultTypeInternal _grSim_Commands_default_instance_; +class grSim_Packet; +class grSim_PacketDefaultTypeInternal; +extern grSim_PacketDefaultTypeInternal _grSim_Packet_default_instance_; +class grSim_Replacement; +class grSim_ReplacementDefaultTypeInternal; +extern grSim_ReplacementDefaultTypeInternal _grSim_Replacement_default_instance_; +class grSim_RobotReplacement; +class grSim_RobotReplacementDefaultTypeInternal; +extern grSim_RobotReplacementDefaultTypeInternal _grSim_RobotReplacement_default_instance_; +class grSim_Robot_Command; +class grSim_Robot_CommandDefaultTypeInternal; +extern grSim_Robot_CommandDefaultTypeInternal _grSim_Robot_Command_default_instance_; // Internal implementation detail -- do not call these. -void protobuf_AddDesc_grSim_5fPacket_2eproto(); -void protobuf_AssignDesc_grSim_5fPacket_2eproto(); -void protobuf_ShutdownFile_grSim_5fPacket_2eproto(); - -class grSim_Packet; +void protobuf_AddDesc_grSim_5fPacket_2eproto(); +void protobuf_InitDefaults_grSim_5fPacket_2eproto(); // =================================================================== -class grSim_Packet : public ::google::protobuf::Message { +class grSim_Packet : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grSim_Packet) */ { public: grSim_Packet(); virtual ~grSim_Packet(); @@ -50,92 +68,109 @@ class grSim_Packet : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const grSim_Packet& default_instance(); + static inline const grSim_Packet* internal_default_instance() { + return reinterpret_cast( + &_grSim_Packet_default_instance_); + } + void Swap(grSim_Packet* other); // implements Message ---------------------------------------------- - grSim_Packet* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline grSim_Packet* New() const PROTOBUF_FINAL { return New(NULL); } + + grSim_Packet* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const grSim_Packet& from); void MergeFrom(const grSim_Packet& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(grSim_Packet* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // optional .grSim_Commands commands = 1; - inline bool has_commands() const; - inline void clear_commands(); + bool has_commands() const; + void clear_commands(); static const int kCommandsFieldNumber = 1; - inline const ::grSim_Commands& commands() const; - inline ::grSim_Commands* mutable_commands(); - inline ::grSim_Commands* release_commands(); - inline void set_allocated_commands(::grSim_Commands* commands); + const ::grSim_Commands& commands() const; + ::grSim_Commands* mutable_commands(); + ::grSim_Commands* release_commands(); + void set_allocated_commands(::grSim_Commands* commands); // optional .grSim_Replacement replacement = 2; - inline bool has_replacement() const; - inline void clear_replacement(); + bool has_replacement() const; + void clear_replacement(); static const int kReplacementFieldNumber = 2; - inline const ::grSim_Replacement& replacement() const; - inline ::grSim_Replacement* mutable_replacement(); - inline ::grSim_Replacement* release_replacement(); - inline void set_allocated_replacement(::grSim_Replacement* replacement); + const ::grSim_Replacement& replacement() const; + ::grSim_Replacement* mutable_replacement(); + ::grSim_Replacement* release_replacement(); + void set_allocated_replacement(::grSim_Replacement* replacement); // @@protoc_insertion_point(class_scope:grSim_Packet) private: - inline void set_has_commands(); - inline void clear_has_commands(); - inline void set_has_replacement(); - inline void clear_has_replacement(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; + void set_has_commands(); + void clear_has_commands(); + void set_has_replacement(); + void clear_has_replacement(); + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; ::grSim_Commands* commands_; ::grSim_Replacement* replacement_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; - - friend void protobuf_AddDesc_grSim_5fPacket_2eproto(); - friend void protobuf_AssignDesc_grSim_5fPacket_2eproto(); + friend void protobuf_InitDefaults_grSim_5fPacket_2eproto_impl(); + friend void protobuf_AddDesc_grSim_5fPacket_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_grSim_5fPacket_2eproto(); friend void protobuf_ShutdownFile_grSim_5fPacket_2eproto(); - void InitAsDefaultInstance(); - static grSim_Packet* default_instance_; }; // =================================================================== // =================================================================== +#if !PROTOBUF_INLINE_NOT_IN_HEADERS // grSim_Packet // optional .grSim_Commands commands = 1; @@ -153,14 +188,20 @@ inline void grSim_Packet::clear_commands() { clear_has_commands(); } inline const ::grSim_Commands& grSim_Packet::commands() const { - return commands_ != NULL ? *commands_ : *default_instance_->commands_; + // @@protoc_insertion_point(field_get:grSim_Packet.commands) + return commands_ != NULL ? *commands_ + : *::grSim_Commands::internal_default_instance(); } inline ::grSim_Commands* grSim_Packet::mutable_commands() { set_has_commands(); - if (commands_ == NULL) commands_ = new ::grSim_Commands; + if (commands_ == NULL) { + commands_ = new ::grSim_Commands; + } + // @@protoc_insertion_point(field_mutable:grSim_Packet.commands) return commands_; } inline ::grSim_Commands* grSim_Packet::release_commands() { + // @@protoc_insertion_point(field_release:grSim_Packet.commands) clear_has_commands(); ::grSim_Commands* temp = commands_; commands_ = NULL; @@ -174,6 +215,7 @@ inline void grSim_Packet::set_allocated_commands(::grSim_Commands* commands) { } else { clear_has_commands(); } + // @@protoc_insertion_point(field_set_allocated:grSim_Packet.commands) } // optional .grSim_Replacement replacement = 2; @@ -191,14 +233,20 @@ inline void grSim_Packet::clear_replacement() { clear_has_replacement(); } inline const ::grSim_Replacement& grSim_Packet::replacement() const { - return replacement_ != NULL ? *replacement_ : *default_instance_->replacement_; + // @@protoc_insertion_point(field_get:grSim_Packet.replacement) + return replacement_ != NULL ? *replacement_ + : *::grSim_Replacement::internal_default_instance(); } inline ::grSim_Replacement* grSim_Packet::mutable_replacement() { set_has_replacement(); - if (replacement_ == NULL) replacement_ = new ::grSim_Replacement; + if (replacement_ == NULL) { + replacement_ = new ::grSim_Replacement; + } + // @@protoc_insertion_point(field_mutable:grSim_Packet.replacement) return replacement_; } inline ::grSim_Replacement* grSim_Packet::release_replacement() { + // @@protoc_insertion_point(field_release:grSim_Packet.replacement) clear_has_replacement(); ::grSim_Replacement* temp = replacement_; replacement_ = NULL; @@ -212,19 +260,13 @@ inline void grSim_Packet::set_allocated_replacement(::grSim_Replacement* replace } else { clear_has_replacement(); } + // @@protoc_insertion_point(field_set_allocated:grSim_Packet.replacement) } +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) -#ifndef SWIG -namespace google { -namespace protobuf { - - -} // namespace google -} // namespace protobuf -#endif // SWIG // @@protoc_insertion_point(global_scope) diff --git a/src/proto/grSim_Replacement.pb.cc b/src/proto/grSim_Replacement.pb.cc index 5e5f2e2..39098c6 100644 --- a/src/proto/grSim_Replacement.pb.cc +++ b/src/proto/grSim_Replacement.pb.cc @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -15,138 +16,144 @@ #include #include // @@protoc_insertion_point(includes) +class grSim_RobotReplacementDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +grSim_RobotReplacementDefaultTypeInternal _grSim_RobotReplacement_default_instance_; +class grSim_BallReplacementDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +grSim_BallReplacementDefaultTypeInternal _grSim_BallReplacement_default_instance_; +class grSim_ReplacementDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +grSim_ReplacementDefaultTypeInternal _grSim_Replacement_default_instance_; namespace { -const ::google::protobuf::Descriptor* grSim_RobotReplacement_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - grSim_RobotReplacement_reflection_ = NULL; -const ::google::protobuf::Descriptor* grSim_BallReplacement_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - grSim_BallReplacement_reflection_ = NULL; -const ::google::protobuf::Descriptor* grSim_Replacement_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - grSim_Replacement_reflection_ = NULL; +::google::protobuf::Metadata file_level_metadata[3]; } // namespace -void protobuf_AssignDesc_grSim_5fReplacement_2eproto() { - protobuf_AddDesc_grSim_5fReplacement_2eproto(); - const ::google::protobuf::FileDescriptor* file = - ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( - "grSim_Replacement.proto"); - GOOGLE_CHECK(file != NULL); - grSim_RobotReplacement_descriptor_ = file->message_type(0); - static const int grSim_RobotReplacement_offsets_[5] = { +const ::google::protobuf::uint32* protobuf_Offsets_grSim_5fReplacement_2eproto() GOOGLE_ATTRIBUTE_COLD; +const ::google::protobuf::uint32* protobuf_Offsets_grSim_5fReplacement_2eproto() { + static const ::google::protobuf::uint32 offsets[] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_RobotReplacement, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_RobotReplacement, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_RobotReplacement, x_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_RobotReplacement, y_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_RobotReplacement, dir_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_RobotReplacement, id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_RobotReplacement, yellowteam_), - }; - grSim_RobotReplacement_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - grSim_RobotReplacement_descriptor_, - grSim_RobotReplacement::default_instance_, - grSim_RobotReplacement_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_RobotReplacement, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_RobotReplacement, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(grSim_RobotReplacement)); - grSim_BallReplacement_descriptor_ = file->message_type(1); - static const int grSim_BallReplacement_offsets_[4] = { + 0, + 1, + 2, + 3, + 4, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_BallReplacement, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_BallReplacement, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_BallReplacement, x_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_BallReplacement, y_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_BallReplacement, vx_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_BallReplacement, vy_), - }; - grSim_BallReplacement_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - grSim_BallReplacement_descriptor_, - grSim_BallReplacement::default_instance_, - grSim_BallReplacement_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_BallReplacement, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_BallReplacement, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(grSim_BallReplacement)); - grSim_Replacement_descriptor_ = file->message_type(2); - static const int grSim_Replacement_offsets_[2] = { + 0, + 1, + 2, + 3, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_Replacement, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_Replacement, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_Replacement, ball_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_Replacement, robots_), + 0, + 1, }; - grSim_Replacement_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - grSim_Replacement_descriptor_, - grSim_Replacement::default_instance_, - grSim_Replacement_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_Replacement, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(grSim_Replacement, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(grSim_Replacement)); + return offsets; } +static const ::google::protobuf::internal::MigrationSchema schemas[] = { + { 0, 9, sizeof(grSim_RobotReplacement)}, + { 14, 22, sizeof(grSim_BallReplacement)}, + { 26, 32, sizeof(grSim_Replacement)}, +}; + +static const ::google::protobuf::internal::DefaultInstanceData file_default_instances[] = { + {reinterpret_cast(&_grSim_RobotReplacement_default_instance_), NULL}, + {reinterpret_cast(&_grSim_BallReplacement_default_instance_), NULL}, + {reinterpret_cast(&_grSim_Replacement_default_instance_), NULL}, +}; + namespace { -GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); -inline void protobuf_AssignDescriptorsOnce() { - ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, - &protobuf_AssignDesc_grSim_5fReplacement_2eproto); +void protobuf_AssignDescriptors() { + protobuf_AddDesc_grSim_5fReplacement_2eproto(); + ::google::protobuf::MessageFactory* factory = NULL; + AssignDescriptors( + "grSim_Replacement.proto", schemas, file_default_instances, protobuf_Offsets_grSim_5fReplacement_2eproto(), factory, + file_level_metadata, NULL, NULL); +} + +void protobuf_AssignDescriptorsOnce() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); } +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - grSim_RobotReplacement_descriptor_, &grSim_RobotReplacement::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - grSim_BallReplacement_descriptor_, &grSim_BallReplacement::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - grSim_Replacement_descriptor_, &grSim_Replacement::default_instance()); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 3); } } // namespace void protobuf_ShutdownFile_grSim_5fReplacement_2eproto() { - delete grSim_RobotReplacement::default_instance_; - delete grSim_RobotReplacement_reflection_; - delete grSim_BallReplacement::default_instance_; - delete grSim_BallReplacement_reflection_; - delete grSim_Replacement::default_instance_; - delete grSim_Replacement_reflection_; + _grSim_RobotReplacement_default_instance_.Shutdown(); + delete file_level_metadata[0].reflection; + _grSim_BallReplacement_default_instance_.Shutdown(); + delete file_level_metadata[1].reflection; + _grSim_Replacement_default_instance_.Shutdown(); + delete file_level_metadata[2].reflection; } -void protobuf_AddDesc_grSim_5fReplacement_2eproto() { - static bool already_here = false; - if (already_here) return; - already_here = true; +void protobuf_InitDefaults_grSim_5fReplacement_2eproto_impl() { GOOGLE_PROTOBUF_VERIFY_VERSION; + ::google::protobuf::internal::InitProtobufDefaults(); + _grSim_RobotReplacement_default_instance_.DefaultConstruct(); + _grSim_BallReplacement_default_instance_.DefaultConstruct(); + _grSim_Replacement_default_instance_.DefaultConstruct(); + _grSim_Replacement_default_instance_.get_mutable()->ball_ = const_cast< ::grSim_BallReplacement*>( + ::grSim_BallReplacement::internal_default_instance()); +} + +void protobuf_InitDefaults_grSim_5fReplacement_2eproto() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_InitDefaults_grSim_5fReplacement_2eproto_impl); +} +void protobuf_AddDesc_grSim_5fReplacement_2eproto_impl() { + protobuf_InitDefaults_grSim_5fReplacement_2eproto(); + static const char descriptor[] = { + "\n\027grSim_Replacement.proto\"[\n\026grSim_Robot" + "Replacement\022\t\n\001x\030\001 \002(\001\022\t\n\001y\030\002 \002(\001\022\013\n\003dir" + "\030\003 \002(\001\022\n\n\002id\030\004 \002(\r\022\022\n\nyellowteam\030\005 \002(\010\"E" + "\n\025grSim_BallReplacement\022\t\n\001x\030\001 \002(\001\022\t\n\001y\030" + "\002 \002(\001\022\n\n\002vx\030\003 \002(\001\022\n\n\002vy\030\004 \002(\001\"b\n\021grSim_R" + "eplacement\022$\n\004ball\030\001 \001(\0132\026.grSim_BallRep" + "lacement\022\'\n\006robots\030\002 \003(\0132\027.grSim_RobotRe" + "placement" + }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - "\n\027grSim_Replacement.proto\"[\n\026grSim_Robot" - "Replacement\022\t\n\001x\030\001 \002(\001\022\t\n\001y\030\002 \002(\001\022\013\n\003dir" - "\030\003 \002(\001\022\n\n\002id\030\004 \002(\r\022\022\n\nyellowteam\030\005 \002(\010\"E" - "\n\025grSim_BallReplacement\022\t\n\001x\030\001 \002(\001\022\t\n\001y\030" - "\002 \002(\001\022\n\n\002vx\030\003 \002(\001\022\n\n\002vy\030\004 \002(\001\"b\n\021grSim_R" - "eplacement\022$\n\004ball\030\001 \001(\0132\026.grSim_BallRep" - "lacement\022\'\n\006robots\030\002 \003(\0132\027.grSim_RobotRe" - "placement", 289); + descriptor, 289); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "grSim_Replacement.proto", &protobuf_RegisterTypes); - grSim_RobotReplacement::default_instance_ = new grSim_RobotReplacement(); - grSim_BallReplacement::default_instance_ = new grSim_BallReplacement(); - grSim_Replacement::default_instance_ = new grSim_Replacement(); - grSim_RobotReplacement::default_instance_->InitAsDefaultInstance(); - grSim_BallReplacement::default_instance_->InitAsDefaultInstance(); - grSim_Replacement::default_instance_->InitAsDefaultInstance(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_grSim_5fReplacement_2eproto); } +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_grSim_5fReplacement_2eproto_once_); +void protobuf_AddDesc_grSim_5fReplacement_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_grSim_5fReplacement_2eproto_once_, + &protobuf_AddDesc_grSim_5fReplacement_2eproto_impl); +} // Force AddDescriptors() to be called at static initialization time. struct StaticDescriptorInitializer_grSim_5fReplacement_2eproto { StaticDescriptorInitializer_grSim_5fReplacement_2eproto() { @@ -156,45 +163,46 @@ struct StaticDescriptorInitializer_grSim_5fReplacement_2eproto { // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int grSim_RobotReplacement::kXFieldNumber; const int grSim_RobotReplacement::kYFieldNumber; const int grSim_RobotReplacement::kDirFieldNumber; const int grSim_RobotReplacement::kIdFieldNumber; const int grSim_RobotReplacement::kYellowteamFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 grSim_RobotReplacement::grSim_RobotReplacement() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_grSim_5fReplacement_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:grSim_RobotReplacement) } - -void grSim_RobotReplacement::InitAsDefaultInstance() { -} - grSim_RobotReplacement::grSim_RobotReplacement(const grSim_RobotReplacement& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::memcpy(&x_, &from.x_, + reinterpret_cast(&yellowteam_) - + reinterpret_cast(&x_) + sizeof(yellowteam_)); + // @@protoc_insertion_point(copy_constructor:grSim_RobotReplacement) } void grSim_RobotReplacement::SharedCtor() { _cached_size_ = 0; - x_ = 0; - y_ = 0; - dir_ = 0; - id_ = 0u; - yellowteam_ = false; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); + ::memset(&x_, 0, reinterpret_cast(&yellowteam_) - + reinterpret_cast(&x_) + sizeof(yellowteam_)); } grSim_RobotReplacement::~grSim_RobotReplacement() { + // @@protoc_insertion_point(destructor:grSim_RobotReplacement) SharedDtor(); } void grSim_RobotReplacement::SharedDtor() { - if (this != default_instance_) { - } } void grSim_RobotReplacement::SetCachedSize(int size) const { @@ -204,122 +212,113 @@ void grSim_RobotReplacement::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* grSim_RobotReplacement::descriptor() { protobuf_AssignDescriptorsOnce(); - return grSim_RobotReplacement_descriptor_; + return file_level_metadata[0].descriptor; } const grSim_RobotReplacement& grSim_RobotReplacement::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_grSim_5fReplacement_2eproto(); - return *default_instance_; + protobuf_InitDefaults_grSim_5fReplacement_2eproto(); + return *internal_default_instance(); } -grSim_RobotReplacement* grSim_RobotReplacement::default_instance_ = NULL; - -grSim_RobotReplacement* grSim_RobotReplacement::New() const { - return new grSim_RobotReplacement; +grSim_RobotReplacement* grSim_RobotReplacement::New(::google::protobuf::Arena* arena) const { + grSim_RobotReplacement* n = new grSim_RobotReplacement; + if (arena != NULL) { + arena->Own(n); + } + return n; } void grSim_RobotReplacement::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - x_ = 0; - y_ = 0; - dir_ = 0; - id_ = 0u; - yellowteam_ = false; +// @@protoc_insertion_point(message_clear_start:grSim_RobotReplacement) + if (_has_bits_[0 / 32] & 31u) { + ::memset(&x_, 0, reinterpret_cast(&yellowteam_) - + reinterpret_cast(&x_) + sizeof(yellowteam_)); } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool grSim_RobotReplacement::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:grSim_RobotReplacement) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required double x = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) { + if (tag == 9u) { + set_has_x(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( input, &x_))); - set_has_x(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(17)) goto parse_y; break; } // required double y = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) { - parse_y: + if (tag == 17u) { + set_has_y(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( input, &y_))); - set_has_y(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(25)) goto parse_dir; break; } // required double dir = 3; case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) { - parse_dir: + if (tag == 25u) { + set_has_dir(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( input, &dir_))); - set_has_dir(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(32)) goto parse_id; break; } // required uint32 id = 4; case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_id: + if (tag == 32u) { + set_has_id(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( input, &id_))); - set_has_id(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(40)) goto parse_yellowteam; break; } // required bool yellowteam = 5; case 5: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_yellowteam: + if (tag == 40u) { + set_has_yellowteam(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( input, &yellowteam_))); - set_has_yellowteam(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectAtEnd()) return true; break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -327,12 +326,18 @@ bool grSim_RobotReplacement::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:grSim_RobotReplacement) return true; +failure: + // @@protoc_insertion_point(parse_failure:grSim_RobotReplacement) + return false; #undef DO_ } void grSim_RobotReplacement::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:grSim_RobotReplacement) // required double x = 1; if (has_x()) { ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->x(), output); @@ -358,14 +363,17 @@ void grSim_RobotReplacement::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->yellowteam(), output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:grSim_RobotReplacement) } -::google::protobuf::uint8* grSim_RobotReplacement::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* grSim_RobotReplacement::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:grSim_RobotReplacement) // required double x = 1; if (has_x()) { target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->x(), target); @@ -391,71 +399,104 @@ ::google::protobuf::uint8* grSim_RobotReplacement::SerializeWithCachedSizesToArr target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->yellowteam(), target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:grSim_RobotReplacement) return target; } -int grSim_RobotReplacement::ByteSize() const { - int total_size = 0; +size_t grSim_RobotReplacement::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:grSim_RobotReplacement) + size_t total_size = 0; - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_x()) { // required double x = 1; - if (has_x()) { - total_size += 1 + 8; - } + total_size += 1 + 8; + } + if (has_y()) { // required double y = 2; - if (has_y()) { - total_size += 1 + 8; - } + total_size += 1 + 8; + } + if (has_dir()) { // required double dir = 3; - if (has_dir()) { - total_size += 1 + 8; - } + total_size += 1 + 8; + } + if (has_id()) { // required uint32 id = 4; - if (has_id()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::UInt32Size( - this->id()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->id()); + } + if (has_yellowteam()) { // required bool yellowteam = 5; - if (has_yellowteam()) { - total_size += 1 + 1; - } - + total_size += 1 + 1; } - if (!unknown_fields().empty()) { + + return total_size; +} +size_t grSim_RobotReplacement::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:grSim_RobotReplacement) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( unknown_fields()); } + if (((_has_bits_[0] & 0x0000001f) ^ 0x0000001f) == 0) { // All required fields are present. + // required double x = 1; + total_size += 1 + 8; + + // required double y = 2; + total_size += 1 + 8; + + // required double dir = 3; + total_size += 1 + 8; + + // required uint32 id = 4; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->id()); + + // required bool yellowteam = 5; + total_size += 1 + 1; + + } else { + total_size += RequiredFieldsByteSizeFallback(); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void grSim_RobotReplacement::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:grSim_RobotReplacement) + GOOGLE_DCHECK_NE(&from, this); const grSim_RobotReplacement* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:grSim_RobotReplacement) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:grSim_RobotReplacement) MergeFrom(*source); } } void grSim_RobotReplacement::MergeFrom(const grSim_RobotReplacement& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { +// @@protoc_insertion_point(class_specific_merge_from_start:grSim_RobotReplacement) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._has_bits_[0 / 32] & 31u) { if (from.has_x()) { set_x(from.x()); } @@ -472,16 +513,17 @@ void grSim_RobotReplacement::MergeFrom(const grSim_RobotReplacement& from) { set_yellowteam(from.yellowteam()); } } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void grSim_RobotReplacement::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:grSim_RobotReplacement) if (&from == this) return; Clear(); MergeFrom(from); } void grSim_RobotReplacement::CopyFrom(const grSim_RobotReplacement& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:grSim_RobotReplacement) if (&from == this) return; Clear(); MergeFrom(from); @@ -489,71 +531,195 @@ void grSim_RobotReplacement::CopyFrom(const grSim_RobotReplacement& from) { bool grSim_RobotReplacement::IsInitialized() const { if ((_has_bits_[0] & 0x0000001f) != 0x0000001f) return false; - return true; } void grSim_RobotReplacement::Swap(grSim_RobotReplacement* other) { - if (other != this) { - std::swap(x_, other->x_); - std::swap(y_, other->y_); - std::swap(dir_, other->dir_); - std::swap(id_, other->id_); - std::swap(yellowteam_, other->yellowteam_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void grSim_RobotReplacement::InternalSwap(grSim_RobotReplacement* other) { + std::swap(x_, other->x_); + std::swap(y_, other->y_); + std::swap(dir_, other->dir_); + std::swap(id_, other->id_); + std::swap(yellowteam_, other->yellowteam_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata grSim_RobotReplacement::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = grSim_RobotReplacement_descriptor_; - metadata.reflection = grSim_RobotReplacement_reflection_; - return metadata; + return file_level_metadata[0]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// grSim_RobotReplacement + +// required double x = 1; +bool grSim_RobotReplacement::has_x() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void grSim_RobotReplacement::set_has_x() { + _has_bits_[0] |= 0x00000001u; +} +void grSim_RobotReplacement::clear_has_x() { + _has_bits_[0] &= ~0x00000001u; +} +void grSim_RobotReplacement::clear_x() { + x_ = 0; + clear_has_x(); +} +double grSim_RobotReplacement::x() const { + // @@protoc_insertion_point(field_get:grSim_RobotReplacement.x) + return x_; +} +void grSim_RobotReplacement::set_x(double value) { + set_has_x(); + x_ = value; + // @@protoc_insertion_point(field_set:grSim_RobotReplacement.x) } +// required double y = 2; +bool grSim_RobotReplacement::has_y() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +void grSim_RobotReplacement::set_has_y() { + _has_bits_[0] |= 0x00000002u; +} +void grSim_RobotReplacement::clear_has_y() { + _has_bits_[0] &= ~0x00000002u; +} +void grSim_RobotReplacement::clear_y() { + y_ = 0; + clear_has_y(); +} +double grSim_RobotReplacement::y() const { + // @@protoc_insertion_point(field_get:grSim_RobotReplacement.y) + return y_; +} +void grSim_RobotReplacement::set_y(double value) { + set_has_y(); + y_ = value; + // @@protoc_insertion_point(field_set:grSim_RobotReplacement.y) +} + +// required double dir = 3; +bool grSim_RobotReplacement::has_dir() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +void grSim_RobotReplacement::set_has_dir() { + _has_bits_[0] |= 0x00000004u; +} +void grSim_RobotReplacement::clear_has_dir() { + _has_bits_[0] &= ~0x00000004u; +} +void grSim_RobotReplacement::clear_dir() { + dir_ = 0; + clear_has_dir(); +} +double grSim_RobotReplacement::dir() const { + // @@protoc_insertion_point(field_get:grSim_RobotReplacement.dir) + return dir_; +} +void grSim_RobotReplacement::set_dir(double value) { + set_has_dir(); + dir_ = value; + // @@protoc_insertion_point(field_set:grSim_RobotReplacement.dir) +} + +// required uint32 id = 4; +bool grSim_RobotReplacement::has_id() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +void grSim_RobotReplacement::set_has_id() { + _has_bits_[0] |= 0x00000008u; +} +void grSim_RobotReplacement::clear_has_id() { + _has_bits_[0] &= ~0x00000008u; +} +void grSim_RobotReplacement::clear_id() { + id_ = 0u; + clear_has_id(); +} +::google::protobuf::uint32 grSim_RobotReplacement::id() const { + // @@protoc_insertion_point(field_get:grSim_RobotReplacement.id) + return id_; +} +void grSim_RobotReplacement::set_id(::google::protobuf::uint32 value) { + set_has_id(); + id_ = value; + // @@protoc_insertion_point(field_set:grSim_RobotReplacement.id) +} + +// required bool yellowteam = 5; +bool grSim_RobotReplacement::has_yellowteam() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +void grSim_RobotReplacement::set_has_yellowteam() { + _has_bits_[0] |= 0x00000010u; +} +void grSim_RobotReplacement::clear_has_yellowteam() { + _has_bits_[0] &= ~0x00000010u; +} +void grSim_RobotReplacement::clear_yellowteam() { + yellowteam_ = false; + clear_has_yellowteam(); +} +bool grSim_RobotReplacement::yellowteam() const { + // @@protoc_insertion_point(field_get:grSim_RobotReplacement.yellowteam) + return yellowteam_; +} +void grSim_RobotReplacement::set_yellowteam(bool value) { + set_has_yellowteam(); + yellowteam_ = value; + // @@protoc_insertion_point(field_set:grSim_RobotReplacement.yellowteam) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int grSim_BallReplacement::kXFieldNumber; const int grSim_BallReplacement::kYFieldNumber; const int grSim_BallReplacement::kVxFieldNumber; const int grSim_BallReplacement::kVyFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 grSim_BallReplacement::grSim_BallReplacement() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_grSim_5fReplacement_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:grSim_BallReplacement) } - -void grSim_BallReplacement::InitAsDefaultInstance() { -} - grSim_BallReplacement::grSim_BallReplacement(const grSim_BallReplacement& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::memcpy(&x_, &from.x_, + reinterpret_cast(&vy_) - + reinterpret_cast(&x_) + sizeof(vy_)); + // @@protoc_insertion_point(copy_constructor:grSim_BallReplacement) } void grSim_BallReplacement::SharedCtor() { _cached_size_ = 0; - x_ = 0; - y_ = 0; - vx_ = 0; - vy_ = 0; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); + ::memset(&x_, 0, reinterpret_cast(&vy_) - + reinterpret_cast(&x_) + sizeof(vy_)); } grSim_BallReplacement::~grSim_BallReplacement() { + // @@protoc_insertion_point(destructor:grSim_BallReplacement) SharedDtor(); } void grSim_BallReplacement::SharedDtor() { - if (this != default_instance_) { - } } void grSim_BallReplacement::SetCachedSize(int size) const { @@ -563,105 +729,100 @@ void grSim_BallReplacement::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* grSim_BallReplacement::descriptor() { protobuf_AssignDescriptorsOnce(); - return grSim_BallReplacement_descriptor_; + return file_level_metadata[1].descriptor; } const grSim_BallReplacement& grSim_BallReplacement::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_grSim_5fReplacement_2eproto(); - return *default_instance_; + protobuf_InitDefaults_grSim_5fReplacement_2eproto(); + return *internal_default_instance(); } -grSim_BallReplacement* grSim_BallReplacement::default_instance_ = NULL; - -grSim_BallReplacement* grSim_BallReplacement::New() const { - return new grSim_BallReplacement; +grSim_BallReplacement* grSim_BallReplacement::New(::google::protobuf::Arena* arena) const { + grSim_BallReplacement* n = new grSim_BallReplacement; + if (arena != NULL) { + arena->Own(n); + } + return n; } void grSim_BallReplacement::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - x_ = 0; - y_ = 0; - vx_ = 0; - vy_ = 0; +// @@protoc_insertion_point(message_clear_start:grSim_BallReplacement) + if (_has_bits_[0 / 32] & 15u) { + ::memset(&x_, 0, reinterpret_cast(&vy_) - + reinterpret_cast(&x_) + sizeof(vy_)); } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool grSim_BallReplacement::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:grSim_BallReplacement) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required double x = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) { + if (tag == 9u) { + set_has_x(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( input, &x_))); - set_has_x(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(17)) goto parse_y; break; } // required double y = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) { - parse_y: + if (tag == 17u) { + set_has_y(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( input, &y_))); - set_has_y(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(25)) goto parse_vx; break; } // required double vx = 3; case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) { - parse_vx: + if (tag == 25u) { + set_has_vx(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( input, &vx_))); - set_has_vx(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(33)) goto parse_vy; break; } // required double vy = 4; case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) { - parse_vy: + if (tag == 33u) { + set_has_vy(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( input, &vy_))); - set_has_vy(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectAtEnd()) return true; break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -669,12 +830,18 @@ bool grSim_BallReplacement::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:grSim_BallReplacement) return true; +failure: + // @@protoc_insertion_point(parse_failure:grSim_BallReplacement) + return false; #undef DO_ } void grSim_BallReplacement::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:grSim_BallReplacement) // required double x = 1; if (has_x()) { ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->x(), output); @@ -695,14 +862,17 @@ void grSim_BallReplacement::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteDouble(4, this->vy(), output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:grSim_BallReplacement) } -::google::protobuf::uint8* grSim_BallReplacement::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* grSim_BallReplacement::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:grSim_BallReplacement) // required double x = 1; if (has_x()) { target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->x(), target); @@ -723,64 +893,92 @@ ::google::protobuf::uint8* grSim_BallReplacement::SerializeWithCachedSizesToArra target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(4, this->vy(), target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:grSim_BallReplacement) return target; } -int grSim_BallReplacement::ByteSize() const { - int total_size = 0; +size_t grSim_BallReplacement::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:grSim_BallReplacement) + size_t total_size = 0; - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_x()) { // required double x = 1; - if (has_x()) { - total_size += 1 + 8; - } + total_size += 1 + 8; + } + if (has_y()) { // required double y = 2; - if (has_y()) { - total_size += 1 + 8; - } + total_size += 1 + 8; + } + if (has_vx()) { // required double vx = 3; - if (has_vx()) { - total_size += 1 + 8; - } + total_size += 1 + 8; + } + if (has_vy()) { // required double vy = 4; - if (has_vy()) { - total_size += 1 + 8; - } - + total_size += 1 + 8; } - if (!unknown_fields().empty()) { + + return total_size; +} +size_t grSim_BallReplacement::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:grSim_BallReplacement) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( unknown_fields()); } + if (((_has_bits_[0] & 0x0000000f) ^ 0x0000000f) == 0) { // All required fields are present. + // required double x = 1; + total_size += 1 + 8; + + // required double y = 2; + total_size += 1 + 8; + + // required double vx = 3; + total_size += 1 + 8; + + // required double vy = 4; + total_size += 1 + 8; + + } else { + total_size += RequiredFieldsByteSizeFallback(); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void grSim_BallReplacement::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:grSim_BallReplacement) + GOOGLE_DCHECK_NE(&from, this); const grSim_BallReplacement* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:grSim_BallReplacement) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:grSim_BallReplacement) MergeFrom(*source); } } void grSim_BallReplacement::MergeFrom(const grSim_BallReplacement& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { +// @@protoc_insertion_point(class_specific_merge_from_start:grSim_BallReplacement) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._has_bits_[0 / 32] & 15u) { if (from.has_x()) { set_x(from.x()); } @@ -794,16 +992,17 @@ void grSim_BallReplacement::MergeFrom(const grSim_BallReplacement& from) { set_vy(from.vy()); } } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void grSim_BallReplacement::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:grSim_BallReplacement) if (&from == this) return; Clear(); MergeFrom(from); } void grSim_BallReplacement::CopyFrom(const grSim_BallReplacement& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:grSim_BallReplacement) if (&from == this) return; Clear(); MergeFrom(from); @@ -811,65 +1010,171 @@ void grSim_BallReplacement::CopyFrom(const grSim_BallReplacement& from) { bool grSim_BallReplacement::IsInitialized() const { if ((_has_bits_[0] & 0x0000000f) != 0x0000000f) return false; - return true; } void grSim_BallReplacement::Swap(grSim_BallReplacement* other) { - if (other != this) { - std::swap(x_, other->x_); - std::swap(y_, other->y_); - std::swap(vx_, other->vx_); - std::swap(vy_, other->vy_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void grSim_BallReplacement::InternalSwap(grSim_BallReplacement* other) { + std::swap(x_, other->x_); + std::swap(y_, other->y_); + std::swap(vx_, other->vx_); + std::swap(vy_, other->vy_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata grSim_BallReplacement::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = grSim_BallReplacement_descriptor_; - metadata.reflection = grSim_BallReplacement_reflection_; - return metadata; + return file_level_metadata[1]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// grSim_BallReplacement + +// required double x = 1; +bool grSim_BallReplacement::has_x() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void grSim_BallReplacement::set_has_x() { + _has_bits_[0] |= 0x00000001u; +} +void grSim_BallReplacement::clear_has_x() { + _has_bits_[0] &= ~0x00000001u; +} +void grSim_BallReplacement::clear_x() { + x_ = 0; + clear_has_x(); +} +double grSim_BallReplacement::x() const { + // @@protoc_insertion_point(field_get:grSim_BallReplacement.x) + return x_; +} +void grSim_BallReplacement::set_x(double value) { + set_has_x(); + x_ = value; + // @@protoc_insertion_point(field_set:grSim_BallReplacement.x) +} + +// required double y = 2; +bool grSim_BallReplacement::has_y() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +void grSim_BallReplacement::set_has_y() { + _has_bits_[0] |= 0x00000002u; +} +void grSim_BallReplacement::clear_has_y() { + _has_bits_[0] &= ~0x00000002u; +} +void grSim_BallReplacement::clear_y() { + y_ = 0; + clear_has_y(); +} +double grSim_BallReplacement::y() const { + // @@protoc_insertion_point(field_get:grSim_BallReplacement.y) + return y_; +} +void grSim_BallReplacement::set_y(double value) { + set_has_y(); + y_ = value; + // @@protoc_insertion_point(field_set:grSim_BallReplacement.y) +} + +// required double vx = 3; +bool grSim_BallReplacement::has_vx() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +void grSim_BallReplacement::set_has_vx() { + _has_bits_[0] |= 0x00000004u; +} +void grSim_BallReplacement::clear_has_vx() { + _has_bits_[0] &= ~0x00000004u; +} +void grSim_BallReplacement::clear_vx() { + vx_ = 0; + clear_has_vx(); +} +double grSim_BallReplacement::vx() const { + // @@protoc_insertion_point(field_get:grSim_BallReplacement.vx) + return vx_; +} +void grSim_BallReplacement::set_vx(double value) { + set_has_vx(); + vx_ = value; + // @@protoc_insertion_point(field_set:grSim_BallReplacement.vx) +} + +// required double vy = 4; +bool grSim_BallReplacement::has_vy() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +void grSim_BallReplacement::set_has_vy() { + _has_bits_[0] |= 0x00000008u; +} +void grSim_BallReplacement::clear_has_vy() { + _has_bits_[0] &= ~0x00000008u; +} +void grSim_BallReplacement::clear_vy() { + vy_ = 0; + clear_has_vy(); +} +double grSim_BallReplacement::vy() const { + // @@protoc_insertion_point(field_get:grSim_BallReplacement.vy) + return vy_; +} +void grSim_BallReplacement::set_vy(double value) { + set_has_vy(); + vy_ = value; + // @@protoc_insertion_point(field_set:grSim_BallReplacement.vy) } +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int grSim_Replacement::kBallFieldNumber; const int grSim_Replacement::kRobotsFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 grSim_Replacement::grSim_Replacement() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_grSim_5fReplacement_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:grSim_Replacement) } - -void grSim_Replacement::InitAsDefaultInstance() { - ball_ = const_cast< ::grSim_BallReplacement*>(&::grSim_BallReplacement::default_instance()); -} - grSim_Replacement::grSim_Replacement(const grSim_Replacement& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0), + robots_(from.robots_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from.has_ball()) { + ball_ = new ::grSim_BallReplacement(*from.ball_); + } else { + ball_ = NULL; + } + // @@protoc_insertion_point(copy_constructor:grSim_Replacement) } void grSim_Replacement::SharedCtor() { _cached_size_ = 0; ball_ = NULL; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); } grSim_Replacement::~grSim_Replacement() { + // @@protoc_insertion_point(destructor:grSim_Replacement) SharedDtor(); } void grSim_Replacement::SharedDtor() { - if (this != default_instance_) { + if (this != internal_default_instance()) { delete ball_; } } @@ -881,70 +1186,73 @@ void grSim_Replacement::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* grSim_Replacement::descriptor() { protobuf_AssignDescriptorsOnce(); - return grSim_Replacement_descriptor_; + return file_level_metadata[2].descriptor; } const grSim_Replacement& grSim_Replacement::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_grSim_5fReplacement_2eproto(); - return *default_instance_; + protobuf_InitDefaults_grSim_5fReplacement_2eproto(); + return *internal_default_instance(); } -grSim_Replacement* grSim_Replacement::default_instance_ = NULL; - -grSim_Replacement* grSim_Replacement::New() const { - return new grSim_Replacement; +grSim_Replacement* grSim_Replacement::New(::google::protobuf::Arena* arena) const { + grSim_Replacement* n = new grSim_Replacement; + if (arena != NULL) { + arena->Own(n); + } + return n; } void grSim_Replacement::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (has_ball()) { - if (ball_ != NULL) ball_->::grSim_BallReplacement::Clear(); - } - } +// @@protoc_insertion_point(message_clear_start:grSim_Replacement) robots_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + if (has_ball()) { + GOOGLE_DCHECK(ball_ != NULL); + ball_->::grSim_BallReplacement::Clear(); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool grSim_Replacement::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:grSim_Replacement) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional .grSim_BallReplacement ball = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + if (tag == 10u) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_ball())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(18)) goto parse_robots; break; } // repeated .grSim_RobotReplacement robots = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_robots: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + if (tag == 18u) { + DO_(input->IncrementRecursionDepth()); + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( input, add_robots())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(18)) goto parse_robots; - if (input->ExpectAtEnd()) return true; + input->UnsafeDecrementRecursionDepth(); break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -952,148 +1260,240 @@ bool grSim_Replacement::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:grSim_Replacement) return true; +failure: + // @@protoc_insertion_point(parse_failure:grSim_Replacement) + return false; #undef DO_ } void grSim_Replacement::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:grSim_Replacement) // optional .grSim_BallReplacement ball = 1; if (has_ball()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, this->ball(), output); + 1, *this->ball_, output); } // repeated .grSim_RobotReplacement robots = 2; - for (int i = 0; i < this->robots_size(); i++) { + for (unsigned int i = 0, n = this->robots_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, this->robots(i), output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:grSim_Replacement) } -::google::protobuf::uint8* grSim_Replacement::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* grSim_Replacement::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:grSim_Replacement) // optional .grSim_BallReplacement ball = 1; if (has_ball()) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 1, this->ball(), target); + InternalWriteMessageNoVirtualToArray( + 1, *this->ball_, false, target); } // repeated .grSim_RobotReplacement robots = 2; - for (int i = 0; i < this->robots_size(); i++) { + for (unsigned int i = 0, n = this->robots_size(); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 2, this->robots(i), target); + InternalWriteMessageNoVirtualToArray( + 2, this->robots(i), false, target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:grSim_Replacement) return target; } -int grSim_Replacement::ByteSize() const { - int total_size = 0; +size_t grSim_Replacement::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:grSim_Replacement) + size_t total_size = 0; - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // optional .grSim_BallReplacement ball = 1; - if (has_ball()) { - total_size += 1 + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + // repeated .grSim_RobotReplacement robots = 2; + { + unsigned int count = this->robots_size(); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->ball()); + this->robots(i)); } - } - // repeated .grSim_RobotReplacement robots = 2; - total_size += 1 * this->robots_size(); - for (int i = 0; i < this->robots_size(); i++) { - total_size += + + // optional .grSim_BallReplacement ball = 1; + if (has_ball()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->robots(i)); + *this->ball_); } - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void grSim_Replacement::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:grSim_Replacement) + GOOGLE_DCHECK_NE(&from, this); const grSim_Replacement* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:grSim_Replacement) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:grSim_Replacement) MergeFrom(*source); } } void grSim_Replacement::MergeFrom(const grSim_Replacement& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(class_specific_merge_from_start:grSim_Replacement) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); robots_.MergeFrom(from.robots_); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_ball()) { - mutable_ball()->::grSim_BallReplacement::MergeFrom(from.ball()); - } + if (from.has_ball()) { + mutable_ball()->::grSim_BallReplacement::MergeFrom(from.ball()); } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void grSim_Replacement::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:grSim_Replacement) if (&from == this) return; Clear(); MergeFrom(from); } void grSim_Replacement::CopyFrom(const grSim_Replacement& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:grSim_Replacement) if (&from == this) return; Clear(); MergeFrom(from); } bool grSim_Replacement::IsInitialized() const { - + if (!::google::protobuf::internal::AllAreInitialized(this->robots())) return false; if (has_ball()) { - if (!this->ball().IsInitialized()) return false; - } - for (int i = 0; i < robots_size(); i++) { - if (!this->robots(i).IsInitialized()) return false; + if (!this->ball_->IsInitialized()) return false; } return true; } void grSim_Replacement::Swap(grSim_Replacement* other) { - if (other != this) { - std::swap(ball_, other->ball_); - robots_.Swap(&other->robots_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void grSim_Replacement::InternalSwap(grSim_Replacement* other) { + robots_.UnsafeArenaSwap(&other->robots_); + std::swap(ball_, other->ball_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata grSim_Replacement::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = grSim_Replacement_descriptor_; - metadata.reflection = grSim_Replacement_reflection_; - return metadata; + return file_level_metadata[2]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// grSim_Replacement + +// optional .grSim_BallReplacement ball = 1; +bool grSim_Replacement::has_ball() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void grSim_Replacement::set_has_ball() { + _has_bits_[0] |= 0x00000001u; +} +void grSim_Replacement::clear_has_ball() { + _has_bits_[0] &= ~0x00000001u; +} +void grSim_Replacement::clear_ball() { + if (ball_ != NULL) ball_->::grSim_BallReplacement::Clear(); + clear_has_ball(); +} +const ::grSim_BallReplacement& grSim_Replacement::ball() const { + // @@protoc_insertion_point(field_get:grSim_Replacement.ball) + return ball_ != NULL ? *ball_ + : *::grSim_BallReplacement::internal_default_instance(); +} +::grSim_BallReplacement* grSim_Replacement::mutable_ball() { + set_has_ball(); + if (ball_ == NULL) { + ball_ = new ::grSim_BallReplacement; + } + // @@protoc_insertion_point(field_mutable:grSim_Replacement.ball) + return ball_; +} +::grSim_BallReplacement* grSim_Replacement::release_ball() { + // @@protoc_insertion_point(field_release:grSim_Replacement.ball) + clear_has_ball(); + ::grSim_BallReplacement* temp = ball_; + ball_ = NULL; + return temp; +} +void grSim_Replacement::set_allocated_ball(::grSim_BallReplacement* ball) { + delete ball_; + ball_ = ball; + if (ball) { + set_has_ball(); + } else { + clear_has_ball(); + } + // @@protoc_insertion_point(field_set_allocated:grSim_Replacement.ball) +} + +// repeated .grSim_RobotReplacement robots = 2; +int grSim_Replacement::robots_size() const { + return robots_.size(); +} +void grSim_Replacement::clear_robots() { + robots_.Clear(); +} +const ::grSim_RobotReplacement& grSim_Replacement::robots(int index) const { + // @@protoc_insertion_point(field_get:grSim_Replacement.robots) + return robots_.Get(index); +} +::grSim_RobotReplacement* grSim_Replacement::mutable_robots(int index) { + // @@protoc_insertion_point(field_mutable:grSim_Replacement.robots) + return robots_.Mutable(index); +} +::grSim_RobotReplacement* grSim_Replacement::add_robots() { + // @@protoc_insertion_point(field_add:grSim_Replacement.robots) + return robots_.Add(); +} +::google::protobuf::RepeatedPtrField< ::grSim_RobotReplacement >* +grSim_Replacement::mutable_robots() { + // @@protoc_insertion_point(field_mutable_list:grSim_Replacement.robots) + return &robots_; +} +const ::google::protobuf::RepeatedPtrField< ::grSim_RobotReplacement >& +grSim_Replacement::robots() const { + // @@protoc_insertion_point(field_list:grSim_Replacement.robots) + return robots_; } +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) diff --git a/src/proto/grSim_Replacement.pb.h b/src/proto/grSim_Replacement.pb.h index 65a219d..3213052 100644 --- a/src/proto/grSim_Replacement.pb.h +++ b/src/proto/grSim_Replacement.pb.h @@ -8,36 +8,43 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 2005000 +#if GOOGLE_PROTOBUF_VERSION < 3001000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. #endif +#include +#include #include +#include #include -#include -#include +#include // IWYU pragma: export +#include // IWYU pragma: export #include // @@protoc_insertion_point(includes) - -// Internal implementation detail -- do not call these. -void protobuf_AddDesc_grSim_5fReplacement_2eproto(); -void protobuf_AssignDesc_grSim_5fReplacement_2eproto(); -void protobuf_ShutdownFile_grSim_5fReplacement_2eproto(); - -class grSim_RobotReplacement; class grSim_BallReplacement; +class grSim_BallReplacementDefaultTypeInternal; +extern grSim_BallReplacementDefaultTypeInternal _grSim_BallReplacement_default_instance_; class grSim_Replacement; +class grSim_ReplacementDefaultTypeInternal; +extern grSim_ReplacementDefaultTypeInternal _grSim_Replacement_default_instance_; +class grSim_RobotReplacement; +class grSim_RobotReplacementDefaultTypeInternal; +extern grSim_RobotReplacementDefaultTypeInternal _grSim_RobotReplacement_default_instance_; + +// Internal implementation detail -- do not call these. +void protobuf_AddDesc_grSim_5fReplacement_2eproto(); +void protobuf_InitDefaults_grSim_5fReplacement_2eproto(); // =================================================================== -class grSim_RobotReplacement : public ::google::protobuf::Message { +class grSim_RobotReplacement : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grSim_RobotReplacement) */ { public: grSim_RobotReplacement(); virtual ~grSim_RobotReplacement(); @@ -50,116 +57,135 @@ class grSim_RobotReplacement : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const grSim_RobotReplacement& default_instance(); + static inline const grSim_RobotReplacement* internal_default_instance() { + return reinterpret_cast( + &_grSim_RobotReplacement_default_instance_); + } + void Swap(grSim_RobotReplacement* other); // implements Message ---------------------------------------------- - grSim_RobotReplacement* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline grSim_RobotReplacement* New() const PROTOBUF_FINAL { return New(NULL); } + + grSim_RobotReplacement* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const grSim_RobotReplacement& from); void MergeFrom(const grSim_RobotReplacement& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(grSim_RobotReplacement* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // required double x = 1; - inline bool has_x() const; - inline void clear_x(); + bool has_x() const; + void clear_x(); static const int kXFieldNumber = 1; - inline double x() const; - inline void set_x(double value); + double x() const; + void set_x(double value); // required double y = 2; - inline bool has_y() const; - inline void clear_y(); + bool has_y() const; + void clear_y(); static const int kYFieldNumber = 2; - inline double y() const; - inline void set_y(double value); + double y() const; + void set_y(double value); // required double dir = 3; - inline bool has_dir() const; - inline void clear_dir(); + bool has_dir() const; + void clear_dir(); static const int kDirFieldNumber = 3; - inline double dir() const; - inline void set_dir(double value); + double dir() const; + void set_dir(double value); // required uint32 id = 4; - inline bool has_id() const; - inline void clear_id(); + bool has_id() const; + void clear_id(); static const int kIdFieldNumber = 4; - inline ::google::protobuf::uint32 id() const; - inline void set_id(::google::protobuf::uint32 value); + ::google::protobuf::uint32 id() const; + void set_id(::google::protobuf::uint32 value); // required bool yellowteam = 5; - inline bool has_yellowteam() const; - inline void clear_yellowteam(); + bool has_yellowteam() const; + void clear_yellowteam(); static const int kYellowteamFieldNumber = 5; - inline bool yellowteam() const; - inline void set_yellowteam(bool value); + bool yellowteam() const; + void set_yellowteam(bool value); // @@protoc_insertion_point(class_scope:grSim_RobotReplacement) private: - inline void set_has_x(); - inline void clear_has_x(); - inline void set_has_y(); - inline void clear_has_y(); - inline void set_has_dir(); - inline void clear_has_dir(); - inline void set_has_id(); - inline void clear_has_id(); - inline void set_has_yellowteam(); - inline void clear_has_yellowteam(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + void set_has_x(); + void clear_has_x(); + void set_has_y(); + void clear_has_y(); + void set_has_dir(); + void clear_has_dir(); + void set_has_id(); + void clear_has_id(); + void set_has_yellowteam(); + void clear_has_yellowteam(); + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; double x_; double y_; double dir_; ::google::protobuf::uint32 id_; bool yellowteam_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(5 + 31) / 32]; - - friend void protobuf_AddDesc_grSim_5fReplacement_2eproto(); - friend void protobuf_AssignDesc_grSim_5fReplacement_2eproto(); + friend void protobuf_InitDefaults_grSim_5fReplacement_2eproto_impl(); + friend void protobuf_AddDesc_grSim_5fReplacement_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_grSim_5fReplacement_2eproto(); friend void protobuf_ShutdownFile_grSim_5fReplacement_2eproto(); - void InitAsDefaultInstance(); - static grSim_RobotReplacement* default_instance_; }; // ------------------------------------------------------------------- -class grSim_BallReplacement : public ::google::protobuf::Message { +class grSim_BallReplacement : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grSim_BallReplacement) */ { public: grSim_BallReplacement(); virtual ~grSim_BallReplacement(); @@ -172,106 +198,125 @@ class grSim_BallReplacement : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const grSim_BallReplacement& default_instance(); + static inline const grSim_BallReplacement* internal_default_instance() { + return reinterpret_cast( + &_grSim_BallReplacement_default_instance_); + } + void Swap(grSim_BallReplacement* other); // implements Message ---------------------------------------------- - grSim_BallReplacement* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline grSim_BallReplacement* New() const PROTOBUF_FINAL { return New(NULL); } + + grSim_BallReplacement* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const grSim_BallReplacement& from); void MergeFrom(const grSim_BallReplacement& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(grSim_BallReplacement* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // required double x = 1; - inline bool has_x() const; - inline void clear_x(); + bool has_x() const; + void clear_x(); static const int kXFieldNumber = 1; - inline double x() const; - inline void set_x(double value); + double x() const; + void set_x(double value); // required double y = 2; - inline bool has_y() const; - inline void clear_y(); + bool has_y() const; + void clear_y(); static const int kYFieldNumber = 2; - inline double y() const; - inline void set_y(double value); + double y() const; + void set_y(double value); // required double vx = 3; - inline bool has_vx() const; - inline void clear_vx(); + bool has_vx() const; + void clear_vx(); static const int kVxFieldNumber = 3; - inline double vx() const; - inline void set_vx(double value); + double vx() const; + void set_vx(double value); // required double vy = 4; - inline bool has_vy() const; - inline void clear_vy(); + bool has_vy() const; + void clear_vy(); static const int kVyFieldNumber = 4; - inline double vy() const; - inline void set_vy(double value); + double vy() const; + void set_vy(double value); // @@protoc_insertion_point(class_scope:grSim_BallReplacement) private: - inline void set_has_x(); - inline void clear_has_x(); - inline void set_has_y(); - inline void clear_has_y(); - inline void set_has_vx(); - inline void clear_has_vx(); - inline void set_has_vy(); - inline void clear_has_vy(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + void set_has_x(); + void clear_has_x(); + void set_has_y(); + void clear_has_y(); + void set_has_vx(); + void clear_has_vx(); + void set_has_vy(); + void clear_has_vy(); + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; double x_; double y_; double vx_; double vy_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32]; - - friend void protobuf_AddDesc_grSim_5fReplacement_2eproto(); - friend void protobuf_AssignDesc_grSim_5fReplacement_2eproto(); + friend void protobuf_InitDefaults_grSim_5fReplacement_2eproto_impl(); + friend void protobuf_AddDesc_grSim_5fReplacement_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_grSim_5fReplacement_2eproto(); friend void protobuf_ShutdownFile_grSim_5fReplacement_2eproto(); - void InitAsDefaultInstance(); - static grSim_BallReplacement* default_instance_; }; // ------------------------------------------------------------------- -class grSim_Replacement : public ::google::protobuf::Message { +class grSim_Replacement : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grSim_Replacement) */ { public: grSim_Replacement(); virtual ~grSim_Replacement(); @@ -284,93 +329,110 @@ class grSim_Replacement : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const grSim_Replacement& default_instance(); + static inline const grSim_Replacement* internal_default_instance() { + return reinterpret_cast( + &_grSim_Replacement_default_instance_); + } + void Swap(grSim_Replacement* other); // implements Message ---------------------------------------------- - grSim_Replacement* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline grSim_Replacement* New() const PROTOBUF_FINAL { return New(NULL); } + + grSim_Replacement* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const grSim_Replacement& from); void MergeFrom(const grSim_Replacement& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(grSim_Replacement* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // optional .grSim_BallReplacement ball = 1; - inline bool has_ball() const; - inline void clear_ball(); + bool has_ball() const; + void clear_ball(); static const int kBallFieldNumber = 1; - inline const ::grSim_BallReplacement& ball() const; - inline ::grSim_BallReplacement* mutable_ball(); - inline ::grSim_BallReplacement* release_ball(); - inline void set_allocated_ball(::grSim_BallReplacement* ball); + const ::grSim_BallReplacement& ball() const; + ::grSim_BallReplacement* mutable_ball(); + ::grSim_BallReplacement* release_ball(); + void set_allocated_ball(::grSim_BallReplacement* ball); // repeated .grSim_RobotReplacement robots = 2; - inline int robots_size() const; - inline void clear_robots(); + int robots_size() const; + void clear_robots(); static const int kRobotsFieldNumber = 2; - inline const ::grSim_RobotReplacement& robots(int index) const; - inline ::grSim_RobotReplacement* mutable_robots(int index); - inline ::grSim_RobotReplacement* add_robots(); - inline const ::google::protobuf::RepeatedPtrField< ::grSim_RobotReplacement >& - robots() const; - inline ::google::protobuf::RepeatedPtrField< ::grSim_RobotReplacement >* + const ::grSim_RobotReplacement& robots(int index) const; + ::grSim_RobotReplacement* mutable_robots(int index); + ::grSim_RobotReplacement* add_robots(); + ::google::protobuf::RepeatedPtrField< ::grSim_RobotReplacement >* mutable_robots(); + const ::google::protobuf::RepeatedPtrField< ::grSim_RobotReplacement >& + robots() const; // @@protoc_insertion_point(class_scope:grSim_Replacement) private: - inline void set_has_ball(); - inline void clear_has_ball(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::grSim_BallReplacement* ball_; - ::google::protobuf::RepeatedPtrField< ::grSim_RobotReplacement > robots_; + void set_has_ball(); + void clear_has_ball(); + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; - - friend void protobuf_AddDesc_grSim_5fReplacement_2eproto(); - friend void protobuf_AssignDesc_grSim_5fReplacement_2eproto(); + ::google::protobuf::RepeatedPtrField< ::grSim_RobotReplacement > robots_; + ::grSim_BallReplacement* ball_; + friend void protobuf_InitDefaults_grSim_5fReplacement_2eproto_impl(); + friend void protobuf_AddDesc_grSim_5fReplacement_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_grSim_5fReplacement_2eproto(); friend void protobuf_ShutdownFile_grSim_5fReplacement_2eproto(); - void InitAsDefaultInstance(); - static grSim_Replacement* default_instance_; }; // =================================================================== // =================================================================== +#if !PROTOBUF_INLINE_NOT_IN_HEADERS // grSim_RobotReplacement // required double x = 1; @@ -388,11 +450,13 @@ inline void grSim_RobotReplacement::clear_x() { clear_has_x(); } inline double grSim_RobotReplacement::x() const { + // @@protoc_insertion_point(field_get:grSim_RobotReplacement.x) return x_; } inline void grSim_RobotReplacement::set_x(double value) { set_has_x(); x_ = value; + // @@protoc_insertion_point(field_set:grSim_RobotReplacement.x) } // required double y = 2; @@ -410,11 +474,13 @@ inline void grSim_RobotReplacement::clear_y() { clear_has_y(); } inline double grSim_RobotReplacement::y() const { + // @@protoc_insertion_point(field_get:grSim_RobotReplacement.y) return y_; } inline void grSim_RobotReplacement::set_y(double value) { set_has_y(); y_ = value; + // @@protoc_insertion_point(field_set:grSim_RobotReplacement.y) } // required double dir = 3; @@ -432,11 +498,13 @@ inline void grSim_RobotReplacement::clear_dir() { clear_has_dir(); } inline double grSim_RobotReplacement::dir() const { + // @@protoc_insertion_point(field_get:grSim_RobotReplacement.dir) return dir_; } inline void grSim_RobotReplacement::set_dir(double value) { set_has_dir(); dir_ = value; + // @@protoc_insertion_point(field_set:grSim_RobotReplacement.dir) } // required uint32 id = 4; @@ -454,11 +522,13 @@ inline void grSim_RobotReplacement::clear_id() { clear_has_id(); } inline ::google::protobuf::uint32 grSim_RobotReplacement::id() const { + // @@protoc_insertion_point(field_get:grSim_RobotReplacement.id) return id_; } inline void grSim_RobotReplacement::set_id(::google::protobuf::uint32 value) { set_has_id(); id_ = value; + // @@protoc_insertion_point(field_set:grSim_RobotReplacement.id) } // required bool yellowteam = 5; @@ -476,11 +546,13 @@ inline void grSim_RobotReplacement::clear_yellowteam() { clear_has_yellowteam(); } inline bool grSim_RobotReplacement::yellowteam() const { + // @@protoc_insertion_point(field_get:grSim_RobotReplacement.yellowteam) return yellowteam_; } inline void grSim_RobotReplacement::set_yellowteam(bool value) { set_has_yellowteam(); yellowteam_ = value; + // @@protoc_insertion_point(field_set:grSim_RobotReplacement.yellowteam) } // ------------------------------------------------------------------- @@ -502,11 +574,13 @@ inline void grSim_BallReplacement::clear_x() { clear_has_x(); } inline double grSim_BallReplacement::x() const { + // @@protoc_insertion_point(field_get:grSim_BallReplacement.x) return x_; } inline void grSim_BallReplacement::set_x(double value) { set_has_x(); x_ = value; + // @@protoc_insertion_point(field_set:grSim_BallReplacement.x) } // required double y = 2; @@ -524,11 +598,13 @@ inline void grSim_BallReplacement::clear_y() { clear_has_y(); } inline double grSim_BallReplacement::y() const { + // @@protoc_insertion_point(field_get:grSim_BallReplacement.y) return y_; } inline void grSim_BallReplacement::set_y(double value) { set_has_y(); y_ = value; + // @@protoc_insertion_point(field_set:grSim_BallReplacement.y) } // required double vx = 3; @@ -546,11 +622,13 @@ inline void grSim_BallReplacement::clear_vx() { clear_has_vx(); } inline double grSim_BallReplacement::vx() const { + // @@protoc_insertion_point(field_get:grSim_BallReplacement.vx) return vx_; } inline void grSim_BallReplacement::set_vx(double value) { set_has_vx(); vx_ = value; + // @@protoc_insertion_point(field_set:grSim_BallReplacement.vx) } // required double vy = 4; @@ -568,11 +646,13 @@ inline void grSim_BallReplacement::clear_vy() { clear_has_vy(); } inline double grSim_BallReplacement::vy() const { + // @@protoc_insertion_point(field_get:grSim_BallReplacement.vy) return vy_; } inline void grSim_BallReplacement::set_vy(double value) { set_has_vy(); vy_ = value; + // @@protoc_insertion_point(field_set:grSim_BallReplacement.vy) } // ------------------------------------------------------------------- @@ -594,14 +674,20 @@ inline void grSim_Replacement::clear_ball() { clear_has_ball(); } inline const ::grSim_BallReplacement& grSim_Replacement::ball() const { - return ball_ != NULL ? *ball_ : *default_instance_->ball_; + // @@protoc_insertion_point(field_get:grSim_Replacement.ball) + return ball_ != NULL ? *ball_ + : *::grSim_BallReplacement::internal_default_instance(); } inline ::grSim_BallReplacement* grSim_Replacement::mutable_ball() { set_has_ball(); - if (ball_ == NULL) ball_ = new ::grSim_BallReplacement; + if (ball_ == NULL) { + ball_ = new ::grSim_BallReplacement; + } + // @@protoc_insertion_point(field_mutable:grSim_Replacement.ball) return ball_; } inline ::grSim_BallReplacement* grSim_Replacement::release_ball() { + // @@protoc_insertion_point(field_release:grSim_Replacement.ball) clear_has_ball(); ::grSim_BallReplacement* temp = ball_; ball_ = NULL; @@ -615,6 +701,7 @@ inline void grSim_Replacement::set_allocated_ball(::grSim_BallReplacement* ball) } else { clear_has_ball(); } + // @@protoc_insertion_point(field_set_allocated:grSim_Replacement.ball) } // repeated .grSim_RobotReplacement robots = 2; @@ -625,34 +712,36 @@ inline void grSim_Replacement::clear_robots() { robots_.Clear(); } inline const ::grSim_RobotReplacement& grSim_Replacement::robots(int index) const { + // @@protoc_insertion_point(field_get:grSim_Replacement.robots) return robots_.Get(index); } inline ::grSim_RobotReplacement* grSim_Replacement::mutable_robots(int index) { + // @@protoc_insertion_point(field_mutable:grSim_Replacement.robots) return robots_.Mutable(index); } inline ::grSim_RobotReplacement* grSim_Replacement::add_robots() { + // @@protoc_insertion_point(field_add:grSim_Replacement.robots) return robots_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::grSim_RobotReplacement >& -grSim_Replacement::robots() const { - return robots_; -} inline ::google::protobuf::RepeatedPtrField< ::grSim_RobotReplacement >* grSim_Replacement::mutable_robots() { + // @@protoc_insertion_point(field_mutable_list:grSim_Replacement.robots) return &robots_; } +inline const ::google::protobuf::RepeatedPtrField< ::grSim_RobotReplacement >& +grSim_Replacement::robots() const { + // @@protoc_insertion_point(field_list:grSim_Replacement.robots) + return robots_; +} +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS +// ------------------------------------------------------------------- -// @@protoc_insertion_point(namespace_scope) +// ------------------------------------------------------------------- -#ifndef SWIG -namespace google { -namespace protobuf { +// @@protoc_insertion_point(namespace_scope) -} // namespace google -} // namespace protobuf -#endif // SWIG // @@protoc_insertion_point(global_scope) diff --git a/src/proto/log.pb.cc b/src/proto/log.pb.cc index 37fa1f8..4398183 100644 --- a/src/proto/log.pb.cc +++ b/src/proto/log.pb.cc @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -15,83 +16,112 @@ #include #include // @@protoc_insertion_point(includes) +class logRecordDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +logRecordDefaultTypeInternal _logRecord_default_instance_; namespace { -const ::google::protobuf::Descriptor* logRecord_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - logRecord_reflection_ = NULL; +::google::protobuf::Metadata file_level_metadata[1]; } // namespace -void protobuf_AssignDesc_log_2eproto() { - protobuf_AddDesc_log_2eproto(); - const ::google::protobuf::FileDescriptor* file = - ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( - "log.proto"); - GOOGLE_CHECK(file != NULL); - logRecord_descriptor_ = file->message_type(0); - static const int logRecord_offsets_[3] = { +const ::google::protobuf::uint32* protobuf_Offsets_log_2eproto() GOOGLE_ATTRIBUTE_COLD; +const ::google::protobuf::uint32* protobuf_Offsets_log_2eproto() { + static const ::google::protobuf::uint32 offsets[] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(logRecord, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(logRecord, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(logRecord, ai_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(logRecord, vision_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(logRecord, referee_), + 0, + 1, + 2, }; - logRecord_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - logRecord_descriptor_, - logRecord::default_instance_, - logRecord_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(logRecord, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(logRecord, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(logRecord)); + return offsets; } +static const ::google::protobuf::internal::MigrationSchema schemas[] = { + { 0, 7, sizeof(logRecord)}, +}; + +static const ::google::protobuf::internal::DefaultInstanceData file_default_instances[] = { + {reinterpret_cast(&_logRecord_default_instance_), NULL}, +}; + namespace { -GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); -inline void protobuf_AssignDescriptorsOnce() { - ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, - &protobuf_AssignDesc_log_2eproto); +void protobuf_AssignDescriptors() { + protobuf_AddDesc_log_2eproto(); + ::google::protobuf::MessageFactory* factory = NULL; + AssignDescriptors( + "log.proto", schemas, file_default_instances, protobuf_Offsets_log_2eproto(), factory, + file_level_metadata, NULL, NULL); +} + +void protobuf_AssignDescriptorsOnce() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); } +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - logRecord_descriptor_, &logRecord::default_instance()); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1); } } // namespace void protobuf_ShutdownFile_log_2eproto() { - delete logRecord::default_instance_; - delete logRecord_reflection_; + _logRecord_default_instance_.Shutdown(); + delete file_level_metadata[0].reflection; } -void protobuf_AddDesc_log_2eproto() { - static bool already_here = false; - if (already_here) return; - already_here = true; +void protobuf_InitDefaults_log_2eproto_impl() { GOOGLE_PROTOBUF_VERIFY_VERSION; - ::protobuf_AddDesc_vision_5flog_2eproto(); - ::protobuf_AddDesc_ssl_5flog_2eproto(); - ::protobuf_AddDesc_ref_5flog_2eproto(); + ::protobuf_InitDefaults_vision_5flog_2eproto(); + ::protobuf_InitDefaults_ssl_5flog_2eproto(); + ::protobuf_InitDefaults_ref_5flog_2eproto(); + ::google::protobuf::internal::InitProtobufDefaults(); + _logRecord_default_instance_.DefaultConstruct(); + _logRecord_default_instance_.get_mutable()->ai_ = const_cast< ::SSL_log*>( + ::SSL_log::internal_default_instance()); + _logRecord_default_instance_.get_mutable()->vision_ = const_cast< ::Vision_log*>( + ::Vision_log::internal_default_instance()); + _logRecord_default_instance_.get_mutable()->referee_ = const_cast< ::Ref_log*>( + ::Ref_log::internal_default_instance()); +} + +void protobuf_InitDefaults_log_2eproto() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_InitDefaults_log_2eproto_impl); +} +void protobuf_AddDesc_log_2eproto_impl() { + protobuf_InitDefaults_log_2eproto(); + static const char descriptor[] = { + "\n\tlog.proto\032\020vision_log.proto\032\rssl_log.p" + "roto\032\rref_log.proto\"Y\n\tlogRecord\022\024\n\002ai\030\001" + " \001(\0132\010.SSL_log\022\033\n\006vision\030\002 \001(\0132\013.Vision_" + "log\022\031\n\007referee\030\003 \001(\0132\010.Ref_log" + }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - "\n\tlog.proto\032\020vision_log.proto\032\rssl_log.p" - "roto\032\rref_log.proto\"Y\n\tlogRecord\022\024\n\002ai\030\001" - " \001(\0132\010.SSL_log\022\033\n\006vision\030\002 \001(\0132\013.Vision_" - "log\022\031\n\007referee\030\003 \001(\0132\010.Ref_log", 150); + descriptor, 150); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "log.proto", &protobuf_RegisterTypes); - logRecord::default_instance_ = new logRecord(); - logRecord::default_instance_->InitAsDefaultInstance(); + ::protobuf_AddDesc_vision_5flog_2eproto(); + ::protobuf_AddDesc_ssl_5flog_2eproto(); + ::protobuf_AddDesc_ref_5flog_2eproto(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_log_2eproto); } +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_log_2eproto_once_); +void protobuf_AddDesc_log_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_log_2eproto_once_, + &protobuf_AddDesc_log_2eproto_impl); +} // Force AddDescriptors() to be called at static initialization time. struct StaticDescriptorInitializer_log_2eproto { StaticDescriptorInitializer_log_2eproto() { @@ -101,45 +131,63 @@ struct StaticDescriptorInitializer_log_2eproto { // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int logRecord::kAiFieldNumber; const int logRecord::kVisionFieldNumber; const int logRecord::kRefereeFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 logRecord::logRecord() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_log_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:logRecord) } - -void logRecord::InitAsDefaultInstance() { - ai_ = const_cast< ::SSL_log*>(&::SSL_log::default_instance()); - vision_ = const_cast< ::Vision_log*>(&::Vision_log::default_instance()); - referee_ = const_cast< ::Ref_log*>(&::Ref_log::default_instance()); -} - logRecord::logRecord(const logRecord& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from.has_ai()) { + ai_ = new ::SSL_log(*from.ai_); + } else { + ai_ = NULL; + } + if (from.has_vision()) { + vision_ = new ::Vision_log(*from.vision_); + } else { + vision_ = NULL; + } + if (from.has_referee()) { + referee_ = new ::Ref_log(*from.referee_); + } else { + referee_ = NULL; + } + // @@protoc_insertion_point(copy_constructor:logRecord) } void logRecord::SharedCtor() { _cached_size_ = 0; - ai_ = NULL; - vision_ = NULL; - referee_ = NULL; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); + ::memset(&ai_, 0, reinterpret_cast(&referee_) - + reinterpret_cast(&ai_) + sizeof(referee_)); } logRecord::~logRecord() { + // @@protoc_insertion_point(destructor:logRecord) SharedDtor(); } void logRecord::SharedDtor() { - if (this != default_instance_) { + if (this != internal_default_instance()) { delete ai_; + } + if (this != internal_default_instance()) { delete vision_; + } + if (this != internal_default_instance()) { delete referee_; } } @@ -151,88 +199,91 @@ void logRecord::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* logRecord::descriptor() { protobuf_AssignDescriptorsOnce(); - return logRecord_descriptor_; + return file_level_metadata[0].descriptor; } const logRecord& logRecord::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_log_2eproto(); - return *default_instance_; + protobuf_InitDefaults_log_2eproto(); + return *internal_default_instance(); } -logRecord* logRecord::default_instance_ = NULL; - -logRecord* logRecord::New() const { - return new logRecord; +logRecord* logRecord::New(::google::protobuf::Arena* arena) const { + logRecord* n = new logRecord; + if (arena != NULL) { + arena->Own(n); + } + return n; } void logRecord::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { +// @@protoc_insertion_point(message_clear_start:logRecord) + if (_has_bits_[0 / 32] & 7u) { if (has_ai()) { - if (ai_ != NULL) ai_->::SSL_log::Clear(); + GOOGLE_DCHECK(ai_ != NULL); + ai_->::SSL_log::Clear(); } if (has_vision()) { - if (vision_ != NULL) vision_->::Vision_log::Clear(); + GOOGLE_DCHECK(vision_ != NULL); + vision_->::Vision_log::Clear(); } if (has_referee()) { - if (referee_ != NULL) referee_->::Ref_log::Clear(); + GOOGLE_DCHECK(referee_ != NULL); + referee_->::Ref_log::Clear(); } } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool logRecord::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:logRecord) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional .SSL_log ai = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + if (tag == 10u) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_ai())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(18)) goto parse_vision; break; } // optional .Vision_log vision = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_vision: + if (tag == 18u) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_vision())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(26)) goto parse_referee; break; } // optional .Ref_log referee = 3; case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_referee: + if (tag == 26u) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_referee())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectAtEnd()) return true; break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -240,118 +291,135 @@ bool logRecord::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:logRecord) return true; +failure: + // @@protoc_insertion_point(parse_failure:logRecord) + return false; #undef DO_ } void logRecord::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:logRecord) // optional .SSL_log ai = 1; if (has_ai()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, this->ai(), output); + 1, *this->ai_, output); } // optional .Vision_log vision = 2; if (has_vision()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, this->vision(), output); + 2, *this->vision_, output); } // optional .Ref_log referee = 3; if (has_referee()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, this->referee(), output); + 3, *this->referee_, output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:logRecord) } -::google::protobuf::uint8* logRecord::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* logRecord::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:logRecord) // optional .SSL_log ai = 1; if (has_ai()) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 1, this->ai(), target); + InternalWriteMessageNoVirtualToArray( + 1, *this->ai_, false, target); } // optional .Vision_log vision = 2; if (has_vision()) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 2, this->vision(), target); + InternalWriteMessageNoVirtualToArray( + 2, *this->vision_, false, target); } // optional .Ref_log referee = 3; if (has_referee()) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 3, this->referee(), target); + InternalWriteMessageNoVirtualToArray( + 3, *this->referee_, false, target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:logRecord) return target; } -int logRecord::ByteSize() const { - int total_size = 0; +size_t logRecord::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:logRecord) + size_t total_size = 0; - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + if (_has_bits_[0 / 32] & 7u) { // optional .SSL_log ai = 1; if (has_ai()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->ai()); + *this->ai_); } // optional .Vision_log vision = 2; if (has_vision()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->vision()); + *this->vision_); } // optional .Ref_log referee = 3; if (has_referee()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->referee()); + *this->referee_); } } - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void logRecord::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:logRecord) + GOOGLE_DCHECK_NE(&from, this); const logRecord* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:logRecord) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:logRecord) MergeFrom(*source); } } void logRecord::MergeFrom(const logRecord& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { +// @@protoc_insertion_point(class_specific_merge_from_start:logRecord) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._has_bits_[0 / 32] & 7u) { if (from.has_ai()) { mutable_ai()->::SSL_log::MergeFrom(from.ai()); } @@ -362,54 +430,192 @@ void logRecord::MergeFrom(const logRecord& from) { mutable_referee()->::Ref_log::MergeFrom(from.referee()); } } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void logRecord::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:logRecord) if (&from == this) return; Clear(); MergeFrom(from); } void logRecord::CopyFrom(const logRecord& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:logRecord) if (&from == this) return; Clear(); MergeFrom(from); } bool logRecord::IsInitialized() const { - if (has_ai()) { - if (!this->ai().IsInitialized()) return false; + if (!this->ai_->IsInitialized()) return false; } if (has_vision()) { - if (!this->vision().IsInitialized()) return false; + if (!this->vision_->IsInitialized()) return false; } if (has_referee()) { - if (!this->referee().IsInitialized()) return false; + if (!this->referee_->IsInitialized()) return false; } return true; } void logRecord::Swap(logRecord* other) { - if (other != this) { - std::swap(ai_, other->ai_); - std::swap(vision_, other->vision_); - std::swap(referee_, other->referee_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void logRecord::InternalSwap(logRecord* other) { + std::swap(ai_, other->ai_); + std::swap(vision_, other->vision_); + std::swap(referee_, other->referee_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata logRecord::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = logRecord_descriptor_; - metadata.reflection = logRecord_reflection_; - return metadata; + return file_level_metadata[0]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// logRecord + +// optional .SSL_log ai = 1; +bool logRecord::has_ai() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void logRecord::set_has_ai() { + _has_bits_[0] |= 0x00000001u; +} +void logRecord::clear_has_ai() { + _has_bits_[0] &= ~0x00000001u; +} +void logRecord::clear_ai() { + if (ai_ != NULL) ai_->::SSL_log::Clear(); + clear_has_ai(); +} +const ::SSL_log& logRecord::ai() const { + // @@protoc_insertion_point(field_get:logRecord.ai) + return ai_ != NULL ? *ai_ + : *::SSL_log::internal_default_instance(); +} +::SSL_log* logRecord::mutable_ai() { + set_has_ai(); + if (ai_ == NULL) { + ai_ = new ::SSL_log; + } + // @@protoc_insertion_point(field_mutable:logRecord.ai) + return ai_; +} +::SSL_log* logRecord::release_ai() { + // @@protoc_insertion_point(field_release:logRecord.ai) + clear_has_ai(); + ::SSL_log* temp = ai_; + ai_ = NULL; + return temp; +} +void logRecord::set_allocated_ai(::SSL_log* ai) { + delete ai_; + ai_ = ai; + if (ai) { + set_has_ai(); + } else { + clear_has_ai(); + } + // @@protoc_insertion_point(field_set_allocated:logRecord.ai) +} + +// optional .Vision_log vision = 2; +bool logRecord::has_vision() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +void logRecord::set_has_vision() { + _has_bits_[0] |= 0x00000002u; +} +void logRecord::clear_has_vision() { + _has_bits_[0] &= ~0x00000002u; +} +void logRecord::clear_vision() { + if (vision_ != NULL) vision_->::Vision_log::Clear(); + clear_has_vision(); +} +const ::Vision_log& logRecord::vision() const { + // @@protoc_insertion_point(field_get:logRecord.vision) + return vision_ != NULL ? *vision_ + : *::Vision_log::internal_default_instance(); +} +::Vision_log* logRecord::mutable_vision() { + set_has_vision(); + if (vision_ == NULL) { + vision_ = new ::Vision_log; + } + // @@protoc_insertion_point(field_mutable:logRecord.vision) + return vision_; +} +::Vision_log* logRecord::release_vision() { + // @@protoc_insertion_point(field_release:logRecord.vision) + clear_has_vision(); + ::Vision_log* temp = vision_; + vision_ = NULL; + return temp; +} +void logRecord::set_allocated_vision(::Vision_log* vision) { + delete vision_; + vision_ = vision; + if (vision) { + set_has_vision(); + } else { + clear_has_vision(); + } + // @@protoc_insertion_point(field_set_allocated:logRecord.vision) +} + +// optional .Ref_log referee = 3; +bool logRecord::has_referee() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +void logRecord::set_has_referee() { + _has_bits_[0] |= 0x00000004u; +} +void logRecord::clear_has_referee() { + _has_bits_[0] &= ~0x00000004u; +} +void logRecord::clear_referee() { + if (referee_ != NULL) referee_->::Ref_log::Clear(); + clear_has_referee(); +} +const ::Ref_log& logRecord::referee() const { + // @@protoc_insertion_point(field_get:logRecord.referee) + return referee_ != NULL ? *referee_ + : *::Ref_log::internal_default_instance(); +} +::Ref_log* logRecord::mutable_referee() { + set_has_referee(); + if (referee_ == NULL) { + referee_ = new ::Ref_log; + } + // @@protoc_insertion_point(field_mutable:logRecord.referee) + return referee_; +} +::Ref_log* logRecord::release_referee() { + // @@protoc_insertion_point(field_release:logRecord.referee) + clear_has_referee(); + ::Ref_log* temp = referee_; + referee_ = NULL; + return temp; +} +void logRecord::set_allocated_referee(::Ref_log* referee) { + delete referee_; + referee_ = referee; + if (referee) { + set_has_referee(); + } else { + clear_has_referee(); + } + // @@protoc_insertion_point(field_set_allocated:logRecord.referee) } +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) diff --git a/src/proto/log.pb.h b/src/proto/log.pb.h index b86219c..a6773db 100644 --- a/src/proto/log.pb.h +++ b/src/proto/log.pb.h @@ -8,37 +8,58 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 2005000 +#if GOOGLE_PROTOBUF_VERSION < 3001000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. #endif +#include +#include #include +#include #include -#include -#include +#include // IWYU pragma: export +#include // IWYU pragma: export #include #include "vision_log.pb.h" #include "ssl_log.pb.h" #include "ref_log.pb.h" // @@protoc_insertion_point(includes) +class Ref_chunk; +class Ref_chunkDefaultTypeInternal; +extern Ref_chunkDefaultTypeInternal _Ref_chunk_default_instance_; +class Ref_log; +class Ref_logDefaultTypeInternal; +extern Ref_logDefaultTypeInternal _Ref_log_default_instance_; +class SSL_log; +class SSL_logDefaultTypeInternal; +extern SSL_logDefaultTypeInternal _SSL_log_default_instance_; +class Vision_chunk; +class Vision_chunkDefaultTypeInternal; +extern Vision_chunkDefaultTypeInternal _Vision_chunk_default_instance_; +class Vision_log; +class Vision_logDefaultTypeInternal; +extern Vision_logDefaultTypeInternal _Vision_log_default_instance_; +class logRecord; +class logRecordDefaultTypeInternal; +extern logRecordDefaultTypeInternal _logRecord_default_instance_; +class log_chunk; +class log_chunkDefaultTypeInternal; +extern log_chunkDefaultTypeInternal _log_chunk_default_instance_; // Internal implementation detail -- do not call these. -void protobuf_AddDesc_log_2eproto(); -void protobuf_AssignDesc_log_2eproto(); -void protobuf_ShutdownFile_log_2eproto(); - -class logRecord; +void protobuf_AddDesc_log_2eproto(); +void protobuf_InitDefaults_log_2eproto(); // =================================================================== -class logRecord : public ::google::protobuf::Message { +class logRecord : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:logRecord) */ { public: logRecord(); virtual ~logRecord(); @@ -51,104 +72,121 @@ class logRecord : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const logRecord& default_instance(); + static inline const logRecord* internal_default_instance() { + return reinterpret_cast( + &_logRecord_default_instance_); + } + void Swap(logRecord* other); // implements Message ---------------------------------------------- - logRecord* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline logRecord* New() const PROTOBUF_FINAL { return New(NULL); } + + logRecord* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const logRecord& from); void MergeFrom(const logRecord& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(logRecord* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // optional .SSL_log ai = 1; - inline bool has_ai() const; - inline void clear_ai(); + bool has_ai() const; + void clear_ai(); static const int kAiFieldNumber = 1; - inline const ::SSL_log& ai() const; - inline ::SSL_log* mutable_ai(); - inline ::SSL_log* release_ai(); - inline void set_allocated_ai(::SSL_log* ai); + const ::SSL_log& ai() const; + ::SSL_log* mutable_ai(); + ::SSL_log* release_ai(); + void set_allocated_ai(::SSL_log* ai); // optional .Vision_log vision = 2; - inline bool has_vision() const; - inline void clear_vision(); + bool has_vision() const; + void clear_vision(); static const int kVisionFieldNumber = 2; - inline const ::Vision_log& vision() const; - inline ::Vision_log* mutable_vision(); - inline ::Vision_log* release_vision(); - inline void set_allocated_vision(::Vision_log* vision); + const ::Vision_log& vision() const; + ::Vision_log* mutable_vision(); + ::Vision_log* release_vision(); + void set_allocated_vision(::Vision_log* vision); // optional .Ref_log referee = 3; - inline bool has_referee() const; - inline void clear_referee(); + bool has_referee() const; + void clear_referee(); static const int kRefereeFieldNumber = 3; - inline const ::Ref_log& referee() const; - inline ::Ref_log* mutable_referee(); - inline ::Ref_log* release_referee(); - inline void set_allocated_referee(::Ref_log* referee); + const ::Ref_log& referee() const; + ::Ref_log* mutable_referee(); + ::Ref_log* release_referee(); + void set_allocated_referee(::Ref_log* referee); // @@protoc_insertion_point(class_scope:logRecord) private: - inline void set_has_ai(); - inline void clear_has_ai(); - inline void set_has_vision(); - inline void clear_has_vision(); - inline void set_has_referee(); - inline void clear_has_referee(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + void set_has_ai(); + void clear_has_ai(); + void set_has_vision(); + void clear_has_vision(); + void set_has_referee(); + void clear_has_referee(); + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; ::SSL_log* ai_; ::Vision_log* vision_; ::Ref_log* referee_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; - - friend void protobuf_AddDesc_log_2eproto(); - friend void protobuf_AssignDesc_log_2eproto(); + friend void protobuf_InitDefaults_log_2eproto_impl(); + friend void protobuf_AddDesc_log_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_log_2eproto(); friend void protobuf_ShutdownFile_log_2eproto(); - void InitAsDefaultInstance(); - static logRecord* default_instance_; }; // =================================================================== // =================================================================== +#if !PROTOBUF_INLINE_NOT_IN_HEADERS // logRecord // optional .SSL_log ai = 1; @@ -166,14 +204,20 @@ inline void logRecord::clear_ai() { clear_has_ai(); } inline const ::SSL_log& logRecord::ai() const { - return ai_ != NULL ? *ai_ : *default_instance_->ai_; + // @@protoc_insertion_point(field_get:logRecord.ai) + return ai_ != NULL ? *ai_ + : *::SSL_log::internal_default_instance(); } inline ::SSL_log* logRecord::mutable_ai() { set_has_ai(); - if (ai_ == NULL) ai_ = new ::SSL_log; + if (ai_ == NULL) { + ai_ = new ::SSL_log; + } + // @@protoc_insertion_point(field_mutable:logRecord.ai) return ai_; } inline ::SSL_log* logRecord::release_ai() { + // @@protoc_insertion_point(field_release:logRecord.ai) clear_has_ai(); ::SSL_log* temp = ai_; ai_ = NULL; @@ -187,6 +231,7 @@ inline void logRecord::set_allocated_ai(::SSL_log* ai) { } else { clear_has_ai(); } + // @@protoc_insertion_point(field_set_allocated:logRecord.ai) } // optional .Vision_log vision = 2; @@ -204,14 +249,20 @@ inline void logRecord::clear_vision() { clear_has_vision(); } inline const ::Vision_log& logRecord::vision() const { - return vision_ != NULL ? *vision_ : *default_instance_->vision_; + // @@protoc_insertion_point(field_get:logRecord.vision) + return vision_ != NULL ? *vision_ + : *::Vision_log::internal_default_instance(); } inline ::Vision_log* logRecord::mutable_vision() { set_has_vision(); - if (vision_ == NULL) vision_ = new ::Vision_log; + if (vision_ == NULL) { + vision_ = new ::Vision_log; + } + // @@protoc_insertion_point(field_mutable:logRecord.vision) return vision_; } inline ::Vision_log* logRecord::release_vision() { + // @@protoc_insertion_point(field_release:logRecord.vision) clear_has_vision(); ::Vision_log* temp = vision_; vision_ = NULL; @@ -225,6 +276,7 @@ inline void logRecord::set_allocated_vision(::Vision_log* vision) { } else { clear_has_vision(); } + // @@protoc_insertion_point(field_set_allocated:logRecord.vision) } // optional .Ref_log referee = 3; @@ -242,14 +294,20 @@ inline void logRecord::clear_referee() { clear_has_referee(); } inline const ::Ref_log& logRecord::referee() const { - return referee_ != NULL ? *referee_ : *default_instance_->referee_; + // @@protoc_insertion_point(field_get:logRecord.referee) + return referee_ != NULL ? *referee_ + : *::Ref_log::internal_default_instance(); } inline ::Ref_log* logRecord::mutable_referee() { set_has_referee(); - if (referee_ == NULL) referee_ = new ::Ref_log; + if (referee_ == NULL) { + referee_ = new ::Ref_log; + } + // @@protoc_insertion_point(field_mutable:logRecord.referee) return referee_; } inline ::Ref_log* logRecord::release_referee() { + // @@protoc_insertion_point(field_release:logRecord.referee) clear_has_referee(); ::Ref_log* temp = referee_; referee_ = NULL; @@ -263,19 +321,13 @@ inline void logRecord::set_allocated_referee(::Ref_log* referee) { } else { clear_has_referee(); } + // @@protoc_insertion_point(field_set_allocated:logRecord.referee) } +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) -#ifndef SWIG -namespace google { -namespace protobuf { - - -} // namespace google -} // namespace protobuf -#endif // SWIG // @@protoc_insertion_point(global_scope) diff --git a/src/proto/messages_robocup_ssl_detection.pb.cc b/src/proto/messages_robocup_ssl_detection.pb.cc index 2ba469e..2a96c23 100644 --- a/src/proto/messages_robocup_ssl_detection.pb.cc +++ b/src/proto/messages_robocup_ssl_detection.pb.cc @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -15,30 +16,27 @@ #include #include // @@protoc_insertion_point(includes) +class SSL_DetectionBallDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +SSL_DetectionBallDefaultTypeInternal _SSL_DetectionBall_default_instance_; +class SSL_DetectionRobotDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +SSL_DetectionRobotDefaultTypeInternal _SSL_DetectionRobot_default_instance_; +class SSL_DetectionFrameDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +SSL_DetectionFrameDefaultTypeInternal _SSL_DetectionFrame_default_instance_; namespace { -const ::google::protobuf::Descriptor* SSL_DetectionBall_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - SSL_DetectionBall_reflection_ = NULL; -const ::google::protobuf::Descriptor* SSL_DetectionRobot_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - SSL_DetectionRobot_reflection_ = NULL; -const ::google::protobuf::Descriptor* SSL_DetectionFrame_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - SSL_DetectionFrame_reflection_ = NULL; +::google::protobuf::Metadata file_level_metadata[3]; } // namespace -void protobuf_AssignDesc_messages_5frobocup_5fssl_5fdetection_2eproto() { - protobuf_AddDesc_messages_5frobocup_5fssl_5fdetection_2eproto(); - const ::google::protobuf::FileDescriptor* file = - ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( - "messages_robocup_ssl_detection.proto"); - GOOGLE_CHECK(file != NULL); - SSL_DetectionBall_descriptor_ = file->message_type(0); - static const int SSL_DetectionBall_offsets_[7] = { +const ::google::protobuf::uint32* protobuf_Offsets_messages_5frobocup_5fssl_5fdetection_2eproto() GOOGLE_ATTRIBUTE_COLD; +const ::google::protobuf::uint32* protobuf_Offsets_messages_5frobocup_5fssl_5fdetection_2eproto() { + static const ::google::protobuf::uint32 offsets[] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionBall, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionBall, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionBall, confidence_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionBall, area_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionBall, x_), @@ -46,20 +44,17 @@ void protobuf_AssignDesc_messages_5frobocup_5fssl_5fdetection_2eproto() { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionBall, z_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionBall, pixel_x_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionBall, pixel_y_), - }; - SSL_DetectionBall_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - SSL_DetectionBall_descriptor_, - SSL_DetectionBall::default_instance_, - SSL_DetectionBall_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionBall, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionBall, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(SSL_DetectionBall)); - SSL_DetectionRobot_descriptor_ = file->message_type(1); - static const int SSL_DetectionRobot_offsets_[8] = { + 0, + 1, + 2, + 3, + 4, + 5, + 6, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionRobot, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionRobot, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionRobot, confidence_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionRobot, robot_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionRobot, x_), @@ -68,20 +63,18 @@ void protobuf_AssignDesc_messages_5frobocup_5fssl_5fdetection_2eproto() { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionRobot, pixel_x_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionRobot, pixel_y_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionRobot, height_), - }; - SSL_DetectionRobot_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - SSL_DetectionRobot_descriptor_, - SSL_DetectionRobot::default_instance_, - SSL_DetectionRobot_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionRobot, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionRobot, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(SSL_DetectionRobot)); - SSL_DetectionFrame_descriptor_ = file->message_type(2); - static const int SSL_DetectionFrame_offsets_[7] = { + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionFrame, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionFrame, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionFrame, frame_number_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionFrame, t_capture_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionFrame, t_sent_), @@ -89,81 +82,104 @@ void protobuf_AssignDesc_messages_5frobocup_5fssl_5fdetection_2eproto() { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionFrame, balls_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionFrame, robots_yellow_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionFrame, robots_blue_), + 1, + 0, + 3, + 2, + 4, + 5, + 6, }; - SSL_DetectionFrame_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - SSL_DetectionFrame_descriptor_, - SSL_DetectionFrame::default_instance_, - SSL_DetectionFrame_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionFrame, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_DetectionFrame, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(SSL_DetectionFrame)); + return offsets; } +static const ::google::protobuf::internal::MigrationSchema schemas[] = { + { 0, 11, sizeof(SSL_DetectionBall)}, + { 18, 30, sizeof(SSL_DetectionRobot)}, + { 38, 49, sizeof(SSL_DetectionFrame)}, +}; + +static const ::google::protobuf::internal::DefaultInstanceData file_default_instances[] = { + {reinterpret_cast(&_SSL_DetectionBall_default_instance_), NULL}, + {reinterpret_cast(&_SSL_DetectionRobot_default_instance_), NULL}, + {reinterpret_cast(&_SSL_DetectionFrame_default_instance_), NULL}, +}; + namespace { -GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); -inline void protobuf_AssignDescriptorsOnce() { - ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, - &protobuf_AssignDesc_messages_5frobocup_5fssl_5fdetection_2eproto); +void protobuf_AssignDescriptors() { + protobuf_AddDesc_messages_5frobocup_5fssl_5fdetection_2eproto(); + ::google::protobuf::MessageFactory* factory = NULL; + AssignDescriptors( + "messages_robocup_ssl_detection.proto", schemas, file_default_instances, protobuf_Offsets_messages_5frobocup_5fssl_5fdetection_2eproto(), factory, + file_level_metadata, NULL, NULL); +} + +void protobuf_AssignDescriptorsOnce() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); } +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - SSL_DetectionBall_descriptor_, &SSL_DetectionBall::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - SSL_DetectionRobot_descriptor_, &SSL_DetectionRobot::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - SSL_DetectionFrame_descriptor_, &SSL_DetectionFrame::default_instance()); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 3); } } // namespace void protobuf_ShutdownFile_messages_5frobocup_5fssl_5fdetection_2eproto() { - delete SSL_DetectionBall::default_instance_; - delete SSL_DetectionBall_reflection_; - delete SSL_DetectionRobot::default_instance_; - delete SSL_DetectionRobot_reflection_; - delete SSL_DetectionFrame::default_instance_; - delete SSL_DetectionFrame_reflection_; + _SSL_DetectionBall_default_instance_.Shutdown(); + delete file_level_metadata[0].reflection; + _SSL_DetectionRobot_default_instance_.Shutdown(); + delete file_level_metadata[1].reflection; + _SSL_DetectionFrame_default_instance_.Shutdown(); + delete file_level_metadata[2].reflection; } -void protobuf_AddDesc_messages_5frobocup_5fssl_5fdetection_2eproto() { - static bool already_here = false; - if (already_here) return; - already_here = true; +void protobuf_InitDefaults_messages_5frobocup_5fssl_5fdetection_2eproto_impl() { GOOGLE_PROTOBUF_VERIFY_VERSION; + ::google::protobuf::internal::InitProtobufDefaults(); + _SSL_DetectionBall_default_instance_.DefaultConstruct(); + _SSL_DetectionRobot_default_instance_.DefaultConstruct(); + _SSL_DetectionFrame_default_instance_.DefaultConstruct(); +} + +void protobuf_InitDefaults_messages_5frobocup_5fssl_5fdetection_2eproto() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_InitDefaults_messages_5frobocup_5fssl_5fdetection_2eproto_impl); +} +void protobuf_AddDesc_messages_5frobocup_5fssl_5fdetection_2eproto_impl() { + protobuf_InitDefaults_messages_5frobocup_5fssl_5fdetection_2eproto(); + static const char descriptor[] = { + "\n$messages_robocup_ssl_detection.proto\"x" + "\n\021SSL_DetectionBall\022\022\n\nconfidence\030\001 \002(\002\022" + "\014\n\004area\030\002 \001(\r\022\t\n\001x\030\003 \002(\002\022\t\n\001y\030\004 \002(\002\022\t\n\001z" + "\030\005 \001(\002\022\017\n\007pixel_x\030\006 \002(\002\022\017\n\007pixel_y\030\007 \002(\002" + "\"\227\001\n\022SSL_DetectionRobot\022\022\n\nconfidence\030\001 " + "\002(\002\022\020\n\010robot_id\030\002 \001(\r\022\t\n\001x\030\003 \002(\002\022\t\n\001y\030\004 " + "\002(\002\022\023\n\013orientation\030\005 \001(\002\022\017\n\007pixel_x\030\006 \002(" + "\002\022\017\n\007pixel_y\030\007 \002(\002\022\016\n\006height\030\010 \001(\002\"\331\001\n\022S" + "SL_DetectionFrame\022\024\n\014frame_number\030\001 \002(\r\022" + "\021\n\tt_capture\030\002 \002(\001\022\016\n\006t_sent\030\003 \002(\001\022\021\n\tca" + "mera_id\030\004 \002(\r\022!\n\005balls\030\005 \003(\0132\022.SSL_Detec" + "tionBall\022*\n\rrobots_yellow\030\006 \003(\0132\023.SSL_De" + "tectionRobot\022(\n\013robots_blue\030\007 \003(\0132\023.SSL_" + "DetectionRobot" + }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - "\n$messages_robocup_ssl_detection.proto\"x" - "\n\021SSL_DetectionBall\022\022\n\nconfidence\030\001 \002(\002\022" - "\014\n\004area\030\002 \001(\r\022\t\n\001x\030\003 \002(\002\022\t\n\001y\030\004 \002(\002\022\t\n\001z" - "\030\005 \001(\002\022\017\n\007pixel_x\030\006 \002(\002\022\017\n\007pixel_y\030\007 \002(\002" - "\"\227\001\n\022SSL_DetectionRobot\022\022\n\nconfidence\030\001 " - "\002(\002\022\020\n\010robot_id\030\002 \001(\r\022\t\n\001x\030\003 \002(\002\022\t\n\001y\030\004 " - "\002(\002\022\023\n\013orientation\030\005 \001(\002\022\017\n\007pixel_x\030\006 \002(" - "\002\022\017\n\007pixel_y\030\007 \002(\002\022\016\n\006height\030\010 \001(\002\"\331\001\n\022S" - "SL_DetectionFrame\022\024\n\014frame_number\030\001 \002(\r\022" - "\021\n\tt_capture\030\002 \002(\001\022\016\n\006t_sent\030\003 \002(\001\022\021\n\tca" - "mera_id\030\004 \002(\r\022!\n\005balls\030\005 \003(\0132\022.SSL_Detec" - "tionBall\022*\n\rrobots_yellow\030\006 \003(\0132\023.SSL_De" - "tectionRobot\022(\n\013robots_blue\030\007 \003(\0132\023.SSL_" - "DetectionRobot", 534); + descriptor, 534); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "messages_robocup_ssl_detection.proto", &protobuf_RegisterTypes); - SSL_DetectionBall::default_instance_ = new SSL_DetectionBall(); - SSL_DetectionRobot::default_instance_ = new SSL_DetectionRobot(); - SSL_DetectionFrame::default_instance_ = new SSL_DetectionFrame(); - SSL_DetectionBall::default_instance_->InitAsDefaultInstance(); - SSL_DetectionRobot::default_instance_->InitAsDefaultInstance(); - SSL_DetectionFrame::default_instance_->InitAsDefaultInstance(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_messages_5frobocup_5fssl_5fdetection_2eproto); } +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_messages_5frobocup_5fssl_5fdetection_2eproto_once_); +void protobuf_AddDesc_messages_5frobocup_5fssl_5fdetection_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_messages_5frobocup_5fssl_5fdetection_2eproto_once_, + &protobuf_AddDesc_messages_5frobocup_5fssl_5fdetection_2eproto_impl); +} // Force AddDescriptors() to be called at static initialization time. struct StaticDescriptorInitializer_messages_5frobocup_5fssl_5fdetection_2eproto { StaticDescriptorInitializer_messages_5frobocup_5fssl_5fdetection_2eproto() { @@ -173,7 +189,7 @@ struct StaticDescriptorInitializer_messages_5frobocup_5fssl_5fdetection_2eproto // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int SSL_DetectionBall::kConfidenceFieldNumber; const int SSL_DetectionBall::kAreaFieldNumber; const int SSL_DetectionBall::kXFieldNumber; @@ -181,41 +197,40 @@ const int SSL_DetectionBall::kYFieldNumber; const int SSL_DetectionBall::kZFieldNumber; const int SSL_DetectionBall::kPixelXFieldNumber; const int SSL_DetectionBall::kPixelYFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 SSL_DetectionBall::SSL_DetectionBall() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_messages_5frobocup_5fssl_5fdetection_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:SSL_DetectionBall) } - -void SSL_DetectionBall::InitAsDefaultInstance() { -} - SSL_DetectionBall::SSL_DetectionBall(const SSL_DetectionBall& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::memcpy(&confidence_, &from.confidence_, + reinterpret_cast(&pixel_y_) - + reinterpret_cast(&confidence_) + sizeof(pixel_y_)); + // @@protoc_insertion_point(copy_constructor:SSL_DetectionBall) } void SSL_DetectionBall::SharedCtor() { _cached_size_ = 0; - confidence_ = 0; - area_ = 0u; - x_ = 0; - y_ = 0; - z_ = 0; - pixel_x_ = 0; - pixel_y_ = 0; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); + ::memset(&confidence_, 0, reinterpret_cast(&pixel_y_) - + reinterpret_cast(&confidence_) + sizeof(pixel_y_)); } SSL_DetectionBall::~SSL_DetectionBall() { + // @@protoc_insertion_point(destructor:SSL_DetectionBall) SharedDtor(); } void SSL_DetectionBall::SharedDtor() { - if (this != default_instance_) { - } } void SSL_DetectionBall::SetCachedSize(int size) const { @@ -225,156 +240,139 @@ void SSL_DetectionBall::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* SSL_DetectionBall::descriptor() { protobuf_AssignDescriptorsOnce(); - return SSL_DetectionBall_descriptor_; + return file_level_metadata[0].descriptor; } const SSL_DetectionBall& SSL_DetectionBall::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_messages_5frobocup_5fssl_5fdetection_2eproto(); - return *default_instance_; + protobuf_InitDefaults_messages_5frobocup_5fssl_5fdetection_2eproto(); + return *internal_default_instance(); } -SSL_DetectionBall* SSL_DetectionBall::default_instance_ = NULL; - -SSL_DetectionBall* SSL_DetectionBall::New() const { - return new SSL_DetectionBall; +SSL_DetectionBall* SSL_DetectionBall::New(::google::protobuf::Arena* arena) const { + SSL_DetectionBall* n = new SSL_DetectionBall; + if (arena != NULL) { + arena->Own(n); + } + return n; } void SSL_DetectionBall::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - confidence_ = 0; - area_ = 0u; - x_ = 0; - y_ = 0; - z_ = 0; - pixel_x_ = 0; - pixel_y_ = 0; +// @@protoc_insertion_point(message_clear_start:SSL_DetectionBall) + if (_has_bits_[0 / 32] & 127u) { + ::memset(&confidence_, 0, reinterpret_cast(&pixel_y_) - + reinterpret_cast(&confidence_) + sizeof(pixel_y_)); } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool SSL_DetectionBall::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:SSL_DetectionBall) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required float confidence = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { + if (tag == 13u) { + set_has_confidence(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &confidence_))); - set_has_confidence(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(16)) goto parse_area; break; } // optional uint32 area = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_area: + if (tag == 16u) { + set_has_area(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( input, &area_))); - set_has_area(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(29)) goto parse_x; break; } // required float x = 3; case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_x: + if (tag == 29u) { + set_has_x(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &x_))); - set_has_x(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(37)) goto parse_y; break; } // required float y = 4; case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_y: + if (tag == 37u) { + set_has_y(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &y_))); - set_has_y(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(45)) goto parse_z; break; } // optional float z = 5; case 5: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_z: + if (tag == 45u) { + set_has_z(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &z_))); - set_has_z(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(53)) goto parse_pixel_x; break; } // required float pixel_x = 6; case 6: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_pixel_x: + if (tag == 53u) { + set_has_pixel_x(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &pixel_x_))); - set_has_pixel_x(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(61)) goto parse_pixel_y; break; } // required float pixel_y = 7; case 7: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_pixel_y: + if (tag == 61u) { + set_has_pixel_y(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &pixel_y_))); - set_has_pixel_y(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectAtEnd()) return true; break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -382,12 +380,18 @@ bool SSL_DetectionBall::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:SSL_DetectionBall) return true; +failure: + // @@protoc_insertion_point(parse_failure:SSL_DetectionBall) + return false; #undef DO_ } void SSL_DetectionBall::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:SSL_DetectionBall) // required float confidence = 1; if (has_confidence()) { ::google::protobuf::internal::WireFormatLite::WriteFloat(1, this->confidence(), output); @@ -423,14 +427,17 @@ void SSL_DetectionBall::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteFloat(7, this->pixel_y(), output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:SSL_DetectionBall) } -::google::protobuf::uint8* SSL_DetectionBall::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* SSL_DetectionBall::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:SSL_DetectionBall) // required float confidence = 1; if (has_confidence()) { target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(1, this->confidence(), target); @@ -466,81 +473,112 @@ ::google::protobuf::uint8* SSL_DetectionBall::SerializeWithCachedSizesToArray( target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(7, this->pixel_y(), target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:SSL_DetectionBall) return target; } -int SSL_DetectionBall::ByteSize() const { - int total_size = 0; +size_t SSL_DetectionBall::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:SSL_DetectionBall) + size_t total_size = 0; - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_confidence()) { // required float confidence = 1; - if (has_confidence()) { - total_size += 1 + 4; - } - - // optional uint32 area = 2; - if (has_area()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::UInt32Size( - this->area()); - } + total_size += 1 + 4; + } + if (has_x()) { // required float x = 3; - if (has_x()) { - total_size += 1 + 4; - } + total_size += 1 + 4; + } + if (has_y()) { // required float y = 4; - if (has_y()) { - total_size += 1 + 4; - } - - // optional float z = 5; - if (has_z()) { - total_size += 1 + 4; - } + total_size += 1 + 4; + } + if (has_pixel_x()) { // required float pixel_x = 6; - if (has_pixel_x()) { - total_size += 1 + 4; - } + total_size += 1 + 4; + } + if (has_pixel_y()) { // required float pixel_y = 7; - if (has_pixel_y()) { - total_size += 1 + 4; - } - + total_size += 1 + 4; } - if (!unknown_fields().empty()) { + + return total_size; +} +size_t SSL_DetectionBall::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:SSL_DetectionBall) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( unknown_fields()); } + if (((_has_bits_[0] & 0x0000006d) ^ 0x0000006d) == 0) { // All required fields are present. + // required float confidence = 1; + total_size += 1 + 4; + + // required float x = 3; + total_size += 1 + 4; + + // required float y = 4; + total_size += 1 + 4; + + // required float pixel_x = 6; + total_size += 1 + 4; + + // required float pixel_y = 7; + total_size += 1 + 4; + + } else { + total_size += RequiredFieldsByteSizeFallback(); + } + // optional uint32 area = 2; + if (has_area()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->area()); + } + + // optional float z = 5; + if (has_z()) { + total_size += 1 + 4; + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void SSL_DetectionBall::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:SSL_DetectionBall) + GOOGLE_DCHECK_NE(&from, this); const SSL_DetectionBall* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:SSL_DetectionBall) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:SSL_DetectionBall) MergeFrom(*source); } } void SSL_DetectionBall::MergeFrom(const SSL_DetectionBall& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { +// @@protoc_insertion_point(class_specific_merge_from_start:SSL_DetectionBall) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._has_bits_[0 / 32] & 127u) { if (from.has_confidence()) { set_confidence(from.confidence()); } @@ -563,16 +601,17 @@ void SSL_DetectionBall::MergeFrom(const SSL_DetectionBall& from) { set_pixel_y(from.pixel_y()); } } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void SSL_DetectionBall::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:SSL_DetectionBall) if (&from == this) return; Clear(); MergeFrom(from); } void SSL_DetectionBall::CopyFrom(const SSL_DetectionBall& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:SSL_DetectionBall) if (&from == this) return; Clear(); MergeFrom(from); @@ -580,37 +619,207 @@ void SSL_DetectionBall::CopyFrom(const SSL_DetectionBall& from) { bool SSL_DetectionBall::IsInitialized() const { if ((_has_bits_[0] & 0x0000006d) != 0x0000006d) return false; - return true; } void SSL_DetectionBall::Swap(SSL_DetectionBall* other) { - if (other != this) { - std::swap(confidence_, other->confidence_); - std::swap(area_, other->area_); - std::swap(x_, other->x_); - std::swap(y_, other->y_); - std::swap(z_, other->z_); - std::swap(pixel_x_, other->pixel_x_); - std::swap(pixel_y_, other->pixel_y_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void SSL_DetectionBall::InternalSwap(SSL_DetectionBall* other) { + std::swap(confidence_, other->confidence_); + std::swap(area_, other->area_); + std::swap(x_, other->x_); + std::swap(y_, other->y_); + std::swap(z_, other->z_); + std::swap(pixel_x_, other->pixel_x_); + std::swap(pixel_y_, other->pixel_y_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata SSL_DetectionBall::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = SSL_DetectionBall_descriptor_; - metadata.reflection = SSL_DetectionBall_reflection_; - return metadata; + return file_level_metadata[0]; } +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// SSL_DetectionBall + +// required float confidence = 1; +bool SSL_DetectionBall::has_confidence() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void SSL_DetectionBall::set_has_confidence() { + _has_bits_[0] |= 0x00000001u; +} +void SSL_DetectionBall::clear_has_confidence() { + _has_bits_[0] &= ~0x00000001u; +} +void SSL_DetectionBall::clear_confidence() { + confidence_ = 0; + clear_has_confidence(); +} +float SSL_DetectionBall::confidence() const { + // @@protoc_insertion_point(field_get:SSL_DetectionBall.confidence) + return confidence_; +} +void SSL_DetectionBall::set_confidence(float value) { + set_has_confidence(); + confidence_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionBall.confidence) +} + +// optional uint32 area = 2; +bool SSL_DetectionBall::has_area() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +void SSL_DetectionBall::set_has_area() { + _has_bits_[0] |= 0x00000002u; +} +void SSL_DetectionBall::clear_has_area() { + _has_bits_[0] &= ~0x00000002u; +} +void SSL_DetectionBall::clear_area() { + area_ = 0u; + clear_has_area(); +} +::google::protobuf::uint32 SSL_DetectionBall::area() const { + // @@protoc_insertion_point(field_get:SSL_DetectionBall.area) + return area_; +} +void SSL_DetectionBall::set_area(::google::protobuf::uint32 value) { + set_has_area(); + area_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionBall.area) +} + +// required float x = 3; +bool SSL_DetectionBall::has_x() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +void SSL_DetectionBall::set_has_x() { + _has_bits_[0] |= 0x00000004u; +} +void SSL_DetectionBall::clear_has_x() { + _has_bits_[0] &= ~0x00000004u; +} +void SSL_DetectionBall::clear_x() { + x_ = 0; + clear_has_x(); +} +float SSL_DetectionBall::x() const { + // @@protoc_insertion_point(field_get:SSL_DetectionBall.x) + return x_; +} +void SSL_DetectionBall::set_x(float value) { + set_has_x(); + x_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionBall.x) +} + +// required float y = 4; +bool SSL_DetectionBall::has_y() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +void SSL_DetectionBall::set_has_y() { + _has_bits_[0] |= 0x00000008u; +} +void SSL_DetectionBall::clear_has_y() { + _has_bits_[0] &= ~0x00000008u; +} +void SSL_DetectionBall::clear_y() { + y_ = 0; + clear_has_y(); +} +float SSL_DetectionBall::y() const { + // @@protoc_insertion_point(field_get:SSL_DetectionBall.y) + return y_; +} +void SSL_DetectionBall::set_y(float value) { + set_has_y(); + y_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionBall.y) +} + +// optional float z = 5; +bool SSL_DetectionBall::has_z() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +void SSL_DetectionBall::set_has_z() { + _has_bits_[0] |= 0x00000010u; +} +void SSL_DetectionBall::clear_has_z() { + _has_bits_[0] &= ~0x00000010u; +} +void SSL_DetectionBall::clear_z() { + z_ = 0; + clear_has_z(); +} +float SSL_DetectionBall::z() const { + // @@protoc_insertion_point(field_get:SSL_DetectionBall.z) + return z_; +} +void SSL_DetectionBall::set_z(float value) { + set_has_z(); + z_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionBall.z) +} + +// required float pixel_x = 6; +bool SSL_DetectionBall::has_pixel_x() const { + return (_has_bits_[0] & 0x00000020u) != 0; +} +void SSL_DetectionBall::set_has_pixel_x() { + _has_bits_[0] |= 0x00000020u; +} +void SSL_DetectionBall::clear_has_pixel_x() { + _has_bits_[0] &= ~0x00000020u; +} +void SSL_DetectionBall::clear_pixel_x() { + pixel_x_ = 0; + clear_has_pixel_x(); +} +float SSL_DetectionBall::pixel_x() const { + // @@protoc_insertion_point(field_get:SSL_DetectionBall.pixel_x) + return pixel_x_; +} +void SSL_DetectionBall::set_pixel_x(float value) { + set_has_pixel_x(); + pixel_x_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionBall.pixel_x) +} + +// required float pixel_y = 7; +bool SSL_DetectionBall::has_pixel_y() const { + return (_has_bits_[0] & 0x00000040u) != 0; +} +void SSL_DetectionBall::set_has_pixel_y() { + _has_bits_[0] |= 0x00000040u; +} +void SSL_DetectionBall::clear_has_pixel_y() { + _has_bits_[0] &= ~0x00000040u; +} +void SSL_DetectionBall::clear_pixel_y() { + pixel_y_ = 0; + clear_has_pixel_y(); +} +float SSL_DetectionBall::pixel_y() const { + // @@protoc_insertion_point(field_get:SSL_DetectionBall.pixel_y) + return pixel_y_; +} +void SSL_DetectionBall::set_pixel_y(float value) { + set_has_pixel_y(); + pixel_y_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionBall.pixel_y) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int SSL_DetectionRobot::kConfidenceFieldNumber; const int SSL_DetectionRobot::kRobotIdFieldNumber; const int SSL_DetectionRobot::kXFieldNumber; @@ -619,42 +828,40 @@ const int SSL_DetectionRobot::kOrientationFieldNumber; const int SSL_DetectionRobot::kPixelXFieldNumber; const int SSL_DetectionRobot::kPixelYFieldNumber; const int SSL_DetectionRobot::kHeightFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 SSL_DetectionRobot::SSL_DetectionRobot() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_messages_5frobocup_5fssl_5fdetection_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:SSL_DetectionRobot) } - -void SSL_DetectionRobot::InitAsDefaultInstance() { -} - SSL_DetectionRobot::SSL_DetectionRobot(const SSL_DetectionRobot& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::memcpy(&confidence_, &from.confidence_, + reinterpret_cast(&height_) - + reinterpret_cast(&confidence_) + sizeof(height_)); + // @@protoc_insertion_point(copy_constructor:SSL_DetectionRobot) } void SSL_DetectionRobot::SharedCtor() { _cached_size_ = 0; - confidence_ = 0; - robot_id_ = 0u; - x_ = 0; - y_ = 0; - orientation_ = 0; - pixel_x_ = 0; - pixel_y_ = 0; - height_ = 0; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); + ::memset(&confidence_, 0, reinterpret_cast(&height_) - + reinterpret_cast(&confidence_) + sizeof(height_)); } SSL_DetectionRobot::~SSL_DetectionRobot() { + // @@protoc_insertion_point(destructor:SSL_DetectionRobot) SharedDtor(); } void SSL_DetectionRobot::SharedDtor() { - if (this != default_instance_) { - } } void SSL_DetectionRobot::SetCachedSize(int size) const { @@ -664,173 +871,152 @@ void SSL_DetectionRobot::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* SSL_DetectionRobot::descriptor() { protobuf_AssignDescriptorsOnce(); - return SSL_DetectionRobot_descriptor_; + return file_level_metadata[1].descriptor; } const SSL_DetectionRobot& SSL_DetectionRobot::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_messages_5frobocup_5fssl_5fdetection_2eproto(); - return *default_instance_; + protobuf_InitDefaults_messages_5frobocup_5fssl_5fdetection_2eproto(); + return *internal_default_instance(); } -SSL_DetectionRobot* SSL_DetectionRobot::default_instance_ = NULL; - -SSL_DetectionRobot* SSL_DetectionRobot::New() const { - return new SSL_DetectionRobot; +SSL_DetectionRobot* SSL_DetectionRobot::New(::google::protobuf::Arena* arena) const { + SSL_DetectionRobot* n = new SSL_DetectionRobot; + if (arena != NULL) { + arena->Own(n); + } + return n; } void SSL_DetectionRobot::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - confidence_ = 0; - robot_id_ = 0u; - x_ = 0; - y_ = 0; - orientation_ = 0; - pixel_x_ = 0; - pixel_y_ = 0; - height_ = 0; +// @@protoc_insertion_point(message_clear_start:SSL_DetectionRobot) + if (_has_bits_[0 / 32] & 255u) { + ::memset(&confidence_, 0, reinterpret_cast(&height_) - + reinterpret_cast(&confidence_) + sizeof(height_)); } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool SSL_DetectionRobot::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:SSL_DetectionRobot) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required float confidence = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { + if (tag == 13u) { + set_has_confidence(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &confidence_))); - set_has_confidence(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(16)) goto parse_robot_id; break; } // optional uint32 robot_id = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_robot_id: + if (tag == 16u) { + set_has_robot_id(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( input, &robot_id_))); - set_has_robot_id(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(29)) goto parse_x; break; } // required float x = 3; case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_x: + if (tag == 29u) { + set_has_x(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &x_))); - set_has_x(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(37)) goto parse_y; break; } // required float y = 4; case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_y: + if (tag == 37u) { + set_has_y(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &y_))); - set_has_y(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(45)) goto parse_orientation; break; } // optional float orientation = 5; case 5: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_orientation: + if (tag == 45u) { + set_has_orientation(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &orientation_))); - set_has_orientation(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(53)) goto parse_pixel_x; break; } // required float pixel_x = 6; case 6: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_pixel_x: + if (tag == 53u) { + set_has_pixel_x(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &pixel_x_))); - set_has_pixel_x(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(61)) goto parse_pixel_y; break; } // required float pixel_y = 7; case 7: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_pixel_y: + if (tag == 61u) { + set_has_pixel_y(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &pixel_y_))); - set_has_pixel_y(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(69)) goto parse_height; break; } // optional float height = 8; case 8: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_height: + if (tag == 69u) { + set_has_height(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &height_))); - set_has_height(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectAtEnd()) return true; break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -838,12 +1024,18 @@ bool SSL_DetectionRobot::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:SSL_DetectionRobot) return true; +failure: + // @@protoc_insertion_point(parse_failure:SSL_DetectionRobot) + return false; #undef DO_ } void SSL_DetectionRobot::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:SSL_DetectionRobot) // required float confidence = 1; if (has_confidence()) { ::google::protobuf::internal::WireFormatLite::WriteFloat(1, this->confidence(), output); @@ -884,14 +1076,17 @@ void SSL_DetectionRobot::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteFloat(8, this->height(), output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:SSL_DetectionRobot) } -::google::protobuf::uint8* SSL_DetectionRobot::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* SSL_DetectionRobot::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:SSL_DetectionRobot) // required float confidence = 1; if (has_confidence()) { target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(1, this->confidence(), target); @@ -932,86 +1127,117 @@ ::google::protobuf::uint8* SSL_DetectionRobot::SerializeWithCachedSizesToArray( target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(8, this->height(), target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:SSL_DetectionRobot) return target; } -int SSL_DetectionRobot::ByteSize() const { - int total_size = 0; +size_t SSL_DetectionRobot::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:SSL_DetectionRobot) + size_t total_size = 0; - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_confidence()) { // required float confidence = 1; - if (has_confidence()) { - total_size += 1 + 4; - } - - // optional uint32 robot_id = 2; - if (has_robot_id()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::UInt32Size( - this->robot_id()); - } + total_size += 1 + 4; + } + if (has_x()) { // required float x = 3; - if (has_x()) { - total_size += 1 + 4; - } + total_size += 1 + 4; + } + if (has_y()) { // required float y = 4; - if (has_y()) { - total_size += 1 + 4; - } - - // optional float orientation = 5; - if (has_orientation()) { - total_size += 1 + 4; - } + total_size += 1 + 4; + } + if (has_pixel_x()) { // required float pixel_x = 6; - if (has_pixel_x()) { - total_size += 1 + 4; - } + total_size += 1 + 4; + } + if (has_pixel_y()) { // required float pixel_y = 7; - if (has_pixel_y()) { - total_size += 1 + 4; - } + total_size += 1 + 4; + } - // optional float height = 8; - if (has_height()) { - total_size += 1 + 4; - } + return total_size; +} +size_t SSL_DetectionRobot::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:SSL_DetectionRobot) + size_t total_size = 0; - } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( unknown_fields()); } + if (((_has_bits_[0] & 0x0000006d) ^ 0x0000006d) == 0) { // All required fields are present. + // required float confidence = 1; + total_size += 1 + 4; + + // required float x = 3; + total_size += 1 + 4; + + // required float y = 4; + total_size += 1 + 4; + + // required float pixel_x = 6; + total_size += 1 + 4; + + // required float pixel_y = 7; + total_size += 1 + 4; + + } else { + total_size += RequiredFieldsByteSizeFallback(); + } + // optional uint32 robot_id = 2; + if (has_robot_id()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->robot_id()); + } + + // optional float orientation = 5; + if (has_orientation()) { + total_size += 1 + 4; + } + + // optional float height = 8; + if (has_height()) { + total_size += 1 + 4; + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void SSL_DetectionRobot::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:SSL_DetectionRobot) + GOOGLE_DCHECK_NE(&from, this); const SSL_DetectionRobot* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:SSL_DetectionRobot) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:SSL_DetectionRobot) MergeFrom(*source); } } void SSL_DetectionRobot::MergeFrom(const SSL_DetectionRobot& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { +// @@protoc_insertion_point(class_specific_merge_from_start:SSL_DetectionRobot) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._has_bits_[0 / 32] & 255u) { if (from.has_confidence()) { set_confidence(from.confidence()); } @@ -1037,16 +1263,17 @@ void SSL_DetectionRobot::MergeFrom(const SSL_DetectionRobot& from) { set_height(from.height()); } } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void SSL_DetectionRobot::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:SSL_DetectionRobot) if (&from == this) return; Clear(); MergeFrom(from); } void SSL_DetectionRobot::CopyFrom(const SSL_DetectionRobot& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:SSL_DetectionRobot) if (&from == this) return; Clear(); MergeFrom(from); @@ -1054,38 +1281,232 @@ void SSL_DetectionRobot::CopyFrom(const SSL_DetectionRobot& from) { bool SSL_DetectionRobot::IsInitialized() const { if ((_has_bits_[0] & 0x0000006d) != 0x0000006d) return false; - return true; } void SSL_DetectionRobot::Swap(SSL_DetectionRobot* other) { - if (other != this) { - std::swap(confidence_, other->confidence_); - std::swap(robot_id_, other->robot_id_); - std::swap(x_, other->x_); - std::swap(y_, other->y_); - std::swap(orientation_, other->orientation_); - std::swap(pixel_x_, other->pixel_x_); - std::swap(pixel_y_, other->pixel_y_); - std::swap(height_, other->height_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void SSL_DetectionRobot::InternalSwap(SSL_DetectionRobot* other) { + std::swap(confidence_, other->confidence_); + std::swap(robot_id_, other->robot_id_); + std::swap(x_, other->x_); + std::swap(y_, other->y_); + std::swap(orientation_, other->orientation_); + std::swap(pixel_x_, other->pixel_x_); + std::swap(pixel_y_, other->pixel_y_); + std::swap(height_, other->height_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata SSL_DetectionRobot::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = SSL_DetectionRobot_descriptor_; - metadata.reflection = SSL_DetectionRobot_reflection_; - return metadata; + return file_level_metadata[1]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// SSL_DetectionRobot + +// required float confidence = 1; +bool SSL_DetectionRobot::has_confidence() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void SSL_DetectionRobot::set_has_confidence() { + _has_bits_[0] |= 0x00000001u; +} +void SSL_DetectionRobot::clear_has_confidence() { + _has_bits_[0] &= ~0x00000001u; +} +void SSL_DetectionRobot::clear_confidence() { + confidence_ = 0; + clear_has_confidence(); +} +float SSL_DetectionRobot::confidence() const { + // @@protoc_insertion_point(field_get:SSL_DetectionRobot.confidence) + return confidence_; +} +void SSL_DetectionRobot::set_confidence(float value) { + set_has_confidence(); + confidence_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionRobot.confidence) +} + +// optional uint32 robot_id = 2; +bool SSL_DetectionRobot::has_robot_id() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +void SSL_DetectionRobot::set_has_robot_id() { + _has_bits_[0] |= 0x00000002u; +} +void SSL_DetectionRobot::clear_has_robot_id() { + _has_bits_[0] &= ~0x00000002u; +} +void SSL_DetectionRobot::clear_robot_id() { + robot_id_ = 0u; + clear_has_robot_id(); +} +::google::protobuf::uint32 SSL_DetectionRobot::robot_id() const { + // @@protoc_insertion_point(field_get:SSL_DetectionRobot.robot_id) + return robot_id_; +} +void SSL_DetectionRobot::set_robot_id(::google::protobuf::uint32 value) { + set_has_robot_id(); + robot_id_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionRobot.robot_id) } +// required float x = 3; +bool SSL_DetectionRobot::has_x() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +void SSL_DetectionRobot::set_has_x() { + _has_bits_[0] |= 0x00000004u; +} +void SSL_DetectionRobot::clear_has_x() { + _has_bits_[0] &= ~0x00000004u; +} +void SSL_DetectionRobot::clear_x() { + x_ = 0; + clear_has_x(); +} +float SSL_DetectionRobot::x() const { + // @@protoc_insertion_point(field_get:SSL_DetectionRobot.x) + return x_; +} +void SSL_DetectionRobot::set_x(float value) { + set_has_x(); + x_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionRobot.x) +} + +// required float y = 4; +bool SSL_DetectionRobot::has_y() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +void SSL_DetectionRobot::set_has_y() { + _has_bits_[0] |= 0x00000008u; +} +void SSL_DetectionRobot::clear_has_y() { + _has_bits_[0] &= ~0x00000008u; +} +void SSL_DetectionRobot::clear_y() { + y_ = 0; + clear_has_y(); +} +float SSL_DetectionRobot::y() const { + // @@protoc_insertion_point(field_get:SSL_DetectionRobot.y) + return y_; +} +void SSL_DetectionRobot::set_y(float value) { + set_has_y(); + y_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionRobot.y) +} + +// optional float orientation = 5; +bool SSL_DetectionRobot::has_orientation() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +void SSL_DetectionRobot::set_has_orientation() { + _has_bits_[0] |= 0x00000010u; +} +void SSL_DetectionRobot::clear_has_orientation() { + _has_bits_[0] &= ~0x00000010u; +} +void SSL_DetectionRobot::clear_orientation() { + orientation_ = 0; + clear_has_orientation(); +} +float SSL_DetectionRobot::orientation() const { + // @@protoc_insertion_point(field_get:SSL_DetectionRobot.orientation) + return orientation_; +} +void SSL_DetectionRobot::set_orientation(float value) { + set_has_orientation(); + orientation_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionRobot.orientation) +} + +// required float pixel_x = 6; +bool SSL_DetectionRobot::has_pixel_x() const { + return (_has_bits_[0] & 0x00000020u) != 0; +} +void SSL_DetectionRobot::set_has_pixel_x() { + _has_bits_[0] |= 0x00000020u; +} +void SSL_DetectionRobot::clear_has_pixel_x() { + _has_bits_[0] &= ~0x00000020u; +} +void SSL_DetectionRobot::clear_pixel_x() { + pixel_x_ = 0; + clear_has_pixel_x(); +} +float SSL_DetectionRobot::pixel_x() const { + // @@protoc_insertion_point(field_get:SSL_DetectionRobot.pixel_x) + return pixel_x_; +} +void SSL_DetectionRobot::set_pixel_x(float value) { + set_has_pixel_x(); + pixel_x_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionRobot.pixel_x) +} + +// required float pixel_y = 7; +bool SSL_DetectionRobot::has_pixel_y() const { + return (_has_bits_[0] & 0x00000040u) != 0; +} +void SSL_DetectionRobot::set_has_pixel_y() { + _has_bits_[0] |= 0x00000040u; +} +void SSL_DetectionRobot::clear_has_pixel_y() { + _has_bits_[0] &= ~0x00000040u; +} +void SSL_DetectionRobot::clear_pixel_y() { + pixel_y_ = 0; + clear_has_pixel_y(); +} +float SSL_DetectionRobot::pixel_y() const { + // @@protoc_insertion_point(field_get:SSL_DetectionRobot.pixel_y) + return pixel_y_; +} +void SSL_DetectionRobot::set_pixel_y(float value) { + set_has_pixel_y(); + pixel_y_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionRobot.pixel_y) +} + +// optional float height = 8; +bool SSL_DetectionRobot::has_height() const { + return (_has_bits_[0] & 0x00000080u) != 0; +} +void SSL_DetectionRobot::set_has_height() { + _has_bits_[0] |= 0x00000080u; +} +void SSL_DetectionRobot::clear_has_height() { + _has_bits_[0] &= ~0x00000080u; +} +void SSL_DetectionRobot::clear_height() { + height_ = 0; + clear_has_height(); +} +float SSL_DetectionRobot::height() const { + // @@protoc_insertion_point(field_get:SSL_DetectionRobot.height) + return height_; +} +void SSL_DetectionRobot::set_height(float value) { + set_has_height(); + height_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionRobot.height) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int SSL_DetectionFrame::kFrameNumberFieldNumber; const int SSL_DetectionFrame::kTCaptureFieldNumber; const int SSL_DetectionFrame::kTSentFieldNumber; @@ -1093,38 +1514,43 @@ const int SSL_DetectionFrame::kCameraIdFieldNumber; const int SSL_DetectionFrame::kBallsFieldNumber; const int SSL_DetectionFrame::kRobotsYellowFieldNumber; const int SSL_DetectionFrame::kRobotsBlueFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 SSL_DetectionFrame::SSL_DetectionFrame() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_messages_5frobocup_5fssl_5fdetection_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:SSL_DetectionFrame) } - -void SSL_DetectionFrame::InitAsDefaultInstance() { -} - SSL_DetectionFrame::SSL_DetectionFrame(const SSL_DetectionFrame& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0), + balls_(from.balls_), + robots_yellow_(from.robots_yellow_), + robots_blue_(from.robots_blue_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::memcpy(&t_capture_, &from.t_capture_, + reinterpret_cast(&t_sent_) - + reinterpret_cast(&t_capture_) + sizeof(t_sent_)); + // @@protoc_insertion_point(copy_constructor:SSL_DetectionFrame) } void SSL_DetectionFrame::SharedCtor() { _cached_size_ = 0; - frame_number_ = 0u; - t_capture_ = 0; - t_sent_ = 0; - camera_id_ = 0u; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); + ::memset(&t_capture_, 0, reinterpret_cast(&t_sent_) - + reinterpret_cast(&t_capture_) + sizeof(t_sent_)); } SSL_DetectionFrame::~SSL_DetectionFrame() { + // @@protoc_insertion_point(destructor:SSL_DetectionFrame) SharedDtor(); } void SSL_DetectionFrame::SharedDtor() { - if (this != default_instance_) { - } } void SSL_DetectionFrame::SetCachedSize(int size) const { @@ -1134,153 +1560,142 @@ void SSL_DetectionFrame::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* SSL_DetectionFrame::descriptor() { protobuf_AssignDescriptorsOnce(); - return SSL_DetectionFrame_descriptor_; + return file_level_metadata[2].descriptor; } const SSL_DetectionFrame& SSL_DetectionFrame::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_messages_5frobocup_5fssl_5fdetection_2eproto(); - return *default_instance_; + protobuf_InitDefaults_messages_5frobocup_5fssl_5fdetection_2eproto(); + return *internal_default_instance(); } -SSL_DetectionFrame* SSL_DetectionFrame::default_instance_ = NULL; - -SSL_DetectionFrame* SSL_DetectionFrame::New() const { - return new SSL_DetectionFrame; +SSL_DetectionFrame* SSL_DetectionFrame::New(::google::protobuf::Arena* arena) const { + SSL_DetectionFrame* n = new SSL_DetectionFrame; + if (arena != NULL) { + arena->Own(n); + } + return n; } void SSL_DetectionFrame::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - frame_number_ = 0u; - t_capture_ = 0; - t_sent_ = 0; - camera_id_ = 0u; - } +// @@protoc_insertion_point(message_clear_start:SSL_DetectionFrame) balls_.Clear(); robots_yellow_.Clear(); robots_blue_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + if (_has_bits_[0 / 32] & 15u) { + ::memset(&t_capture_, 0, reinterpret_cast(&t_sent_) - + reinterpret_cast(&t_capture_) + sizeof(t_sent_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool SSL_DetectionFrame::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:SSL_DetectionFrame) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required uint32 frame_number = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + if (tag == 8u) { + set_has_frame_number(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( input, &frame_number_))); - set_has_frame_number(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(17)) goto parse_t_capture; break; } // required double t_capture = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) { - parse_t_capture: + if (tag == 17u) { + set_has_t_capture(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( input, &t_capture_))); - set_has_t_capture(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(25)) goto parse_t_sent; break; } // required double t_sent = 3; case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) { - parse_t_sent: + if (tag == 25u) { + set_has_t_sent(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( input, &t_sent_))); - set_has_t_sent(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(32)) goto parse_camera_id; break; } // required uint32 camera_id = 4; case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_camera_id: + if (tag == 32u) { + set_has_camera_id(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( input, &camera_id_))); - set_has_camera_id(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(42)) goto parse_balls; break; } // repeated .SSL_DetectionBall balls = 5; case 5: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_balls: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + if (tag == 42u) { + DO_(input->IncrementRecursionDepth()); + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( input, add_balls())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(42)) goto parse_balls; - if (input->ExpectTag(50)) goto parse_robots_yellow; + input->UnsafeDecrementRecursionDepth(); break; } // repeated .SSL_DetectionRobot robots_yellow = 6; case 6: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_robots_yellow: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + if (tag == 50u) { + DO_(input->IncrementRecursionDepth()); + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( input, add_robots_yellow())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(50)) goto parse_robots_yellow; - if (input->ExpectTag(58)) goto parse_robots_blue; + input->UnsafeDecrementRecursionDepth(); break; } // repeated .SSL_DetectionRobot robots_blue = 7; case 7: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_robots_blue: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + if (tag == 58u) { + DO_(input->IncrementRecursionDepth()); + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( input, add_robots_blue())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(58)) goto parse_robots_blue; - if (input->ExpectAtEnd()) return true; + input->UnsafeDecrementRecursionDepth(); break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -1288,12 +1703,18 @@ bool SSL_DetectionFrame::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:SSL_DetectionFrame) return true; +failure: + // @@protoc_insertion_point(parse_failure:SSL_DetectionFrame) + return false; #undef DO_ } void SSL_DetectionFrame::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:SSL_DetectionFrame) // required uint32 frame_number = 1; if (has_frame_number()) { ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->frame_number(), output); @@ -1315,31 +1736,34 @@ void SSL_DetectionFrame::SerializeWithCachedSizes( } // repeated .SSL_DetectionBall balls = 5; - for (int i = 0; i < this->balls_size(); i++) { + for (unsigned int i = 0, n = this->balls_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 5, this->balls(i), output); } // repeated .SSL_DetectionRobot robots_yellow = 6; - for (int i = 0; i < this->robots_yellow_size(); i++) { + for (unsigned int i = 0, n = this->robots_yellow_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 6, this->robots_yellow(i), output); } // repeated .SSL_DetectionRobot robots_blue = 7; - for (int i = 0; i < this->robots_blue_size(); i++) { + for (unsigned int i = 0, n = this->robots_blue_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 7, this->robots_blue(i), output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:SSL_DetectionFrame) } -::google::protobuf::uint8* SSL_DetectionFrame::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* SSL_DetectionFrame::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:SSL_DetectionFrame) // required uint32 frame_number = 1; if (has_frame_number()) { target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->frame_number(), target); @@ -1361,138 +1785,180 @@ ::google::protobuf::uint8* SSL_DetectionFrame::SerializeWithCachedSizesToArray( } // repeated .SSL_DetectionBall balls = 5; - for (int i = 0; i < this->balls_size(); i++) { + for (unsigned int i = 0, n = this->balls_size(); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 5, this->balls(i), target); + InternalWriteMessageNoVirtualToArray( + 5, this->balls(i), false, target); } // repeated .SSL_DetectionRobot robots_yellow = 6; - for (int i = 0; i < this->robots_yellow_size(); i++) { + for (unsigned int i = 0, n = this->robots_yellow_size(); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 6, this->robots_yellow(i), target); + InternalWriteMessageNoVirtualToArray( + 6, this->robots_yellow(i), false, target); } // repeated .SSL_DetectionRobot robots_blue = 7; - for (int i = 0; i < this->robots_blue_size(); i++) { + for (unsigned int i = 0, n = this->robots_blue_size(); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 7, this->robots_blue(i), target); + InternalWriteMessageNoVirtualToArray( + 7, this->robots_blue(i), false, target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:SSL_DetectionFrame) return target; } -int SSL_DetectionFrame::ByteSize() const { - int total_size = 0; +size_t SSL_DetectionFrame::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:SSL_DetectionFrame) + size_t total_size = 0; - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_t_capture()) { + // required double t_capture = 2; + total_size += 1 + 8; + } + + if (has_frame_number()) { // required uint32 frame_number = 1; - if (has_frame_number()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::UInt32Size( - this->frame_number()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->frame_number()); + } - // required double t_capture = 2; - if (has_t_capture()) { - total_size += 1 + 8; - } + if (has_camera_id()) { + // required uint32 camera_id = 4; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->camera_id()); + } + if (has_t_sent()) { // required double t_sent = 3; - if (has_t_sent()) { - total_size += 1 + 8; - } + total_size += 1 + 8; + } + + return total_size; +} +size_t SSL_DetectionFrame::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:SSL_DetectionFrame) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + if (((_has_bits_[0] & 0x0000000f) ^ 0x0000000f) == 0) { // All required fields are present. + // required double t_capture = 2; + total_size += 1 + 8; + + // required uint32 frame_number = 1; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->frame_number()); // required uint32 camera_id = 4; - if (has_camera_id()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::UInt32Size( - this->camera_id()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->camera_id()); + + // required double t_sent = 3; + total_size += 1 + 8; + } else { + total_size += RequiredFieldsByteSizeFallback(); } // repeated .SSL_DetectionBall balls = 5; - total_size += 1 * this->balls_size(); - for (int i = 0; i < this->balls_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->balls(i)); + { + unsigned int count = this->balls_size(); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->balls(i)); + } } // repeated .SSL_DetectionRobot robots_yellow = 6; - total_size += 1 * this->robots_yellow_size(); - for (int i = 0; i < this->robots_yellow_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->robots_yellow(i)); + { + unsigned int count = this->robots_yellow_size(); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->robots_yellow(i)); + } } // repeated .SSL_DetectionRobot robots_blue = 7; - total_size += 1 * this->robots_blue_size(); - for (int i = 0; i < this->robots_blue_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->robots_blue(i)); + { + unsigned int count = this->robots_blue_size(); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->robots_blue(i)); + } } - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void SSL_DetectionFrame::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:SSL_DetectionFrame) + GOOGLE_DCHECK_NE(&from, this); const SSL_DetectionFrame* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:SSL_DetectionFrame) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:SSL_DetectionFrame) MergeFrom(*source); } } void SSL_DetectionFrame::MergeFrom(const SSL_DetectionFrame& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(class_specific_merge_from_start:SSL_DetectionFrame) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); balls_.MergeFrom(from.balls_); robots_yellow_.MergeFrom(from.robots_yellow_); robots_blue_.MergeFrom(from.robots_blue_); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_frame_number()) { - set_frame_number(from.frame_number()); - } + if (from._has_bits_[0 / 32] & 15u) { if (from.has_t_capture()) { set_t_capture(from.t_capture()); } - if (from.has_t_sent()) { - set_t_sent(from.t_sent()); + if (from.has_frame_number()) { + set_frame_number(from.frame_number()); } if (from.has_camera_id()) { set_camera_id(from.camera_id()); } + if (from.has_t_sent()) { + set_t_sent(from.t_sent()); + } } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void SSL_DetectionFrame::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:SSL_DetectionFrame) if (&from == this) return; Clear(); MergeFrom(from); } void SSL_DetectionFrame::CopyFrom(const SSL_DetectionFrame& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:SSL_DetectionFrame) if (&from == this) return; Clear(); MergeFrom(from); @@ -1500,42 +1966,224 @@ void SSL_DetectionFrame::CopyFrom(const SSL_DetectionFrame& from) { bool SSL_DetectionFrame::IsInitialized() const { if ((_has_bits_[0] & 0x0000000f) != 0x0000000f) return false; - - for (int i = 0; i < balls_size(); i++) { - if (!this->balls(i).IsInitialized()) return false; - } - for (int i = 0; i < robots_yellow_size(); i++) { - if (!this->robots_yellow(i).IsInitialized()) return false; - } - for (int i = 0; i < robots_blue_size(); i++) { - if (!this->robots_blue(i).IsInitialized()) return false; - } + if (!::google::protobuf::internal::AllAreInitialized(this->balls())) return false; + if (!::google::protobuf::internal::AllAreInitialized(this->robots_yellow())) return false; + if (!::google::protobuf::internal::AllAreInitialized(this->robots_blue())) return false; return true; } void SSL_DetectionFrame::Swap(SSL_DetectionFrame* other) { - if (other != this) { - std::swap(frame_number_, other->frame_number_); - std::swap(t_capture_, other->t_capture_); - std::swap(t_sent_, other->t_sent_); - std::swap(camera_id_, other->camera_id_); - balls_.Swap(&other->balls_); - robots_yellow_.Swap(&other->robots_yellow_); - robots_blue_.Swap(&other->robots_blue_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void SSL_DetectionFrame::InternalSwap(SSL_DetectionFrame* other) { + balls_.UnsafeArenaSwap(&other->balls_); + robots_yellow_.UnsafeArenaSwap(&other->robots_yellow_); + robots_blue_.UnsafeArenaSwap(&other->robots_blue_); + std::swap(t_capture_, other->t_capture_); + std::swap(frame_number_, other->frame_number_); + std::swap(camera_id_, other->camera_id_); + std::swap(t_sent_, other->t_sent_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata SSL_DetectionFrame::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = SSL_DetectionFrame_descriptor_; - metadata.reflection = SSL_DetectionFrame_reflection_; - return metadata; + return file_level_metadata[2]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// SSL_DetectionFrame + +// required uint32 frame_number = 1; +bool SSL_DetectionFrame::has_frame_number() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +void SSL_DetectionFrame::set_has_frame_number() { + _has_bits_[0] |= 0x00000002u; +} +void SSL_DetectionFrame::clear_has_frame_number() { + _has_bits_[0] &= ~0x00000002u; +} +void SSL_DetectionFrame::clear_frame_number() { + frame_number_ = 0u; + clear_has_frame_number(); +} +::google::protobuf::uint32 SSL_DetectionFrame::frame_number() const { + // @@protoc_insertion_point(field_get:SSL_DetectionFrame.frame_number) + return frame_number_; +} +void SSL_DetectionFrame::set_frame_number(::google::protobuf::uint32 value) { + set_has_frame_number(); + frame_number_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionFrame.frame_number) +} + +// required double t_capture = 2; +bool SSL_DetectionFrame::has_t_capture() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void SSL_DetectionFrame::set_has_t_capture() { + _has_bits_[0] |= 0x00000001u; +} +void SSL_DetectionFrame::clear_has_t_capture() { + _has_bits_[0] &= ~0x00000001u; +} +void SSL_DetectionFrame::clear_t_capture() { + t_capture_ = 0; + clear_has_t_capture(); +} +double SSL_DetectionFrame::t_capture() const { + // @@protoc_insertion_point(field_get:SSL_DetectionFrame.t_capture) + return t_capture_; +} +void SSL_DetectionFrame::set_t_capture(double value) { + set_has_t_capture(); + t_capture_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionFrame.t_capture) +} + +// required double t_sent = 3; +bool SSL_DetectionFrame::has_t_sent() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +void SSL_DetectionFrame::set_has_t_sent() { + _has_bits_[0] |= 0x00000008u; +} +void SSL_DetectionFrame::clear_has_t_sent() { + _has_bits_[0] &= ~0x00000008u; +} +void SSL_DetectionFrame::clear_t_sent() { + t_sent_ = 0; + clear_has_t_sent(); +} +double SSL_DetectionFrame::t_sent() const { + // @@protoc_insertion_point(field_get:SSL_DetectionFrame.t_sent) + return t_sent_; +} +void SSL_DetectionFrame::set_t_sent(double value) { + set_has_t_sent(); + t_sent_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionFrame.t_sent) +} + +// required uint32 camera_id = 4; +bool SSL_DetectionFrame::has_camera_id() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +void SSL_DetectionFrame::set_has_camera_id() { + _has_bits_[0] |= 0x00000004u; +} +void SSL_DetectionFrame::clear_has_camera_id() { + _has_bits_[0] &= ~0x00000004u; +} +void SSL_DetectionFrame::clear_camera_id() { + camera_id_ = 0u; + clear_has_camera_id(); +} +::google::protobuf::uint32 SSL_DetectionFrame::camera_id() const { + // @@protoc_insertion_point(field_get:SSL_DetectionFrame.camera_id) + return camera_id_; +} +void SSL_DetectionFrame::set_camera_id(::google::protobuf::uint32 value) { + set_has_camera_id(); + camera_id_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionFrame.camera_id) +} + +// repeated .SSL_DetectionBall balls = 5; +int SSL_DetectionFrame::balls_size() const { + return balls_.size(); +} +void SSL_DetectionFrame::clear_balls() { + balls_.Clear(); +} +const ::SSL_DetectionBall& SSL_DetectionFrame::balls(int index) const { + // @@protoc_insertion_point(field_get:SSL_DetectionFrame.balls) + return balls_.Get(index); +} +::SSL_DetectionBall* SSL_DetectionFrame::mutable_balls(int index) { + // @@protoc_insertion_point(field_mutable:SSL_DetectionFrame.balls) + return balls_.Mutable(index); +} +::SSL_DetectionBall* SSL_DetectionFrame::add_balls() { + // @@protoc_insertion_point(field_add:SSL_DetectionFrame.balls) + return balls_.Add(); +} +::google::protobuf::RepeatedPtrField< ::SSL_DetectionBall >* +SSL_DetectionFrame::mutable_balls() { + // @@protoc_insertion_point(field_mutable_list:SSL_DetectionFrame.balls) + return &balls_; +} +const ::google::protobuf::RepeatedPtrField< ::SSL_DetectionBall >& +SSL_DetectionFrame::balls() const { + // @@protoc_insertion_point(field_list:SSL_DetectionFrame.balls) + return balls_; +} + +// repeated .SSL_DetectionRobot robots_yellow = 6; +int SSL_DetectionFrame::robots_yellow_size() const { + return robots_yellow_.size(); +} +void SSL_DetectionFrame::clear_robots_yellow() { + robots_yellow_.Clear(); +} +const ::SSL_DetectionRobot& SSL_DetectionFrame::robots_yellow(int index) const { + // @@protoc_insertion_point(field_get:SSL_DetectionFrame.robots_yellow) + return robots_yellow_.Get(index); +} +::SSL_DetectionRobot* SSL_DetectionFrame::mutable_robots_yellow(int index) { + // @@protoc_insertion_point(field_mutable:SSL_DetectionFrame.robots_yellow) + return robots_yellow_.Mutable(index); +} +::SSL_DetectionRobot* SSL_DetectionFrame::add_robots_yellow() { + // @@protoc_insertion_point(field_add:SSL_DetectionFrame.robots_yellow) + return robots_yellow_.Add(); +} +::google::protobuf::RepeatedPtrField< ::SSL_DetectionRobot >* +SSL_DetectionFrame::mutable_robots_yellow() { + // @@protoc_insertion_point(field_mutable_list:SSL_DetectionFrame.robots_yellow) + return &robots_yellow_; +} +const ::google::protobuf::RepeatedPtrField< ::SSL_DetectionRobot >& +SSL_DetectionFrame::robots_yellow() const { + // @@protoc_insertion_point(field_list:SSL_DetectionFrame.robots_yellow) + return robots_yellow_; +} + +// repeated .SSL_DetectionRobot robots_blue = 7; +int SSL_DetectionFrame::robots_blue_size() const { + return robots_blue_.size(); +} +void SSL_DetectionFrame::clear_robots_blue() { + robots_blue_.Clear(); +} +const ::SSL_DetectionRobot& SSL_DetectionFrame::robots_blue(int index) const { + // @@protoc_insertion_point(field_get:SSL_DetectionFrame.robots_blue) + return robots_blue_.Get(index); +} +::SSL_DetectionRobot* SSL_DetectionFrame::mutable_robots_blue(int index) { + // @@protoc_insertion_point(field_mutable:SSL_DetectionFrame.robots_blue) + return robots_blue_.Mutable(index); +} +::SSL_DetectionRobot* SSL_DetectionFrame::add_robots_blue() { + // @@protoc_insertion_point(field_add:SSL_DetectionFrame.robots_blue) + return robots_blue_.Add(); +} +::google::protobuf::RepeatedPtrField< ::SSL_DetectionRobot >* +SSL_DetectionFrame::mutable_robots_blue() { + // @@protoc_insertion_point(field_mutable_list:SSL_DetectionFrame.robots_blue) + return &robots_blue_; +} +const ::google::protobuf::RepeatedPtrField< ::SSL_DetectionRobot >& +SSL_DetectionFrame::robots_blue() const { + // @@protoc_insertion_point(field_list:SSL_DetectionFrame.robots_blue) + return robots_blue_; } +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) diff --git a/src/proto/messages_robocup_ssl_detection.pb.h b/src/proto/messages_robocup_ssl_detection.pb.h index 7e0cc0f..1543315 100644 --- a/src/proto/messages_robocup_ssl_detection.pb.h +++ b/src/proto/messages_robocup_ssl_detection.pb.h @@ -8,36 +8,43 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 2005000 +#if GOOGLE_PROTOBUF_VERSION < 3001000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. #endif +#include +#include #include +#include #include -#include -#include +#include // IWYU pragma: export +#include // IWYU pragma: export #include // @@protoc_insertion_point(includes) - -// Internal implementation detail -- do not call these. -void protobuf_AddDesc_messages_5frobocup_5fssl_5fdetection_2eproto(); -void protobuf_AssignDesc_messages_5frobocup_5fssl_5fdetection_2eproto(); -void protobuf_ShutdownFile_messages_5frobocup_5fssl_5fdetection_2eproto(); - class SSL_DetectionBall; -class SSL_DetectionRobot; +class SSL_DetectionBallDefaultTypeInternal; +extern SSL_DetectionBallDefaultTypeInternal _SSL_DetectionBall_default_instance_; class SSL_DetectionFrame; +class SSL_DetectionFrameDefaultTypeInternal; +extern SSL_DetectionFrameDefaultTypeInternal _SSL_DetectionFrame_default_instance_; +class SSL_DetectionRobot; +class SSL_DetectionRobotDefaultTypeInternal; +extern SSL_DetectionRobotDefaultTypeInternal _SSL_DetectionRobot_default_instance_; + +// Internal implementation detail -- do not call these. +void protobuf_AddDesc_messages_5frobocup_5fssl_5fdetection_2eproto(); +void protobuf_InitDefaults_messages_5frobocup_5fssl_5fdetection_2eproto(); // =================================================================== -class SSL_DetectionBall : public ::google::protobuf::Message { +class SSL_DetectionBall : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:SSL_DetectionBall) */ { public: SSL_DetectionBall(); virtual ~SSL_DetectionBall(); @@ -50,115 +57,139 @@ class SSL_DetectionBall : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const SSL_DetectionBall& default_instance(); + static inline const SSL_DetectionBall* internal_default_instance() { + return reinterpret_cast( + &_SSL_DetectionBall_default_instance_); + } + void Swap(SSL_DetectionBall* other); // implements Message ---------------------------------------------- - SSL_DetectionBall* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline SSL_DetectionBall* New() const PROTOBUF_FINAL { return New(NULL); } + + SSL_DetectionBall* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const SSL_DetectionBall& from); void MergeFrom(const SSL_DetectionBall& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(SSL_DetectionBall* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // required float confidence = 1; - inline bool has_confidence() const; - inline void clear_confidence(); + bool has_confidence() const; + void clear_confidence(); static const int kConfidenceFieldNumber = 1; - inline float confidence() const; - inline void set_confidence(float value); + float confidence() const; + void set_confidence(float value); // optional uint32 area = 2; - inline bool has_area() const; - inline void clear_area(); + bool has_area() const; + void clear_area(); static const int kAreaFieldNumber = 2; - inline ::google::protobuf::uint32 area() const; - inline void set_area(::google::protobuf::uint32 value); + ::google::protobuf::uint32 area() const; + void set_area(::google::protobuf::uint32 value); // required float x = 3; - inline bool has_x() const; - inline void clear_x(); + bool has_x() const; + void clear_x(); static const int kXFieldNumber = 3; - inline float x() const; - inline void set_x(float value); + float x() const; + void set_x(float value); // required float y = 4; - inline bool has_y() const; - inline void clear_y(); + bool has_y() const; + void clear_y(); static const int kYFieldNumber = 4; - inline float y() const; - inline void set_y(float value); + float y() const; + void set_y(float value); // optional float z = 5; - inline bool has_z() const; - inline void clear_z(); + bool has_z() const; + void clear_z(); static const int kZFieldNumber = 5; - inline float z() const; - inline void set_z(float value); + float z() const; + void set_z(float value); // required float pixel_x = 6; - inline bool has_pixel_x() const; - inline void clear_pixel_x(); + bool has_pixel_x() const; + void clear_pixel_x(); static const int kPixelXFieldNumber = 6; - inline float pixel_x() const; - inline void set_pixel_x(float value); + float pixel_x() const; + void set_pixel_x(float value); // required float pixel_y = 7; - inline bool has_pixel_y() const; - inline void clear_pixel_y(); + bool has_pixel_y() const; + void clear_pixel_y(); static const int kPixelYFieldNumber = 7; - inline float pixel_y() const; - inline void set_pixel_y(float value); + float pixel_y() const; + void set_pixel_y(float value); // @@protoc_insertion_point(class_scope:SSL_DetectionBall) private: - inline void set_has_confidence(); - inline void clear_has_confidence(); - inline void set_has_area(); - inline void clear_has_area(); - inline void set_has_x(); - inline void clear_has_x(); - inline void set_has_y(); - inline void clear_has_y(); - inline void set_has_z(); - inline void clear_has_z(); - inline void set_has_pixel_x(); - inline void clear_has_pixel_x(); - inline void set_has_pixel_y(); - inline void clear_has_pixel_y(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + void set_has_confidence(); + void clear_has_confidence(); + void set_has_area(); + void clear_has_area(); + void set_has_x(); + void clear_has_x(); + void set_has_y(); + void clear_has_y(); + void set_has_z(); + void clear_has_z(); + void set_has_pixel_x(); + void clear_has_pixel_x(); + void set_has_pixel_y(); + void clear_has_pixel_y(); + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; float confidence_; ::google::protobuf::uint32 area_; float x_; @@ -166,20 +197,15 @@ class SSL_DetectionBall : public ::google::protobuf::Message { float z_; float pixel_x_; float pixel_y_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(7 + 31) / 32]; - - friend void protobuf_AddDesc_messages_5frobocup_5fssl_5fdetection_2eproto(); - friend void protobuf_AssignDesc_messages_5frobocup_5fssl_5fdetection_2eproto(); + friend void protobuf_InitDefaults_messages_5frobocup_5fssl_5fdetection_2eproto_impl(); + friend void protobuf_AddDesc_messages_5frobocup_5fssl_5fdetection_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_messages_5frobocup_5fssl_5fdetection_2eproto(); friend void protobuf_ShutdownFile_messages_5frobocup_5fssl_5fdetection_2eproto(); - void InitAsDefaultInstance(); - static SSL_DetectionBall* default_instance_; }; // ------------------------------------------------------------------- -class SSL_DetectionRobot : public ::google::protobuf::Message { +class SSL_DetectionRobot : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:SSL_DetectionRobot) */ { public: SSL_DetectionRobot(); virtual ~SSL_DetectionRobot(); @@ -192,124 +218,148 @@ class SSL_DetectionRobot : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const SSL_DetectionRobot& default_instance(); + static inline const SSL_DetectionRobot* internal_default_instance() { + return reinterpret_cast( + &_SSL_DetectionRobot_default_instance_); + } + void Swap(SSL_DetectionRobot* other); // implements Message ---------------------------------------------- - SSL_DetectionRobot* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline SSL_DetectionRobot* New() const PROTOBUF_FINAL { return New(NULL); } + + SSL_DetectionRobot* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const SSL_DetectionRobot& from); void MergeFrom(const SSL_DetectionRobot& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(SSL_DetectionRobot* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // required float confidence = 1; - inline bool has_confidence() const; - inline void clear_confidence(); + bool has_confidence() const; + void clear_confidence(); static const int kConfidenceFieldNumber = 1; - inline float confidence() const; - inline void set_confidence(float value); + float confidence() const; + void set_confidence(float value); // optional uint32 robot_id = 2; - inline bool has_robot_id() const; - inline void clear_robot_id(); + bool has_robot_id() const; + void clear_robot_id(); static const int kRobotIdFieldNumber = 2; - inline ::google::protobuf::uint32 robot_id() const; - inline void set_robot_id(::google::protobuf::uint32 value); + ::google::protobuf::uint32 robot_id() const; + void set_robot_id(::google::protobuf::uint32 value); // required float x = 3; - inline bool has_x() const; - inline void clear_x(); + bool has_x() const; + void clear_x(); static const int kXFieldNumber = 3; - inline float x() const; - inline void set_x(float value); + float x() const; + void set_x(float value); // required float y = 4; - inline bool has_y() const; - inline void clear_y(); + bool has_y() const; + void clear_y(); static const int kYFieldNumber = 4; - inline float y() const; - inline void set_y(float value); + float y() const; + void set_y(float value); // optional float orientation = 5; - inline bool has_orientation() const; - inline void clear_orientation(); + bool has_orientation() const; + void clear_orientation(); static const int kOrientationFieldNumber = 5; - inline float orientation() const; - inline void set_orientation(float value); + float orientation() const; + void set_orientation(float value); // required float pixel_x = 6; - inline bool has_pixel_x() const; - inline void clear_pixel_x(); + bool has_pixel_x() const; + void clear_pixel_x(); static const int kPixelXFieldNumber = 6; - inline float pixel_x() const; - inline void set_pixel_x(float value); + float pixel_x() const; + void set_pixel_x(float value); // required float pixel_y = 7; - inline bool has_pixel_y() const; - inline void clear_pixel_y(); + bool has_pixel_y() const; + void clear_pixel_y(); static const int kPixelYFieldNumber = 7; - inline float pixel_y() const; - inline void set_pixel_y(float value); + float pixel_y() const; + void set_pixel_y(float value); // optional float height = 8; - inline bool has_height() const; - inline void clear_height(); + bool has_height() const; + void clear_height(); static const int kHeightFieldNumber = 8; - inline float height() const; - inline void set_height(float value); + float height() const; + void set_height(float value); // @@protoc_insertion_point(class_scope:SSL_DetectionRobot) private: - inline void set_has_confidence(); - inline void clear_has_confidence(); - inline void set_has_robot_id(); - inline void clear_has_robot_id(); - inline void set_has_x(); - inline void clear_has_x(); - inline void set_has_y(); - inline void clear_has_y(); - inline void set_has_orientation(); - inline void clear_has_orientation(); - inline void set_has_pixel_x(); - inline void clear_has_pixel_x(); - inline void set_has_pixel_y(); - inline void clear_has_pixel_y(); - inline void set_has_height(); - inline void clear_has_height(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + void set_has_confidence(); + void clear_has_confidence(); + void set_has_robot_id(); + void clear_has_robot_id(); + void set_has_x(); + void clear_has_x(); + void set_has_y(); + void clear_has_y(); + void set_has_orientation(); + void clear_has_orientation(); + void set_has_pixel_x(); + void clear_has_pixel_x(); + void set_has_pixel_y(); + void clear_has_pixel_y(); + void set_has_height(); + void clear_has_height(); + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; float confidence_; ::google::protobuf::uint32 robot_id_; float x_; @@ -318,20 +368,15 @@ class SSL_DetectionRobot : public ::google::protobuf::Message { float pixel_x_; float pixel_y_; float height_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(8 + 31) / 32]; - - friend void protobuf_AddDesc_messages_5frobocup_5fssl_5fdetection_2eproto(); - friend void protobuf_AssignDesc_messages_5frobocup_5fssl_5fdetection_2eproto(); + friend void protobuf_InitDefaults_messages_5frobocup_5fssl_5fdetection_2eproto_impl(); + friend void protobuf_AddDesc_messages_5frobocup_5fssl_5fdetection_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_messages_5frobocup_5fssl_5fdetection_2eproto(); friend void protobuf_ShutdownFile_messages_5frobocup_5fssl_5fdetection_2eproto(); - void InitAsDefaultInstance(); - static SSL_DetectionRobot* default_instance_; }; // ------------------------------------------------------------------- -class SSL_DetectionFrame : public ::google::protobuf::Message { +class SSL_DetectionFrame : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:SSL_DetectionFrame) */ { public: SSL_DetectionFrame(); virtual ~SSL_DetectionFrame(); @@ -344,147 +389,167 @@ class SSL_DetectionFrame : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const SSL_DetectionFrame& default_instance(); + static inline const SSL_DetectionFrame* internal_default_instance() { + return reinterpret_cast( + &_SSL_DetectionFrame_default_instance_); + } + void Swap(SSL_DetectionFrame* other); // implements Message ---------------------------------------------- - SSL_DetectionFrame* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline SSL_DetectionFrame* New() const PROTOBUF_FINAL { return New(NULL); } + + SSL_DetectionFrame* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const SSL_DetectionFrame& from); void MergeFrom(const SSL_DetectionFrame& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(SSL_DetectionFrame* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // required uint32 frame_number = 1; - inline bool has_frame_number() const; - inline void clear_frame_number(); + bool has_frame_number() const; + void clear_frame_number(); static const int kFrameNumberFieldNumber = 1; - inline ::google::protobuf::uint32 frame_number() const; - inline void set_frame_number(::google::protobuf::uint32 value); + ::google::protobuf::uint32 frame_number() const; + void set_frame_number(::google::protobuf::uint32 value); // required double t_capture = 2; - inline bool has_t_capture() const; - inline void clear_t_capture(); + bool has_t_capture() const; + void clear_t_capture(); static const int kTCaptureFieldNumber = 2; - inline double t_capture() const; - inline void set_t_capture(double value); + double t_capture() const; + void set_t_capture(double value); // required double t_sent = 3; - inline bool has_t_sent() const; - inline void clear_t_sent(); + bool has_t_sent() const; + void clear_t_sent(); static const int kTSentFieldNumber = 3; - inline double t_sent() const; - inline void set_t_sent(double value); + double t_sent() const; + void set_t_sent(double value); // required uint32 camera_id = 4; - inline bool has_camera_id() const; - inline void clear_camera_id(); + bool has_camera_id() const; + void clear_camera_id(); static const int kCameraIdFieldNumber = 4; - inline ::google::protobuf::uint32 camera_id() const; - inline void set_camera_id(::google::protobuf::uint32 value); + ::google::protobuf::uint32 camera_id() const; + void set_camera_id(::google::protobuf::uint32 value); // repeated .SSL_DetectionBall balls = 5; - inline int balls_size() const; - inline void clear_balls(); + int balls_size() const; + void clear_balls(); static const int kBallsFieldNumber = 5; - inline const ::SSL_DetectionBall& balls(int index) const; - inline ::SSL_DetectionBall* mutable_balls(int index); - inline ::SSL_DetectionBall* add_balls(); - inline const ::google::protobuf::RepeatedPtrField< ::SSL_DetectionBall >& - balls() const; - inline ::google::protobuf::RepeatedPtrField< ::SSL_DetectionBall >* + const ::SSL_DetectionBall& balls(int index) const; + ::SSL_DetectionBall* mutable_balls(int index); + ::SSL_DetectionBall* add_balls(); + ::google::protobuf::RepeatedPtrField< ::SSL_DetectionBall >* mutable_balls(); + const ::google::protobuf::RepeatedPtrField< ::SSL_DetectionBall >& + balls() const; // repeated .SSL_DetectionRobot robots_yellow = 6; - inline int robots_yellow_size() const; - inline void clear_robots_yellow(); + int robots_yellow_size() const; + void clear_robots_yellow(); static const int kRobotsYellowFieldNumber = 6; - inline const ::SSL_DetectionRobot& robots_yellow(int index) const; - inline ::SSL_DetectionRobot* mutable_robots_yellow(int index); - inline ::SSL_DetectionRobot* add_robots_yellow(); - inline const ::google::protobuf::RepeatedPtrField< ::SSL_DetectionRobot >& - robots_yellow() const; - inline ::google::protobuf::RepeatedPtrField< ::SSL_DetectionRobot >* + const ::SSL_DetectionRobot& robots_yellow(int index) const; + ::SSL_DetectionRobot* mutable_robots_yellow(int index); + ::SSL_DetectionRobot* add_robots_yellow(); + ::google::protobuf::RepeatedPtrField< ::SSL_DetectionRobot >* mutable_robots_yellow(); + const ::google::protobuf::RepeatedPtrField< ::SSL_DetectionRobot >& + robots_yellow() const; // repeated .SSL_DetectionRobot robots_blue = 7; - inline int robots_blue_size() const; - inline void clear_robots_blue(); + int robots_blue_size() const; + void clear_robots_blue(); static const int kRobotsBlueFieldNumber = 7; - inline const ::SSL_DetectionRobot& robots_blue(int index) const; - inline ::SSL_DetectionRobot* mutable_robots_blue(int index); - inline ::SSL_DetectionRobot* add_robots_blue(); - inline const ::google::protobuf::RepeatedPtrField< ::SSL_DetectionRobot >& - robots_blue() const; - inline ::google::protobuf::RepeatedPtrField< ::SSL_DetectionRobot >* + const ::SSL_DetectionRobot& robots_blue(int index) const; + ::SSL_DetectionRobot* mutable_robots_blue(int index); + ::SSL_DetectionRobot* add_robots_blue(); + ::google::protobuf::RepeatedPtrField< ::SSL_DetectionRobot >* mutable_robots_blue(); + const ::google::protobuf::RepeatedPtrField< ::SSL_DetectionRobot >& + robots_blue() const; // @@protoc_insertion_point(class_scope:SSL_DetectionFrame) private: - inline void set_has_frame_number(); - inline void clear_has_frame_number(); - inline void set_has_t_capture(); - inline void clear_has_t_capture(); - inline void set_has_t_sent(); - inline void clear_has_t_sent(); - inline void set_has_camera_id(); - inline void clear_has_camera_id(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + void set_has_frame_number(); + void clear_has_frame_number(); + void set_has_t_capture(); + void clear_has_t_capture(); + void set_has_t_sent(); + void clear_has_t_sent(); + void set_has_camera_id(); + void clear_has_camera_id(); + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; + ::google::protobuf::RepeatedPtrField< ::SSL_DetectionBall > balls_; + ::google::protobuf::RepeatedPtrField< ::SSL_DetectionRobot > robots_yellow_; + ::google::protobuf::RepeatedPtrField< ::SSL_DetectionRobot > robots_blue_; double t_capture_; ::google::protobuf::uint32 frame_number_; ::google::protobuf::uint32 camera_id_; double t_sent_; - ::google::protobuf::RepeatedPtrField< ::SSL_DetectionBall > balls_; - ::google::protobuf::RepeatedPtrField< ::SSL_DetectionRobot > robots_yellow_; - ::google::protobuf::RepeatedPtrField< ::SSL_DetectionRobot > robots_blue_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(7 + 31) / 32]; - - friend void protobuf_AddDesc_messages_5frobocup_5fssl_5fdetection_2eproto(); - friend void protobuf_AssignDesc_messages_5frobocup_5fssl_5fdetection_2eproto(); + friend void protobuf_InitDefaults_messages_5frobocup_5fssl_5fdetection_2eproto_impl(); + friend void protobuf_AddDesc_messages_5frobocup_5fssl_5fdetection_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_messages_5frobocup_5fssl_5fdetection_2eproto(); friend void protobuf_ShutdownFile_messages_5frobocup_5fssl_5fdetection_2eproto(); - void InitAsDefaultInstance(); - static SSL_DetectionFrame* default_instance_; }; // =================================================================== // =================================================================== +#if !PROTOBUF_INLINE_NOT_IN_HEADERS // SSL_DetectionBall // required float confidence = 1; @@ -502,11 +567,13 @@ inline void SSL_DetectionBall::clear_confidence() { clear_has_confidence(); } inline float SSL_DetectionBall::confidence() const { + // @@protoc_insertion_point(field_get:SSL_DetectionBall.confidence) return confidence_; } inline void SSL_DetectionBall::set_confidence(float value) { set_has_confidence(); confidence_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionBall.confidence) } // optional uint32 area = 2; @@ -524,11 +591,13 @@ inline void SSL_DetectionBall::clear_area() { clear_has_area(); } inline ::google::protobuf::uint32 SSL_DetectionBall::area() const { + // @@protoc_insertion_point(field_get:SSL_DetectionBall.area) return area_; } inline void SSL_DetectionBall::set_area(::google::protobuf::uint32 value) { set_has_area(); area_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionBall.area) } // required float x = 3; @@ -546,11 +615,13 @@ inline void SSL_DetectionBall::clear_x() { clear_has_x(); } inline float SSL_DetectionBall::x() const { + // @@protoc_insertion_point(field_get:SSL_DetectionBall.x) return x_; } inline void SSL_DetectionBall::set_x(float value) { set_has_x(); x_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionBall.x) } // required float y = 4; @@ -568,11 +639,13 @@ inline void SSL_DetectionBall::clear_y() { clear_has_y(); } inline float SSL_DetectionBall::y() const { + // @@protoc_insertion_point(field_get:SSL_DetectionBall.y) return y_; } inline void SSL_DetectionBall::set_y(float value) { set_has_y(); y_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionBall.y) } // optional float z = 5; @@ -590,11 +663,13 @@ inline void SSL_DetectionBall::clear_z() { clear_has_z(); } inline float SSL_DetectionBall::z() const { + // @@protoc_insertion_point(field_get:SSL_DetectionBall.z) return z_; } inline void SSL_DetectionBall::set_z(float value) { set_has_z(); z_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionBall.z) } // required float pixel_x = 6; @@ -612,11 +687,13 @@ inline void SSL_DetectionBall::clear_pixel_x() { clear_has_pixel_x(); } inline float SSL_DetectionBall::pixel_x() const { + // @@protoc_insertion_point(field_get:SSL_DetectionBall.pixel_x) return pixel_x_; } inline void SSL_DetectionBall::set_pixel_x(float value) { set_has_pixel_x(); pixel_x_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionBall.pixel_x) } // required float pixel_y = 7; @@ -634,11 +711,13 @@ inline void SSL_DetectionBall::clear_pixel_y() { clear_has_pixel_y(); } inline float SSL_DetectionBall::pixel_y() const { + // @@protoc_insertion_point(field_get:SSL_DetectionBall.pixel_y) return pixel_y_; } inline void SSL_DetectionBall::set_pixel_y(float value) { set_has_pixel_y(); pixel_y_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionBall.pixel_y) } // ------------------------------------------------------------------- @@ -660,11 +739,13 @@ inline void SSL_DetectionRobot::clear_confidence() { clear_has_confidence(); } inline float SSL_DetectionRobot::confidence() const { + // @@protoc_insertion_point(field_get:SSL_DetectionRobot.confidence) return confidence_; } inline void SSL_DetectionRobot::set_confidence(float value) { set_has_confidence(); confidence_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionRobot.confidence) } // optional uint32 robot_id = 2; @@ -682,11 +763,13 @@ inline void SSL_DetectionRobot::clear_robot_id() { clear_has_robot_id(); } inline ::google::protobuf::uint32 SSL_DetectionRobot::robot_id() const { + // @@protoc_insertion_point(field_get:SSL_DetectionRobot.robot_id) return robot_id_; } inline void SSL_DetectionRobot::set_robot_id(::google::protobuf::uint32 value) { set_has_robot_id(); robot_id_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionRobot.robot_id) } // required float x = 3; @@ -704,11 +787,13 @@ inline void SSL_DetectionRobot::clear_x() { clear_has_x(); } inline float SSL_DetectionRobot::x() const { + // @@protoc_insertion_point(field_get:SSL_DetectionRobot.x) return x_; } inline void SSL_DetectionRobot::set_x(float value) { set_has_x(); x_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionRobot.x) } // required float y = 4; @@ -726,11 +811,13 @@ inline void SSL_DetectionRobot::clear_y() { clear_has_y(); } inline float SSL_DetectionRobot::y() const { + // @@protoc_insertion_point(field_get:SSL_DetectionRobot.y) return y_; } inline void SSL_DetectionRobot::set_y(float value) { set_has_y(); y_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionRobot.y) } // optional float orientation = 5; @@ -748,11 +835,13 @@ inline void SSL_DetectionRobot::clear_orientation() { clear_has_orientation(); } inline float SSL_DetectionRobot::orientation() const { + // @@protoc_insertion_point(field_get:SSL_DetectionRobot.orientation) return orientation_; } inline void SSL_DetectionRobot::set_orientation(float value) { set_has_orientation(); orientation_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionRobot.orientation) } // required float pixel_x = 6; @@ -770,11 +859,13 @@ inline void SSL_DetectionRobot::clear_pixel_x() { clear_has_pixel_x(); } inline float SSL_DetectionRobot::pixel_x() const { + // @@protoc_insertion_point(field_get:SSL_DetectionRobot.pixel_x) return pixel_x_; } inline void SSL_DetectionRobot::set_pixel_x(float value) { set_has_pixel_x(); pixel_x_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionRobot.pixel_x) } // required float pixel_y = 7; @@ -792,11 +883,13 @@ inline void SSL_DetectionRobot::clear_pixel_y() { clear_has_pixel_y(); } inline float SSL_DetectionRobot::pixel_y() const { + // @@protoc_insertion_point(field_get:SSL_DetectionRobot.pixel_y) return pixel_y_; } inline void SSL_DetectionRobot::set_pixel_y(float value) { set_has_pixel_y(); pixel_y_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionRobot.pixel_y) } // optional float height = 8; @@ -814,11 +907,13 @@ inline void SSL_DetectionRobot::clear_height() { clear_has_height(); } inline float SSL_DetectionRobot::height() const { + // @@protoc_insertion_point(field_get:SSL_DetectionRobot.height) return height_; } inline void SSL_DetectionRobot::set_height(float value) { set_has_height(); height_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionRobot.height) } // ------------------------------------------------------------------- @@ -827,90 +922,98 @@ inline void SSL_DetectionRobot::set_height(float value) { // required uint32 frame_number = 1; inline bool SSL_DetectionFrame::has_frame_number() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return (_has_bits_[0] & 0x00000002u) != 0; } inline void SSL_DetectionFrame::set_has_frame_number() { - _has_bits_[0] |= 0x00000001u; + _has_bits_[0] |= 0x00000002u; } inline void SSL_DetectionFrame::clear_has_frame_number() { - _has_bits_[0] &= ~0x00000001u; + _has_bits_[0] &= ~0x00000002u; } inline void SSL_DetectionFrame::clear_frame_number() { frame_number_ = 0u; clear_has_frame_number(); } inline ::google::protobuf::uint32 SSL_DetectionFrame::frame_number() const { + // @@protoc_insertion_point(field_get:SSL_DetectionFrame.frame_number) return frame_number_; } inline void SSL_DetectionFrame::set_frame_number(::google::protobuf::uint32 value) { set_has_frame_number(); frame_number_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionFrame.frame_number) } // required double t_capture = 2; inline bool SSL_DetectionFrame::has_t_capture() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return (_has_bits_[0] & 0x00000001u) != 0; } inline void SSL_DetectionFrame::set_has_t_capture() { - _has_bits_[0] |= 0x00000002u; + _has_bits_[0] |= 0x00000001u; } inline void SSL_DetectionFrame::clear_has_t_capture() { - _has_bits_[0] &= ~0x00000002u; + _has_bits_[0] &= ~0x00000001u; } inline void SSL_DetectionFrame::clear_t_capture() { t_capture_ = 0; clear_has_t_capture(); } inline double SSL_DetectionFrame::t_capture() const { + // @@protoc_insertion_point(field_get:SSL_DetectionFrame.t_capture) return t_capture_; } inline void SSL_DetectionFrame::set_t_capture(double value) { set_has_t_capture(); t_capture_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionFrame.t_capture) } // required double t_sent = 3; inline bool SSL_DetectionFrame::has_t_sent() const { - return (_has_bits_[0] & 0x00000004u) != 0; + return (_has_bits_[0] & 0x00000008u) != 0; } inline void SSL_DetectionFrame::set_has_t_sent() { - _has_bits_[0] |= 0x00000004u; + _has_bits_[0] |= 0x00000008u; } inline void SSL_DetectionFrame::clear_has_t_sent() { - _has_bits_[0] &= ~0x00000004u; + _has_bits_[0] &= ~0x00000008u; } inline void SSL_DetectionFrame::clear_t_sent() { t_sent_ = 0; clear_has_t_sent(); } inline double SSL_DetectionFrame::t_sent() const { + // @@protoc_insertion_point(field_get:SSL_DetectionFrame.t_sent) return t_sent_; } inline void SSL_DetectionFrame::set_t_sent(double value) { set_has_t_sent(); t_sent_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionFrame.t_sent) } // required uint32 camera_id = 4; inline bool SSL_DetectionFrame::has_camera_id() const { - return (_has_bits_[0] & 0x00000008u) != 0; + return (_has_bits_[0] & 0x00000004u) != 0; } inline void SSL_DetectionFrame::set_has_camera_id() { - _has_bits_[0] |= 0x00000008u; + _has_bits_[0] |= 0x00000004u; } inline void SSL_DetectionFrame::clear_has_camera_id() { - _has_bits_[0] &= ~0x00000008u; + _has_bits_[0] &= ~0x00000004u; } inline void SSL_DetectionFrame::clear_camera_id() { camera_id_ = 0u; clear_has_camera_id(); } inline ::google::protobuf::uint32 SSL_DetectionFrame::camera_id() const { + // @@protoc_insertion_point(field_get:SSL_DetectionFrame.camera_id) return camera_id_; } inline void SSL_DetectionFrame::set_camera_id(::google::protobuf::uint32 value) { set_has_camera_id(); camera_id_ = value; + // @@protoc_insertion_point(field_set:SSL_DetectionFrame.camera_id) } // repeated .SSL_DetectionBall balls = 5; @@ -921,22 +1024,27 @@ inline void SSL_DetectionFrame::clear_balls() { balls_.Clear(); } inline const ::SSL_DetectionBall& SSL_DetectionFrame::balls(int index) const { + // @@protoc_insertion_point(field_get:SSL_DetectionFrame.balls) return balls_.Get(index); } inline ::SSL_DetectionBall* SSL_DetectionFrame::mutable_balls(int index) { + // @@protoc_insertion_point(field_mutable:SSL_DetectionFrame.balls) return balls_.Mutable(index); } inline ::SSL_DetectionBall* SSL_DetectionFrame::add_balls() { + // @@protoc_insertion_point(field_add:SSL_DetectionFrame.balls) return balls_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::SSL_DetectionBall >& -SSL_DetectionFrame::balls() const { - return balls_; -} inline ::google::protobuf::RepeatedPtrField< ::SSL_DetectionBall >* SSL_DetectionFrame::mutable_balls() { + // @@protoc_insertion_point(field_mutable_list:SSL_DetectionFrame.balls) return &balls_; } +inline const ::google::protobuf::RepeatedPtrField< ::SSL_DetectionBall >& +SSL_DetectionFrame::balls() const { + // @@protoc_insertion_point(field_list:SSL_DetectionFrame.balls) + return balls_; +} // repeated .SSL_DetectionRobot robots_yellow = 6; inline int SSL_DetectionFrame::robots_yellow_size() const { @@ -946,22 +1054,27 @@ inline void SSL_DetectionFrame::clear_robots_yellow() { robots_yellow_.Clear(); } inline const ::SSL_DetectionRobot& SSL_DetectionFrame::robots_yellow(int index) const { + // @@protoc_insertion_point(field_get:SSL_DetectionFrame.robots_yellow) return robots_yellow_.Get(index); } inline ::SSL_DetectionRobot* SSL_DetectionFrame::mutable_robots_yellow(int index) { + // @@protoc_insertion_point(field_mutable:SSL_DetectionFrame.robots_yellow) return robots_yellow_.Mutable(index); } inline ::SSL_DetectionRobot* SSL_DetectionFrame::add_robots_yellow() { + // @@protoc_insertion_point(field_add:SSL_DetectionFrame.robots_yellow) return robots_yellow_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::SSL_DetectionRobot >& -SSL_DetectionFrame::robots_yellow() const { - return robots_yellow_; -} inline ::google::protobuf::RepeatedPtrField< ::SSL_DetectionRobot >* SSL_DetectionFrame::mutable_robots_yellow() { + // @@protoc_insertion_point(field_mutable_list:SSL_DetectionFrame.robots_yellow) return &robots_yellow_; } +inline const ::google::protobuf::RepeatedPtrField< ::SSL_DetectionRobot >& +SSL_DetectionFrame::robots_yellow() const { + // @@protoc_insertion_point(field_list:SSL_DetectionFrame.robots_yellow) + return robots_yellow_; +} // repeated .SSL_DetectionRobot robots_blue = 7; inline int SSL_DetectionFrame::robots_blue_size() const { @@ -971,34 +1084,36 @@ inline void SSL_DetectionFrame::clear_robots_blue() { robots_blue_.Clear(); } inline const ::SSL_DetectionRobot& SSL_DetectionFrame::robots_blue(int index) const { + // @@protoc_insertion_point(field_get:SSL_DetectionFrame.robots_blue) return robots_blue_.Get(index); } inline ::SSL_DetectionRobot* SSL_DetectionFrame::mutable_robots_blue(int index) { + // @@protoc_insertion_point(field_mutable:SSL_DetectionFrame.robots_blue) return robots_blue_.Mutable(index); } inline ::SSL_DetectionRobot* SSL_DetectionFrame::add_robots_blue() { + // @@protoc_insertion_point(field_add:SSL_DetectionFrame.robots_blue) return robots_blue_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::SSL_DetectionRobot >& -SSL_DetectionFrame::robots_blue() const { - return robots_blue_; -} inline ::google::protobuf::RepeatedPtrField< ::SSL_DetectionRobot >* SSL_DetectionFrame::mutable_robots_blue() { + // @@protoc_insertion_point(field_mutable_list:SSL_DetectionFrame.robots_blue) return &robots_blue_; } +inline const ::google::protobuf::RepeatedPtrField< ::SSL_DetectionRobot >& +SSL_DetectionFrame::robots_blue() const { + // @@protoc_insertion_point(field_list:SSL_DetectionFrame.robots_blue) + return robots_blue_; +} +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS +// ------------------------------------------------------------------- -// @@protoc_insertion_point(namespace_scope) +// ------------------------------------------------------------------- -#ifndef SWIG -namespace google { -namespace protobuf { +// @@protoc_insertion_point(namespace_scope) -} // namespace google -} // namespace protobuf -#endif // SWIG // @@protoc_insertion_point(global_scope) diff --git a/src/proto/messages_robocup_ssl_geometry.pb.cc b/src/proto/messages_robocup_ssl_geometry.pb.cc index aa1ff0b..44387e4 100644 --- a/src/proto/messages_robocup_ssl_geometry.pb.cc +++ b/src/proto/messages_robocup_ssl_geometry.pb.cc @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -15,93 +16,69 @@ #include #include // @@protoc_insertion_point(includes) +class Vector2fDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +Vector2fDefaultTypeInternal _Vector2f_default_instance_; +class SSL_FieldLineSegmentDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +SSL_FieldLineSegmentDefaultTypeInternal _SSL_FieldLineSegment_default_instance_; +class SSL_FieldCicularArcDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +SSL_FieldCicularArcDefaultTypeInternal _SSL_FieldCicularArc_default_instance_; +class SSL_GeometryFieldSizeDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +SSL_GeometryFieldSizeDefaultTypeInternal _SSL_GeometryFieldSize_default_instance_; +class SSL_GeometryCameraCalibrationDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +SSL_GeometryCameraCalibrationDefaultTypeInternal _SSL_GeometryCameraCalibration_default_instance_; +class SSL_GeometryDataDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +SSL_GeometryDataDefaultTypeInternal _SSL_GeometryData_default_instance_; namespace { -const ::google::protobuf::Descriptor* Vector2f_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - Vector2f_reflection_ = NULL; -const ::google::protobuf::Descriptor* SSL_FieldLineSegment_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - SSL_FieldLineSegment_reflection_ = NULL; -const ::google::protobuf::Descriptor* SSL_FieldCicularArc_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - SSL_FieldCicularArc_reflection_ = NULL; -const ::google::protobuf::Descriptor* SSL_GeometryFieldSize_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - SSL_GeometryFieldSize_reflection_ = NULL; -const ::google::protobuf::Descriptor* SSL_GeometryCameraCalibration_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - SSL_GeometryCameraCalibration_reflection_ = NULL; -const ::google::protobuf::Descriptor* SSL_GeometryData_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - SSL_GeometryData_reflection_ = NULL; +::google::protobuf::Metadata file_level_metadata[6]; } // namespace -void protobuf_AssignDesc_messages_5frobocup_5fssl_5fgeometry_2eproto() { - protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto(); - const ::google::protobuf::FileDescriptor* file = - ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( - "messages_robocup_ssl_geometry.proto"); - GOOGLE_CHECK(file != NULL); - Vector2f_descriptor_ = file->message_type(0); - static const int Vector2f_offsets_[2] = { +const ::google::protobuf::uint32* protobuf_Offsets_messages_5frobocup_5fssl_5fgeometry_2eproto() GOOGLE_ATTRIBUTE_COLD; +const ::google::protobuf::uint32* protobuf_Offsets_messages_5frobocup_5fssl_5fgeometry_2eproto() { + static const ::google::protobuf::uint32 offsets[] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vector2f, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vector2f, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vector2f, x_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vector2f, y_), - }; - Vector2f_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - Vector2f_descriptor_, - Vector2f::default_instance_, - Vector2f_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vector2f, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vector2f, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(Vector2f)); - SSL_FieldLineSegment_descriptor_ = file->message_type(1); - static const int SSL_FieldLineSegment_offsets_[4] = { + 0, + 1, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_FieldLineSegment, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_FieldLineSegment, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_FieldLineSegment, name_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_FieldLineSegment, p1_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_FieldLineSegment, p2_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_FieldLineSegment, thickness_), - }; - SSL_FieldLineSegment_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - SSL_FieldLineSegment_descriptor_, - SSL_FieldLineSegment::default_instance_, - SSL_FieldLineSegment_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_FieldLineSegment, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_FieldLineSegment, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(SSL_FieldLineSegment)); - SSL_FieldCicularArc_descriptor_ = file->message_type(2); - static const int SSL_FieldCicularArc_offsets_[6] = { + 0, + 1, + 2, + 3, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_FieldCicularArc, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_FieldCicularArc, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_FieldCicularArc, name_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_FieldCicularArc, center_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_FieldCicularArc, radius_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_FieldCicularArc, a1_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_FieldCicularArc, a2_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_FieldCicularArc, thickness_), - }; - SSL_FieldCicularArc_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - SSL_FieldCicularArc_descriptor_, - SSL_FieldCicularArc::default_instance_, - SSL_FieldCicularArc_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_FieldCicularArc, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_FieldCicularArc, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(SSL_FieldCicularArc)); - SSL_GeometryFieldSize_descriptor_ = file->message_type(3); - static const int SSL_GeometryFieldSize_offsets_[7] = { + 0, + 1, + 2, + 3, + 4, + 5, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryFieldSize, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryFieldSize, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryFieldSize, field_length_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryFieldSize, field_width_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryFieldSize, goal_width_), @@ -109,20 +86,17 @@ void protobuf_AssignDesc_messages_5frobocup_5fssl_5fgeometry_2eproto() { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryFieldSize, boundary_width_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryFieldSize, field_lines_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryFieldSize, field_arcs_), - }; - SSL_GeometryFieldSize_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - SSL_GeometryFieldSize_descriptor_, - SSL_GeometryFieldSize::default_instance_, - SSL_GeometryFieldSize_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryFieldSize, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryFieldSize, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(SSL_GeometryFieldSize)); - SSL_GeometryCameraCalibration_descriptor_ = file->message_type(4); - static const int SSL_GeometryCameraCalibration_offsets_[15] = { + 0, + 1, + 2, + 3, + 4, + 5, + 6, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryCameraCalibration, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryCameraCalibration, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryCameraCalibration, camera_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryCameraCalibration, focal_length_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryCameraCalibration, principal_point_x_), @@ -138,125 +112,153 @@ void protobuf_AssignDesc_messages_5frobocup_5fssl_5fgeometry_2eproto() { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryCameraCalibration, derived_camera_world_tx_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryCameraCalibration, derived_camera_world_ty_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryCameraCalibration, derived_camera_world_tz_), - }; - SSL_GeometryCameraCalibration_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - SSL_GeometryCameraCalibration_descriptor_, - SSL_GeometryCameraCalibration::default_instance_, - SSL_GeometryCameraCalibration_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryCameraCalibration, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryCameraCalibration, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(SSL_GeometryCameraCalibration)); - SSL_GeometryData_descriptor_ = file->message_type(5); - static const int SSL_GeometryData_offsets_[2] = { + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryData, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryData, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryData, field_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryData, calib_), + 0, + 1, }; - SSL_GeometryData_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - SSL_GeometryData_descriptor_, - SSL_GeometryData::default_instance_, - SSL_GeometryData_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryData, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryData, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(SSL_GeometryData)); -} + return offsets; +} + +static const ::google::protobuf::internal::MigrationSchema schemas[] = { + { 0, 6, sizeof(Vector2f)}, + { 8, 16, sizeof(SSL_FieldLineSegment)}, + { 20, 30, sizeof(SSL_FieldCicularArc)}, + { 36, 47, sizeof(SSL_GeometryFieldSize)}, + { 54, 73, sizeof(SSL_GeometryCameraCalibration)}, + { 88, 94, sizeof(SSL_GeometryData)}, +}; + +static const ::google::protobuf::internal::DefaultInstanceData file_default_instances[] = { + {reinterpret_cast(&_Vector2f_default_instance_), NULL}, + {reinterpret_cast(&_SSL_FieldLineSegment_default_instance_), NULL}, + {reinterpret_cast(&_SSL_FieldCicularArc_default_instance_), NULL}, + {reinterpret_cast(&_SSL_GeometryFieldSize_default_instance_), NULL}, + {reinterpret_cast(&_SSL_GeometryCameraCalibration_default_instance_), NULL}, + {reinterpret_cast(&_SSL_GeometryData_default_instance_), NULL}, +}; namespace { -GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); -inline void protobuf_AssignDescriptorsOnce() { - ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, - &protobuf_AssignDesc_messages_5frobocup_5fssl_5fgeometry_2eproto); +void protobuf_AssignDescriptors() { + protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto(); + ::google::protobuf::MessageFactory* factory = NULL; + AssignDescriptors( + "messages_robocup_ssl_geometry.proto", schemas, file_default_instances, protobuf_Offsets_messages_5frobocup_5fssl_5fgeometry_2eproto(), factory, + file_level_metadata, NULL, NULL); +} + +void protobuf_AssignDescriptorsOnce() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); } +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - Vector2f_descriptor_, &Vector2f::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - SSL_FieldLineSegment_descriptor_, &SSL_FieldLineSegment::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - SSL_FieldCicularArc_descriptor_, &SSL_FieldCicularArc::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - SSL_GeometryFieldSize_descriptor_, &SSL_GeometryFieldSize::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - SSL_GeometryCameraCalibration_descriptor_, &SSL_GeometryCameraCalibration::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - SSL_GeometryData_descriptor_, &SSL_GeometryData::default_instance()); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 6); } } // namespace void protobuf_ShutdownFile_messages_5frobocup_5fssl_5fgeometry_2eproto() { - delete Vector2f::default_instance_; - delete Vector2f_reflection_; - delete SSL_FieldLineSegment::default_instance_; - delete SSL_FieldLineSegment_reflection_; - delete SSL_FieldCicularArc::default_instance_; - delete SSL_FieldCicularArc_reflection_; - delete SSL_GeometryFieldSize::default_instance_; - delete SSL_GeometryFieldSize_reflection_; - delete SSL_GeometryCameraCalibration::default_instance_; - delete SSL_GeometryCameraCalibration_reflection_; - delete SSL_GeometryData::default_instance_; - delete SSL_GeometryData_reflection_; -} - -void protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto() { - static bool already_here = false; - if (already_here) return; - already_here = true; + _Vector2f_default_instance_.Shutdown(); + delete file_level_metadata[0].reflection; + _SSL_FieldLineSegment_default_instance_.Shutdown(); + delete file_level_metadata[1].reflection; + _SSL_FieldCicularArc_default_instance_.Shutdown(); + delete file_level_metadata[2].reflection; + _SSL_GeometryFieldSize_default_instance_.Shutdown(); + delete file_level_metadata[3].reflection; + _SSL_GeometryCameraCalibration_default_instance_.Shutdown(); + delete file_level_metadata[4].reflection; + _SSL_GeometryData_default_instance_.Shutdown(); + delete file_level_metadata[5].reflection; +} + +void protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_2eproto_impl() { GOOGLE_PROTOBUF_VERIFY_VERSION; + ::google::protobuf::internal::InitProtobufDefaults(); + _Vector2f_default_instance_.DefaultConstruct(); + _SSL_FieldLineSegment_default_instance_.DefaultConstruct(); + _SSL_FieldCicularArc_default_instance_.DefaultConstruct(); + _SSL_GeometryFieldSize_default_instance_.DefaultConstruct(); + _SSL_GeometryCameraCalibration_default_instance_.DefaultConstruct(); + _SSL_GeometryData_default_instance_.DefaultConstruct(); + _SSL_FieldLineSegment_default_instance_.get_mutable()->p1_ = const_cast< ::Vector2f*>( + ::Vector2f::internal_default_instance()); + _SSL_FieldLineSegment_default_instance_.get_mutable()->p2_ = const_cast< ::Vector2f*>( + ::Vector2f::internal_default_instance()); + _SSL_FieldCicularArc_default_instance_.get_mutable()->center_ = const_cast< ::Vector2f*>( + ::Vector2f::internal_default_instance()); + _SSL_GeometryData_default_instance_.get_mutable()->field_ = const_cast< ::SSL_GeometryFieldSize*>( + ::SSL_GeometryFieldSize::internal_default_instance()); +} + +void protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_2eproto() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_2eproto_impl); +} +void protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto_impl() { + protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_2eproto(); + static const char descriptor[] = { + "\n#messages_robocup_ssl_geometry.proto\" \n" + "\010Vector2f\022\t\n\001x\030\001 \002(\002\022\t\n\001y\030\002 \002(\002\"e\n\024SSL_F" + "ieldLineSegment\022\014\n\004name\030\001 \002(\t\022\025\n\002p1\030\002 \002(" + "\0132\t.Vector2f\022\025\n\002p2\030\003 \002(\0132\t.Vector2f\022\021\n\tt" + "hickness\030\004 \002(\002\"y\n\023SSL_FieldCicularArc\022\014\n" + "\004name\030\001 \002(\t\022\031\n\006center\030\002 \002(\0132\t.Vector2f\022\016" + "\n\006radius\030\003 \002(\002\022\n\n\002a1\030\004 \002(\002\022\n\n\002a2\030\005 \002(\002\022\021" + "\n\tthickness\030\006 \002(\002\"\330\001\n\025SSL_GeometryFieldS" + "ize\022\024\n\014field_length\030\001 \002(\005\022\023\n\013field_width" + "\030\002 \002(\005\022\022\n\ngoal_width\030\003 \002(\005\022\022\n\ngoal_depth" + "\030\004 \002(\005\022\026\n\016boundary_width\030\005 \002(\005\022*\n\013field_" + "lines\030\006 \003(\0132\025.SSL_FieldLineSegment\022(\n\nfi" + "eld_arcs\030\007 \003(\0132\024.SSL_FieldCicularArc\"\311\002\n" + "\035SSL_GeometryCameraCalibration\022\021\n\tcamera" + "_id\030\001 \002(\r\022\024\n\014focal_length\030\002 \002(\002\022\031\n\021princ" + "ipal_point_x\030\003 \002(\002\022\031\n\021principal_point_y\030" + "\004 \002(\002\022\022\n\ndistortion\030\005 \002(\002\022\n\n\002q0\030\006 \002(\002\022\n\n" + "\002q1\030\007 \002(\002\022\n\n\002q2\030\010 \002(\002\022\n\n\002q3\030\t \002(\002\022\n\n\002tx\030" + "\n \002(\002\022\n\n\002ty\030\013 \002(\002\022\n\n\002tz\030\014 \002(\002\022\037\n\027derived" + "_camera_world_tx\030\r \001(\002\022\037\n\027derived_camera" + "_world_ty\030\016 \001(\002\022\037\n\027derived_camera_world_" + "tz\030\017 \001(\002\"h\n\020SSL_GeometryData\022%\n\005field\030\001 " + "\002(\0132\026.SSL_GeometryFieldSize\022-\n\005calib\030\002 \003" + "(\0132\036.SSL_GeometryCameraCalibration" + }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - "\n#messages_robocup_ssl_geometry.proto\" \n" - "\010Vector2f\022\t\n\001x\030\001 \002(\002\022\t\n\001y\030\002 \002(\002\"e\n\024SSL_F" - "ieldLineSegment\022\014\n\004name\030\001 \002(\t\022\025\n\002p1\030\002 \002(" - "\0132\t.Vector2f\022\025\n\002p2\030\003 \002(\0132\t.Vector2f\022\021\n\tt" - "hickness\030\004 \002(\002\"y\n\023SSL_FieldCicularArc\022\014\n" - "\004name\030\001 \002(\t\022\031\n\006center\030\002 \002(\0132\t.Vector2f\022\016" - "\n\006radius\030\003 \002(\002\022\n\n\002a1\030\004 \002(\002\022\n\n\002a2\030\005 \002(\002\022\021" - "\n\tthickness\030\006 \002(\002\"\330\001\n\025SSL_GeometryFieldS" - "ize\022\024\n\014field_length\030\001 \002(\005\022\023\n\013field_width" - "\030\002 \002(\005\022\022\n\ngoal_width\030\003 \002(\005\022\022\n\ngoal_depth" - "\030\004 \002(\005\022\026\n\016boundary_width\030\005 \002(\005\022*\n\013field_" - "lines\030\006 \003(\0132\025.SSL_FieldLineSegment\022(\n\nfi" - "eld_arcs\030\007 \003(\0132\024.SSL_FieldCicularArc\"\311\002\n" - "\035SSL_GeometryCameraCalibration\022\021\n\tcamera" - "_id\030\001 \002(\r\022\024\n\014focal_length\030\002 \002(\002\022\031\n\021princ" - "ipal_point_x\030\003 \002(\002\022\031\n\021principal_point_y\030" - "\004 \002(\002\022\022\n\ndistortion\030\005 \002(\002\022\n\n\002q0\030\006 \002(\002\022\n\n" - "\002q1\030\007 \002(\002\022\n\n\002q2\030\010 \002(\002\022\n\n\002q3\030\t \002(\002\022\n\n\002tx\030" - "\n \002(\002\022\n\n\002ty\030\013 \002(\002\022\n\n\002tz\030\014 \002(\002\022\037\n\027derived" - "_camera_world_tx\030\r \001(\002\022\037\n\027derived_camera" - "_world_ty\030\016 \001(\002\022\037\n\027derived_camera_world_" - "tz\030\017 \001(\002\"h\n\020SSL_GeometryData\022%\n\005field\030\001 " - "\002(\0132\026.SSL_GeometryFieldSize\022-\n\005calib\030\002 \003" - "(\0132\036.SSL_GeometryCameraCalibration", 954); + descriptor, 954); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "messages_robocup_ssl_geometry.proto", &protobuf_RegisterTypes); - Vector2f::default_instance_ = new Vector2f(); - SSL_FieldLineSegment::default_instance_ = new SSL_FieldLineSegment(); - SSL_FieldCicularArc::default_instance_ = new SSL_FieldCicularArc(); - SSL_GeometryFieldSize::default_instance_ = new SSL_GeometryFieldSize(); - SSL_GeometryCameraCalibration::default_instance_ = new SSL_GeometryCameraCalibration(); - SSL_GeometryData::default_instance_ = new SSL_GeometryData(); - Vector2f::default_instance_->InitAsDefaultInstance(); - SSL_FieldLineSegment::default_instance_->InitAsDefaultInstance(); - SSL_FieldCicularArc::default_instance_->InitAsDefaultInstance(); - SSL_GeometryFieldSize::default_instance_->InitAsDefaultInstance(); - SSL_GeometryCameraCalibration::default_instance_->InitAsDefaultInstance(); - SSL_GeometryData::default_instance_->InitAsDefaultInstance(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_messages_5frobocup_5fssl_5fgeometry_2eproto); } +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto_once_); +void protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto_once_, + &protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto_impl); +} // Force AddDescriptors() to be called at static initialization time. struct StaticDescriptorInitializer_messages_5frobocup_5fssl_5fgeometry_2eproto { StaticDescriptorInitializer_messages_5frobocup_5fssl_5fgeometry_2eproto() { @@ -266,39 +268,43 @@ struct StaticDescriptorInitializer_messages_5frobocup_5fssl_5fgeometry_2eproto { // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int Vector2f::kXFieldNumber; const int Vector2f::kYFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 Vector2f::Vector2f() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:Vector2f) } - -void Vector2f::InitAsDefaultInstance() { -} - Vector2f::Vector2f(const Vector2f& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::memcpy(&x_, &from.x_, + reinterpret_cast(&y_) - + reinterpret_cast(&x_) + sizeof(y_)); + // @@protoc_insertion_point(copy_constructor:Vector2f) } void Vector2f::SharedCtor() { _cached_size_ = 0; - x_ = 0; - y_ = 0; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); + ::memset(&x_, 0, reinterpret_cast(&y_) - + reinterpret_cast(&x_) + sizeof(y_)); } Vector2f::~Vector2f() { + // @@protoc_insertion_point(destructor:Vector2f) SharedDtor(); } void Vector2f::SharedDtor() { - if (this != default_instance_) { - } } void Vector2f::SetCachedSize(int size) const { @@ -308,71 +314,74 @@ void Vector2f::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* Vector2f::descriptor() { protobuf_AssignDescriptorsOnce(); - return Vector2f_descriptor_; + return file_level_metadata[0].descriptor; } const Vector2f& Vector2f::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto(); - return *default_instance_; + protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_2eproto(); + return *internal_default_instance(); } -Vector2f* Vector2f::default_instance_ = NULL; - -Vector2f* Vector2f::New() const { - return new Vector2f; +Vector2f* Vector2f::New(::google::protobuf::Arena* arena) const { + Vector2f* n = new Vector2f; + if (arena != NULL) { + arena->Own(n); + } + return n; } void Vector2f::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - x_ = 0; - y_ = 0; +// @@protoc_insertion_point(message_clear_start:Vector2f) + if (_has_bits_[0 / 32] & 3u) { + ::memset(&x_, 0, reinterpret_cast(&y_) - + reinterpret_cast(&x_) + sizeof(y_)); } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool Vector2f::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:Vector2f) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required float x = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { + if (tag == 13u) { + set_has_x(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &x_))); - set_has_x(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(21)) goto parse_y; break; } // required float y = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_y: + if (tag == 21u) { + set_has_y(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &y_))); - set_has_y(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectAtEnd()) return true; break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -380,12 +389,18 @@ bool Vector2f::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:Vector2f) return true; +failure: + // @@protoc_insertion_point(parse_failure:Vector2f) + return false; #undef DO_ } void Vector2f::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:Vector2f) // required float x = 1; if (has_x()) { ::google::protobuf::internal::WireFormatLite::WriteFloat(1, this->x(), output); @@ -396,14 +411,17 @@ void Vector2f::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->y(), output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:Vector2f) } -::google::protobuf::uint8* Vector2f::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* Vector2f::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:Vector2f) // required float x = 1; if (has_x()) { target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(1, this->x(), target); @@ -414,54 +432,76 @@ ::google::protobuf::uint8* Vector2f::SerializeWithCachedSizesToArray( target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->y(), target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:Vector2f) return target; } -int Vector2f::ByteSize() const { - int total_size = 0; +size_t Vector2f::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:Vector2f) + size_t total_size = 0; - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_x()) { // required float x = 1; - if (has_x()) { - total_size += 1 + 4; - } + total_size += 1 + 4; + } + if (has_y()) { // required float y = 2; - if (has_y()) { - total_size += 1 + 4; - } - + total_size += 1 + 4; } - if (!unknown_fields().empty()) { + + return total_size; +} +size_t Vector2f::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Vector2f) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( unknown_fields()); } + if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present. + // required float x = 1; + total_size += 1 + 4; + + // required float y = 2; + total_size += 1 + 4; + + } else { + total_size += RequiredFieldsByteSizeFallback(); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void Vector2f::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:Vector2f) + GOOGLE_DCHECK_NE(&from, this); const Vector2f* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Vector2f) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Vector2f) MergeFrom(*source); } } void Vector2f::MergeFrom(const Vector2f& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { +// @@protoc_insertion_point(class_specific_merge_from_start:Vector2f) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._has_bits_[0 / 32] & 3u) { if (from.has_x()) { set_x(from.x()); } @@ -469,16 +509,17 @@ void Vector2f::MergeFrom(const Vector2f& from) { set_y(from.y()); } } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void Vector2f::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Vector2f) if (&from == this) return; Clear(); MergeFrom(from); } void Vector2f::CopyFrom(const Vector2f& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Vector2f) if (&from == this) return; Clear(); MergeFrom(from); @@ -486,73 +527,138 @@ void Vector2f::CopyFrom(const Vector2f& from) { bool Vector2f::IsInitialized() const { if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; - return true; } void Vector2f::Swap(Vector2f* other) { - if (other != this) { - std::swap(x_, other->x_); - std::swap(y_, other->y_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void Vector2f::InternalSwap(Vector2f* other) { + std::swap(x_, other->x_); + std::swap(y_, other->y_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata Vector2f::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = Vector2f_descriptor_; - metadata.reflection = Vector2f_reflection_; - return metadata; + return file_level_metadata[0]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// Vector2f + +// required float x = 1; +bool Vector2f::has_x() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void Vector2f::set_has_x() { + _has_bits_[0] |= 0x00000001u; +} +void Vector2f::clear_has_x() { + _has_bits_[0] &= ~0x00000001u; +} +void Vector2f::clear_x() { + x_ = 0; + clear_has_x(); +} +float Vector2f::x() const { + // @@protoc_insertion_point(field_get:Vector2f.x) + return x_; +} +void Vector2f::set_x(float value) { + set_has_x(); + x_ = value; + // @@protoc_insertion_point(field_set:Vector2f.x) +} + +// required float y = 2; +bool Vector2f::has_y() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +void Vector2f::set_has_y() { + _has_bits_[0] |= 0x00000002u; +} +void Vector2f::clear_has_y() { + _has_bits_[0] &= ~0x00000002u; +} +void Vector2f::clear_y() { + y_ = 0; + clear_has_y(); +} +float Vector2f::y() const { + // @@protoc_insertion_point(field_get:Vector2f.y) + return y_; +} +void Vector2f::set_y(float value) { + set_has_y(); + y_ = value; + // @@protoc_insertion_point(field_set:Vector2f.y) } +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int SSL_FieldLineSegment::kNameFieldNumber; const int SSL_FieldLineSegment::kP1FieldNumber; const int SSL_FieldLineSegment::kP2FieldNumber; const int SSL_FieldLineSegment::kThicknessFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 SSL_FieldLineSegment::SSL_FieldLineSegment() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:SSL_FieldLineSegment) } - -void SSL_FieldLineSegment::InitAsDefaultInstance() { - p1_ = const_cast< ::Vector2f*>(&::Vector2f::default_instance()); - p2_ = const_cast< ::Vector2f*>(&::Vector2f::default_instance()); -} - SSL_FieldLineSegment::SSL_FieldLineSegment(const SSL_FieldLineSegment& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.has_name()) { + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } + if (from.has_p1()) { + p1_ = new ::Vector2f(*from.p1_); + } else { + p1_ = NULL; + } + if (from.has_p2()) { + p2_ = new ::Vector2f(*from.p2_); + } else { + p2_ = NULL; + } + thickness_ = from.thickness_; + // @@protoc_insertion_point(copy_constructor:SSL_FieldLineSegment) } void SSL_FieldLineSegment::SharedCtor() { _cached_size_ = 0; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - p1_ = NULL; - p2_ = NULL; - thickness_ = 0; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::memset(&p1_, 0, reinterpret_cast(&thickness_) - + reinterpret_cast(&p1_) + sizeof(thickness_)); } SSL_FieldLineSegment::~SSL_FieldLineSegment() { + // @@protoc_insertion_point(destructor:SSL_FieldLineSegment) SharedDtor(); } void SSL_FieldLineSegment::SharedDtor() { - if (name_ != &::google::protobuf::internal::kEmptyString) { - delete name_; - } - if (this != default_instance_) { + name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) { delete p1_; + } + if (this != internal_default_instance()) { delete p2_; } } @@ -564,110 +670,109 @@ void SSL_FieldLineSegment::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* SSL_FieldLineSegment::descriptor() { protobuf_AssignDescriptorsOnce(); - return SSL_FieldLineSegment_descriptor_; + return file_level_metadata[1].descriptor; } const SSL_FieldLineSegment& SSL_FieldLineSegment::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto(); - return *default_instance_; + protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_2eproto(); + return *internal_default_instance(); } -SSL_FieldLineSegment* SSL_FieldLineSegment::default_instance_ = NULL; - -SSL_FieldLineSegment* SSL_FieldLineSegment::New() const { - return new SSL_FieldLineSegment; +SSL_FieldLineSegment* SSL_FieldLineSegment::New(::google::protobuf::Arena* arena) const { + SSL_FieldLineSegment* n = new SSL_FieldLineSegment; + if (arena != NULL) { + arena->Own(n); + } + return n; } void SSL_FieldLineSegment::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { +// @@protoc_insertion_point(message_clear_start:SSL_FieldLineSegment) + if (_has_bits_[0 / 32] & 7u) { if (has_name()) { - if (name_ != &::google::protobuf::internal::kEmptyString) { - name_->clear(); - } + GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); + (*name_.UnsafeRawStringPointer())->clear(); } if (has_p1()) { - if (p1_ != NULL) p1_->::Vector2f::Clear(); + GOOGLE_DCHECK(p1_ != NULL); + p1_->::Vector2f::Clear(); } if (has_p2()) { - if (p2_ != NULL) p2_->::Vector2f::Clear(); + GOOGLE_DCHECK(p2_ != NULL); + p2_->::Vector2f::Clear(); } - thickness_ = 0; } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + thickness_ = 0; + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool SSL_FieldLineSegment::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:SSL_FieldLineSegment) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required string name = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + if (tag == 10u) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::PARSE); + ::google::protobuf::internal::WireFormat::PARSE, + "SSL_FieldLineSegment.name"); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(18)) goto parse_p1; break; } // required .Vector2f p1 = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_p1: + if (tag == 18u) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_p1())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(26)) goto parse_p2; break; } // required .Vector2f p2 = 3; case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_p2: + if (tag == 26u) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_p2())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(37)) goto parse_thickness; break; } // required float thickness = 4; case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_thickness: + if (tag == 37u) { + set_has_thickness(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &thickness_))); - set_has_thickness(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectAtEnd()) return true; break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -675,31 +780,38 @@ bool SSL_FieldLineSegment::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:SSL_FieldLineSegment) return true; +failure: + // @@protoc_insertion_point(parse_failure:SSL_FieldLineSegment) + return false; #undef DO_ } void SSL_FieldLineSegment::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:SSL_FieldLineSegment) // required string name = 1; if (has_name()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( + ::google::protobuf::internal::WireFormat::SERIALIZE, + "SSL_FieldLineSegment.name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); } // required .Vector2f p1 = 2; if (has_p1()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, this->p1(), output); + 2, *this->p1_, output); } // required .Vector2f p2 = 3; if (has_p2()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, this->p2(), output); + 3, *this->p2_, output); } // required float thickness = 4; @@ -707,19 +819,23 @@ void SSL_FieldLineSegment::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteFloat(4, this->thickness(), output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:SSL_FieldLineSegment) } -::google::protobuf::uint8* SSL_FieldLineSegment::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* SSL_FieldLineSegment::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:SSL_FieldLineSegment) // required string name = 1; if (has_name()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormat::SERIALIZE, + "SSL_FieldLineSegment.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->name(), target); @@ -728,15 +844,15 @@ ::google::protobuf::uint8* SSL_FieldLineSegment::SerializeWithCachedSizesToArray // required .Vector2f p1 = 2; if (has_p1()) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 2, this->p1(), target); + InternalWriteMessageNoVirtualToArray( + 2, *this->p1_, false, target); } // required .Vector2f p2 = 3; if (has_p2()) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 3, this->p2(), target); + InternalWriteMessageNoVirtualToArray( + 3, *this->p2_, false, target); } // required float thickness = 4; @@ -744,72 +860,107 @@ ::google::protobuf::uint8* SSL_FieldLineSegment::SerializeWithCachedSizesToArray target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(4, this->thickness(), target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:SSL_FieldLineSegment) return target; } -int SSL_FieldLineSegment::ByteSize() const { - int total_size = 0; +size_t SSL_FieldLineSegment::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:SSL_FieldLineSegment) + size_t total_size = 0; - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_name()) { // required string name = 1; - if (has_name()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->name()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + if (has_p1()) { // required .Vector2f p1 = 2; - if (has_p1()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->p1()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->p1_); + } + if (has_p2()) { // required .Vector2f p2 = 3; - if (has_p2()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->p2()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->p2_); + } + if (has_thickness()) { // required float thickness = 4; - if (has_thickness()) { - total_size += 1 + 4; - } - + total_size += 1 + 4; } - if (!unknown_fields().empty()) { + + return total_size; +} +size_t SSL_FieldLineSegment::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:SSL_FieldLineSegment) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( unknown_fields()); } + if (((_has_bits_[0] & 0x0000000f) ^ 0x0000000f) == 0) { // All required fields are present. + // required string name = 1; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + + // required .Vector2f p1 = 2; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->p1_); + + // required .Vector2f p2 = 3; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->p2_); + + // required float thickness = 4; + total_size += 1 + 4; + + } else { + total_size += RequiredFieldsByteSizeFallback(); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void SSL_FieldLineSegment::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:SSL_FieldLineSegment) + GOOGLE_DCHECK_NE(&from, this); const SSL_FieldLineSegment* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:SSL_FieldLineSegment) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:SSL_FieldLineSegment) MergeFrom(*source); } } void SSL_FieldLineSegment::MergeFrom(const SSL_FieldLineSegment& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { +// @@protoc_insertion_point(class_specific_merge_from_start:SSL_FieldLineSegment) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._has_bits_[0 / 32] & 15u) { if (from.has_name()) { - set_name(from.name()); + set_has_name(); + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } if (from.has_p1()) { mutable_p1()->::Vector2f::MergeFrom(from.p1()); @@ -821,16 +972,17 @@ void SSL_FieldLineSegment::MergeFrom(const SSL_FieldLineSegment& from) { set_thickness(from.thickness()); } } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void SSL_FieldLineSegment::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:SSL_FieldLineSegment) if (&from == this) return; Clear(); MergeFrom(from); } void SSL_FieldLineSegment::CopyFrom(const SSL_FieldLineSegment& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:SSL_FieldLineSegment) if (&from == this) return; Clear(); MergeFrom(from); @@ -838,83 +990,270 @@ void SSL_FieldLineSegment::CopyFrom(const SSL_FieldLineSegment& from) { bool SSL_FieldLineSegment::IsInitialized() const { if ((_has_bits_[0] & 0x0000000f) != 0x0000000f) return false; - if (has_p1()) { - if (!this->p1().IsInitialized()) return false; + if (!this->p1_->IsInitialized()) return false; } if (has_p2()) { - if (!this->p2().IsInitialized()) return false; + if (!this->p2_->IsInitialized()) return false; } return true; } void SSL_FieldLineSegment::Swap(SSL_FieldLineSegment* other) { - if (other != this) { - std::swap(name_, other->name_); - std::swap(p1_, other->p1_); - std::swap(p2_, other->p2_); - std::swap(thickness_, other->thickness_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void SSL_FieldLineSegment::InternalSwap(SSL_FieldLineSegment* other) { + name_.Swap(&other->name_); + std::swap(p1_, other->p1_); + std::swap(p2_, other->p2_); + std::swap(thickness_, other->thickness_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata SSL_FieldLineSegment::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = SSL_FieldLineSegment_descriptor_; - metadata.reflection = SSL_FieldLineSegment_reflection_; - return metadata; + return file_level_metadata[1]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// SSL_FieldLineSegment + +// required string name = 1; +bool SSL_FieldLineSegment::has_name() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void SSL_FieldLineSegment::set_has_name() { + _has_bits_[0] |= 0x00000001u; +} +void SSL_FieldLineSegment::clear_has_name() { + _has_bits_[0] &= ~0x00000001u; +} +void SSL_FieldLineSegment::clear_name() { + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_name(); +} +const ::std::string& SSL_FieldLineSegment::name() const { + // @@protoc_insertion_point(field_get:SSL_FieldLineSegment.name) + return name_.GetNoArena(); +} +void SSL_FieldLineSegment::set_name(const ::std::string& value) { + set_has_name(); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:SSL_FieldLineSegment.name) +} +#if LANG_CXX11 +void SSL_FieldLineSegment::set_name(::std::string&& value) { + set_has_name(); + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:SSL_FieldLineSegment.name) +} +#endif +void SSL_FieldLineSegment::set_name(const char* value) { + set_has_name(); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:SSL_FieldLineSegment.name) +} +void SSL_FieldLineSegment::set_name(const char* value, size_t size) { + set_has_name(); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:SSL_FieldLineSegment.name) +} +::std::string* SSL_FieldLineSegment::mutable_name() { + set_has_name(); + // @@protoc_insertion_point(field_mutable:SSL_FieldLineSegment.name) + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +::std::string* SSL_FieldLineSegment::release_name() { + // @@protoc_insertion_point(field_release:SSL_FieldLineSegment.name) + clear_has_name(); + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void SSL_FieldLineSegment::set_allocated_name(::std::string* name) { + if (name != NULL) { + set_has_name(); + } else { + clear_has_name(); + } + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + // @@protoc_insertion_point(field_set_allocated:SSL_FieldLineSegment.name) +} + +// required .Vector2f p1 = 2; +bool SSL_FieldLineSegment::has_p1() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +void SSL_FieldLineSegment::set_has_p1() { + _has_bits_[0] |= 0x00000002u; +} +void SSL_FieldLineSegment::clear_has_p1() { + _has_bits_[0] &= ~0x00000002u; +} +void SSL_FieldLineSegment::clear_p1() { + if (p1_ != NULL) p1_->::Vector2f::Clear(); + clear_has_p1(); +} +const ::Vector2f& SSL_FieldLineSegment::p1() const { + // @@protoc_insertion_point(field_get:SSL_FieldLineSegment.p1) + return p1_ != NULL ? *p1_ + : *::Vector2f::internal_default_instance(); +} +::Vector2f* SSL_FieldLineSegment::mutable_p1() { + set_has_p1(); + if (p1_ == NULL) { + p1_ = new ::Vector2f; + } + // @@protoc_insertion_point(field_mutable:SSL_FieldLineSegment.p1) + return p1_; +} +::Vector2f* SSL_FieldLineSegment::release_p1() { + // @@protoc_insertion_point(field_release:SSL_FieldLineSegment.p1) + clear_has_p1(); + ::Vector2f* temp = p1_; + p1_ = NULL; + return temp; +} +void SSL_FieldLineSegment::set_allocated_p1(::Vector2f* p1) { + delete p1_; + p1_ = p1; + if (p1) { + set_has_p1(); + } else { + clear_has_p1(); + } + // @@protoc_insertion_point(field_set_allocated:SSL_FieldLineSegment.p1) +} + +// required .Vector2f p2 = 3; +bool SSL_FieldLineSegment::has_p2() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +void SSL_FieldLineSegment::set_has_p2() { + _has_bits_[0] |= 0x00000004u; +} +void SSL_FieldLineSegment::clear_has_p2() { + _has_bits_[0] &= ~0x00000004u; +} +void SSL_FieldLineSegment::clear_p2() { + if (p2_ != NULL) p2_->::Vector2f::Clear(); + clear_has_p2(); +} +const ::Vector2f& SSL_FieldLineSegment::p2() const { + // @@protoc_insertion_point(field_get:SSL_FieldLineSegment.p2) + return p2_ != NULL ? *p2_ + : *::Vector2f::internal_default_instance(); +} +::Vector2f* SSL_FieldLineSegment::mutable_p2() { + set_has_p2(); + if (p2_ == NULL) { + p2_ = new ::Vector2f; + } + // @@protoc_insertion_point(field_mutable:SSL_FieldLineSegment.p2) + return p2_; +} +::Vector2f* SSL_FieldLineSegment::release_p2() { + // @@protoc_insertion_point(field_release:SSL_FieldLineSegment.p2) + clear_has_p2(); + ::Vector2f* temp = p2_; + p2_ = NULL; + return temp; +} +void SSL_FieldLineSegment::set_allocated_p2(::Vector2f* p2) { + delete p2_; + p2_ = p2; + if (p2) { + set_has_p2(); + } else { + clear_has_p2(); + } + // @@protoc_insertion_point(field_set_allocated:SSL_FieldLineSegment.p2) +} + +// required float thickness = 4; +bool SSL_FieldLineSegment::has_thickness() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +void SSL_FieldLineSegment::set_has_thickness() { + _has_bits_[0] |= 0x00000008u; +} +void SSL_FieldLineSegment::clear_has_thickness() { + _has_bits_[0] &= ~0x00000008u; +} +void SSL_FieldLineSegment::clear_thickness() { + thickness_ = 0; + clear_has_thickness(); +} +float SSL_FieldLineSegment::thickness() const { + // @@protoc_insertion_point(field_get:SSL_FieldLineSegment.thickness) + return thickness_; +} +void SSL_FieldLineSegment::set_thickness(float value) { + set_has_thickness(); + thickness_ = value; + // @@protoc_insertion_point(field_set:SSL_FieldLineSegment.thickness) } +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int SSL_FieldCicularArc::kNameFieldNumber; const int SSL_FieldCicularArc::kCenterFieldNumber; const int SSL_FieldCicularArc::kRadiusFieldNumber; const int SSL_FieldCicularArc::kA1FieldNumber; const int SSL_FieldCicularArc::kA2FieldNumber; const int SSL_FieldCicularArc::kThicknessFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 SSL_FieldCicularArc::SSL_FieldCicularArc() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:SSL_FieldCicularArc) } - -void SSL_FieldCicularArc::InitAsDefaultInstance() { - center_ = const_cast< ::Vector2f*>(&::Vector2f::default_instance()); -} - SSL_FieldCicularArc::SSL_FieldCicularArc(const SSL_FieldCicularArc& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.has_name()) { + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } + if (from.has_center()) { + center_ = new ::Vector2f(*from.center_); + } else { + center_ = NULL; + } + ::memcpy(&radius_, &from.radius_, + reinterpret_cast(&thickness_) - + reinterpret_cast(&radius_) + sizeof(thickness_)); + // @@protoc_insertion_point(copy_constructor:SSL_FieldCicularArc) } void SSL_FieldCicularArc::SharedCtor() { _cached_size_ = 0; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - center_ = NULL; - radius_ = 0; - a1_ = 0; - a2_ = 0; - thickness_ = 0; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::memset(¢er_, 0, reinterpret_cast(&thickness_) - + reinterpret_cast(¢er_) + sizeof(thickness_)); } SSL_FieldCicularArc::~SSL_FieldCicularArc() { + // @@protoc_insertion_point(destructor:SSL_FieldCicularArc) SharedDtor(); } void SSL_FieldCicularArc::SharedDtor() { - if (name_ != &::google::protobuf::internal::kEmptyString) { - delete name_; - } - if (this != default_instance_) { + name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) { delete center_; } } @@ -926,144 +1265,136 @@ void SSL_FieldCicularArc::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* SSL_FieldCicularArc::descriptor() { protobuf_AssignDescriptorsOnce(); - return SSL_FieldCicularArc_descriptor_; + return file_level_metadata[2].descriptor; } const SSL_FieldCicularArc& SSL_FieldCicularArc::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto(); - return *default_instance_; + protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_2eproto(); + return *internal_default_instance(); } -SSL_FieldCicularArc* SSL_FieldCicularArc::default_instance_ = NULL; - -SSL_FieldCicularArc* SSL_FieldCicularArc::New() const { - return new SSL_FieldCicularArc; +SSL_FieldCicularArc* SSL_FieldCicularArc::New(::google::protobuf::Arena* arena) const { + SSL_FieldCicularArc* n = new SSL_FieldCicularArc; + if (arena != NULL) { + arena->Own(n); + } + return n; } void SSL_FieldCicularArc::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { +// @@protoc_insertion_point(message_clear_start:SSL_FieldCicularArc) + if (_has_bits_[0 / 32] & 3u) { if (has_name()) { - if (name_ != &::google::protobuf::internal::kEmptyString) { - name_->clear(); - } + GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); + (*name_.UnsafeRawStringPointer())->clear(); } if (has_center()) { - if (center_ != NULL) center_->::Vector2f::Clear(); + GOOGLE_DCHECK(center_ != NULL); + center_->::Vector2f::Clear(); } - radius_ = 0; - a1_ = 0; - a2_ = 0; - thickness_ = 0; } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + if (_has_bits_[0 / 32] & 60u) { + ::memset(&radius_, 0, reinterpret_cast(&thickness_) - + reinterpret_cast(&radius_) + sizeof(thickness_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool SSL_FieldCicularArc::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:SSL_FieldCicularArc) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required string name = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + if (tag == 10u) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::PARSE); + ::google::protobuf::internal::WireFormat::PARSE, + "SSL_FieldCicularArc.name"); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(18)) goto parse_center; break; } // required .Vector2f center = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_center: + if (tag == 18u) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_center())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(29)) goto parse_radius; break; } // required float radius = 3; case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_radius: + if (tag == 29u) { + set_has_radius(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &radius_))); - set_has_radius(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(37)) goto parse_a1; break; } // required float a1 = 4; case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_a1: + if (tag == 37u) { + set_has_a1(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &a1_))); - set_has_a1(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(45)) goto parse_a2; break; } // required float a2 = 5; case 5: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_a2: + if (tag == 45u) { + set_has_a2(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &a2_))); - set_has_a2(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(53)) goto parse_thickness; break; } // required float thickness = 6; case 6: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_thickness: + if (tag == 53u) { + set_has_thickness(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &thickness_))); - set_has_thickness(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectAtEnd()) return true; break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -1071,25 +1402,32 @@ bool SSL_FieldCicularArc::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:SSL_FieldCicularArc) return true; +failure: + // @@protoc_insertion_point(parse_failure:SSL_FieldCicularArc) + return false; #undef DO_ } void SSL_FieldCicularArc::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:SSL_FieldCicularArc) // required string name = 1; if (has_name()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( + ::google::protobuf::internal::WireFormat::SERIALIZE, + "SSL_FieldCicularArc.name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); } // required .Vector2f center = 2; if (has_center()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, this->center(), output); + 2, *this->center_, output); } // required float radius = 3; @@ -1112,19 +1450,23 @@ void SSL_FieldCicularArc::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteFloat(6, this->thickness(), output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:SSL_FieldCicularArc) } -::google::protobuf::uint8* SSL_FieldCicularArc::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* SSL_FieldCicularArc::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:SSL_FieldCicularArc) // required string name = 1; if (has_name()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormat::SERIALIZE, + "SSL_FieldCicularArc.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->name(), target); @@ -1133,8 +1475,8 @@ ::google::protobuf::uint8* SSL_FieldCicularArc::SerializeWithCachedSizesToArray( // required .Vector2f center = 2; if (has_center()) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 2, this->center(), target); + InternalWriteMessageNoVirtualToArray( + 2, *this->center_, false, target); } // required float radius = 3; @@ -1157,80 +1499,119 @@ ::google::protobuf::uint8* SSL_FieldCicularArc::SerializeWithCachedSizesToArray( target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(6, this->thickness(), target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:SSL_FieldCicularArc) return target; } -int SSL_FieldCicularArc::ByteSize() const { - int total_size = 0; +size_t SSL_FieldCicularArc::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:SSL_FieldCicularArc) + size_t total_size = 0; - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_name()) { // required string name = 1; - if (has_name()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->name()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + if (has_center()) { // required .Vector2f center = 2; - if (has_center()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->center()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->center_); + } + if (has_radius()) { // required float radius = 3; - if (has_radius()) { - total_size += 1 + 4; - } + total_size += 1 + 4; + } + if (has_a1()) { // required float a1 = 4; - if (has_a1()) { - total_size += 1 + 4; - } + total_size += 1 + 4; + } + if (has_a2()) { // required float a2 = 5; - if (has_a2()) { - total_size += 1 + 4; - } + total_size += 1 + 4; + } + if (has_thickness()) { // required float thickness = 6; - if (has_thickness()) { - total_size += 1 + 4; - } - + total_size += 1 + 4; } - if (!unknown_fields().empty()) { + + return total_size; +} +size_t SSL_FieldCicularArc::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:SSL_FieldCicularArc) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( unknown_fields()); } + if (((_has_bits_[0] & 0x0000003f) ^ 0x0000003f) == 0) { // All required fields are present. + // required string name = 1; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + + // required .Vector2f center = 2; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->center_); + + // required float radius = 3; + total_size += 1 + 4; + + // required float a1 = 4; + total_size += 1 + 4; + + // required float a2 = 5; + total_size += 1 + 4; + + // required float thickness = 6; + total_size += 1 + 4; + + } else { + total_size += RequiredFieldsByteSizeFallback(); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void SSL_FieldCicularArc::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:SSL_FieldCicularArc) + GOOGLE_DCHECK_NE(&from, this); const SSL_FieldCicularArc* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:SSL_FieldCicularArc) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:SSL_FieldCicularArc) MergeFrom(*source); } } void SSL_FieldCicularArc::MergeFrom(const SSL_FieldCicularArc& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { +// @@protoc_insertion_point(class_specific_merge_from_start:SSL_FieldCicularArc) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._has_bits_[0 / 32] & 63u) { if (from.has_name()) { - set_name(from.name()); + set_has_name(); + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } if (from.has_center()) { mutable_center()->::Vector2f::MergeFrom(from.center()); @@ -1248,16 +1629,17 @@ void SSL_FieldCicularArc::MergeFrom(const SSL_FieldCicularArc& from) { set_thickness(from.thickness()); } } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void SSL_FieldCicularArc::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:SSL_FieldCicularArc) if (&from == this) return; Clear(); MergeFrom(from); } void SSL_FieldCicularArc::CopyFrom(const SSL_FieldCicularArc& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:SSL_FieldCicularArc) if (&from == this) return; Clear(); MergeFrom(from); @@ -1265,79 +1647,287 @@ void SSL_FieldCicularArc::CopyFrom(const SSL_FieldCicularArc& from) { bool SSL_FieldCicularArc::IsInitialized() const { if ((_has_bits_[0] & 0x0000003f) != 0x0000003f) return false; - if (has_center()) { - if (!this->center().IsInitialized()) return false; + if (!this->center_->IsInitialized()) return false; } return true; } void SSL_FieldCicularArc::Swap(SSL_FieldCicularArc* other) { - if (other != this) { - std::swap(name_, other->name_); - std::swap(center_, other->center_); - std::swap(radius_, other->radius_); - std::swap(a1_, other->a1_); - std::swap(a2_, other->a2_); - std::swap(thickness_, other->thickness_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void SSL_FieldCicularArc::InternalSwap(SSL_FieldCicularArc* other) { + name_.Swap(&other->name_); + std::swap(center_, other->center_); + std::swap(radius_, other->radius_); + std::swap(a1_, other->a1_); + std::swap(a2_, other->a2_); + std::swap(thickness_, other->thickness_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata SSL_FieldCicularArc::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = SSL_FieldCicularArc_descriptor_; - metadata.reflection = SSL_FieldCicularArc_reflection_; - return metadata; + return file_level_metadata[2]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// SSL_FieldCicularArc + +// required string name = 1; +bool SSL_FieldCicularArc::has_name() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void SSL_FieldCicularArc::set_has_name() { + _has_bits_[0] |= 0x00000001u; +} +void SSL_FieldCicularArc::clear_has_name() { + _has_bits_[0] &= ~0x00000001u; +} +void SSL_FieldCicularArc::clear_name() { + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_name(); +} +const ::std::string& SSL_FieldCicularArc::name() const { + // @@protoc_insertion_point(field_get:SSL_FieldCicularArc.name) + return name_.GetNoArena(); +} +void SSL_FieldCicularArc::set_name(const ::std::string& value) { + set_has_name(); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:SSL_FieldCicularArc.name) +} +#if LANG_CXX11 +void SSL_FieldCicularArc::set_name(::std::string&& value) { + set_has_name(); + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:SSL_FieldCicularArc.name) +} +#endif +void SSL_FieldCicularArc::set_name(const char* value) { + set_has_name(); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:SSL_FieldCicularArc.name) +} +void SSL_FieldCicularArc::set_name(const char* value, size_t size) { + set_has_name(); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:SSL_FieldCicularArc.name) +} +::std::string* SSL_FieldCicularArc::mutable_name() { + set_has_name(); + // @@protoc_insertion_point(field_mutable:SSL_FieldCicularArc.name) + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +::std::string* SSL_FieldCicularArc::release_name() { + // @@protoc_insertion_point(field_release:SSL_FieldCicularArc.name) + clear_has_name(); + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void SSL_FieldCicularArc::set_allocated_name(::std::string* name) { + if (name != NULL) { + set_has_name(); + } else { + clear_has_name(); + } + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + // @@protoc_insertion_point(field_set_allocated:SSL_FieldCicularArc.name) } - -// =================================================================== - -#ifndef _MSC_VER -const int SSL_GeometryFieldSize::kFieldLengthFieldNumber; -const int SSL_GeometryFieldSize::kFieldWidthFieldNumber; -const int SSL_GeometryFieldSize::kGoalWidthFieldNumber; -const int SSL_GeometryFieldSize::kGoalDepthFieldNumber; -const int SSL_GeometryFieldSize::kBoundaryWidthFieldNumber; -const int SSL_GeometryFieldSize::kFieldLinesFieldNumber; -const int SSL_GeometryFieldSize::kFieldArcsFieldNumber; -#endif // !_MSC_VER - -SSL_GeometryFieldSize::SSL_GeometryFieldSize() - : ::google::protobuf::Message() { - SharedCtor(); +// required .Vector2f center = 2; +bool SSL_FieldCicularArc::has_center() const { + return (_has_bits_[0] & 0x00000002u) != 0; } - -void SSL_GeometryFieldSize::InitAsDefaultInstance() { +void SSL_FieldCicularArc::set_has_center() { + _has_bits_[0] |= 0x00000002u; } - -SSL_GeometryFieldSize::SSL_GeometryFieldSize(const SSL_GeometryFieldSize& from) - : ::google::protobuf::Message() { +void SSL_FieldCicularArc::clear_has_center() { + _has_bits_[0] &= ~0x00000002u; +} +void SSL_FieldCicularArc::clear_center() { + if (center_ != NULL) center_->::Vector2f::Clear(); + clear_has_center(); +} +const ::Vector2f& SSL_FieldCicularArc::center() const { + // @@protoc_insertion_point(field_get:SSL_FieldCicularArc.center) + return center_ != NULL ? *center_ + : *::Vector2f::internal_default_instance(); +} +::Vector2f* SSL_FieldCicularArc::mutable_center() { + set_has_center(); + if (center_ == NULL) { + center_ = new ::Vector2f; + } + // @@protoc_insertion_point(field_mutable:SSL_FieldCicularArc.center) + return center_; +} +::Vector2f* SSL_FieldCicularArc::release_center() { + // @@protoc_insertion_point(field_release:SSL_FieldCicularArc.center) + clear_has_center(); + ::Vector2f* temp = center_; + center_ = NULL; + return temp; +} +void SSL_FieldCicularArc::set_allocated_center(::Vector2f* center) { + delete center_; + center_ = center; + if (center) { + set_has_center(); + } else { + clear_has_center(); + } + // @@protoc_insertion_point(field_set_allocated:SSL_FieldCicularArc.center) +} + +// required float radius = 3; +bool SSL_FieldCicularArc::has_radius() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +void SSL_FieldCicularArc::set_has_radius() { + _has_bits_[0] |= 0x00000004u; +} +void SSL_FieldCicularArc::clear_has_radius() { + _has_bits_[0] &= ~0x00000004u; +} +void SSL_FieldCicularArc::clear_radius() { + radius_ = 0; + clear_has_radius(); +} +float SSL_FieldCicularArc::radius() const { + // @@protoc_insertion_point(field_get:SSL_FieldCicularArc.radius) + return radius_; +} +void SSL_FieldCicularArc::set_radius(float value) { + set_has_radius(); + radius_ = value; + // @@protoc_insertion_point(field_set:SSL_FieldCicularArc.radius) +} + +// required float a1 = 4; +bool SSL_FieldCicularArc::has_a1() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +void SSL_FieldCicularArc::set_has_a1() { + _has_bits_[0] |= 0x00000008u; +} +void SSL_FieldCicularArc::clear_has_a1() { + _has_bits_[0] &= ~0x00000008u; +} +void SSL_FieldCicularArc::clear_a1() { + a1_ = 0; + clear_has_a1(); +} +float SSL_FieldCicularArc::a1() const { + // @@protoc_insertion_point(field_get:SSL_FieldCicularArc.a1) + return a1_; +} +void SSL_FieldCicularArc::set_a1(float value) { + set_has_a1(); + a1_ = value; + // @@protoc_insertion_point(field_set:SSL_FieldCicularArc.a1) +} + +// required float a2 = 5; +bool SSL_FieldCicularArc::has_a2() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +void SSL_FieldCicularArc::set_has_a2() { + _has_bits_[0] |= 0x00000010u; +} +void SSL_FieldCicularArc::clear_has_a2() { + _has_bits_[0] &= ~0x00000010u; +} +void SSL_FieldCicularArc::clear_a2() { + a2_ = 0; + clear_has_a2(); +} +float SSL_FieldCicularArc::a2() const { + // @@protoc_insertion_point(field_get:SSL_FieldCicularArc.a2) + return a2_; +} +void SSL_FieldCicularArc::set_a2(float value) { + set_has_a2(); + a2_ = value; + // @@protoc_insertion_point(field_set:SSL_FieldCicularArc.a2) +} + +// required float thickness = 6; +bool SSL_FieldCicularArc::has_thickness() const { + return (_has_bits_[0] & 0x00000020u) != 0; +} +void SSL_FieldCicularArc::set_has_thickness() { + _has_bits_[0] |= 0x00000020u; +} +void SSL_FieldCicularArc::clear_has_thickness() { + _has_bits_[0] &= ~0x00000020u; +} +void SSL_FieldCicularArc::clear_thickness() { + thickness_ = 0; + clear_has_thickness(); +} +float SSL_FieldCicularArc::thickness() const { + // @@protoc_insertion_point(field_get:SSL_FieldCicularArc.thickness) + return thickness_; +} +void SSL_FieldCicularArc::set_thickness(float value) { + set_has_thickness(); + thickness_ = value; + // @@protoc_insertion_point(field_set:SSL_FieldCicularArc.thickness) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int SSL_GeometryFieldSize::kFieldLengthFieldNumber; +const int SSL_GeometryFieldSize::kFieldWidthFieldNumber; +const int SSL_GeometryFieldSize::kGoalWidthFieldNumber; +const int SSL_GeometryFieldSize::kGoalDepthFieldNumber; +const int SSL_GeometryFieldSize::kBoundaryWidthFieldNumber; +const int SSL_GeometryFieldSize::kFieldLinesFieldNumber; +const int SSL_GeometryFieldSize::kFieldArcsFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +SSL_GeometryFieldSize::SSL_GeometryFieldSize() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_2eproto(); + } SharedCtor(); - MergeFrom(from); + // @@protoc_insertion_point(constructor:SSL_GeometryFieldSize) +} +SSL_GeometryFieldSize::SSL_GeometryFieldSize(const SSL_GeometryFieldSize& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0), + field_lines_(from.field_lines_), + field_arcs_(from.field_arcs_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::memcpy(&field_length_, &from.field_length_, + reinterpret_cast(&boundary_width_) - + reinterpret_cast(&field_length_) + sizeof(boundary_width_)); + // @@protoc_insertion_point(copy_constructor:SSL_GeometryFieldSize) } void SSL_GeometryFieldSize::SharedCtor() { _cached_size_ = 0; - field_length_ = 0; - field_width_ = 0; - goal_width_ = 0; - goal_depth_ = 0; - boundary_width_ = 0; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); + ::memset(&field_length_, 0, reinterpret_cast(&boundary_width_) - + reinterpret_cast(&field_length_) + sizeof(boundary_width_)); } SSL_GeometryFieldSize::~SSL_GeometryFieldSize() { + // @@protoc_insertion_point(destructor:SSL_GeometryFieldSize) SharedDtor(); } void SSL_GeometryFieldSize::SharedDtor() { - if (this != default_instance_) { - } } void SSL_GeometryFieldSize::SetCachedSize(int size) const { @@ -1347,154 +1937,141 @@ void SSL_GeometryFieldSize::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* SSL_GeometryFieldSize::descriptor() { protobuf_AssignDescriptorsOnce(); - return SSL_GeometryFieldSize_descriptor_; + return file_level_metadata[3].descriptor; } const SSL_GeometryFieldSize& SSL_GeometryFieldSize::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto(); - return *default_instance_; + protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_2eproto(); + return *internal_default_instance(); } -SSL_GeometryFieldSize* SSL_GeometryFieldSize::default_instance_ = NULL; - -SSL_GeometryFieldSize* SSL_GeometryFieldSize::New() const { - return new SSL_GeometryFieldSize; +SSL_GeometryFieldSize* SSL_GeometryFieldSize::New(::google::protobuf::Arena* arena) const { + SSL_GeometryFieldSize* n = new SSL_GeometryFieldSize; + if (arena != NULL) { + arena->Own(n); + } + return n; } void SSL_GeometryFieldSize::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - field_length_ = 0; - field_width_ = 0; - goal_width_ = 0; - goal_depth_ = 0; - boundary_width_ = 0; - } +// @@protoc_insertion_point(message_clear_start:SSL_GeometryFieldSize) field_lines_.Clear(); field_arcs_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + if (_has_bits_[0 / 32] & 31u) { + ::memset(&field_length_, 0, reinterpret_cast(&boundary_width_) - + reinterpret_cast(&field_length_) + sizeof(boundary_width_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool SSL_GeometryFieldSize::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:SSL_GeometryFieldSize) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required int32 field_length = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + if (tag == 8u) { + set_has_field_length(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &field_length_))); - set_has_field_length(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(16)) goto parse_field_width; break; } // required int32 field_width = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_field_width: + if (tag == 16u) { + set_has_field_width(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &field_width_))); - set_has_field_width(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(24)) goto parse_goal_width; break; } // required int32 goal_width = 3; case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_goal_width: + if (tag == 24u) { + set_has_goal_width(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &goal_width_))); - set_has_goal_width(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(32)) goto parse_goal_depth; break; } // required int32 goal_depth = 4; case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_goal_depth: + if (tag == 32u) { + set_has_goal_depth(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &goal_depth_))); - set_has_goal_depth(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(40)) goto parse_boundary_width; break; } // required int32 boundary_width = 5; case 5: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_boundary_width: + if (tag == 40u) { + set_has_boundary_width(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &boundary_width_))); - set_has_boundary_width(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(50)) goto parse_field_lines; break; } // repeated .SSL_FieldLineSegment field_lines = 6; case 6: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_field_lines: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + if (tag == 50u) { + DO_(input->IncrementRecursionDepth()); + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( input, add_field_lines())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(50)) goto parse_field_lines; - if (input->ExpectTag(58)) goto parse_field_arcs; + input->UnsafeDecrementRecursionDepth(); break; } // repeated .SSL_FieldCicularArc field_arcs = 7; case 7: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_field_arcs: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + if (tag == 58u) { + DO_(input->IncrementRecursionDepth()); + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( input, add_field_arcs())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(58)) goto parse_field_arcs; - if (input->ExpectAtEnd()) return true; + input->UnsafeDecrementRecursionDepth(); break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -1502,12 +2079,18 @@ bool SSL_GeometryFieldSize::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:SSL_GeometryFieldSize) return true; +failure: + // @@protoc_insertion_point(parse_failure:SSL_GeometryFieldSize) + return false; #undef DO_ } void SSL_GeometryFieldSize::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:SSL_GeometryFieldSize) // required int32 field_length = 1; if (has_field_length()) { ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->field_length(), output); @@ -1534,25 +2117,28 @@ void SSL_GeometryFieldSize::SerializeWithCachedSizes( } // repeated .SSL_FieldLineSegment field_lines = 6; - for (int i = 0; i < this->field_lines_size(); i++) { + for (unsigned int i = 0, n = this->field_lines_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 6, this->field_lines(i), output); } // repeated .SSL_FieldCicularArc field_arcs = 7; - for (int i = 0; i < this->field_arcs_size(); i++) { + for (unsigned int i = 0, n = this->field_arcs_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 7, this->field_arcs(i), output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:SSL_GeometryFieldSize) } -::google::protobuf::uint8* SSL_GeometryFieldSize::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* SSL_GeometryFieldSize::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:SSL_GeometryFieldSize) // required int32 field_length = 1; if (has_field_length()) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->field_length(), target); @@ -1579,110 +2165,157 @@ ::google::protobuf::uint8* SSL_GeometryFieldSize::SerializeWithCachedSizesToArra } // repeated .SSL_FieldLineSegment field_lines = 6; - for (int i = 0; i < this->field_lines_size(); i++) { + for (unsigned int i = 0, n = this->field_lines_size(); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 6, this->field_lines(i), target); + InternalWriteMessageNoVirtualToArray( + 6, this->field_lines(i), false, target); } // repeated .SSL_FieldCicularArc field_arcs = 7; - for (int i = 0; i < this->field_arcs_size(); i++) { + for (unsigned int i = 0, n = this->field_arcs_size(); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 7, this->field_arcs(i), target); + InternalWriteMessageNoVirtualToArray( + 7, this->field_arcs(i), false, target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:SSL_GeometryFieldSize) return target; } -int SSL_GeometryFieldSize::ByteSize() const { - int total_size = 0; +size_t SSL_GeometryFieldSize::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:SSL_GeometryFieldSize) + size_t total_size = 0; - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_field_length()) { // required int32 field_length = 1; - if (has_field_length()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->field_length()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->field_length()); + } + if (has_field_width()) { // required int32 field_width = 2; - if (has_field_width()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->field_width()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->field_width()); + } + if (has_goal_width()) { // required int32 goal_width = 3; - if (has_goal_width()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->goal_width()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->goal_width()); + } + if (has_goal_depth()) { // required int32 goal_depth = 4; - if (has_goal_depth()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->goal_depth()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->goal_depth()); + } + if (has_boundary_width()) { // required int32 boundary_width = 5; - if (has_boundary_width()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->boundary_width()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->boundary_width()); + } + + return total_size; +} +size_t SSL_GeometryFieldSize::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:SSL_GeometryFieldSize) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + if (((_has_bits_[0] & 0x0000001f) ^ 0x0000001f) == 0) { // All required fields are present. + // required int32 field_length = 1; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->field_length()); + + // required int32 field_width = 2; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->field_width()); + + // required int32 goal_width = 3; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->goal_width()); + + // required int32 goal_depth = 4; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->goal_depth()); + // required int32 boundary_width = 5; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->boundary_width()); + + } else { + total_size += RequiredFieldsByteSizeFallback(); } // repeated .SSL_FieldLineSegment field_lines = 6; - total_size += 1 * this->field_lines_size(); - for (int i = 0; i < this->field_lines_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->field_lines(i)); + { + unsigned int count = this->field_lines_size(); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->field_lines(i)); + } } // repeated .SSL_FieldCicularArc field_arcs = 7; - total_size += 1 * this->field_arcs_size(); - for (int i = 0; i < this->field_arcs_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->field_arcs(i)); + { + unsigned int count = this->field_arcs_size(); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->field_arcs(i)); + } } - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void SSL_GeometryFieldSize::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:SSL_GeometryFieldSize) + GOOGLE_DCHECK_NE(&from, this); const SSL_GeometryFieldSize* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:SSL_GeometryFieldSize) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:SSL_GeometryFieldSize) MergeFrom(*source); } } void SSL_GeometryFieldSize::MergeFrom(const SSL_GeometryFieldSize& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(class_specific_merge_from_start:SSL_GeometryFieldSize) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); field_lines_.MergeFrom(from.field_lines_); field_arcs_.MergeFrom(from.field_arcs_); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from._has_bits_[0 / 32] & 31u) { if (from.has_field_length()) { set_field_length(from.field_length()); } @@ -1699,16 +2332,17 @@ void SSL_GeometryFieldSize::MergeFrom(const SSL_GeometryFieldSize& from) { set_boundary_width(from.boundary_width()); } } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void SSL_GeometryFieldSize::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:SSL_GeometryFieldSize) if (&from == this) return; Clear(); MergeFrom(from); } void SSL_GeometryFieldSize::CopyFrom(const SSL_GeometryFieldSize& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:SSL_GeometryFieldSize) if (&from == this) return; Clear(); MergeFrom(from); @@ -1716,43 +2350,221 @@ void SSL_GeometryFieldSize::CopyFrom(const SSL_GeometryFieldSize& from) { bool SSL_GeometryFieldSize::IsInitialized() const { if ((_has_bits_[0] & 0x0000001f) != 0x0000001f) return false; - - for (int i = 0; i < field_lines_size(); i++) { - if (!this->field_lines(i).IsInitialized()) return false; - } - for (int i = 0; i < field_arcs_size(); i++) { - if (!this->field_arcs(i).IsInitialized()) return false; - } + if (!::google::protobuf::internal::AllAreInitialized(this->field_lines())) return false; + if (!::google::protobuf::internal::AllAreInitialized(this->field_arcs())) return false; return true; } void SSL_GeometryFieldSize::Swap(SSL_GeometryFieldSize* other) { - if (other != this) { - std::swap(field_length_, other->field_length_); - std::swap(field_width_, other->field_width_); - std::swap(goal_width_, other->goal_width_); - std::swap(goal_depth_, other->goal_depth_); - std::swap(boundary_width_, other->boundary_width_); - field_lines_.Swap(&other->field_lines_); - field_arcs_.Swap(&other->field_arcs_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void SSL_GeometryFieldSize::InternalSwap(SSL_GeometryFieldSize* other) { + field_lines_.UnsafeArenaSwap(&other->field_lines_); + field_arcs_.UnsafeArenaSwap(&other->field_arcs_); + std::swap(field_length_, other->field_length_); + std::swap(field_width_, other->field_width_); + std::swap(goal_width_, other->goal_width_); + std::swap(goal_depth_, other->goal_depth_); + std::swap(boundary_width_, other->boundary_width_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata SSL_GeometryFieldSize::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = SSL_GeometryFieldSize_descriptor_; - metadata.reflection = SSL_GeometryFieldSize_reflection_; - return metadata; + return file_level_metadata[3]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// SSL_GeometryFieldSize + +// required int32 field_length = 1; +bool SSL_GeometryFieldSize::has_field_length() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void SSL_GeometryFieldSize::set_has_field_length() { + _has_bits_[0] |= 0x00000001u; +} +void SSL_GeometryFieldSize::clear_has_field_length() { + _has_bits_[0] &= ~0x00000001u; +} +void SSL_GeometryFieldSize::clear_field_length() { + field_length_ = 0; + clear_has_field_length(); +} +::google::protobuf::int32 SSL_GeometryFieldSize::field_length() const { + // @@protoc_insertion_point(field_get:SSL_GeometryFieldSize.field_length) + return field_length_; +} +void SSL_GeometryFieldSize::set_field_length(::google::protobuf::int32 value) { + set_has_field_length(); + field_length_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryFieldSize.field_length) +} + +// required int32 field_width = 2; +bool SSL_GeometryFieldSize::has_field_width() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +void SSL_GeometryFieldSize::set_has_field_width() { + _has_bits_[0] |= 0x00000002u; +} +void SSL_GeometryFieldSize::clear_has_field_width() { + _has_bits_[0] &= ~0x00000002u; +} +void SSL_GeometryFieldSize::clear_field_width() { + field_width_ = 0; + clear_has_field_width(); +} +::google::protobuf::int32 SSL_GeometryFieldSize::field_width() const { + // @@protoc_insertion_point(field_get:SSL_GeometryFieldSize.field_width) + return field_width_; +} +void SSL_GeometryFieldSize::set_field_width(::google::protobuf::int32 value) { + set_has_field_width(); + field_width_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryFieldSize.field_width) +} + +// required int32 goal_width = 3; +bool SSL_GeometryFieldSize::has_goal_width() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +void SSL_GeometryFieldSize::set_has_goal_width() { + _has_bits_[0] |= 0x00000004u; +} +void SSL_GeometryFieldSize::clear_has_goal_width() { + _has_bits_[0] &= ~0x00000004u; +} +void SSL_GeometryFieldSize::clear_goal_width() { + goal_width_ = 0; + clear_has_goal_width(); +} +::google::protobuf::int32 SSL_GeometryFieldSize::goal_width() const { + // @@protoc_insertion_point(field_get:SSL_GeometryFieldSize.goal_width) + return goal_width_; +} +void SSL_GeometryFieldSize::set_goal_width(::google::protobuf::int32 value) { + set_has_goal_width(); + goal_width_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryFieldSize.goal_width) +} + +// required int32 goal_depth = 4; +bool SSL_GeometryFieldSize::has_goal_depth() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +void SSL_GeometryFieldSize::set_has_goal_depth() { + _has_bits_[0] |= 0x00000008u; +} +void SSL_GeometryFieldSize::clear_has_goal_depth() { + _has_bits_[0] &= ~0x00000008u; +} +void SSL_GeometryFieldSize::clear_goal_depth() { + goal_depth_ = 0; + clear_has_goal_depth(); +} +::google::protobuf::int32 SSL_GeometryFieldSize::goal_depth() const { + // @@protoc_insertion_point(field_get:SSL_GeometryFieldSize.goal_depth) + return goal_depth_; +} +void SSL_GeometryFieldSize::set_goal_depth(::google::protobuf::int32 value) { + set_has_goal_depth(); + goal_depth_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryFieldSize.goal_depth) +} + +// required int32 boundary_width = 5; +bool SSL_GeometryFieldSize::has_boundary_width() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +void SSL_GeometryFieldSize::set_has_boundary_width() { + _has_bits_[0] |= 0x00000010u; +} +void SSL_GeometryFieldSize::clear_has_boundary_width() { + _has_bits_[0] &= ~0x00000010u; +} +void SSL_GeometryFieldSize::clear_boundary_width() { + boundary_width_ = 0; + clear_has_boundary_width(); +} +::google::protobuf::int32 SSL_GeometryFieldSize::boundary_width() const { + // @@protoc_insertion_point(field_get:SSL_GeometryFieldSize.boundary_width) + return boundary_width_; +} +void SSL_GeometryFieldSize::set_boundary_width(::google::protobuf::int32 value) { + set_has_boundary_width(); + boundary_width_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryFieldSize.boundary_width) +} + +// repeated .SSL_FieldLineSegment field_lines = 6; +int SSL_GeometryFieldSize::field_lines_size() const { + return field_lines_.size(); +} +void SSL_GeometryFieldSize::clear_field_lines() { + field_lines_.Clear(); +} +const ::SSL_FieldLineSegment& SSL_GeometryFieldSize::field_lines(int index) const { + // @@protoc_insertion_point(field_get:SSL_GeometryFieldSize.field_lines) + return field_lines_.Get(index); +} +::SSL_FieldLineSegment* SSL_GeometryFieldSize::mutable_field_lines(int index) { + // @@protoc_insertion_point(field_mutable:SSL_GeometryFieldSize.field_lines) + return field_lines_.Mutable(index); +} +::SSL_FieldLineSegment* SSL_GeometryFieldSize::add_field_lines() { + // @@protoc_insertion_point(field_add:SSL_GeometryFieldSize.field_lines) + return field_lines_.Add(); +} +::google::protobuf::RepeatedPtrField< ::SSL_FieldLineSegment >* +SSL_GeometryFieldSize::mutable_field_lines() { + // @@protoc_insertion_point(field_mutable_list:SSL_GeometryFieldSize.field_lines) + return &field_lines_; +} +const ::google::protobuf::RepeatedPtrField< ::SSL_FieldLineSegment >& +SSL_GeometryFieldSize::field_lines() const { + // @@protoc_insertion_point(field_list:SSL_GeometryFieldSize.field_lines) + return field_lines_; +} + +// repeated .SSL_FieldCicularArc field_arcs = 7; +int SSL_GeometryFieldSize::field_arcs_size() const { + return field_arcs_.size(); +} +void SSL_GeometryFieldSize::clear_field_arcs() { + field_arcs_.Clear(); +} +const ::SSL_FieldCicularArc& SSL_GeometryFieldSize::field_arcs(int index) const { + // @@protoc_insertion_point(field_get:SSL_GeometryFieldSize.field_arcs) + return field_arcs_.Get(index); +} +::SSL_FieldCicularArc* SSL_GeometryFieldSize::mutable_field_arcs(int index) { + // @@protoc_insertion_point(field_mutable:SSL_GeometryFieldSize.field_arcs) + return field_arcs_.Mutable(index); +} +::SSL_FieldCicularArc* SSL_GeometryFieldSize::add_field_arcs() { + // @@protoc_insertion_point(field_add:SSL_GeometryFieldSize.field_arcs) + return field_arcs_.Add(); +} +::google::protobuf::RepeatedPtrField< ::SSL_FieldCicularArc >* +SSL_GeometryFieldSize::mutable_field_arcs() { + // @@protoc_insertion_point(field_mutable_list:SSL_GeometryFieldSize.field_arcs) + return &field_arcs_; +} +const ::google::protobuf::RepeatedPtrField< ::SSL_FieldCicularArc >& +SSL_GeometryFieldSize::field_arcs() const { + // @@protoc_insertion_point(field_list:SSL_GeometryFieldSize.field_arcs) + return field_arcs_; } +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int SSL_GeometryCameraCalibration::kCameraIdFieldNumber; const int SSL_GeometryCameraCalibration::kFocalLengthFieldNumber; const int SSL_GeometryCameraCalibration::kPrincipalPointXFieldNumber; @@ -1768,49 +2580,40 @@ const int SSL_GeometryCameraCalibration::kTzFieldNumber; const int SSL_GeometryCameraCalibration::kDerivedCameraWorldTxFieldNumber; const int SSL_GeometryCameraCalibration::kDerivedCameraWorldTyFieldNumber; const int SSL_GeometryCameraCalibration::kDerivedCameraWorldTzFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 SSL_GeometryCameraCalibration::SSL_GeometryCameraCalibration() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:SSL_GeometryCameraCalibration) } - -void SSL_GeometryCameraCalibration::InitAsDefaultInstance() { -} - SSL_GeometryCameraCalibration::SSL_GeometryCameraCalibration(const SSL_GeometryCameraCalibration& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::memcpy(&camera_id_, &from.camera_id_, + reinterpret_cast(&derived_camera_world_tz_) - + reinterpret_cast(&camera_id_) + sizeof(derived_camera_world_tz_)); + // @@protoc_insertion_point(copy_constructor:SSL_GeometryCameraCalibration) } void SSL_GeometryCameraCalibration::SharedCtor() { _cached_size_ = 0; - camera_id_ = 0u; - focal_length_ = 0; - principal_point_x_ = 0; - principal_point_y_ = 0; - distortion_ = 0; - q0_ = 0; - q1_ = 0; - q2_ = 0; - q3_ = 0; - tx_ = 0; - ty_ = 0; - tz_ = 0; - derived_camera_world_tx_ = 0; - derived_camera_world_ty_ = 0; - derived_camera_world_tz_ = 0; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); + ::memset(&camera_id_, 0, reinterpret_cast(&derived_camera_world_tz_) - + reinterpret_cast(&camera_id_) + sizeof(derived_camera_world_tz_)); } SSL_GeometryCameraCalibration::~SSL_GeometryCameraCalibration() { + // @@protoc_insertion_point(destructor:SSL_GeometryCameraCalibration) SharedDtor(); } void SSL_GeometryCameraCalibration::SharedDtor() { - if (this != default_instance_) { - } } void SSL_GeometryCameraCalibration::SetCachedSize(int size) const { @@ -1820,294 +2623,247 @@ void SSL_GeometryCameraCalibration::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* SSL_GeometryCameraCalibration::descriptor() { protobuf_AssignDescriptorsOnce(); - return SSL_GeometryCameraCalibration_descriptor_; + return file_level_metadata[4].descriptor; } const SSL_GeometryCameraCalibration& SSL_GeometryCameraCalibration::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto(); - return *default_instance_; + protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_2eproto(); + return *internal_default_instance(); } -SSL_GeometryCameraCalibration* SSL_GeometryCameraCalibration::default_instance_ = NULL; - -SSL_GeometryCameraCalibration* SSL_GeometryCameraCalibration::New() const { - return new SSL_GeometryCameraCalibration; +SSL_GeometryCameraCalibration* SSL_GeometryCameraCalibration::New(::google::protobuf::Arena* arena) const { + SSL_GeometryCameraCalibration* n = new SSL_GeometryCameraCalibration; + if (arena != NULL) { + arena->Own(n); + } + return n; } void SSL_GeometryCameraCalibration::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - camera_id_ = 0u; - focal_length_ = 0; - principal_point_x_ = 0; - principal_point_y_ = 0; - distortion_ = 0; - q0_ = 0; - q1_ = 0; - q2_ = 0; - } - if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) { - q3_ = 0; - tx_ = 0; - ty_ = 0; - tz_ = 0; - derived_camera_world_tx_ = 0; - derived_camera_world_ty_ = 0; - derived_camera_world_tz_ = 0; - } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); +// @@protoc_insertion_point(message_clear_start:SSL_GeometryCameraCalibration) + if (_has_bits_[0 / 32] & 255u) { + ::memset(&camera_id_, 0, reinterpret_cast(&q2_) - + reinterpret_cast(&camera_id_) + sizeof(q2_)); + } + if (_has_bits_[8 / 32] & 32512u) { + ::memset(&q3_, 0, reinterpret_cast(&derived_camera_world_tz_) - + reinterpret_cast(&q3_) + sizeof(derived_camera_world_tz_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool SSL_GeometryCameraCalibration::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:SSL_GeometryCameraCalibration) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required uint32 camera_id = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + if (tag == 8u) { + set_has_camera_id(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( input, &camera_id_))); - set_has_camera_id(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(21)) goto parse_focal_length; break; } // required float focal_length = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_focal_length: + if (tag == 21u) { + set_has_focal_length(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &focal_length_))); - set_has_focal_length(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(29)) goto parse_principal_point_x; break; } // required float principal_point_x = 3; case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_principal_point_x: + if (tag == 29u) { + set_has_principal_point_x(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &principal_point_x_))); - set_has_principal_point_x(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(37)) goto parse_principal_point_y; break; } // required float principal_point_y = 4; case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_principal_point_y: + if (tag == 37u) { + set_has_principal_point_y(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &principal_point_y_))); - set_has_principal_point_y(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(45)) goto parse_distortion; break; } // required float distortion = 5; case 5: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_distortion: + if (tag == 45u) { + set_has_distortion(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &distortion_))); - set_has_distortion(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(53)) goto parse_q0; break; } // required float q0 = 6; case 6: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_q0: + if (tag == 53u) { + set_has_q0(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &q0_))); - set_has_q0(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(61)) goto parse_q1; break; } // required float q1 = 7; case 7: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_q1: + if (tag == 61u) { + set_has_q1(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &q1_))); - set_has_q1(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(69)) goto parse_q2; break; } // required float q2 = 8; case 8: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_q2: + if (tag == 69u) { + set_has_q2(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &q2_))); - set_has_q2(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(77)) goto parse_q3; break; } // required float q3 = 9; case 9: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_q3: + if (tag == 77u) { + set_has_q3(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &q3_))); - set_has_q3(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(85)) goto parse_tx; break; } // required float tx = 10; case 10: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_tx: + if (tag == 85u) { + set_has_tx(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &tx_))); - set_has_tx(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(93)) goto parse_ty; break; } // required float ty = 11; case 11: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_ty: + if (tag == 93u) { + set_has_ty(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &ty_))); - set_has_ty(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(101)) goto parse_tz; break; } // required float tz = 12; case 12: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_tz: + if (tag == 101u) { + set_has_tz(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &tz_))); - set_has_tz(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(109)) goto parse_derived_camera_world_tx; break; } // optional float derived_camera_world_tx = 13; case 13: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_derived_camera_world_tx: + if (tag == 109u) { + set_has_derived_camera_world_tx(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &derived_camera_world_tx_))); - set_has_derived_camera_world_tx(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(117)) goto parse_derived_camera_world_ty; break; } // optional float derived_camera_world_ty = 14; case 14: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_derived_camera_world_ty: + if (tag == 117u) { + set_has_derived_camera_world_ty(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &derived_camera_world_ty_))); - set_has_derived_camera_world_ty(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(125)) goto parse_derived_camera_world_tz; break; } // optional float derived_camera_world_tz = 15; case 15: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_derived_camera_world_tz: + if (tag == 125u) { + set_has_derived_camera_world_tz(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &derived_camera_world_tz_))); - set_has_derived_camera_world_tz(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectAtEnd()) return true; break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -2115,12 +2871,18 @@ bool SSL_GeometryCameraCalibration::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:SSL_GeometryCameraCalibration) return true; +failure: + // @@protoc_insertion_point(parse_failure:SSL_GeometryCameraCalibration) + return false; #undef DO_ } void SSL_GeometryCameraCalibration::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:SSL_GeometryCameraCalibration) // required uint32 camera_id = 1; if (has_camera_id()) { ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->camera_id(), output); @@ -2196,14 +2958,17 @@ void SSL_GeometryCameraCalibration::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteFloat(15, this->derived_camera_world_tz(), output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:SSL_GeometryCameraCalibration) } -::google::protobuf::uint8* SSL_GeometryCameraCalibration::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* SSL_GeometryCameraCalibration::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:SSL_GeometryCameraCalibration) // required uint32 camera_id = 1; if (has_camera_id()) { target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->camera_id(), target); @@ -2279,81 +3044,134 @@ ::google::protobuf::uint8* SSL_GeometryCameraCalibration::SerializeWithCachedSiz target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(15, this->derived_camera_world_tz(), target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:SSL_GeometryCameraCalibration) return target; } -int SSL_GeometryCameraCalibration::ByteSize() const { - int total_size = 0; +size_t SSL_GeometryCameraCalibration::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:SSL_GeometryCameraCalibration) + size_t total_size = 0; - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_camera_id()) { // required uint32 camera_id = 1; - if (has_camera_id()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::UInt32Size( - this->camera_id()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->camera_id()); + } + if (has_focal_length()) { // required float focal_length = 2; - if (has_focal_length()) { - total_size += 1 + 4; - } + total_size += 1 + 4; + } + if (has_principal_point_x()) { // required float principal_point_x = 3; - if (has_principal_point_x()) { - total_size += 1 + 4; - } + total_size += 1 + 4; + } + if (has_principal_point_y()) { // required float principal_point_y = 4; - if (has_principal_point_y()) { - total_size += 1 + 4; - } + total_size += 1 + 4; + } + if (has_distortion()) { // required float distortion = 5; - if (has_distortion()) { - total_size += 1 + 4; - } + total_size += 1 + 4; + } + if (has_q0()) { // required float q0 = 6; - if (has_q0()) { - total_size += 1 + 4; - } + total_size += 1 + 4; + } + if (has_q1()) { // required float q1 = 7; - if (has_q1()) { - total_size += 1 + 4; - } + total_size += 1 + 4; + } + if (has_q2()) { // required float q2 = 8; - if (has_q2()) { - total_size += 1 + 4; - } + total_size += 1 + 4; + } + + if (has_q3()) { + // required float q3 = 9; + total_size += 1 + 4; + } + if (has_tx()) { + // required float tx = 10; + total_size += 1 + 4; + } + + if (has_ty()) { + // required float ty = 11; + total_size += 1 + 4; } - if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) { + + if (has_tz()) { + // required float tz = 12; + total_size += 1 + 4; + } + + return total_size; +} +size_t SSL_GeometryCameraCalibration::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:SSL_GeometryCameraCalibration) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + if (((_has_bits_[0] & 0x00000fff) ^ 0x00000fff) == 0) { // All required fields are present. + // required uint32 camera_id = 1; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->camera_id()); + + // required float focal_length = 2; + total_size += 1 + 4; + + // required float principal_point_x = 3; + total_size += 1 + 4; + + // required float principal_point_y = 4; + total_size += 1 + 4; + + // required float distortion = 5; + total_size += 1 + 4; + + // required float q0 = 6; + total_size += 1 + 4; + + // required float q1 = 7; + total_size += 1 + 4; + + // required float q2 = 8; + total_size += 1 + 4; + // required float q3 = 9; - if (has_q3()) { - total_size += 1 + 4; - } + total_size += 1 + 4; // required float tx = 10; - if (has_tx()) { - total_size += 1 + 4; - } + total_size += 1 + 4; // required float ty = 11; - if (has_ty()) { - total_size += 1 + 4; - } + total_size += 1 + 4; // required float tz = 12; - if (has_tz()) { - total_size += 1 + 4; - } + total_size += 1 + 4; + } else { + total_size += RequiredFieldsByteSizeFallback(); + } + if (_has_bits_[8 / 32] & 28672u) { // optional float derived_camera_world_tx = 13; if (has_derived_camera_world_tx()) { total_size += 1 + 4; @@ -2370,32 +3188,33 @@ int SSL_GeometryCameraCalibration::ByteSize() const { } } - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void SSL_GeometryCameraCalibration::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:SSL_GeometryCameraCalibration) + GOOGLE_DCHECK_NE(&from, this); const SSL_GeometryCameraCalibration* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:SSL_GeometryCameraCalibration) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:SSL_GeometryCameraCalibration) MergeFrom(*source); } } void SSL_GeometryCameraCalibration::MergeFrom(const SSL_GeometryCameraCalibration& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { +// @@protoc_insertion_point(class_specific_merge_from_start:SSL_GeometryCameraCalibration) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._has_bits_[0 / 32] & 255u) { if (from.has_camera_id()) { set_camera_id(from.camera_id()); } @@ -2421,7 +3240,7 @@ void SSL_GeometryCameraCalibration::MergeFrom(const SSL_GeometryCameraCalibratio set_q2(from.q2()); } } - if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) { + if (from._has_bits_[8 / 32] & 32512u) { if (from.has_q3()) { set_q3(from.q3()); } @@ -2444,16 +3263,17 @@ void SSL_GeometryCameraCalibration::MergeFrom(const SSL_GeometryCameraCalibratio set_derived_camera_world_tz(from.derived_camera_world_tz()); } } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void SSL_GeometryCameraCalibration::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:SSL_GeometryCameraCalibration) if (&from == this) return; Clear(); MergeFrom(from); } void SSL_GeometryCameraCalibration::CopyFrom(const SSL_GeometryCameraCalibration& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:SSL_GeometryCameraCalibration) if (&from == this) return; Clear(); MergeFrom(from); @@ -2461,76 +3281,446 @@ void SSL_GeometryCameraCalibration::CopyFrom(const SSL_GeometryCameraCalibration bool SSL_GeometryCameraCalibration::IsInitialized() const { if ((_has_bits_[0] & 0x00000fff) != 0x00000fff) return false; - return true; } void SSL_GeometryCameraCalibration::Swap(SSL_GeometryCameraCalibration* other) { - if (other != this) { - std::swap(camera_id_, other->camera_id_); - std::swap(focal_length_, other->focal_length_); - std::swap(principal_point_x_, other->principal_point_x_); - std::swap(principal_point_y_, other->principal_point_y_); - std::swap(distortion_, other->distortion_); - std::swap(q0_, other->q0_); - std::swap(q1_, other->q1_); - std::swap(q2_, other->q2_); - std::swap(q3_, other->q3_); - std::swap(tx_, other->tx_); - std::swap(ty_, other->ty_); - std::swap(tz_, other->tz_); - std::swap(derived_camera_world_tx_, other->derived_camera_world_tx_); - std::swap(derived_camera_world_ty_, other->derived_camera_world_ty_); - std::swap(derived_camera_world_tz_, other->derived_camera_world_tz_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void SSL_GeometryCameraCalibration::InternalSwap(SSL_GeometryCameraCalibration* other) { + std::swap(camera_id_, other->camera_id_); + std::swap(focal_length_, other->focal_length_); + std::swap(principal_point_x_, other->principal_point_x_); + std::swap(principal_point_y_, other->principal_point_y_); + std::swap(distortion_, other->distortion_); + std::swap(q0_, other->q0_); + std::swap(q1_, other->q1_); + std::swap(q2_, other->q2_); + std::swap(q3_, other->q3_); + std::swap(tx_, other->tx_); + std::swap(ty_, other->ty_); + std::swap(tz_, other->tz_); + std::swap(derived_camera_world_tx_, other->derived_camera_world_tx_); + std::swap(derived_camera_world_ty_, other->derived_camera_world_ty_); + std::swap(derived_camera_world_tz_, other->derived_camera_world_tz_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata SSL_GeometryCameraCalibration::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = SSL_GeometryCameraCalibration_descriptor_; - metadata.reflection = SSL_GeometryCameraCalibration_reflection_; - return metadata; + return file_level_metadata[4]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// SSL_GeometryCameraCalibration + +// required uint32 camera_id = 1; +bool SSL_GeometryCameraCalibration::has_camera_id() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void SSL_GeometryCameraCalibration::set_has_camera_id() { + _has_bits_[0] |= 0x00000001u; +} +void SSL_GeometryCameraCalibration::clear_has_camera_id() { + _has_bits_[0] &= ~0x00000001u; +} +void SSL_GeometryCameraCalibration::clear_camera_id() { + camera_id_ = 0u; + clear_has_camera_id(); +} +::google::protobuf::uint32 SSL_GeometryCameraCalibration::camera_id() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.camera_id) + return camera_id_; +} +void SSL_GeometryCameraCalibration::set_camera_id(::google::protobuf::uint32 value) { + set_has_camera_id(); + camera_id_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.camera_id) +} + +// required float focal_length = 2; +bool SSL_GeometryCameraCalibration::has_focal_length() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +void SSL_GeometryCameraCalibration::set_has_focal_length() { + _has_bits_[0] |= 0x00000002u; +} +void SSL_GeometryCameraCalibration::clear_has_focal_length() { + _has_bits_[0] &= ~0x00000002u; +} +void SSL_GeometryCameraCalibration::clear_focal_length() { + focal_length_ = 0; + clear_has_focal_length(); +} +float SSL_GeometryCameraCalibration::focal_length() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.focal_length) + return focal_length_; +} +void SSL_GeometryCameraCalibration::set_focal_length(float value) { + set_has_focal_length(); + focal_length_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.focal_length) +} + +// required float principal_point_x = 3; +bool SSL_GeometryCameraCalibration::has_principal_point_x() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +void SSL_GeometryCameraCalibration::set_has_principal_point_x() { + _has_bits_[0] |= 0x00000004u; +} +void SSL_GeometryCameraCalibration::clear_has_principal_point_x() { + _has_bits_[0] &= ~0x00000004u; +} +void SSL_GeometryCameraCalibration::clear_principal_point_x() { + principal_point_x_ = 0; + clear_has_principal_point_x(); +} +float SSL_GeometryCameraCalibration::principal_point_x() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.principal_point_x) + return principal_point_x_; +} +void SSL_GeometryCameraCalibration::set_principal_point_x(float value) { + set_has_principal_point_x(); + principal_point_x_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.principal_point_x) +} + +// required float principal_point_y = 4; +bool SSL_GeometryCameraCalibration::has_principal_point_y() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +void SSL_GeometryCameraCalibration::set_has_principal_point_y() { + _has_bits_[0] |= 0x00000008u; +} +void SSL_GeometryCameraCalibration::clear_has_principal_point_y() { + _has_bits_[0] &= ~0x00000008u; +} +void SSL_GeometryCameraCalibration::clear_principal_point_y() { + principal_point_y_ = 0; + clear_has_principal_point_y(); +} +float SSL_GeometryCameraCalibration::principal_point_y() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.principal_point_y) + return principal_point_y_; +} +void SSL_GeometryCameraCalibration::set_principal_point_y(float value) { + set_has_principal_point_y(); + principal_point_y_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.principal_point_y) +} + +// required float distortion = 5; +bool SSL_GeometryCameraCalibration::has_distortion() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +void SSL_GeometryCameraCalibration::set_has_distortion() { + _has_bits_[0] |= 0x00000010u; +} +void SSL_GeometryCameraCalibration::clear_has_distortion() { + _has_bits_[0] &= ~0x00000010u; +} +void SSL_GeometryCameraCalibration::clear_distortion() { + distortion_ = 0; + clear_has_distortion(); +} +float SSL_GeometryCameraCalibration::distortion() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.distortion) + return distortion_; +} +void SSL_GeometryCameraCalibration::set_distortion(float value) { + set_has_distortion(); + distortion_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.distortion) } +// required float q0 = 6; +bool SSL_GeometryCameraCalibration::has_q0() const { + return (_has_bits_[0] & 0x00000020u) != 0; +} +void SSL_GeometryCameraCalibration::set_has_q0() { + _has_bits_[0] |= 0x00000020u; +} +void SSL_GeometryCameraCalibration::clear_has_q0() { + _has_bits_[0] &= ~0x00000020u; +} +void SSL_GeometryCameraCalibration::clear_q0() { + q0_ = 0; + clear_has_q0(); +} +float SSL_GeometryCameraCalibration::q0() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.q0) + return q0_; +} +void SSL_GeometryCameraCalibration::set_q0(float value) { + set_has_q0(); + q0_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.q0) +} + +// required float q1 = 7; +bool SSL_GeometryCameraCalibration::has_q1() const { + return (_has_bits_[0] & 0x00000040u) != 0; +} +void SSL_GeometryCameraCalibration::set_has_q1() { + _has_bits_[0] |= 0x00000040u; +} +void SSL_GeometryCameraCalibration::clear_has_q1() { + _has_bits_[0] &= ~0x00000040u; +} +void SSL_GeometryCameraCalibration::clear_q1() { + q1_ = 0; + clear_has_q1(); +} +float SSL_GeometryCameraCalibration::q1() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.q1) + return q1_; +} +void SSL_GeometryCameraCalibration::set_q1(float value) { + set_has_q1(); + q1_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.q1) +} + +// required float q2 = 8; +bool SSL_GeometryCameraCalibration::has_q2() const { + return (_has_bits_[0] & 0x00000080u) != 0; +} +void SSL_GeometryCameraCalibration::set_has_q2() { + _has_bits_[0] |= 0x00000080u; +} +void SSL_GeometryCameraCalibration::clear_has_q2() { + _has_bits_[0] &= ~0x00000080u; +} +void SSL_GeometryCameraCalibration::clear_q2() { + q2_ = 0; + clear_has_q2(); +} +float SSL_GeometryCameraCalibration::q2() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.q2) + return q2_; +} +void SSL_GeometryCameraCalibration::set_q2(float value) { + set_has_q2(); + q2_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.q2) +} + +// required float q3 = 9; +bool SSL_GeometryCameraCalibration::has_q3() const { + return (_has_bits_[0] & 0x00000100u) != 0; +} +void SSL_GeometryCameraCalibration::set_has_q3() { + _has_bits_[0] |= 0x00000100u; +} +void SSL_GeometryCameraCalibration::clear_has_q3() { + _has_bits_[0] &= ~0x00000100u; +} +void SSL_GeometryCameraCalibration::clear_q3() { + q3_ = 0; + clear_has_q3(); +} +float SSL_GeometryCameraCalibration::q3() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.q3) + return q3_; +} +void SSL_GeometryCameraCalibration::set_q3(float value) { + set_has_q3(); + q3_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.q3) +} + +// required float tx = 10; +bool SSL_GeometryCameraCalibration::has_tx() const { + return (_has_bits_[0] & 0x00000200u) != 0; +} +void SSL_GeometryCameraCalibration::set_has_tx() { + _has_bits_[0] |= 0x00000200u; +} +void SSL_GeometryCameraCalibration::clear_has_tx() { + _has_bits_[0] &= ~0x00000200u; +} +void SSL_GeometryCameraCalibration::clear_tx() { + tx_ = 0; + clear_has_tx(); +} +float SSL_GeometryCameraCalibration::tx() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.tx) + return tx_; +} +void SSL_GeometryCameraCalibration::set_tx(float value) { + set_has_tx(); + tx_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.tx) +} + +// required float ty = 11; +bool SSL_GeometryCameraCalibration::has_ty() const { + return (_has_bits_[0] & 0x00000400u) != 0; +} +void SSL_GeometryCameraCalibration::set_has_ty() { + _has_bits_[0] |= 0x00000400u; +} +void SSL_GeometryCameraCalibration::clear_has_ty() { + _has_bits_[0] &= ~0x00000400u; +} +void SSL_GeometryCameraCalibration::clear_ty() { + ty_ = 0; + clear_has_ty(); +} +float SSL_GeometryCameraCalibration::ty() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.ty) + return ty_; +} +void SSL_GeometryCameraCalibration::set_ty(float value) { + set_has_ty(); + ty_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.ty) +} + +// required float tz = 12; +bool SSL_GeometryCameraCalibration::has_tz() const { + return (_has_bits_[0] & 0x00000800u) != 0; +} +void SSL_GeometryCameraCalibration::set_has_tz() { + _has_bits_[0] |= 0x00000800u; +} +void SSL_GeometryCameraCalibration::clear_has_tz() { + _has_bits_[0] &= ~0x00000800u; +} +void SSL_GeometryCameraCalibration::clear_tz() { + tz_ = 0; + clear_has_tz(); +} +float SSL_GeometryCameraCalibration::tz() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.tz) + return tz_; +} +void SSL_GeometryCameraCalibration::set_tz(float value) { + set_has_tz(); + tz_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.tz) +} + +// optional float derived_camera_world_tx = 13; +bool SSL_GeometryCameraCalibration::has_derived_camera_world_tx() const { + return (_has_bits_[0] & 0x00001000u) != 0; +} +void SSL_GeometryCameraCalibration::set_has_derived_camera_world_tx() { + _has_bits_[0] |= 0x00001000u; +} +void SSL_GeometryCameraCalibration::clear_has_derived_camera_world_tx() { + _has_bits_[0] &= ~0x00001000u; +} +void SSL_GeometryCameraCalibration::clear_derived_camera_world_tx() { + derived_camera_world_tx_ = 0; + clear_has_derived_camera_world_tx(); +} +float SSL_GeometryCameraCalibration::derived_camera_world_tx() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.derived_camera_world_tx) + return derived_camera_world_tx_; +} +void SSL_GeometryCameraCalibration::set_derived_camera_world_tx(float value) { + set_has_derived_camera_world_tx(); + derived_camera_world_tx_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.derived_camera_world_tx) +} + +// optional float derived_camera_world_ty = 14; +bool SSL_GeometryCameraCalibration::has_derived_camera_world_ty() const { + return (_has_bits_[0] & 0x00002000u) != 0; +} +void SSL_GeometryCameraCalibration::set_has_derived_camera_world_ty() { + _has_bits_[0] |= 0x00002000u; +} +void SSL_GeometryCameraCalibration::clear_has_derived_camera_world_ty() { + _has_bits_[0] &= ~0x00002000u; +} +void SSL_GeometryCameraCalibration::clear_derived_camera_world_ty() { + derived_camera_world_ty_ = 0; + clear_has_derived_camera_world_ty(); +} +float SSL_GeometryCameraCalibration::derived_camera_world_ty() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.derived_camera_world_ty) + return derived_camera_world_ty_; +} +void SSL_GeometryCameraCalibration::set_derived_camera_world_ty(float value) { + set_has_derived_camera_world_ty(); + derived_camera_world_ty_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.derived_camera_world_ty) +} + +// optional float derived_camera_world_tz = 15; +bool SSL_GeometryCameraCalibration::has_derived_camera_world_tz() const { + return (_has_bits_[0] & 0x00004000u) != 0; +} +void SSL_GeometryCameraCalibration::set_has_derived_camera_world_tz() { + _has_bits_[0] |= 0x00004000u; +} +void SSL_GeometryCameraCalibration::clear_has_derived_camera_world_tz() { + _has_bits_[0] &= ~0x00004000u; +} +void SSL_GeometryCameraCalibration::clear_derived_camera_world_tz() { + derived_camera_world_tz_ = 0; + clear_has_derived_camera_world_tz(); +} +float SSL_GeometryCameraCalibration::derived_camera_world_tz() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.derived_camera_world_tz) + return derived_camera_world_tz_; +} +void SSL_GeometryCameraCalibration::set_derived_camera_world_tz(float value) { + set_has_derived_camera_world_tz(); + derived_camera_world_tz_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.derived_camera_world_tz) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int SSL_GeometryData::kFieldFieldNumber; const int SSL_GeometryData::kCalibFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 SSL_GeometryData::SSL_GeometryData() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:SSL_GeometryData) } - -void SSL_GeometryData::InitAsDefaultInstance() { - field_ = const_cast< ::SSL_GeometryFieldSize*>(&::SSL_GeometryFieldSize::default_instance()); -} - SSL_GeometryData::SSL_GeometryData(const SSL_GeometryData& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0), + calib_(from.calib_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from.has_field()) { + field_ = new ::SSL_GeometryFieldSize(*from.field_); + } else { + field_ = NULL; + } + // @@protoc_insertion_point(copy_constructor:SSL_GeometryData) } void SSL_GeometryData::SharedCtor() { _cached_size_ = 0; field_ = NULL; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); } SSL_GeometryData::~SSL_GeometryData() { + // @@protoc_insertion_point(destructor:SSL_GeometryData) SharedDtor(); } void SSL_GeometryData::SharedDtor() { - if (this != default_instance_) { + if (this != internal_default_instance()) { delete field_; } } @@ -2542,70 +3732,73 @@ void SSL_GeometryData::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* SSL_GeometryData::descriptor() { protobuf_AssignDescriptorsOnce(); - return SSL_GeometryData_descriptor_; + return file_level_metadata[5].descriptor; } const SSL_GeometryData& SSL_GeometryData::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto(); - return *default_instance_; + protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_2eproto(); + return *internal_default_instance(); } -SSL_GeometryData* SSL_GeometryData::default_instance_ = NULL; - -SSL_GeometryData* SSL_GeometryData::New() const { - return new SSL_GeometryData; +SSL_GeometryData* SSL_GeometryData::New(::google::protobuf::Arena* arena) const { + SSL_GeometryData* n = new SSL_GeometryData; + if (arena != NULL) { + arena->Own(n); + } + return n; } void SSL_GeometryData::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (has_field()) { - if (field_ != NULL) field_->::SSL_GeometryFieldSize::Clear(); - } - } +// @@protoc_insertion_point(message_clear_start:SSL_GeometryData) calib_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + if (has_field()) { + GOOGLE_DCHECK(field_ != NULL); + field_->::SSL_GeometryFieldSize::Clear(); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool SSL_GeometryData::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:SSL_GeometryData) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required .SSL_GeometryFieldSize field = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + if (tag == 10u) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_field())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(18)) goto parse_calib; break; } // repeated .SSL_GeometryCameraCalibration calib = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_calib: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + if (tag == 18u) { + DO_(input->IncrementRecursionDepth()); + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( input, add_calib())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(18)) goto parse_calib; - if (input->ExpectAtEnd()) return true; + input->UnsafeDecrementRecursionDepth(); break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -2613,114 +3806,130 @@ bool SSL_GeometryData::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:SSL_GeometryData) return true; +failure: + // @@protoc_insertion_point(parse_failure:SSL_GeometryData) + return false; #undef DO_ } void SSL_GeometryData::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:SSL_GeometryData) // required .SSL_GeometryFieldSize field = 1; if (has_field()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, this->field(), output); + 1, *this->field_, output); } // repeated .SSL_GeometryCameraCalibration calib = 2; - for (int i = 0; i < this->calib_size(); i++) { + for (unsigned int i = 0, n = this->calib_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, this->calib(i), output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:SSL_GeometryData) } -::google::protobuf::uint8* SSL_GeometryData::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* SSL_GeometryData::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:SSL_GeometryData) // required .SSL_GeometryFieldSize field = 1; if (has_field()) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 1, this->field(), target); + InternalWriteMessageNoVirtualToArray( + 1, *this->field_, false, target); } // repeated .SSL_GeometryCameraCalibration calib = 2; - for (int i = 0; i < this->calib_size(); i++) { + for (unsigned int i = 0, n = this->calib_size(); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 2, this->calib(i), target); + InternalWriteMessageNoVirtualToArray( + 2, this->calib(i), false, target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:SSL_GeometryData) return target; } -int SSL_GeometryData::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // required .SSL_GeometryFieldSize field = 1; - if (has_field()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->field()); - } - - } - // repeated .SSL_GeometryCameraCalibration calib = 2; - total_size += 1 * this->calib_size(); - for (int i = 0; i < this->calib_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->calib(i)); - } +size_t SSL_GeometryData::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:SSL_GeometryData) + size_t total_size = 0; - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( unknown_fields()); } + // required .SSL_GeometryFieldSize field = 1; + if (has_field()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->field_); + } + // repeated .SSL_GeometryCameraCalibration calib = 2; + { + unsigned int count = this->calib_size(); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->calib(i)); + } + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void SSL_GeometryData::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:SSL_GeometryData) + GOOGLE_DCHECK_NE(&from, this); const SSL_GeometryData* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:SSL_GeometryData) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:SSL_GeometryData) MergeFrom(*source); } } void SSL_GeometryData::MergeFrom(const SSL_GeometryData& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(class_specific_merge_from_start:SSL_GeometryData) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); calib_.MergeFrom(from.calib_); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_field()) { - mutable_field()->::SSL_GeometryFieldSize::MergeFrom(from.field()); - } + if (from.has_field()) { + mutable_field()->::SSL_GeometryFieldSize::MergeFrom(from.field()); } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void SSL_GeometryData::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:SSL_GeometryData) if (&from == this) return; Clear(); MergeFrom(from); } void SSL_GeometryData::CopyFrom(const SSL_GeometryData& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:SSL_GeometryData) if (&from == this) return; Clear(); MergeFrom(from); @@ -2728,34 +3937,109 @@ void SSL_GeometryData::CopyFrom(const SSL_GeometryData& from) { bool SSL_GeometryData::IsInitialized() const { if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; - + if (!::google::protobuf::internal::AllAreInitialized(this->calib())) return false; if (has_field()) { - if (!this->field().IsInitialized()) return false; - } - for (int i = 0; i < calib_size(); i++) { - if (!this->calib(i).IsInitialized()) return false; + if (!this->field_->IsInitialized()) return false; } return true; } void SSL_GeometryData::Swap(SSL_GeometryData* other) { - if (other != this) { - std::swap(field_, other->field_); - calib_.Swap(&other->calib_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void SSL_GeometryData::InternalSwap(SSL_GeometryData* other) { + calib_.UnsafeArenaSwap(&other->calib_); + std::swap(field_, other->field_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata SSL_GeometryData::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = SSL_GeometryData_descriptor_; - metadata.reflection = SSL_GeometryData_reflection_; - return metadata; + return file_level_metadata[5]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// SSL_GeometryData + +// required .SSL_GeometryFieldSize field = 1; +bool SSL_GeometryData::has_field() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void SSL_GeometryData::set_has_field() { + _has_bits_[0] |= 0x00000001u; +} +void SSL_GeometryData::clear_has_field() { + _has_bits_[0] &= ~0x00000001u; +} +void SSL_GeometryData::clear_field() { + if (field_ != NULL) field_->::SSL_GeometryFieldSize::Clear(); + clear_has_field(); +} +const ::SSL_GeometryFieldSize& SSL_GeometryData::field() const { + // @@protoc_insertion_point(field_get:SSL_GeometryData.field) + return field_ != NULL ? *field_ + : *::SSL_GeometryFieldSize::internal_default_instance(); +} +::SSL_GeometryFieldSize* SSL_GeometryData::mutable_field() { + set_has_field(); + if (field_ == NULL) { + field_ = new ::SSL_GeometryFieldSize; + } + // @@protoc_insertion_point(field_mutable:SSL_GeometryData.field) + return field_; +} +::SSL_GeometryFieldSize* SSL_GeometryData::release_field() { + // @@protoc_insertion_point(field_release:SSL_GeometryData.field) + clear_has_field(); + ::SSL_GeometryFieldSize* temp = field_; + field_ = NULL; + return temp; +} +void SSL_GeometryData::set_allocated_field(::SSL_GeometryFieldSize* field) { + delete field_; + field_ = field; + if (field) { + set_has_field(); + } else { + clear_has_field(); + } + // @@protoc_insertion_point(field_set_allocated:SSL_GeometryData.field) +} + +// repeated .SSL_GeometryCameraCalibration calib = 2; +int SSL_GeometryData::calib_size() const { + return calib_.size(); +} +void SSL_GeometryData::clear_calib() { + calib_.Clear(); +} +const ::SSL_GeometryCameraCalibration& SSL_GeometryData::calib(int index) const { + // @@protoc_insertion_point(field_get:SSL_GeometryData.calib) + return calib_.Get(index); +} +::SSL_GeometryCameraCalibration* SSL_GeometryData::mutable_calib(int index) { + // @@protoc_insertion_point(field_mutable:SSL_GeometryData.calib) + return calib_.Mutable(index); +} +::SSL_GeometryCameraCalibration* SSL_GeometryData::add_calib() { + // @@protoc_insertion_point(field_add:SSL_GeometryData.calib) + return calib_.Add(); +} +::google::protobuf::RepeatedPtrField< ::SSL_GeometryCameraCalibration >* +SSL_GeometryData::mutable_calib() { + // @@protoc_insertion_point(field_mutable_list:SSL_GeometryData.calib) + return &calib_; +} +const ::google::protobuf::RepeatedPtrField< ::SSL_GeometryCameraCalibration >& +SSL_GeometryData::calib() const { + // @@protoc_insertion_point(field_list:SSL_GeometryData.calib) + return calib_; } +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) diff --git a/src/proto/messages_robocup_ssl_geometry.pb.h b/src/proto/messages_robocup_ssl_geometry.pb.h index 7d28f3a..35f22e5 100644 --- a/src/proto/messages_robocup_ssl_geometry.pb.h +++ b/src/proto/messages_robocup_ssl_geometry.pb.h @@ -8,39 +8,52 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 2005000 +#if GOOGLE_PROTOBUF_VERSION < 3001000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. #endif +#include +#include #include +#include #include -#include -#include +#include // IWYU pragma: export +#include // IWYU pragma: export #include // @@protoc_insertion_point(includes) - -// Internal implementation detail -- do not call these. -void protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto(); -void protobuf_AssignDesc_messages_5frobocup_5fssl_5fgeometry_2eproto(); -void protobuf_ShutdownFile_messages_5frobocup_5fssl_5fgeometry_2eproto(); - -class Vector2f; -class SSL_FieldLineSegment; class SSL_FieldCicularArc; -class SSL_GeometryFieldSize; +class SSL_FieldCicularArcDefaultTypeInternal; +extern SSL_FieldCicularArcDefaultTypeInternal _SSL_FieldCicularArc_default_instance_; +class SSL_FieldLineSegment; +class SSL_FieldLineSegmentDefaultTypeInternal; +extern SSL_FieldLineSegmentDefaultTypeInternal _SSL_FieldLineSegment_default_instance_; class SSL_GeometryCameraCalibration; +class SSL_GeometryCameraCalibrationDefaultTypeInternal; +extern SSL_GeometryCameraCalibrationDefaultTypeInternal _SSL_GeometryCameraCalibration_default_instance_; class SSL_GeometryData; +class SSL_GeometryDataDefaultTypeInternal; +extern SSL_GeometryDataDefaultTypeInternal _SSL_GeometryData_default_instance_; +class SSL_GeometryFieldSize; +class SSL_GeometryFieldSizeDefaultTypeInternal; +extern SSL_GeometryFieldSizeDefaultTypeInternal _SSL_GeometryFieldSize_default_instance_; +class Vector2f; +class Vector2fDefaultTypeInternal; +extern Vector2fDefaultTypeInternal _Vector2f_default_instance_; + +// Internal implementation detail -- do not call these. +void protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto(); +void protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_2eproto(); // =================================================================== -class Vector2f : public ::google::protobuf::Message { +class Vector2f : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:Vector2f) */ { public: Vector2f(); virtual ~Vector2f(); @@ -53,86 +66,105 @@ class Vector2f : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const Vector2f& default_instance(); + static inline const Vector2f* internal_default_instance() { + return reinterpret_cast( + &_Vector2f_default_instance_); + } + void Swap(Vector2f* other); // implements Message ---------------------------------------------- - Vector2f* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline Vector2f* New() const PROTOBUF_FINAL { return New(NULL); } + + Vector2f* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const Vector2f& from); void MergeFrom(const Vector2f& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(Vector2f* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // required float x = 1; - inline bool has_x() const; - inline void clear_x(); + bool has_x() const; + void clear_x(); static const int kXFieldNumber = 1; - inline float x() const; - inline void set_x(float value); + float x() const; + void set_x(float value); // required float y = 2; - inline bool has_y() const; - inline void clear_y(); + bool has_y() const; + void clear_y(); static const int kYFieldNumber = 2; - inline float y() const; - inline void set_y(float value); + float y() const; + void set_y(float value); // @@protoc_insertion_point(class_scope:Vector2f) private: - inline void set_has_x(); - inline void clear_has_x(); - inline void set_has_y(); - inline void clear_has_y(); + void set_has_x(); + void clear_has_x(); + void set_has_y(); + void clear_has_y(); - ::google::protobuf::UnknownFieldSet _unknown_fields_; + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; float x_; float y_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; - - friend void protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto(); - friend void protobuf_AssignDesc_messages_5frobocup_5fssl_5fgeometry_2eproto(); + friend void protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_2eproto_impl(); + friend void protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_messages_5frobocup_5fssl_5fgeometry_2eproto(); friend void protobuf_ShutdownFile_messages_5frobocup_5fssl_5fgeometry_2eproto(); - void InitAsDefaultInstance(); - static Vector2f* default_instance_; }; // ------------------------------------------------------------------- -class SSL_FieldLineSegment : public ::google::protobuf::Message { +class SSL_FieldLineSegment : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:SSL_FieldLineSegment) */ { public: SSL_FieldLineSegment(); virtual ~SSL_FieldLineSegment(); @@ -145,115 +177,137 @@ class SSL_FieldLineSegment : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const SSL_FieldLineSegment& default_instance(); + static inline const SSL_FieldLineSegment* internal_default_instance() { + return reinterpret_cast( + &_SSL_FieldLineSegment_default_instance_); + } + void Swap(SSL_FieldLineSegment* other); // implements Message ---------------------------------------------- - SSL_FieldLineSegment* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline SSL_FieldLineSegment* New() const PROTOBUF_FINAL { return New(NULL); } + + SSL_FieldLineSegment* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const SSL_FieldLineSegment& from); void MergeFrom(const SSL_FieldLineSegment& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(SSL_FieldLineSegment* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // required string name = 1; - inline bool has_name() const; - inline void clear_name(); + bool has_name() const; + void clear_name(); static const int kNameFieldNumber = 1; - inline const ::std::string& name() const; - inline void set_name(const ::std::string& value); - inline void set_name(const char* value); - inline void set_name(const char* value, size_t size); - inline ::std::string* mutable_name(); - inline ::std::string* release_name(); - inline void set_allocated_name(::std::string* name); + const ::std::string& name() const; + void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif + void set_name(const char* value); + void set_name(const char* value, size_t size); + ::std::string* mutable_name(); + ::std::string* release_name(); + void set_allocated_name(::std::string* name); // required .Vector2f p1 = 2; - inline bool has_p1() const; - inline void clear_p1(); + bool has_p1() const; + void clear_p1(); static const int kP1FieldNumber = 2; - inline const ::Vector2f& p1() const; - inline ::Vector2f* mutable_p1(); - inline ::Vector2f* release_p1(); - inline void set_allocated_p1(::Vector2f* p1); + const ::Vector2f& p1() const; + ::Vector2f* mutable_p1(); + ::Vector2f* release_p1(); + void set_allocated_p1(::Vector2f* p1); // required .Vector2f p2 = 3; - inline bool has_p2() const; - inline void clear_p2(); + bool has_p2() const; + void clear_p2(); static const int kP2FieldNumber = 3; - inline const ::Vector2f& p2() const; - inline ::Vector2f* mutable_p2(); - inline ::Vector2f* release_p2(); - inline void set_allocated_p2(::Vector2f* p2); + const ::Vector2f& p2() const; + ::Vector2f* mutable_p2(); + ::Vector2f* release_p2(); + void set_allocated_p2(::Vector2f* p2); // required float thickness = 4; - inline bool has_thickness() const; - inline void clear_thickness(); + bool has_thickness() const; + void clear_thickness(); static const int kThicknessFieldNumber = 4; - inline float thickness() const; - inline void set_thickness(float value); + float thickness() const; + void set_thickness(float value); // @@protoc_insertion_point(class_scope:SSL_FieldLineSegment) private: - inline void set_has_name(); - inline void clear_has_name(); - inline void set_has_p1(); - inline void clear_has_p1(); - inline void set_has_p2(); - inline void clear_has_p2(); - inline void set_has_thickness(); - inline void clear_has_thickness(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::std::string* name_; + void set_has_name(); + void clear_has_name(); + void set_has_p1(); + void clear_has_p1(); + void set_has_p2(); + void clear_has_p2(); + void set_has_thickness(); + void clear_has_thickness(); + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; + ::google::protobuf::internal::ArenaStringPtr name_; ::Vector2f* p1_; ::Vector2f* p2_; float thickness_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32]; - - friend void protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto(); - friend void protobuf_AssignDesc_messages_5frobocup_5fssl_5fgeometry_2eproto(); + friend void protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_2eproto_impl(); + friend void protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_messages_5frobocup_5fssl_5fgeometry_2eproto(); friend void protobuf_ShutdownFile_messages_5frobocup_5fssl_5fgeometry_2eproto(); - void InitAsDefaultInstance(); - static SSL_FieldLineSegment* default_instance_; }; // ------------------------------------------------------------------- -class SSL_FieldCicularArc : public ::google::protobuf::Message { +class SSL_FieldCicularArc : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:SSL_FieldCicularArc) */ { public: SSL_FieldCicularArc(); virtual ~SSL_FieldCicularArc(); @@ -266,133 +320,155 @@ class SSL_FieldCicularArc : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const SSL_FieldCicularArc& default_instance(); + static inline const SSL_FieldCicularArc* internal_default_instance() { + return reinterpret_cast( + &_SSL_FieldCicularArc_default_instance_); + } + void Swap(SSL_FieldCicularArc* other); // implements Message ---------------------------------------------- - SSL_FieldCicularArc* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline SSL_FieldCicularArc* New() const PROTOBUF_FINAL { return New(NULL); } + + SSL_FieldCicularArc* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const SSL_FieldCicularArc& from); void MergeFrom(const SSL_FieldCicularArc& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(SSL_FieldCicularArc* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // required string name = 1; - inline bool has_name() const; - inline void clear_name(); + bool has_name() const; + void clear_name(); static const int kNameFieldNumber = 1; - inline const ::std::string& name() const; - inline void set_name(const ::std::string& value); - inline void set_name(const char* value); - inline void set_name(const char* value, size_t size); - inline ::std::string* mutable_name(); - inline ::std::string* release_name(); - inline void set_allocated_name(::std::string* name); + const ::std::string& name() const; + void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif + void set_name(const char* value); + void set_name(const char* value, size_t size); + ::std::string* mutable_name(); + ::std::string* release_name(); + void set_allocated_name(::std::string* name); // required .Vector2f center = 2; - inline bool has_center() const; - inline void clear_center(); + bool has_center() const; + void clear_center(); static const int kCenterFieldNumber = 2; - inline const ::Vector2f& center() const; - inline ::Vector2f* mutable_center(); - inline ::Vector2f* release_center(); - inline void set_allocated_center(::Vector2f* center); + const ::Vector2f& center() const; + ::Vector2f* mutable_center(); + ::Vector2f* release_center(); + void set_allocated_center(::Vector2f* center); // required float radius = 3; - inline bool has_radius() const; - inline void clear_radius(); + bool has_radius() const; + void clear_radius(); static const int kRadiusFieldNumber = 3; - inline float radius() const; - inline void set_radius(float value); + float radius() const; + void set_radius(float value); // required float a1 = 4; - inline bool has_a1() const; - inline void clear_a1(); + bool has_a1() const; + void clear_a1(); static const int kA1FieldNumber = 4; - inline float a1() const; - inline void set_a1(float value); + float a1() const; + void set_a1(float value); // required float a2 = 5; - inline bool has_a2() const; - inline void clear_a2(); + bool has_a2() const; + void clear_a2(); static const int kA2FieldNumber = 5; - inline float a2() const; - inline void set_a2(float value); + float a2() const; + void set_a2(float value); // required float thickness = 6; - inline bool has_thickness() const; - inline void clear_thickness(); + bool has_thickness() const; + void clear_thickness(); static const int kThicknessFieldNumber = 6; - inline float thickness() const; - inline void set_thickness(float value); + float thickness() const; + void set_thickness(float value); // @@protoc_insertion_point(class_scope:SSL_FieldCicularArc) private: - inline void set_has_name(); - inline void clear_has_name(); - inline void set_has_center(); - inline void clear_has_center(); - inline void set_has_radius(); - inline void clear_has_radius(); - inline void set_has_a1(); - inline void clear_has_a1(); - inline void set_has_a2(); - inline void clear_has_a2(); - inline void set_has_thickness(); - inline void clear_has_thickness(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::std::string* name_; + void set_has_name(); + void clear_has_name(); + void set_has_center(); + void clear_has_center(); + void set_has_radius(); + void clear_has_radius(); + void set_has_a1(); + void clear_has_a1(); + void set_has_a2(); + void clear_has_a2(); + void set_has_thickness(); + void clear_has_thickness(); + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; + ::google::protobuf::internal::ArenaStringPtr name_; ::Vector2f* center_; float radius_; float a1_; float a2_; float thickness_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(6 + 31) / 32]; - - friend void protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto(); - friend void protobuf_AssignDesc_messages_5frobocup_5fssl_5fgeometry_2eproto(); + friend void protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_2eproto_impl(); + friend void protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_messages_5frobocup_5fssl_5fgeometry_2eproto(); friend void protobuf_ShutdownFile_messages_5frobocup_5fssl_5fgeometry_2eproto(); - void InitAsDefaultInstance(); - static SSL_FieldCicularArc* default_instance_; }; // ------------------------------------------------------------------- -class SSL_GeometryFieldSize : public ::google::protobuf::Message { +class SSL_GeometryFieldSize : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:SSL_GeometryFieldSize) */ { public: SSL_GeometryFieldSize(); virtual ~SSL_GeometryFieldSize(); @@ -405,142 +481,161 @@ class SSL_GeometryFieldSize : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const SSL_GeometryFieldSize& default_instance(); + static inline const SSL_GeometryFieldSize* internal_default_instance() { + return reinterpret_cast( + &_SSL_GeometryFieldSize_default_instance_); + } + void Swap(SSL_GeometryFieldSize* other); // implements Message ---------------------------------------------- - SSL_GeometryFieldSize* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline SSL_GeometryFieldSize* New() const PROTOBUF_FINAL { return New(NULL); } + + SSL_GeometryFieldSize* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const SSL_GeometryFieldSize& from); void MergeFrom(const SSL_GeometryFieldSize& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(SSL_GeometryFieldSize* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // required int32 field_length = 1; - inline bool has_field_length() const; - inline void clear_field_length(); + bool has_field_length() const; + void clear_field_length(); static const int kFieldLengthFieldNumber = 1; - inline ::google::protobuf::int32 field_length() const; - inline void set_field_length(::google::protobuf::int32 value); + ::google::protobuf::int32 field_length() const; + void set_field_length(::google::protobuf::int32 value); // required int32 field_width = 2; - inline bool has_field_width() const; - inline void clear_field_width(); + bool has_field_width() const; + void clear_field_width(); static const int kFieldWidthFieldNumber = 2; - inline ::google::protobuf::int32 field_width() const; - inline void set_field_width(::google::protobuf::int32 value); + ::google::protobuf::int32 field_width() const; + void set_field_width(::google::protobuf::int32 value); // required int32 goal_width = 3; - inline bool has_goal_width() const; - inline void clear_goal_width(); + bool has_goal_width() const; + void clear_goal_width(); static const int kGoalWidthFieldNumber = 3; - inline ::google::protobuf::int32 goal_width() const; - inline void set_goal_width(::google::protobuf::int32 value); + ::google::protobuf::int32 goal_width() const; + void set_goal_width(::google::protobuf::int32 value); // required int32 goal_depth = 4; - inline bool has_goal_depth() const; - inline void clear_goal_depth(); + bool has_goal_depth() const; + void clear_goal_depth(); static const int kGoalDepthFieldNumber = 4; - inline ::google::protobuf::int32 goal_depth() const; - inline void set_goal_depth(::google::protobuf::int32 value); + ::google::protobuf::int32 goal_depth() const; + void set_goal_depth(::google::protobuf::int32 value); // required int32 boundary_width = 5; - inline bool has_boundary_width() const; - inline void clear_boundary_width(); + bool has_boundary_width() const; + void clear_boundary_width(); static const int kBoundaryWidthFieldNumber = 5; - inline ::google::protobuf::int32 boundary_width() const; - inline void set_boundary_width(::google::protobuf::int32 value); + ::google::protobuf::int32 boundary_width() const; + void set_boundary_width(::google::protobuf::int32 value); // repeated .SSL_FieldLineSegment field_lines = 6; - inline int field_lines_size() const; - inline void clear_field_lines(); + int field_lines_size() const; + void clear_field_lines(); static const int kFieldLinesFieldNumber = 6; - inline const ::SSL_FieldLineSegment& field_lines(int index) const; - inline ::SSL_FieldLineSegment* mutable_field_lines(int index); - inline ::SSL_FieldLineSegment* add_field_lines(); - inline const ::google::protobuf::RepeatedPtrField< ::SSL_FieldLineSegment >& - field_lines() const; - inline ::google::protobuf::RepeatedPtrField< ::SSL_FieldLineSegment >* + const ::SSL_FieldLineSegment& field_lines(int index) const; + ::SSL_FieldLineSegment* mutable_field_lines(int index); + ::SSL_FieldLineSegment* add_field_lines(); + ::google::protobuf::RepeatedPtrField< ::SSL_FieldLineSegment >* mutable_field_lines(); + const ::google::protobuf::RepeatedPtrField< ::SSL_FieldLineSegment >& + field_lines() const; // repeated .SSL_FieldCicularArc field_arcs = 7; - inline int field_arcs_size() const; - inline void clear_field_arcs(); + int field_arcs_size() const; + void clear_field_arcs(); static const int kFieldArcsFieldNumber = 7; - inline const ::SSL_FieldCicularArc& field_arcs(int index) const; - inline ::SSL_FieldCicularArc* mutable_field_arcs(int index); - inline ::SSL_FieldCicularArc* add_field_arcs(); - inline const ::google::protobuf::RepeatedPtrField< ::SSL_FieldCicularArc >& - field_arcs() const; - inline ::google::protobuf::RepeatedPtrField< ::SSL_FieldCicularArc >* + const ::SSL_FieldCicularArc& field_arcs(int index) const; + ::SSL_FieldCicularArc* mutable_field_arcs(int index); + ::SSL_FieldCicularArc* add_field_arcs(); + ::google::protobuf::RepeatedPtrField< ::SSL_FieldCicularArc >* mutable_field_arcs(); + const ::google::protobuf::RepeatedPtrField< ::SSL_FieldCicularArc >& + field_arcs() const; // @@protoc_insertion_point(class_scope:SSL_GeometryFieldSize) private: - inline void set_has_field_length(); - inline void clear_has_field_length(); - inline void set_has_field_width(); - inline void clear_has_field_width(); - inline void set_has_goal_width(); - inline void clear_has_goal_width(); - inline void set_has_goal_depth(); - inline void clear_has_goal_depth(); - inline void set_has_boundary_width(); - inline void clear_has_boundary_width(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + void set_has_field_length(); + void clear_has_field_length(); + void set_has_field_width(); + void clear_has_field_width(); + void set_has_goal_width(); + void clear_has_goal_width(); + void set_has_goal_depth(); + void clear_has_goal_depth(); + void set_has_boundary_width(); + void clear_has_boundary_width(); + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; + ::google::protobuf::RepeatedPtrField< ::SSL_FieldLineSegment > field_lines_; + ::google::protobuf::RepeatedPtrField< ::SSL_FieldCicularArc > field_arcs_; ::google::protobuf::int32 field_length_; ::google::protobuf::int32 field_width_; ::google::protobuf::int32 goal_width_; ::google::protobuf::int32 goal_depth_; - ::google::protobuf::RepeatedPtrField< ::SSL_FieldLineSegment > field_lines_; - ::google::protobuf::RepeatedPtrField< ::SSL_FieldCicularArc > field_arcs_; ::google::protobuf::int32 boundary_width_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(7 + 31) / 32]; - - friend void protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto(); - friend void protobuf_AssignDesc_messages_5frobocup_5fssl_5fgeometry_2eproto(); + friend void protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_2eproto_impl(); + friend void protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_messages_5frobocup_5fssl_5fgeometry_2eproto(); friend void protobuf_ShutdownFile_messages_5frobocup_5fssl_5fgeometry_2eproto(); - void InitAsDefaultInstance(); - static SSL_GeometryFieldSize* default_instance_; }; // ------------------------------------------------------------------- -class SSL_GeometryCameraCalibration : public ::google::protobuf::Message { +class SSL_GeometryCameraCalibration : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:SSL_GeometryCameraCalibration) */ { public: SSL_GeometryCameraCalibration(); virtual ~SSL_GeometryCameraCalibration(); @@ -553,187 +648,211 @@ class SSL_GeometryCameraCalibration : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const SSL_GeometryCameraCalibration& default_instance(); + static inline const SSL_GeometryCameraCalibration* internal_default_instance() { + return reinterpret_cast( + &_SSL_GeometryCameraCalibration_default_instance_); + } + void Swap(SSL_GeometryCameraCalibration* other); // implements Message ---------------------------------------------- - SSL_GeometryCameraCalibration* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline SSL_GeometryCameraCalibration* New() const PROTOBUF_FINAL { return New(NULL); } + + SSL_GeometryCameraCalibration* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const SSL_GeometryCameraCalibration& from); void MergeFrom(const SSL_GeometryCameraCalibration& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(SSL_GeometryCameraCalibration* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // required uint32 camera_id = 1; - inline bool has_camera_id() const; - inline void clear_camera_id(); + bool has_camera_id() const; + void clear_camera_id(); static const int kCameraIdFieldNumber = 1; - inline ::google::protobuf::uint32 camera_id() const; - inline void set_camera_id(::google::protobuf::uint32 value); + ::google::protobuf::uint32 camera_id() const; + void set_camera_id(::google::protobuf::uint32 value); // required float focal_length = 2; - inline bool has_focal_length() const; - inline void clear_focal_length(); + bool has_focal_length() const; + void clear_focal_length(); static const int kFocalLengthFieldNumber = 2; - inline float focal_length() const; - inline void set_focal_length(float value); + float focal_length() const; + void set_focal_length(float value); // required float principal_point_x = 3; - inline bool has_principal_point_x() const; - inline void clear_principal_point_x(); + bool has_principal_point_x() const; + void clear_principal_point_x(); static const int kPrincipalPointXFieldNumber = 3; - inline float principal_point_x() const; - inline void set_principal_point_x(float value); + float principal_point_x() const; + void set_principal_point_x(float value); // required float principal_point_y = 4; - inline bool has_principal_point_y() const; - inline void clear_principal_point_y(); + bool has_principal_point_y() const; + void clear_principal_point_y(); static const int kPrincipalPointYFieldNumber = 4; - inline float principal_point_y() const; - inline void set_principal_point_y(float value); + float principal_point_y() const; + void set_principal_point_y(float value); // required float distortion = 5; - inline bool has_distortion() const; - inline void clear_distortion(); + bool has_distortion() const; + void clear_distortion(); static const int kDistortionFieldNumber = 5; - inline float distortion() const; - inline void set_distortion(float value); + float distortion() const; + void set_distortion(float value); // required float q0 = 6; - inline bool has_q0() const; - inline void clear_q0(); + bool has_q0() const; + void clear_q0(); static const int kQ0FieldNumber = 6; - inline float q0() const; - inline void set_q0(float value); + float q0() const; + void set_q0(float value); // required float q1 = 7; - inline bool has_q1() const; - inline void clear_q1(); + bool has_q1() const; + void clear_q1(); static const int kQ1FieldNumber = 7; - inline float q1() const; - inline void set_q1(float value); + float q1() const; + void set_q1(float value); // required float q2 = 8; - inline bool has_q2() const; - inline void clear_q2(); + bool has_q2() const; + void clear_q2(); static const int kQ2FieldNumber = 8; - inline float q2() const; - inline void set_q2(float value); + float q2() const; + void set_q2(float value); // required float q3 = 9; - inline bool has_q3() const; - inline void clear_q3(); + bool has_q3() const; + void clear_q3(); static const int kQ3FieldNumber = 9; - inline float q3() const; - inline void set_q3(float value); + float q3() const; + void set_q3(float value); // required float tx = 10; - inline bool has_tx() const; - inline void clear_tx(); + bool has_tx() const; + void clear_tx(); static const int kTxFieldNumber = 10; - inline float tx() const; - inline void set_tx(float value); + float tx() const; + void set_tx(float value); // required float ty = 11; - inline bool has_ty() const; - inline void clear_ty(); + bool has_ty() const; + void clear_ty(); static const int kTyFieldNumber = 11; - inline float ty() const; - inline void set_ty(float value); + float ty() const; + void set_ty(float value); // required float tz = 12; - inline bool has_tz() const; - inline void clear_tz(); + bool has_tz() const; + void clear_tz(); static const int kTzFieldNumber = 12; - inline float tz() const; - inline void set_tz(float value); + float tz() const; + void set_tz(float value); // optional float derived_camera_world_tx = 13; - inline bool has_derived_camera_world_tx() const; - inline void clear_derived_camera_world_tx(); + bool has_derived_camera_world_tx() const; + void clear_derived_camera_world_tx(); static const int kDerivedCameraWorldTxFieldNumber = 13; - inline float derived_camera_world_tx() const; - inline void set_derived_camera_world_tx(float value); + float derived_camera_world_tx() const; + void set_derived_camera_world_tx(float value); // optional float derived_camera_world_ty = 14; - inline bool has_derived_camera_world_ty() const; - inline void clear_derived_camera_world_ty(); + bool has_derived_camera_world_ty() const; + void clear_derived_camera_world_ty(); static const int kDerivedCameraWorldTyFieldNumber = 14; - inline float derived_camera_world_ty() const; - inline void set_derived_camera_world_ty(float value); + float derived_camera_world_ty() const; + void set_derived_camera_world_ty(float value); // optional float derived_camera_world_tz = 15; - inline bool has_derived_camera_world_tz() const; - inline void clear_derived_camera_world_tz(); + bool has_derived_camera_world_tz() const; + void clear_derived_camera_world_tz(); static const int kDerivedCameraWorldTzFieldNumber = 15; - inline float derived_camera_world_tz() const; - inline void set_derived_camera_world_tz(float value); + float derived_camera_world_tz() const; + void set_derived_camera_world_tz(float value); // @@protoc_insertion_point(class_scope:SSL_GeometryCameraCalibration) private: - inline void set_has_camera_id(); - inline void clear_has_camera_id(); - inline void set_has_focal_length(); - inline void clear_has_focal_length(); - inline void set_has_principal_point_x(); - inline void clear_has_principal_point_x(); - inline void set_has_principal_point_y(); - inline void clear_has_principal_point_y(); - inline void set_has_distortion(); - inline void clear_has_distortion(); - inline void set_has_q0(); - inline void clear_has_q0(); - inline void set_has_q1(); - inline void clear_has_q1(); - inline void set_has_q2(); - inline void clear_has_q2(); - inline void set_has_q3(); - inline void clear_has_q3(); - inline void set_has_tx(); - inline void clear_has_tx(); - inline void set_has_ty(); - inline void clear_has_ty(); - inline void set_has_tz(); - inline void clear_has_tz(); - inline void set_has_derived_camera_world_tx(); - inline void clear_has_derived_camera_world_tx(); - inline void set_has_derived_camera_world_ty(); - inline void clear_has_derived_camera_world_ty(); - inline void set_has_derived_camera_world_tz(); - inline void clear_has_derived_camera_world_tz(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + void set_has_camera_id(); + void clear_has_camera_id(); + void set_has_focal_length(); + void clear_has_focal_length(); + void set_has_principal_point_x(); + void clear_has_principal_point_x(); + void set_has_principal_point_y(); + void clear_has_principal_point_y(); + void set_has_distortion(); + void clear_has_distortion(); + void set_has_q0(); + void clear_has_q0(); + void set_has_q1(); + void clear_has_q1(); + void set_has_q2(); + void clear_has_q2(); + void set_has_q3(); + void clear_has_q3(); + void set_has_tx(); + void clear_has_tx(); + void set_has_ty(); + void clear_has_ty(); + void set_has_tz(); + void clear_has_tz(); + void set_has_derived_camera_world_tx(); + void clear_has_derived_camera_world_tx(); + void set_has_derived_camera_world_ty(); + void clear_has_derived_camera_world_ty(); + void set_has_derived_camera_world_tz(); + void clear_has_derived_camera_world_tz(); + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; ::google::protobuf::uint32 camera_id_; float focal_length_; float principal_point_x_; @@ -749,20 +868,15 @@ class SSL_GeometryCameraCalibration : public ::google::protobuf::Message { float derived_camera_world_tx_; float derived_camera_world_ty_; float derived_camera_world_tz_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(15 + 31) / 32]; - - friend void protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto(); - friend void protobuf_AssignDesc_messages_5frobocup_5fssl_5fgeometry_2eproto(); + friend void protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_2eproto_impl(); + friend void protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_messages_5frobocup_5fssl_5fgeometry_2eproto(); friend void protobuf_ShutdownFile_messages_5frobocup_5fssl_5fgeometry_2eproto(); - void InitAsDefaultInstance(); - static SSL_GeometryCameraCalibration* default_instance_; }; // ------------------------------------------------------------------- -class SSL_GeometryData : public ::google::protobuf::Message { +class SSL_GeometryData : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:SSL_GeometryData) */ { public: SSL_GeometryData(); virtual ~SSL_GeometryData(); @@ -775,93 +889,110 @@ class SSL_GeometryData : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const SSL_GeometryData& default_instance(); + static inline const SSL_GeometryData* internal_default_instance() { + return reinterpret_cast( + &_SSL_GeometryData_default_instance_); + } + void Swap(SSL_GeometryData* other); // implements Message ---------------------------------------------- - SSL_GeometryData* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline SSL_GeometryData* New() const PROTOBUF_FINAL { return New(NULL); } + + SSL_GeometryData* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const SSL_GeometryData& from); void MergeFrom(const SSL_GeometryData& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(SSL_GeometryData* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // required .SSL_GeometryFieldSize field = 1; - inline bool has_field() const; - inline void clear_field(); + bool has_field() const; + void clear_field(); static const int kFieldFieldNumber = 1; - inline const ::SSL_GeometryFieldSize& field() const; - inline ::SSL_GeometryFieldSize* mutable_field(); - inline ::SSL_GeometryFieldSize* release_field(); - inline void set_allocated_field(::SSL_GeometryFieldSize* field); + const ::SSL_GeometryFieldSize& field() const; + ::SSL_GeometryFieldSize* mutable_field(); + ::SSL_GeometryFieldSize* release_field(); + void set_allocated_field(::SSL_GeometryFieldSize* field); // repeated .SSL_GeometryCameraCalibration calib = 2; - inline int calib_size() const; - inline void clear_calib(); + int calib_size() const; + void clear_calib(); static const int kCalibFieldNumber = 2; - inline const ::SSL_GeometryCameraCalibration& calib(int index) const; - inline ::SSL_GeometryCameraCalibration* mutable_calib(int index); - inline ::SSL_GeometryCameraCalibration* add_calib(); - inline const ::google::protobuf::RepeatedPtrField< ::SSL_GeometryCameraCalibration >& - calib() const; - inline ::google::protobuf::RepeatedPtrField< ::SSL_GeometryCameraCalibration >* + const ::SSL_GeometryCameraCalibration& calib(int index) const; + ::SSL_GeometryCameraCalibration* mutable_calib(int index); + ::SSL_GeometryCameraCalibration* add_calib(); + ::google::protobuf::RepeatedPtrField< ::SSL_GeometryCameraCalibration >* mutable_calib(); + const ::google::protobuf::RepeatedPtrField< ::SSL_GeometryCameraCalibration >& + calib() const; // @@protoc_insertion_point(class_scope:SSL_GeometryData) private: - inline void set_has_field(); - inline void clear_has_field(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::SSL_GeometryFieldSize* field_; - ::google::protobuf::RepeatedPtrField< ::SSL_GeometryCameraCalibration > calib_; + void set_has_field(); + void clear_has_field(); + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; - - friend void protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto(); - friend void protobuf_AssignDesc_messages_5frobocup_5fssl_5fgeometry_2eproto(); + ::google::protobuf::RepeatedPtrField< ::SSL_GeometryCameraCalibration > calib_; + ::SSL_GeometryFieldSize* field_; + friend void protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_2eproto_impl(); + friend void protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_messages_5frobocup_5fssl_5fgeometry_2eproto(); friend void protobuf_ShutdownFile_messages_5frobocup_5fssl_5fgeometry_2eproto(); - void InitAsDefaultInstance(); - static SSL_GeometryData* default_instance_; }; // =================================================================== // =================================================================== +#if !PROTOBUF_INLINE_NOT_IN_HEADERS // Vector2f // required float x = 1; @@ -879,11 +1010,13 @@ inline void Vector2f::clear_x() { clear_has_x(); } inline float Vector2f::x() const { + // @@protoc_insertion_point(field_get:Vector2f.x) return x_; } inline void Vector2f::set_x(float value) { set_has_x(); x_ = value; + // @@protoc_insertion_point(field_set:Vector2f.x) } // required float y = 2; @@ -901,11 +1034,13 @@ inline void Vector2f::clear_y() { clear_has_y(); } inline float Vector2f::y() const { + // @@protoc_insertion_point(field_get:Vector2f.y) return y_; } inline void Vector2f::set_y(float value) { set_has_y(); y_ = value; + // @@protoc_insertion_point(field_set:Vector2f.y) } // ------------------------------------------------------------------- @@ -923,63 +1058,55 @@ inline void SSL_FieldLineSegment::clear_has_name() { _has_bits_[0] &= ~0x00000001u; } inline void SSL_FieldLineSegment::clear_name() { - if (name_ != &::google::protobuf::internal::kEmptyString) { - name_->clear(); - } + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); clear_has_name(); } inline const ::std::string& SSL_FieldLineSegment::name() const { - return *name_; + // @@protoc_insertion_point(field_get:SSL_FieldLineSegment.name) + return name_.GetNoArena(); } inline void SSL_FieldLineSegment::set_name(const ::std::string& value) { set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(value); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:SSL_FieldLineSegment.name) +} +#if LANG_CXX11 +inline void SSL_FieldLineSegment::set_name(::std::string&& value) { + set_has_name(); + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:SSL_FieldLineSegment.name) } +#endif inline void SSL_FieldLineSegment::set_name(const char* value) { set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(value); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:SSL_FieldLineSegment.name) } inline void SSL_FieldLineSegment::set_name(const char* value, size_t size) { set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(reinterpret_cast(value), size); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:SSL_FieldLineSegment.name) } inline ::std::string* SSL_FieldLineSegment::mutable_name() { set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - return name_; + // @@protoc_insertion_point(field_mutable:SSL_FieldLineSegment.name) + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* SSL_FieldLineSegment::release_name() { + // @@protoc_insertion_point(field_release:SSL_FieldLineSegment.name) clear_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = name_; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void SSL_FieldLineSegment::set_allocated_name(::std::string* name) { - if (name_ != &::google::protobuf::internal::kEmptyString) { - delete name_; - } - if (name) { + if (name != NULL) { set_has_name(); - name_ = name; } else { clear_has_name(); - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); } + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + // @@protoc_insertion_point(field_set_allocated:SSL_FieldLineSegment.name) } // required .Vector2f p1 = 2; @@ -997,14 +1124,20 @@ inline void SSL_FieldLineSegment::clear_p1() { clear_has_p1(); } inline const ::Vector2f& SSL_FieldLineSegment::p1() const { - return p1_ != NULL ? *p1_ : *default_instance_->p1_; + // @@protoc_insertion_point(field_get:SSL_FieldLineSegment.p1) + return p1_ != NULL ? *p1_ + : *::Vector2f::internal_default_instance(); } inline ::Vector2f* SSL_FieldLineSegment::mutable_p1() { set_has_p1(); - if (p1_ == NULL) p1_ = new ::Vector2f; + if (p1_ == NULL) { + p1_ = new ::Vector2f; + } + // @@protoc_insertion_point(field_mutable:SSL_FieldLineSegment.p1) return p1_; } inline ::Vector2f* SSL_FieldLineSegment::release_p1() { + // @@protoc_insertion_point(field_release:SSL_FieldLineSegment.p1) clear_has_p1(); ::Vector2f* temp = p1_; p1_ = NULL; @@ -1018,6 +1151,7 @@ inline void SSL_FieldLineSegment::set_allocated_p1(::Vector2f* p1) { } else { clear_has_p1(); } + // @@protoc_insertion_point(field_set_allocated:SSL_FieldLineSegment.p1) } // required .Vector2f p2 = 3; @@ -1035,14 +1169,20 @@ inline void SSL_FieldLineSegment::clear_p2() { clear_has_p2(); } inline const ::Vector2f& SSL_FieldLineSegment::p2() const { - return p2_ != NULL ? *p2_ : *default_instance_->p2_; + // @@protoc_insertion_point(field_get:SSL_FieldLineSegment.p2) + return p2_ != NULL ? *p2_ + : *::Vector2f::internal_default_instance(); } inline ::Vector2f* SSL_FieldLineSegment::mutable_p2() { set_has_p2(); - if (p2_ == NULL) p2_ = new ::Vector2f; + if (p2_ == NULL) { + p2_ = new ::Vector2f; + } + // @@protoc_insertion_point(field_mutable:SSL_FieldLineSegment.p2) return p2_; } inline ::Vector2f* SSL_FieldLineSegment::release_p2() { + // @@protoc_insertion_point(field_release:SSL_FieldLineSegment.p2) clear_has_p2(); ::Vector2f* temp = p2_; p2_ = NULL; @@ -1056,6 +1196,7 @@ inline void SSL_FieldLineSegment::set_allocated_p2(::Vector2f* p2) { } else { clear_has_p2(); } + // @@protoc_insertion_point(field_set_allocated:SSL_FieldLineSegment.p2) } // required float thickness = 4; @@ -1073,11 +1214,13 @@ inline void SSL_FieldLineSegment::clear_thickness() { clear_has_thickness(); } inline float SSL_FieldLineSegment::thickness() const { + // @@protoc_insertion_point(field_get:SSL_FieldLineSegment.thickness) return thickness_; } inline void SSL_FieldLineSegment::set_thickness(float value) { set_has_thickness(); thickness_ = value; + // @@protoc_insertion_point(field_set:SSL_FieldLineSegment.thickness) } // ------------------------------------------------------------------- @@ -1095,63 +1238,55 @@ inline void SSL_FieldCicularArc::clear_has_name() { _has_bits_[0] &= ~0x00000001u; } inline void SSL_FieldCicularArc::clear_name() { - if (name_ != &::google::protobuf::internal::kEmptyString) { - name_->clear(); - } + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); clear_has_name(); } inline const ::std::string& SSL_FieldCicularArc::name() const { - return *name_; + // @@protoc_insertion_point(field_get:SSL_FieldCicularArc.name) + return name_.GetNoArena(); } inline void SSL_FieldCicularArc::set_name(const ::std::string& value) { set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(value); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:SSL_FieldCicularArc.name) } +#if LANG_CXX11 +inline void SSL_FieldCicularArc::set_name(::std::string&& value) { + set_has_name(); + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:SSL_FieldCicularArc.name) +} +#endif inline void SSL_FieldCicularArc::set_name(const char* value) { set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(value); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:SSL_FieldCicularArc.name) } inline void SSL_FieldCicularArc::set_name(const char* value, size_t size) { set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(reinterpret_cast(value), size); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:SSL_FieldCicularArc.name) } inline ::std::string* SSL_FieldCicularArc::mutable_name() { set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - return name_; + // @@protoc_insertion_point(field_mutable:SSL_FieldCicularArc.name) + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* SSL_FieldCicularArc::release_name() { + // @@protoc_insertion_point(field_release:SSL_FieldCicularArc.name) clear_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = name_; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void SSL_FieldCicularArc::set_allocated_name(::std::string* name) { - if (name_ != &::google::protobuf::internal::kEmptyString) { - delete name_; - } - if (name) { + if (name != NULL) { set_has_name(); - name_ = name; } else { clear_has_name(); - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); } + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + // @@protoc_insertion_point(field_set_allocated:SSL_FieldCicularArc.name) } // required .Vector2f center = 2; @@ -1169,14 +1304,20 @@ inline void SSL_FieldCicularArc::clear_center() { clear_has_center(); } inline const ::Vector2f& SSL_FieldCicularArc::center() const { - return center_ != NULL ? *center_ : *default_instance_->center_; + // @@protoc_insertion_point(field_get:SSL_FieldCicularArc.center) + return center_ != NULL ? *center_ + : *::Vector2f::internal_default_instance(); } inline ::Vector2f* SSL_FieldCicularArc::mutable_center() { set_has_center(); - if (center_ == NULL) center_ = new ::Vector2f; + if (center_ == NULL) { + center_ = new ::Vector2f; + } + // @@protoc_insertion_point(field_mutable:SSL_FieldCicularArc.center) return center_; } inline ::Vector2f* SSL_FieldCicularArc::release_center() { + // @@protoc_insertion_point(field_release:SSL_FieldCicularArc.center) clear_has_center(); ::Vector2f* temp = center_; center_ = NULL; @@ -1190,6 +1331,7 @@ inline void SSL_FieldCicularArc::set_allocated_center(::Vector2f* center) { } else { clear_has_center(); } + // @@protoc_insertion_point(field_set_allocated:SSL_FieldCicularArc.center) } // required float radius = 3; @@ -1207,11 +1349,13 @@ inline void SSL_FieldCicularArc::clear_radius() { clear_has_radius(); } inline float SSL_FieldCicularArc::radius() const { + // @@protoc_insertion_point(field_get:SSL_FieldCicularArc.radius) return radius_; } inline void SSL_FieldCicularArc::set_radius(float value) { set_has_radius(); radius_ = value; + // @@protoc_insertion_point(field_set:SSL_FieldCicularArc.radius) } // required float a1 = 4; @@ -1229,11 +1373,13 @@ inline void SSL_FieldCicularArc::clear_a1() { clear_has_a1(); } inline float SSL_FieldCicularArc::a1() const { + // @@protoc_insertion_point(field_get:SSL_FieldCicularArc.a1) return a1_; } inline void SSL_FieldCicularArc::set_a1(float value) { set_has_a1(); a1_ = value; + // @@protoc_insertion_point(field_set:SSL_FieldCicularArc.a1) } // required float a2 = 5; @@ -1251,11 +1397,13 @@ inline void SSL_FieldCicularArc::clear_a2() { clear_has_a2(); } inline float SSL_FieldCicularArc::a2() const { + // @@protoc_insertion_point(field_get:SSL_FieldCicularArc.a2) return a2_; } inline void SSL_FieldCicularArc::set_a2(float value) { set_has_a2(); a2_ = value; + // @@protoc_insertion_point(field_set:SSL_FieldCicularArc.a2) } // required float thickness = 6; @@ -1273,11 +1421,13 @@ inline void SSL_FieldCicularArc::clear_thickness() { clear_has_thickness(); } inline float SSL_FieldCicularArc::thickness() const { + // @@protoc_insertion_point(field_get:SSL_FieldCicularArc.thickness) return thickness_; } inline void SSL_FieldCicularArc::set_thickness(float value) { set_has_thickness(); thickness_ = value; + // @@protoc_insertion_point(field_set:SSL_FieldCicularArc.thickness) } // ------------------------------------------------------------------- @@ -1299,11 +1449,13 @@ inline void SSL_GeometryFieldSize::clear_field_length() { clear_has_field_length(); } inline ::google::protobuf::int32 SSL_GeometryFieldSize::field_length() const { + // @@protoc_insertion_point(field_get:SSL_GeometryFieldSize.field_length) return field_length_; } inline void SSL_GeometryFieldSize::set_field_length(::google::protobuf::int32 value) { set_has_field_length(); field_length_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryFieldSize.field_length) } // required int32 field_width = 2; @@ -1321,11 +1473,13 @@ inline void SSL_GeometryFieldSize::clear_field_width() { clear_has_field_width(); } inline ::google::protobuf::int32 SSL_GeometryFieldSize::field_width() const { + // @@protoc_insertion_point(field_get:SSL_GeometryFieldSize.field_width) return field_width_; } inline void SSL_GeometryFieldSize::set_field_width(::google::protobuf::int32 value) { set_has_field_width(); field_width_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryFieldSize.field_width) } // required int32 goal_width = 3; @@ -1343,11 +1497,13 @@ inline void SSL_GeometryFieldSize::clear_goal_width() { clear_has_goal_width(); } inline ::google::protobuf::int32 SSL_GeometryFieldSize::goal_width() const { + // @@protoc_insertion_point(field_get:SSL_GeometryFieldSize.goal_width) return goal_width_; } inline void SSL_GeometryFieldSize::set_goal_width(::google::protobuf::int32 value) { set_has_goal_width(); goal_width_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryFieldSize.goal_width) } // required int32 goal_depth = 4; @@ -1365,11 +1521,13 @@ inline void SSL_GeometryFieldSize::clear_goal_depth() { clear_has_goal_depth(); } inline ::google::protobuf::int32 SSL_GeometryFieldSize::goal_depth() const { + // @@protoc_insertion_point(field_get:SSL_GeometryFieldSize.goal_depth) return goal_depth_; } inline void SSL_GeometryFieldSize::set_goal_depth(::google::protobuf::int32 value) { set_has_goal_depth(); goal_depth_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryFieldSize.goal_depth) } // required int32 boundary_width = 5; @@ -1387,11 +1545,13 @@ inline void SSL_GeometryFieldSize::clear_boundary_width() { clear_has_boundary_width(); } inline ::google::protobuf::int32 SSL_GeometryFieldSize::boundary_width() const { + // @@protoc_insertion_point(field_get:SSL_GeometryFieldSize.boundary_width) return boundary_width_; } inline void SSL_GeometryFieldSize::set_boundary_width(::google::protobuf::int32 value) { set_has_boundary_width(); boundary_width_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryFieldSize.boundary_width) } // repeated .SSL_FieldLineSegment field_lines = 6; @@ -1402,22 +1562,27 @@ inline void SSL_GeometryFieldSize::clear_field_lines() { field_lines_.Clear(); } inline const ::SSL_FieldLineSegment& SSL_GeometryFieldSize::field_lines(int index) const { + // @@protoc_insertion_point(field_get:SSL_GeometryFieldSize.field_lines) return field_lines_.Get(index); } inline ::SSL_FieldLineSegment* SSL_GeometryFieldSize::mutable_field_lines(int index) { + // @@protoc_insertion_point(field_mutable:SSL_GeometryFieldSize.field_lines) return field_lines_.Mutable(index); } inline ::SSL_FieldLineSegment* SSL_GeometryFieldSize::add_field_lines() { + // @@protoc_insertion_point(field_add:SSL_GeometryFieldSize.field_lines) return field_lines_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::SSL_FieldLineSegment >& -SSL_GeometryFieldSize::field_lines() const { - return field_lines_; -} inline ::google::protobuf::RepeatedPtrField< ::SSL_FieldLineSegment >* SSL_GeometryFieldSize::mutable_field_lines() { + // @@protoc_insertion_point(field_mutable_list:SSL_GeometryFieldSize.field_lines) return &field_lines_; } +inline const ::google::protobuf::RepeatedPtrField< ::SSL_FieldLineSegment >& +SSL_GeometryFieldSize::field_lines() const { + // @@protoc_insertion_point(field_list:SSL_GeometryFieldSize.field_lines) + return field_lines_; +} // repeated .SSL_FieldCicularArc field_arcs = 7; inline int SSL_GeometryFieldSize::field_arcs_size() const { @@ -1427,22 +1592,27 @@ inline void SSL_GeometryFieldSize::clear_field_arcs() { field_arcs_.Clear(); } inline const ::SSL_FieldCicularArc& SSL_GeometryFieldSize::field_arcs(int index) const { + // @@protoc_insertion_point(field_get:SSL_GeometryFieldSize.field_arcs) return field_arcs_.Get(index); } inline ::SSL_FieldCicularArc* SSL_GeometryFieldSize::mutable_field_arcs(int index) { + // @@protoc_insertion_point(field_mutable:SSL_GeometryFieldSize.field_arcs) return field_arcs_.Mutable(index); } inline ::SSL_FieldCicularArc* SSL_GeometryFieldSize::add_field_arcs() { + // @@protoc_insertion_point(field_add:SSL_GeometryFieldSize.field_arcs) return field_arcs_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::SSL_FieldCicularArc >& -SSL_GeometryFieldSize::field_arcs() const { - return field_arcs_; -} inline ::google::protobuf::RepeatedPtrField< ::SSL_FieldCicularArc >* SSL_GeometryFieldSize::mutable_field_arcs() { + // @@protoc_insertion_point(field_mutable_list:SSL_GeometryFieldSize.field_arcs) return &field_arcs_; } +inline const ::google::protobuf::RepeatedPtrField< ::SSL_FieldCicularArc >& +SSL_GeometryFieldSize::field_arcs() const { + // @@protoc_insertion_point(field_list:SSL_GeometryFieldSize.field_arcs) + return field_arcs_; +} // ------------------------------------------------------------------- @@ -1463,11 +1633,13 @@ inline void SSL_GeometryCameraCalibration::clear_camera_id() { clear_has_camera_id(); } inline ::google::protobuf::uint32 SSL_GeometryCameraCalibration::camera_id() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.camera_id) return camera_id_; } inline void SSL_GeometryCameraCalibration::set_camera_id(::google::protobuf::uint32 value) { set_has_camera_id(); camera_id_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.camera_id) } // required float focal_length = 2; @@ -1485,11 +1657,13 @@ inline void SSL_GeometryCameraCalibration::clear_focal_length() { clear_has_focal_length(); } inline float SSL_GeometryCameraCalibration::focal_length() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.focal_length) return focal_length_; } inline void SSL_GeometryCameraCalibration::set_focal_length(float value) { set_has_focal_length(); focal_length_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.focal_length) } // required float principal_point_x = 3; @@ -1507,11 +1681,13 @@ inline void SSL_GeometryCameraCalibration::clear_principal_point_x() { clear_has_principal_point_x(); } inline float SSL_GeometryCameraCalibration::principal_point_x() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.principal_point_x) return principal_point_x_; } inline void SSL_GeometryCameraCalibration::set_principal_point_x(float value) { set_has_principal_point_x(); principal_point_x_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.principal_point_x) } // required float principal_point_y = 4; @@ -1529,11 +1705,13 @@ inline void SSL_GeometryCameraCalibration::clear_principal_point_y() { clear_has_principal_point_y(); } inline float SSL_GeometryCameraCalibration::principal_point_y() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.principal_point_y) return principal_point_y_; } inline void SSL_GeometryCameraCalibration::set_principal_point_y(float value) { set_has_principal_point_y(); principal_point_y_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.principal_point_y) } // required float distortion = 5; @@ -1551,11 +1729,13 @@ inline void SSL_GeometryCameraCalibration::clear_distortion() { clear_has_distortion(); } inline float SSL_GeometryCameraCalibration::distortion() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.distortion) return distortion_; } inline void SSL_GeometryCameraCalibration::set_distortion(float value) { set_has_distortion(); distortion_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.distortion) } // required float q0 = 6; @@ -1573,11 +1753,13 @@ inline void SSL_GeometryCameraCalibration::clear_q0() { clear_has_q0(); } inline float SSL_GeometryCameraCalibration::q0() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.q0) return q0_; } inline void SSL_GeometryCameraCalibration::set_q0(float value) { set_has_q0(); q0_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.q0) } // required float q1 = 7; @@ -1595,11 +1777,13 @@ inline void SSL_GeometryCameraCalibration::clear_q1() { clear_has_q1(); } inline float SSL_GeometryCameraCalibration::q1() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.q1) return q1_; } inline void SSL_GeometryCameraCalibration::set_q1(float value) { set_has_q1(); q1_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.q1) } // required float q2 = 8; @@ -1617,11 +1801,13 @@ inline void SSL_GeometryCameraCalibration::clear_q2() { clear_has_q2(); } inline float SSL_GeometryCameraCalibration::q2() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.q2) return q2_; } inline void SSL_GeometryCameraCalibration::set_q2(float value) { set_has_q2(); q2_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.q2) } // required float q3 = 9; @@ -1639,11 +1825,13 @@ inline void SSL_GeometryCameraCalibration::clear_q3() { clear_has_q3(); } inline float SSL_GeometryCameraCalibration::q3() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.q3) return q3_; } inline void SSL_GeometryCameraCalibration::set_q3(float value) { set_has_q3(); q3_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.q3) } // required float tx = 10; @@ -1661,11 +1849,13 @@ inline void SSL_GeometryCameraCalibration::clear_tx() { clear_has_tx(); } inline float SSL_GeometryCameraCalibration::tx() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.tx) return tx_; } inline void SSL_GeometryCameraCalibration::set_tx(float value) { set_has_tx(); tx_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.tx) } // required float ty = 11; @@ -1683,11 +1873,13 @@ inline void SSL_GeometryCameraCalibration::clear_ty() { clear_has_ty(); } inline float SSL_GeometryCameraCalibration::ty() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.ty) return ty_; } inline void SSL_GeometryCameraCalibration::set_ty(float value) { set_has_ty(); ty_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.ty) } // required float tz = 12; @@ -1705,11 +1897,13 @@ inline void SSL_GeometryCameraCalibration::clear_tz() { clear_has_tz(); } inline float SSL_GeometryCameraCalibration::tz() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.tz) return tz_; } inline void SSL_GeometryCameraCalibration::set_tz(float value) { set_has_tz(); tz_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.tz) } // optional float derived_camera_world_tx = 13; @@ -1727,11 +1921,13 @@ inline void SSL_GeometryCameraCalibration::clear_derived_camera_world_tx() { clear_has_derived_camera_world_tx(); } inline float SSL_GeometryCameraCalibration::derived_camera_world_tx() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.derived_camera_world_tx) return derived_camera_world_tx_; } inline void SSL_GeometryCameraCalibration::set_derived_camera_world_tx(float value) { set_has_derived_camera_world_tx(); derived_camera_world_tx_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.derived_camera_world_tx) } // optional float derived_camera_world_ty = 14; @@ -1749,11 +1945,13 @@ inline void SSL_GeometryCameraCalibration::clear_derived_camera_world_ty() { clear_has_derived_camera_world_ty(); } inline float SSL_GeometryCameraCalibration::derived_camera_world_ty() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.derived_camera_world_ty) return derived_camera_world_ty_; } inline void SSL_GeometryCameraCalibration::set_derived_camera_world_ty(float value) { set_has_derived_camera_world_ty(); derived_camera_world_ty_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.derived_camera_world_ty) } // optional float derived_camera_world_tz = 15; @@ -1771,11 +1969,13 @@ inline void SSL_GeometryCameraCalibration::clear_derived_camera_world_tz() { clear_has_derived_camera_world_tz(); } inline float SSL_GeometryCameraCalibration::derived_camera_world_tz() const { + // @@protoc_insertion_point(field_get:SSL_GeometryCameraCalibration.derived_camera_world_tz) return derived_camera_world_tz_; } inline void SSL_GeometryCameraCalibration::set_derived_camera_world_tz(float value) { set_has_derived_camera_world_tz(); derived_camera_world_tz_ = value; + // @@protoc_insertion_point(field_set:SSL_GeometryCameraCalibration.derived_camera_world_tz) } // ------------------------------------------------------------------- @@ -1797,14 +1997,20 @@ inline void SSL_GeometryData::clear_field() { clear_has_field(); } inline const ::SSL_GeometryFieldSize& SSL_GeometryData::field() const { - return field_ != NULL ? *field_ : *default_instance_->field_; + // @@protoc_insertion_point(field_get:SSL_GeometryData.field) + return field_ != NULL ? *field_ + : *::SSL_GeometryFieldSize::internal_default_instance(); } inline ::SSL_GeometryFieldSize* SSL_GeometryData::mutable_field() { set_has_field(); - if (field_ == NULL) field_ = new ::SSL_GeometryFieldSize; + if (field_ == NULL) { + field_ = new ::SSL_GeometryFieldSize; + } + // @@protoc_insertion_point(field_mutable:SSL_GeometryData.field) return field_; } inline ::SSL_GeometryFieldSize* SSL_GeometryData::release_field() { + // @@protoc_insertion_point(field_release:SSL_GeometryData.field) clear_has_field(); ::SSL_GeometryFieldSize* temp = field_; field_ = NULL; @@ -1818,6 +2024,7 @@ inline void SSL_GeometryData::set_allocated_field(::SSL_GeometryFieldSize* field } else { clear_has_field(); } + // @@protoc_insertion_point(field_set_allocated:SSL_GeometryData.field) } // repeated .SSL_GeometryCameraCalibration calib = 2; @@ -1828,34 +2035,42 @@ inline void SSL_GeometryData::clear_calib() { calib_.Clear(); } inline const ::SSL_GeometryCameraCalibration& SSL_GeometryData::calib(int index) const { + // @@protoc_insertion_point(field_get:SSL_GeometryData.calib) return calib_.Get(index); } inline ::SSL_GeometryCameraCalibration* SSL_GeometryData::mutable_calib(int index) { + // @@protoc_insertion_point(field_mutable:SSL_GeometryData.calib) return calib_.Mutable(index); } inline ::SSL_GeometryCameraCalibration* SSL_GeometryData::add_calib() { + // @@protoc_insertion_point(field_add:SSL_GeometryData.calib) return calib_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::SSL_GeometryCameraCalibration >& -SSL_GeometryData::calib() const { - return calib_; -} inline ::google::protobuf::RepeatedPtrField< ::SSL_GeometryCameraCalibration >* SSL_GeometryData::mutable_calib() { + // @@protoc_insertion_point(field_mutable_list:SSL_GeometryData.calib) return &calib_; } +inline const ::google::protobuf::RepeatedPtrField< ::SSL_GeometryCameraCalibration >& +SSL_GeometryData::calib() const { + // @@protoc_insertion_point(field_list:SSL_GeometryData.calib) + return calib_; +} +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS +// ------------------------------------------------------------------- -// @@protoc_insertion_point(namespace_scope) +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- -#ifndef SWIG -namespace google { -namespace protobuf { +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- -} // namespace google -} // namespace protobuf -#endif // SWIG +// @@protoc_insertion_point(namespace_scope) + // @@protoc_insertion_point(global_scope) diff --git a/src/proto/messages_robocup_ssl_geometry_legacy.pb.cc b/src/proto/messages_robocup_ssl_geometry_legacy.pb.cc index b5569a2..36f523c 100644 --- a/src/proto/messages_robocup_ssl_geometry_legacy.pb.cc +++ b/src/proto/messages_robocup_ssl_geometry_legacy.pb.cc @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -18,27 +19,25 @@ namespace RoboCup2014Legacy { namespace Geometry { +class SSL_GeometryFieldSizeDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +SSL_GeometryFieldSizeDefaultTypeInternal _SSL_GeometryFieldSize_default_instance_; +class SSL_GeometryDataDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +SSL_GeometryDataDefaultTypeInternal _SSL_GeometryData_default_instance_; namespace { -const ::google::protobuf::Descriptor* SSL_GeometryFieldSize_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - SSL_GeometryFieldSize_reflection_ = NULL; -const ::google::protobuf::Descriptor* SSL_GeometryData_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - SSL_GeometryData_reflection_ = NULL; +::google::protobuf::Metadata file_level_metadata[2]; } // namespace -void protobuf_AssignDesc_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto() { - protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto(); - const ::google::protobuf::FileDescriptor* file = - ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( - "messages_robocup_ssl_geometry_legacy.proto"); - GOOGLE_CHECK(file != NULL); - SSL_GeometryFieldSize_descriptor_ = file->message_type(0); - static const int SSL_GeometryFieldSize_offsets_[14] = { +const ::google::protobuf::uint32* protobuf_Offsets_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto() GOOGLE_ATTRIBUTE_COLD; +const ::google::protobuf::uint32* protobuf_Offsets_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto() { + static const ::google::protobuf::uint32 offsets[] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryFieldSize, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryFieldSize, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryFieldSize, line_width_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryFieldSize, field_length_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryFieldSize, field_width_), @@ -53,94 +52,120 @@ void protobuf_AssignDesc_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto() GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryFieldSize, free_kick_from_defense_dist_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryFieldSize, penalty_spot_from_field_line_dist_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryFieldSize, penalty_line_from_spot_dist_), - }; - SSL_GeometryFieldSize_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - SSL_GeometryFieldSize_descriptor_, - SSL_GeometryFieldSize::default_instance_, - SSL_GeometryFieldSize_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryFieldSize, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryFieldSize, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(SSL_GeometryFieldSize)); - SSL_GeometryData_descriptor_ = file->message_type(1); - static const int SSL_GeometryData_offsets_[2] = { + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryData, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryData, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryData, field_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryData, calib_), + 0, + 1, }; - SSL_GeometryData_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - SSL_GeometryData_descriptor_, - SSL_GeometryData::default_instance_, - SSL_GeometryData_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryData, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_GeometryData, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(SSL_GeometryData)); + return offsets; } +static const ::google::protobuf::internal::MigrationSchema schemas[] = { + { 0, 18, sizeof(SSL_GeometryFieldSize)}, + { 32, 38, sizeof(SSL_GeometryData)}, +}; + +static const ::google::protobuf::internal::DefaultInstanceData file_default_instances[] = { + {reinterpret_cast(&_SSL_GeometryFieldSize_default_instance_), NULL}, + {reinterpret_cast(&_SSL_GeometryData_default_instance_), NULL}, +}; + namespace { -GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); -inline void protobuf_AssignDescriptorsOnce() { - ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, - &protobuf_AssignDesc_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto); +void protobuf_AssignDescriptors() { + protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto(); + ::google::protobuf::MessageFactory* factory = NULL; + AssignDescriptors( + "messages_robocup_ssl_geometry_legacy.proto", schemas, file_default_instances, protobuf_Offsets_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto(), factory, + file_level_metadata, NULL, NULL); } +void protobuf_AssignDescriptorsOnce() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); +} + +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - SSL_GeometryFieldSize_descriptor_, &SSL_GeometryFieldSize::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - SSL_GeometryData_descriptor_, &SSL_GeometryData::default_instance()); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 2); } } // namespace void protobuf_ShutdownFile_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto() { - delete SSL_GeometryFieldSize::default_instance_; - delete SSL_GeometryFieldSize_reflection_; - delete SSL_GeometryData::default_instance_; - delete SSL_GeometryData_reflection_; + _SSL_GeometryFieldSize_default_instance_.Shutdown(); + delete file_level_metadata[0].reflection; + _SSL_GeometryData_default_instance_.Shutdown(); + delete file_level_metadata[1].reflection; } -void protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto() { - static bool already_here = false; - if (already_here) return; - already_here = true; +void protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto_impl() { GOOGLE_PROTOBUF_VERIFY_VERSION; - ::protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto(); + ::protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_2eproto(); + ::google::protobuf::internal::InitProtobufDefaults(); + _SSL_GeometryFieldSize_default_instance_.DefaultConstruct(); + _SSL_GeometryData_default_instance_.DefaultConstruct(); + _SSL_GeometryData_default_instance_.get_mutable()->field_ = const_cast< ::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize*>( + ::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize::internal_default_instance()); +} + +void protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto_impl); +} +void protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto_impl() { + protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto(); + static const char descriptor[] = { + "\n*messages_robocup_ssl_geometry_legacy.p" + "roto\022\032RoboCup2014Legacy.Geometry\032#messag" + "es_robocup_ssl_geometry.proto\"\212\003\n\025SSL_Ge" + "ometryFieldSize\022\022\n\nline_width\030\001 \002(\005\022\024\n\014f" + "ield_length\030\002 \002(\005\022\023\n\013field_width\030\003 \002(\005\022\026" + "\n\016boundary_width\030\004 \002(\005\022\025\n\rreferee_width\030" + "\005 \002(\005\022\022\n\ngoal_width\030\006 \002(\005\022\022\n\ngoal_depth\030" + "\007 \002(\005\022\027\n\017goal_wall_width\030\010 \002(\005\022\034\n\024center" + "_circle_radius\030\t \002(\005\022\026\n\016defense_radius\030\n" + " \002(\005\022\027\n\017defense_stretch\030\013 \002(\005\022#\n\033free_ki" + "ck_from_defense_dist\030\014 \002(\005\022)\n!penalty_sp" + "ot_from_field_line_dist\030\r \002(\005\022#\n\033penalty" + "_line_from_spot_dist\030\016 \002(\005\"\203\001\n\020SSL_Geome" + "tryData\022@\n\005field\030\001 \002(\01321.RoboCup2014Lega" + "cy.Geometry.SSL_GeometryFieldSize\022-\n\005cal" + "ib\030\002 \003(\0132\036.SSL_GeometryCameraCalibration" + }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - "\n*messages_robocup_ssl_geometry_legacy.p" - "roto\022\032RoboCup2014Legacy.Geometry\032#messag" - "es_robocup_ssl_geometry.proto\"\212\003\n\025SSL_Ge" - "ometryFieldSize\022\022\n\nline_width\030\001 \002(\005\022\024\n\014f" - "ield_length\030\002 \002(\005\022\023\n\013field_width\030\003 \002(\005\022\026" - "\n\016boundary_width\030\004 \002(\005\022\025\n\rreferee_width\030" - "\005 \002(\005\022\022\n\ngoal_width\030\006 \002(\005\022\022\n\ngoal_depth\030" - "\007 \002(\005\022\027\n\017goal_wall_width\030\010 \002(\005\022\034\n\024center" - "_circle_radius\030\t \002(\005\022\026\n\016defense_radius\030\n" - " \002(\005\022\027\n\017defense_stretch\030\013 \002(\005\022#\n\033free_ki" - "ck_from_defense_dist\030\014 \002(\005\022)\n!penalty_sp" - "ot_from_field_line_dist\030\r \002(\005\022#\n\033penalty" - "_line_from_spot_dist\030\016 \002(\005\"\203\001\n\020SSL_Geome" - "tryData\022@\n\005field\030\001 \002(\01321.RoboCup2014Lega" - "cy.Geometry.SSL_GeometryFieldSize\022-\n\005cal" - "ib\030\002 \003(\0132\036.SSL_GeometryCameraCalibration", 640); + descriptor, 640); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "messages_robocup_ssl_geometry_legacy.proto", &protobuf_RegisterTypes); - SSL_GeometryFieldSize::default_instance_ = new SSL_GeometryFieldSize(); - SSL_GeometryData::default_instance_ = new SSL_GeometryData(); - SSL_GeometryFieldSize::default_instance_->InitAsDefaultInstance(); - SSL_GeometryData::default_instance_->InitAsDefaultInstance(); + ::protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto); } +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto_once_); +void protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto_once_, + &protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto_impl); +} // Force AddDescriptors() to be called at static initialization time. struct StaticDescriptorInitializer_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto { StaticDescriptorInitializer_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto() { @@ -150,7 +175,7 @@ struct StaticDescriptorInitializer_messages_5frobocup_5fssl_5fgeometry_5flegacy_ // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int SSL_GeometryFieldSize::kLineWidthFieldNumber; const int SSL_GeometryFieldSize::kFieldLengthFieldNumber; const int SSL_GeometryFieldSize::kFieldWidthFieldNumber; @@ -165,48 +190,40 @@ const int SSL_GeometryFieldSize::kDefenseStretchFieldNumber; const int SSL_GeometryFieldSize::kFreeKickFromDefenseDistFieldNumber; const int SSL_GeometryFieldSize::kPenaltySpotFromFieldLineDistFieldNumber; const int SSL_GeometryFieldSize::kPenaltyLineFromSpotDistFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 SSL_GeometryFieldSize::SSL_GeometryFieldSize() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize) } - -void SSL_GeometryFieldSize::InitAsDefaultInstance() { -} - SSL_GeometryFieldSize::SSL_GeometryFieldSize(const SSL_GeometryFieldSize& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::memcpy(&line_width_, &from.line_width_, + reinterpret_cast(&penalty_line_from_spot_dist_) - + reinterpret_cast(&line_width_) + sizeof(penalty_line_from_spot_dist_)); + // @@protoc_insertion_point(copy_constructor:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize) } void SSL_GeometryFieldSize::SharedCtor() { _cached_size_ = 0; - line_width_ = 0; - field_length_ = 0; - field_width_ = 0; - boundary_width_ = 0; - referee_width_ = 0; - goal_width_ = 0; - goal_depth_ = 0; - goal_wall_width_ = 0; - center_circle_radius_ = 0; - defense_radius_ = 0; - defense_stretch_ = 0; - free_kick_from_defense_dist_ = 0; - penalty_spot_from_field_line_dist_ = 0; - penalty_line_from_spot_dist_ = 0; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); + ::memset(&line_width_, 0, reinterpret_cast(&penalty_line_from_spot_dist_) - + reinterpret_cast(&line_width_) + sizeof(penalty_line_from_spot_dist_)); } SSL_GeometryFieldSize::~SSL_GeometryFieldSize() { + // @@protoc_insertion_point(destructor:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize) SharedDtor(); } void SSL_GeometryFieldSize::SharedDtor() { - if (this != default_instance_) { - } } void SSL_GeometryFieldSize::SetCachedSize(int size) const { @@ -216,277 +233,234 @@ void SSL_GeometryFieldSize::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* SSL_GeometryFieldSize::descriptor() { protobuf_AssignDescriptorsOnce(); - return SSL_GeometryFieldSize_descriptor_; + return file_level_metadata[0].descriptor; } const SSL_GeometryFieldSize& SSL_GeometryFieldSize::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto(); - return *default_instance_; + protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto(); + return *internal_default_instance(); } -SSL_GeometryFieldSize* SSL_GeometryFieldSize::default_instance_ = NULL; - -SSL_GeometryFieldSize* SSL_GeometryFieldSize::New() const { - return new SSL_GeometryFieldSize; +SSL_GeometryFieldSize* SSL_GeometryFieldSize::New(::google::protobuf::Arena* arena) const { + SSL_GeometryFieldSize* n = new SSL_GeometryFieldSize; + if (arena != NULL) { + arena->Own(n); + } + return n; } void SSL_GeometryFieldSize::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - line_width_ = 0; - field_length_ = 0; - field_width_ = 0; - boundary_width_ = 0; - referee_width_ = 0; - goal_width_ = 0; - goal_depth_ = 0; - goal_wall_width_ = 0; - } - if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) { - center_circle_radius_ = 0; - defense_radius_ = 0; - defense_stretch_ = 0; - free_kick_from_defense_dist_ = 0; - penalty_spot_from_field_line_dist_ = 0; - penalty_line_from_spot_dist_ = 0; - } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); +// @@protoc_insertion_point(message_clear_start:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize) + if (_has_bits_[0 / 32] & 255u) { + ::memset(&line_width_, 0, reinterpret_cast(&goal_wall_width_) - + reinterpret_cast(&line_width_) + sizeof(goal_wall_width_)); + } + if (_has_bits_[8 / 32] & 16128u) { + ::memset(¢er_circle_radius_, 0, reinterpret_cast(&penalty_line_from_spot_dist_) - + reinterpret_cast(¢er_circle_radius_) + sizeof(penalty_line_from_spot_dist_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool SSL_GeometryFieldSize::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required int32 line_width = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + if (tag == 8u) { + set_has_line_width(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &line_width_))); - set_has_line_width(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(16)) goto parse_field_length; break; } // required int32 field_length = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_field_length: + if (tag == 16u) { + set_has_field_length(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &field_length_))); - set_has_field_length(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(24)) goto parse_field_width; break; } // required int32 field_width = 3; case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_field_width: + if (tag == 24u) { + set_has_field_width(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &field_width_))); - set_has_field_width(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(32)) goto parse_boundary_width; break; } // required int32 boundary_width = 4; case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_boundary_width: + if (tag == 32u) { + set_has_boundary_width(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &boundary_width_))); - set_has_boundary_width(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(40)) goto parse_referee_width; break; } // required int32 referee_width = 5; case 5: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_referee_width: + if (tag == 40u) { + set_has_referee_width(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &referee_width_))); - set_has_referee_width(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(48)) goto parse_goal_width; break; } // required int32 goal_width = 6; case 6: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_goal_width: + if (tag == 48u) { + set_has_goal_width(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &goal_width_))); - set_has_goal_width(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(56)) goto parse_goal_depth; break; } // required int32 goal_depth = 7; case 7: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_goal_depth: + if (tag == 56u) { + set_has_goal_depth(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &goal_depth_))); - set_has_goal_depth(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(64)) goto parse_goal_wall_width; break; } // required int32 goal_wall_width = 8; case 8: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_goal_wall_width: + if (tag == 64u) { + set_has_goal_wall_width(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &goal_wall_width_))); - set_has_goal_wall_width(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(72)) goto parse_center_circle_radius; break; } // required int32 center_circle_radius = 9; case 9: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_center_circle_radius: + if (tag == 72u) { + set_has_center_circle_radius(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, ¢er_circle_radius_))); - set_has_center_circle_radius(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(80)) goto parse_defense_radius; break; } // required int32 defense_radius = 10; case 10: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_defense_radius: + if (tag == 80u) { + set_has_defense_radius(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &defense_radius_))); - set_has_defense_radius(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(88)) goto parse_defense_stretch; break; } // required int32 defense_stretch = 11; case 11: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_defense_stretch: + if (tag == 88u) { + set_has_defense_stretch(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &defense_stretch_))); - set_has_defense_stretch(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(96)) goto parse_free_kick_from_defense_dist; break; } // required int32 free_kick_from_defense_dist = 12; case 12: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_free_kick_from_defense_dist: + if (tag == 96u) { + set_has_free_kick_from_defense_dist(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &free_kick_from_defense_dist_))); - set_has_free_kick_from_defense_dist(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(104)) goto parse_penalty_spot_from_field_line_dist; break; } // required int32 penalty_spot_from_field_line_dist = 13; case 13: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_penalty_spot_from_field_line_dist: + if (tag == 104u) { + set_has_penalty_spot_from_field_line_dist(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &penalty_spot_from_field_line_dist_))); - set_has_penalty_spot_from_field_line_dist(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(112)) goto parse_penalty_line_from_spot_dist; break; } // required int32 penalty_line_from_spot_dist = 14; case 14: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_penalty_line_from_spot_dist: + if (tag == 112u) { + set_has_penalty_line_from_spot_dist(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &penalty_line_from_spot_dist_))); - set_has_penalty_line_from_spot_dist(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectAtEnd()) return true; break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -494,12 +468,18 @@ bool SSL_GeometryFieldSize::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize) return true; +failure: + // @@protoc_insertion_point(parse_failure:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize) + return false; #undef DO_ } void SSL_GeometryFieldSize::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize) // required int32 line_width = 1; if (has_line_width()) { ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->line_width(), output); @@ -570,14 +550,17 @@ void SSL_GeometryFieldSize::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteInt32(14, this->penalty_line_from_spot_dist(), output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize) } -::google::protobuf::uint8* SSL_GeometryFieldSize::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* SSL_GeometryFieldSize::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize) // required int32 line_width = 1; if (has_line_width()) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->line_width(), target); @@ -648,144 +631,228 @@ ::google::protobuf::uint8* SSL_GeometryFieldSize::SerializeWithCachedSizesToArra target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(14, this->penalty_line_from_spot_dist(), target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize) return target; } -int SSL_GeometryFieldSize::ByteSize() const { - int total_size = 0; +size_t SSL_GeometryFieldSize::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize) + size_t total_size = 0; - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_line_width()) { // required int32 line_width = 1; - if (has_line_width()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->line_width()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->line_width()); + } + if (has_field_length()) { // required int32 field_length = 2; - if (has_field_length()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->field_length()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->field_length()); + } + if (has_field_width()) { // required int32 field_width = 3; - if (has_field_width()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->field_width()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->field_width()); + } + if (has_boundary_width()) { // required int32 boundary_width = 4; - if (has_boundary_width()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->boundary_width()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->boundary_width()); + } + if (has_referee_width()) { // required int32 referee_width = 5; - if (has_referee_width()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->referee_width()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->referee_width()); + } + if (has_goal_width()) { // required int32 goal_width = 6; - if (has_goal_width()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->goal_width()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->goal_width()); + } + if (has_goal_depth()) { // required int32 goal_depth = 7; - if (has_goal_depth()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->goal_depth()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->goal_depth()); + } + if (has_goal_wall_width()) { // required int32 goal_wall_width = 8; - if (has_goal_wall_width()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->goal_wall_width()); - } - + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->goal_wall_width()); } - if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) { + + if (has_center_circle_radius()) { // required int32 center_circle_radius = 9; - if (has_center_circle_radius()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->center_circle_radius()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->center_circle_radius()); + } + if (has_defense_radius()) { // required int32 defense_radius = 10; - if (has_defense_radius()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->defense_radius()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->defense_radius()); + } + if (has_defense_stretch()) { // required int32 defense_stretch = 11; - if (has_defense_stretch()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->defense_stretch()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->defense_stretch()); + } + if (has_free_kick_from_defense_dist()) { // required int32 free_kick_from_defense_dist = 12; - if (has_free_kick_from_defense_dist()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->free_kick_from_defense_dist()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->free_kick_from_defense_dist()); + } + if (has_penalty_spot_from_field_line_dist()) { // required int32 penalty_spot_from_field_line_dist = 13; - if (has_penalty_spot_from_field_line_dist()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->penalty_spot_from_field_line_dist()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->penalty_spot_from_field_line_dist()); + } + if (has_penalty_line_from_spot_dist()) { // required int32 penalty_line_from_spot_dist = 14; - if (has_penalty_line_from_spot_dist()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->penalty_line_from_spot_dist()); - } - + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->penalty_line_from_spot_dist()); } - if (!unknown_fields().empty()) { + + return total_size; +} +size_t SSL_GeometryFieldSize::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( unknown_fields()); } + if (((_has_bits_[0] & 0x00003fff) ^ 0x00003fff) == 0) { // All required fields are present. + // required int32 line_width = 1; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->line_width()); + + // required int32 field_length = 2; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->field_length()); + + // required int32 field_width = 3; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->field_width()); + + // required int32 boundary_width = 4; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->boundary_width()); + + // required int32 referee_width = 5; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->referee_width()); + + // required int32 goal_width = 6; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->goal_width()); + + // required int32 goal_depth = 7; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->goal_depth()); + + // required int32 goal_wall_width = 8; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->goal_wall_width()); + + // required int32 center_circle_radius = 9; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->center_circle_radius()); + + // required int32 defense_radius = 10; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->defense_radius()); + + // required int32 defense_stretch = 11; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->defense_stretch()); + + // required int32 free_kick_from_defense_dist = 12; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->free_kick_from_defense_dist()); + + // required int32 penalty_spot_from_field_line_dist = 13; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->penalty_spot_from_field_line_dist()); + + // required int32 penalty_line_from_spot_dist = 14; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->penalty_line_from_spot_dist()); + + } else { + total_size += RequiredFieldsByteSizeFallback(); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void SSL_GeometryFieldSize::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize) + GOOGLE_DCHECK_NE(&from, this); const SSL_GeometryFieldSize* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize) MergeFrom(*source); } } void SSL_GeometryFieldSize::MergeFrom(const SSL_GeometryFieldSize& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { +// @@protoc_insertion_point(class_specific_merge_from_start:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._has_bits_[0 / 32] & 255u) { if (from.has_line_width()) { set_line_width(from.line_width()); } @@ -811,7 +878,7 @@ void SSL_GeometryFieldSize::MergeFrom(const SSL_GeometryFieldSize& from) { set_goal_wall_width(from.goal_wall_width()); } } - if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) { + if (from._has_bits_[8 / 32] & 16128u) { if (from.has_center_circle_radius()) { set_center_circle_radius(from.center_circle_radius()); } @@ -831,16 +898,17 @@ void SSL_GeometryFieldSize::MergeFrom(const SSL_GeometryFieldSize& from) { set_penalty_line_from_spot_dist(from.penalty_line_from_spot_dist()); } } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void SSL_GeometryFieldSize::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize) if (&from == this) return; Clear(); MergeFrom(from); } void SSL_GeometryFieldSize::CopyFrom(const SSL_GeometryFieldSize& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize) if (&from == this) return; Clear(); MergeFrom(from); @@ -848,75 +916,421 @@ void SSL_GeometryFieldSize::CopyFrom(const SSL_GeometryFieldSize& from) { bool SSL_GeometryFieldSize::IsInitialized() const { if ((_has_bits_[0] & 0x00003fff) != 0x00003fff) return false; - return true; } void SSL_GeometryFieldSize::Swap(SSL_GeometryFieldSize* other) { - if (other != this) { - std::swap(line_width_, other->line_width_); - std::swap(field_length_, other->field_length_); - std::swap(field_width_, other->field_width_); - std::swap(boundary_width_, other->boundary_width_); - std::swap(referee_width_, other->referee_width_); - std::swap(goal_width_, other->goal_width_); - std::swap(goal_depth_, other->goal_depth_); - std::swap(goal_wall_width_, other->goal_wall_width_); - std::swap(center_circle_radius_, other->center_circle_radius_); - std::swap(defense_radius_, other->defense_radius_); - std::swap(defense_stretch_, other->defense_stretch_); - std::swap(free_kick_from_defense_dist_, other->free_kick_from_defense_dist_); - std::swap(penalty_spot_from_field_line_dist_, other->penalty_spot_from_field_line_dist_); - std::swap(penalty_line_from_spot_dist_, other->penalty_line_from_spot_dist_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void SSL_GeometryFieldSize::InternalSwap(SSL_GeometryFieldSize* other) { + std::swap(line_width_, other->line_width_); + std::swap(field_length_, other->field_length_); + std::swap(field_width_, other->field_width_); + std::swap(boundary_width_, other->boundary_width_); + std::swap(referee_width_, other->referee_width_); + std::swap(goal_width_, other->goal_width_); + std::swap(goal_depth_, other->goal_depth_); + std::swap(goal_wall_width_, other->goal_wall_width_); + std::swap(center_circle_radius_, other->center_circle_radius_); + std::swap(defense_radius_, other->defense_radius_); + std::swap(defense_stretch_, other->defense_stretch_); + std::swap(free_kick_from_defense_dist_, other->free_kick_from_defense_dist_); + std::swap(penalty_spot_from_field_line_dist_, other->penalty_spot_from_field_line_dist_); + std::swap(penalty_line_from_spot_dist_, other->penalty_line_from_spot_dist_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata SSL_GeometryFieldSize::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = SSL_GeometryFieldSize_descriptor_; - metadata.reflection = SSL_GeometryFieldSize_reflection_; - return metadata; + return file_level_metadata[0]; } +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// SSL_GeometryFieldSize + +// required int32 line_width = 1; +bool SSL_GeometryFieldSize::has_line_width() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void SSL_GeometryFieldSize::set_has_line_width() { + _has_bits_[0] |= 0x00000001u; +} +void SSL_GeometryFieldSize::clear_has_line_width() { + _has_bits_[0] &= ~0x00000001u; +} +void SSL_GeometryFieldSize::clear_line_width() { + line_width_ = 0; + clear_has_line_width(); +} +::google::protobuf::int32 SSL_GeometryFieldSize::line_width() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.line_width) + return line_width_; +} +void SSL_GeometryFieldSize::set_line_width(::google::protobuf::int32 value) { + set_has_line_width(); + line_width_ = value; + // @@protoc_insertion_point(field_set:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.line_width) +} + +// required int32 field_length = 2; +bool SSL_GeometryFieldSize::has_field_length() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +void SSL_GeometryFieldSize::set_has_field_length() { + _has_bits_[0] |= 0x00000002u; +} +void SSL_GeometryFieldSize::clear_has_field_length() { + _has_bits_[0] &= ~0x00000002u; +} +void SSL_GeometryFieldSize::clear_field_length() { + field_length_ = 0; + clear_has_field_length(); +} +::google::protobuf::int32 SSL_GeometryFieldSize::field_length() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.field_length) + return field_length_; +} +void SSL_GeometryFieldSize::set_field_length(::google::protobuf::int32 value) { + set_has_field_length(); + field_length_ = value; + // @@protoc_insertion_point(field_set:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.field_length) +} + +// required int32 field_width = 3; +bool SSL_GeometryFieldSize::has_field_width() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +void SSL_GeometryFieldSize::set_has_field_width() { + _has_bits_[0] |= 0x00000004u; +} +void SSL_GeometryFieldSize::clear_has_field_width() { + _has_bits_[0] &= ~0x00000004u; +} +void SSL_GeometryFieldSize::clear_field_width() { + field_width_ = 0; + clear_has_field_width(); +} +::google::protobuf::int32 SSL_GeometryFieldSize::field_width() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.field_width) + return field_width_; +} +void SSL_GeometryFieldSize::set_field_width(::google::protobuf::int32 value) { + set_has_field_width(); + field_width_ = value; + // @@protoc_insertion_point(field_set:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.field_width) +} + +// required int32 boundary_width = 4; +bool SSL_GeometryFieldSize::has_boundary_width() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +void SSL_GeometryFieldSize::set_has_boundary_width() { + _has_bits_[0] |= 0x00000008u; +} +void SSL_GeometryFieldSize::clear_has_boundary_width() { + _has_bits_[0] &= ~0x00000008u; +} +void SSL_GeometryFieldSize::clear_boundary_width() { + boundary_width_ = 0; + clear_has_boundary_width(); +} +::google::protobuf::int32 SSL_GeometryFieldSize::boundary_width() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.boundary_width) + return boundary_width_; +} +void SSL_GeometryFieldSize::set_boundary_width(::google::protobuf::int32 value) { + set_has_boundary_width(); + boundary_width_ = value; + // @@protoc_insertion_point(field_set:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.boundary_width) +} + +// required int32 referee_width = 5; +bool SSL_GeometryFieldSize::has_referee_width() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +void SSL_GeometryFieldSize::set_has_referee_width() { + _has_bits_[0] |= 0x00000010u; +} +void SSL_GeometryFieldSize::clear_has_referee_width() { + _has_bits_[0] &= ~0x00000010u; +} +void SSL_GeometryFieldSize::clear_referee_width() { + referee_width_ = 0; + clear_has_referee_width(); +} +::google::protobuf::int32 SSL_GeometryFieldSize::referee_width() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.referee_width) + return referee_width_; +} +void SSL_GeometryFieldSize::set_referee_width(::google::protobuf::int32 value) { + set_has_referee_width(); + referee_width_ = value; + // @@protoc_insertion_point(field_set:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.referee_width) +} + +// required int32 goal_width = 6; +bool SSL_GeometryFieldSize::has_goal_width() const { + return (_has_bits_[0] & 0x00000020u) != 0; +} +void SSL_GeometryFieldSize::set_has_goal_width() { + _has_bits_[0] |= 0x00000020u; +} +void SSL_GeometryFieldSize::clear_has_goal_width() { + _has_bits_[0] &= ~0x00000020u; +} +void SSL_GeometryFieldSize::clear_goal_width() { + goal_width_ = 0; + clear_has_goal_width(); +} +::google::protobuf::int32 SSL_GeometryFieldSize::goal_width() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.goal_width) + return goal_width_; +} +void SSL_GeometryFieldSize::set_goal_width(::google::protobuf::int32 value) { + set_has_goal_width(); + goal_width_ = value; + // @@protoc_insertion_point(field_set:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.goal_width) +} + +// required int32 goal_depth = 7; +bool SSL_GeometryFieldSize::has_goal_depth() const { + return (_has_bits_[0] & 0x00000040u) != 0; +} +void SSL_GeometryFieldSize::set_has_goal_depth() { + _has_bits_[0] |= 0x00000040u; +} +void SSL_GeometryFieldSize::clear_has_goal_depth() { + _has_bits_[0] &= ~0x00000040u; +} +void SSL_GeometryFieldSize::clear_goal_depth() { + goal_depth_ = 0; + clear_has_goal_depth(); +} +::google::protobuf::int32 SSL_GeometryFieldSize::goal_depth() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.goal_depth) + return goal_depth_; +} +void SSL_GeometryFieldSize::set_goal_depth(::google::protobuf::int32 value) { + set_has_goal_depth(); + goal_depth_ = value; + // @@protoc_insertion_point(field_set:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.goal_depth) +} + +// required int32 goal_wall_width = 8; +bool SSL_GeometryFieldSize::has_goal_wall_width() const { + return (_has_bits_[0] & 0x00000080u) != 0; +} +void SSL_GeometryFieldSize::set_has_goal_wall_width() { + _has_bits_[0] |= 0x00000080u; +} +void SSL_GeometryFieldSize::clear_has_goal_wall_width() { + _has_bits_[0] &= ~0x00000080u; +} +void SSL_GeometryFieldSize::clear_goal_wall_width() { + goal_wall_width_ = 0; + clear_has_goal_wall_width(); +} +::google::protobuf::int32 SSL_GeometryFieldSize::goal_wall_width() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.goal_wall_width) + return goal_wall_width_; +} +void SSL_GeometryFieldSize::set_goal_wall_width(::google::protobuf::int32 value) { + set_has_goal_wall_width(); + goal_wall_width_ = value; + // @@protoc_insertion_point(field_set:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.goal_wall_width) +} + +// required int32 center_circle_radius = 9; +bool SSL_GeometryFieldSize::has_center_circle_radius() const { + return (_has_bits_[0] & 0x00000100u) != 0; +} +void SSL_GeometryFieldSize::set_has_center_circle_radius() { + _has_bits_[0] |= 0x00000100u; +} +void SSL_GeometryFieldSize::clear_has_center_circle_radius() { + _has_bits_[0] &= ~0x00000100u; +} +void SSL_GeometryFieldSize::clear_center_circle_radius() { + center_circle_radius_ = 0; + clear_has_center_circle_radius(); +} +::google::protobuf::int32 SSL_GeometryFieldSize::center_circle_radius() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.center_circle_radius) + return center_circle_radius_; +} +void SSL_GeometryFieldSize::set_center_circle_radius(::google::protobuf::int32 value) { + set_has_center_circle_radius(); + center_circle_radius_ = value; + // @@protoc_insertion_point(field_set:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.center_circle_radius) +} + +// required int32 defense_radius = 10; +bool SSL_GeometryFieldSize::has_defense_radius() const { + return (_has_bits_[0] & 0x00000200u) != 0; +} +void SSL_GeometryFieldSize::set_has_defense_radius() { + _has_bits_[0] |= 0x00000200u; +} +void SSL_GeometryFieldSize::clear_has_defense_radius() { + _has_bits_[0] &= ~0x00000200u; +} +void SSL_GeometryFieldSize::clear_defense_radius() { + defense_radius_ = 0; + clear_has_defense_radius(); +} +::google::protobuf::int32 SSL_GeometryFieldSize::defense_radius() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.defense_radius) + return defense_radius_; +} +void SSL_GeometryFieldSize::set_defense_radius(::google::protobuf::int32 value) { + set_has_defense_radius(); + defense_radius_ = value; + // @@protoc_insertion_point(field_set:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.defense_radius) +} + +// required int32 defense_stretch = 11; +bool SSL_GeometryFieldSize::has_defense_stretch() const { + return (_has_bits_[0] & 0x00000400u) != 0; +} +void SSL_GeometryFieldSize::set_has_defense_stretch() { + _has_bits_[0] |= 0x00000400u; +} +void SSL_GeometryFieldSize::clear_has_defense_stretch() { + _has_bits_[0] &= ~0x00000400u; +} +void SSL_GeometryFieldSize::clear_defense_stretch() { + defense_stretch_ = 0; + clear_has_defense_stretch(); +} +::google::protobuf::int32 SSL_GeometryFieldSize::defense_stretch() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.defense_stretch) + return defense_stretch_; +} +void SSL_GeometryFieldSize::set_defense_stretch(::google::protobuf::int32 value) { + set_has_defense_stretch(); + defense_stretch_ = value; + // @@protoc_insertion_point(field_set:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.defense_stretch) +} + +// required int32 free_kick_from_defense_dist = 12; +bool SSL_GeometryFieldSize::has_free_kick_from_defense_dist() const { + return (_has_bits_[0] & 0x00000800u) != 0; +} +void SSL_GeometryFieldSize::set_has_free_kick_from_defense_dist() { + _has_bits_[0] |= 0x00000800u; +} +void SSL_GeometryFieldSize::clear_has_free_kick_from_defense_dist() { + _has_bits_[0] &= ~0x00000800u; +} +void SSL_GeometryFieldSize::clear_free_kick_from_defense_dist() { + free_kick_from_defense_dist_ = 0; + clear_has_free_kick_from_defense_dist(); +} +::google::protobuf::int32 SSL_GeometryFieldSize::free_kick_from_defense_dist() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.free_kick_from_defense_dist) + return free_kick_from_defense_dist_; +} +void SSL_GeometryFieldSize::set_free_kick_from_defense_dist(::google::protobuf::int32 value) { + set_has_free_kick_from_defense_dist(); + free_kick_from_defense_dist_ = value; + // @@protoc_insertion_point(field_set:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.free_kick_from_defense_dist) +} + +// required int32 penalty_spot_from_field_line_dist = 13; +bool SSL_GeometryFieldSize::has_penalty_spot_from_field_line_dist() const { + return (_has_bits_[0] & 0x00001000u) != 0; +} +void SSL_GeometryFieldSize::set_has_penalty_spot_from_field_line_dist() { + _has_bits_[0] |= 0x00001000u; +} +void SSL_GeometryFieldSize::clear_has_penalty_spot_from_field_line_dist() { + _has_bits_[0] &= ~0x00001000u; +} +void SSL_GeometryFieldSize::clear_penalty_spot_from_field_line_dist() { + penalty_spot_from_field_line_dist_ = 0; + clear_has_penalty_spot_from_field_line_dist(); +} +::google::protobuf::int32 SSL_GeometryFieldSize::penalty_spot_from_field_line_dist() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.penalty_spot_from_field_line_dist) + return penalty_spot_from_field_line_dist_; +} +void SSL_GeometryFieldSize::set_penalty_spot_from_field_line_dist(::google::protobuf::int32 value) { + set_has_penalty_spot_from_field_line_dist(); + penalty_spot_from_field_line_dist_ = value; + // @@protoc_insertion_point(field_set:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.penalty_spot_from_field_line_dist) +} + +// required int32 penalty_line_from_spot_dist = 14; +bool SSL_GeometryFieldSize::has_penalty_line_from_spot_dist() const { + return (_has_bits_[0] & 0x00002000u) != 0; +} +void SSL_GeometryFieldSize::set_has_penalty_line_from_spot_dist() { + _has_bits_[0] |= 0x00002000u; +} +void SSL_GeometryFieldSize::clear_has_penalty_line_from_spot_dist() { + _has_bits_[0] &= ~0x00002000u; +} +void SSL_GeometryFieldSize::clear_penalty_line_from_spot_dist() { + penalty_line_from_spot_dist_ = 0; + clear_has_penalty_line_from_spot_dist(); +} +::google::protobuf::int32 SSL_GeometryFieldSize::penalty_line_from_spot_dist() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.penalty_line_from_spot_dist) + return penalty_line_from_spot_dist_; +} +void SSL_GeometryFieldSize::set_penalty_line_from_spot_dist(::google::protobuf::int32 value) { + set_has_penalty_line_from_spot_dist(); + penalty_line_from_spot_dist_ = value; + // @@protoc_insertion_point(field_set:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.penalty_line_from_spot_dist) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int SSL_GeometryData::kFieldFieldNumber; const int SSL_GeometryData::kCalibFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 SSL_GeometryData::SSL_GeometryData() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:RoboCup2014Legacy.Geometry.SSL_GeometryData) } - -void SSL_GeometryData::InitAsDefaultInstance() { - field_ = const_cast< ::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize*>(&::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize::default_instance()); -} - SSL_GeometryData::SSL_GeometryData(const SSL_GeometryData& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0), + calib_(from.calib_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from.has_field()) { + field_ = new ::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize(*from.field_); + } else { + field_ = NULL; + } + // @@protoc_insertion_point(copy_constructor:RoboCup2014Legacy.Geometry.SSL_GeometryData) } void SSL_GeometryData::SharedCtor() { _cached_size_ = 0; field_ = NULL; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); } SSL_GeometryData::~SSL_GeometryData() { + // @@protoc_insertion_point(destructor:RoboCup2014Legacy.Geometry.SSL_GeometryData) SharedDtor(); } void SSL_GeometryData::SharedDtor() { - if (this != default_instance_) { + if (this != internal_default_instance()) { delete field_; } } @@ -928,70 +1342,73 @@ void SSL_GeometryData::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* SSL_GeometryData::descriptor() { protobuf_AssignDescriptorsOnce(); - return SSL_GeometryData_descriptor_; + return file_level_metadata[1].descriptor; } const SSL_GeometryData& SSL_GeometryData::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto(); - return *default_instance_; + protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto(); + return *internal_default_instance(); } -SSL_GeometryData* SSL_GeometryData::default_instance_ = NULL; - -SSL_GeometryData* SSL_GeometryData::New() const { - return new SSL_GeometryData; +SSL_GeometryData* SSL_GeometryData::New(::google::protobuf::Arena* arena) const { + SSL_GeometryData* n = new SSL_GeometryData; + if (arena != NULL) { + arena->Own(n); + } + return n; } void SSL_GeometryData::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (has_field()) { - if (field_ != NULL) field_->::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize::Clear(); - } - } +// @@protoc_insertion_point(message_clear_start:RoboCup2014Legacy.Geometry.SSL_GeometryData) calib_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + if (has_field()) { + GOOGLE_DCHECK(field_ != NULL); + field_->::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize::Clear(); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool SSL_GeometryData::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:RoboCup2014Legacy.Geometry.SSL_GeometryData) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required .RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize field = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + if (tag == 10u) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_field())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(18)) goto parse_calib; break; } // repeated .SSL_GeometryCameraCalibration calib = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_calib: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + if (tag == 18u) { + DO_(input->IncrementRecursionDepth()); + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( input, add_calib())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(18)) goto parse_calib; - if (input->ExpectAtEnd()) return true; + input->UnsafeDecrementRecursionDepth(); break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -999,114 +1416,130 @@ bool SSL_GeometryData::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:RoboCup2014Legacy.Geometry.SSL_GeometryData) return true; +failure: + // @@protoc_insertion_point(parse_failure:RoboCup2014Legacy.Geometry.SSL_GeometryData) + return false; #undef DO_ } void SSL_GeometryData::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:RoboCup2014Legacy.Geometry.SSL_GeometryData) // required .RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize field = 1; if (has_field()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, this->field(), output); + 1, *this->field_, output); } // repeated .SSL_GeometryCameraCalibration calib = 2; - for (int i = 0; i < this->calib_size(); i++) { + for (unsigned int i = 0, n = this->calib_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, this->calib(i), output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:RoboCup2014Legacy.Geometry.SSL_GeometryData) } -::google::protobuf::uint8* SSL_GeometryData::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* SSL_GeometryData::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:RoboCup2014Legacy.Geometry.SSL_GeometryData) // required .RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize field = 1; if (has_field()) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 1, this->field(), target); + InternalWriteMessageNoVirtualToArray( + 1, *this->field_, false, target); } // repeated .SSL_GeometryCameraCalibration calib = 2; - for (int i = 0; i < this->calib_size(); i++) { + for (unsigned int i = 0, n = this->calib_size(); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 2, this->calib(i), target); + InternalWriteMessageNoVirtualToArray( + 2, this->calib(i), false, target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:RoboCup2014Legacy.Geometry.SSL_GeometryData) return target; } -int SSL_GeometryData::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // required .RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize field = 1; - if (has_field()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->field()); - } - - } - // repeated .SSL_GeometryCameraCalibration calib = 2; - total_size += 1 * this->calib_size(); - for (int i = 0; i < this->calib_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->calib(i)); - } +size_t SSL_GeometryData::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:RoboCup2014Legacy.Geometry.SSL_GeometryData) + size_t total_size = 0; - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( unknown_fields()); } + // required .RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize field = 1; + if (has_field()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->field_); + } + // repeated .SSL_GeometryCameraCalibration calib = 2; + { + unsigned int count = this->calib_size(); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->calib(i)); + } + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void SSL_GeometryData::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:RoboCup2014Legacy.Geometry.SSL_GeometryData) + GOOGLE_DCHECK_NE(&from, this); const SSL_GeometryData* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:RoboCup2014Legacy.Geometry.SSL_GeometryData) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:RoboCup2014Legacy.Geometry.SSL_GeometryData) MergeFrom(*source); } } void SSL_GeometryData::MergeFrom(const SSL_GeometryData& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(class_specific_merge_from_start:RoboCup2014Legacy.Geometry.SSL_GeometryData) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); calib_.MergeFrom(from.calib_); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_field()) { - mutable_field()->::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize::MergeFrom(from.field()); - } + if (from.has_field()) { + mutable_field()->::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize::MergeFrom(from.field()); } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void SSL_GeometryData::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:RoboCup2014Legacy.Geometry.SSL_GeometryData) if (&from == this) return; Clear(); MergeFrom(from); } void SSL_GeometryData::CopyFrom(const SSL_GeometryData& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:RoboCup2014Legacy.Geometry.SSL_GeometryData) if (&from == this) return; Clear(); MergeFrom(from); @@ -1114,34 +1547,109 @@ void SSL_GeometryData::CopyFrom(const SSL_GeometryData& from) { bool SSL_GeometryData::IsInitialized() const { if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; - + if (!::google::protobuf::internal::AllAreInitialized(this->calib())) return false; if (has_field()) { - if (!this->field().IsInitialized()) return false; - } - for (int i = 0; i < calib_size(); i++) { - if (!this->calib(i).IsInitialized()) return false; + if (!this->field_->IsInitialized()) return false; } return true; } void SSL_GeometryData::Swap(SSL_GeometryData* other) { - if (other != this) { - std::swap(field_, other->field_); - calib_.Swap(&other->calib_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void SSL_GeometryData::InternalSwap(SSL_GeometryData* other) { + calib_.UnsafeArenaSwap(&other->calib_); + std::swap(field_, other->field_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata SSL_GeometryData::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = SSL_GeometryData_descriptor_; - metadata.reflection = SSL_GeometryData_reflection_; - return metadata; + return file_level_metadata[1]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// SSL_GeometryData + +// required .RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize field = 1; +bool SSL_GeometryData::has_field() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void SSL_GeometryData::set_has_field() { + _has_bits_[0] |= 0x00000001u; +} +void SSL_GeometryData::clear_has_field() { + _has_bits_[0] &= ~0x00000001u; +} +void SSL_GeometryData::clear_field() { + if (field_ != NULL) field_->::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize::Clear(); + clear_has_field(); +} +const ::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize& SSL_GeometryData::field() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryData.field) + return field_ != NULL ? *field_ + : *::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize::internal_default_instance(); +} +::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize* SSL_GeometryData::mutable_field() { + set_has_field(); + if (field_ == NULL) { + field_ = new ::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize; + } + // @@protoc_insertion_point(field_mutable:RoboCup2014Legacy.Geometry.SSL_GeometryData.field) + return field_; +} +::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize* SSL_GeometryData::release_field() { + // @@protoc_insertion_point(field_release:RoboCup2014Legacy.Geometry.SSL_GeometryData.field) + clear_has_field(); + ::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize* temp = field_; + field_ = NULL; + return temp; +} +void SSL_GeometryData::set_allocated_field(::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize* field) { + delete field_; + field_ = field; + if (field) { + set_has_field(); + } else { + clear_has_field(); + } + // @@protoc_insertion_point(field_set_allocated:RoboCup2014Legacy.Geometry.SSL_GeometryData.field) +} + +// repeated .SSL_GeometryCameraCalibration calib = 2; +int SSL_GeometryData::calib_size() const { + return calib_.size(); +} +void SSL_GeometryData::clear_calib() { + calib_.Clear(); +} +const ::SSL_GeometryCameraCalibration& SSL_GeometryData::calib(int index) const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryData.calib) + return calib_.Get(index); +} +::SSL_GeometryCameraCalibration* SSL_GeometryData::mutable_calib(int index) { + // @@protoc_insertion_point(field_mutable:RoboCup2014Legacy.Geometry.SSL_GeometryData.calib) + return calib_.Mutable(index); +} +::SSL_GeometryCameraCalibration* SSL_GeometryData::add_calib() { + // @@protoc_insertion_point(field_add:RoboCup2014Legacy.Geometry.SSL_GeometryData.calib) + return calib_.Add(); +} +::google::protobuf::RepeatedPtrField< ::SSL_GeometryCameraCalibration >* +SSL_GeometryData::mutable_calib() { + // @@protoc_insertion_point(field_mutable_list:RoboCup2014Legacy.Geometry.SSL_GeometryData.calib) + return &calib_; +} +const ::google::protobuf::RepeatedPtrField< ::SSL_GeometryCameraCalibration >& +SSL_GeometryData::calib() const { + // @@protoc_insertion_point(field_list:RoboCup2014Legacy.Geometry.SSL_GeometryData.calib) + return calib_; } +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) diff --git a/src/proto/messages_robocup_ssl_geometry_legacy.pb.h b/src/proto/messages_robocup_ssl_geometry_legacy.pb.h index 410a8d1..216e0e2 100644 --- a/src/proto/messages_robocup_ssl_geometry_legacy.pb.h +++ b/src/proto/messages_robocup_ssl_geometry_legacy.pb.h @@ -8,39 +8,66 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 2005000 +#if GOOGLE_PROTOBUF_VERSION < 3001000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. #endif +#include +#include #include +#include #include -#include -#include +#include // IWYU pragma: export +#include // IWYU pragma: export #include #include "messages_robocup_ssl_geometry.pb.h" // @@protoc_insertion_point(includes) +class SSL_FieldCicularArc; +class SSL_FieldCicularArcDefaultTypeInternal; +extern SSL_FieldCicularArcDefaultTypeInternal _SSL_FieldCicularArc_default_instance_; +class SSL_FieldLineSegment; +class SSL_FieldLineSegmentDefaultTypeInternal; +extern SSL_FieldLineSegmentDefaultTypeInternal _SSL_FieldLineSegment_default_instance_; +class SSL_GeometryCameraCalibration; +class SSL_GeometryCameraCalibrationDefaultTypeInternal; +extern SSL_GeometryCameraCalibrationDefaultTypeInternal _SSL_GeometryCameraCalibration_default_instance_; +class SSL_GeometryData; +class SSL_GeometryDataDefaultTypeInternal; +extern SSL_GeometryDataDefaultTypeInternal _SSL_GeometryData_default_instance_; +class SSL_GeometryFieldSize; +class SSL_GeometryFieldSizeDefaultTypeInternal; +extern SSL_GeometryFieldSizeDefaultTypeInternal _SSL_GeometryFieldSize_default_instance_; +class Vector2f; +class Vector2fDefaultTypeInternal; +extern Vector2fDefaultTypeInternal _Vector2f_default_instance_; +namespace RoboCup2014Legacy { +namespace Geometry { +class SSL_GeometryData; +class SSL_GeometryDataDefaultTypeInternal; +extern SSL_GeometryDataDefaultTypeInternal _SSL_GeometryData_default_instance_; +class SSL_GeometryFieldSize; +class SSL_GeometryFieldSizeDefaultTypeInternal; +extern SSL_GeometryFieldSizeDefaultTypeInternal _SSL_GeometryFieldSize_default_instance_; +} // namespace Geometry +} // namespace RoboCup2014Legacy namespace RoboCup2014Legacy { namespace Geometry { // Internal implementation detail -- do not call these. -void protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto(); -void protobuf_AssignDesc_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto(); -void protobuf_ShutdownFile_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto(); - -class SSL_GeometryFieldSize; -class SSL_GeometryData; +void protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto(); +void protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto(); // =================================================================== -class SSL_GeometryFieldSize : public ::google::protobuf::Message { +class SSL_GeometryFieldSize : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize) */ { public: SSL_GeometryFieldSize(); virtual ~SSL_GeometryFieldSize(); @@ -53,178 +80,202 @@ class SSL_GeometryFieldSize : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const SSL_GeometryFieldSize& default_instance(); + static inline const SSL_GeometryFieldSize* internal_default_instance() { + return reinterpret_cast( + &_SSL_GeometryFieldSize_default_instance_); + } + void Swap(SSL_GeometryFieldSize* other); // implements Message ---------------------------------------------- - SSL_GeometryFieldSize* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline SSL_GeometryFieldSize* New() const PROTOBUF_FINAL { return New(NULL); } + + SSL_GeometryFieldSize* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const SSL_GeometryFieldSize& from); void MergeFrom(const SSL_GeometryFieldSize& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(SSL_GeometryFieldSize* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // required int32 line_width = 1; - inline bool has_line_width() const; - inline void clear_line_width(); + bool has_line_width() const; + void clear_line_width(); static const int kLineWidthFieldNumber = 1; - inline ::google::protobuf::int32 line_width() const; - inline void set_line_width(::google::protobuf::int32 value); + ::google::protobuf::int32 line_width() const; + void set_line_width(::google::protobuf::int32 value); // required int32 field_length = 2; - inline bool has_field_length() const; - inline void clear_field_length(); + bool has_field_length() const; + void clear_field_length(); static const int kFieldLengthFieldNumber = 2; - inline ::google::protobuf::int32 field_length() const; - inline void set_field_length(::google::protobuf::int32 value); + ::google::protobuf::int32 field_length() const; + void set_field_length(::google::protobuf::int32 value); // required int32 field_width = 3; - inline bool has_field_width() const; - inline void clear_field_width(); + bool has_field_width() const; + void clear_field_width(); static const int kFieldWidthFieldNumber = 3; - inline ::google::protobuf::int32 field_width() const; - inline void set_field_width(::google::protobuf::int32 value); + ::google::protobuf::int32 field_width() const; + void set_field_width(::google::protobuf::int32 value); // required int32 boundary_width = 4; - inline bool has_boundary_width() const; - inline void clear_boundary_width(); + bool has_boundary_width() const; + void clear_boundary_width(); static const int kBoundaryWidthFieldNumber = 4; - inline ::google::protobuf::int32 boundary_width() const; - inline void set_boundary_width(::google::protobuf::int32 value); + ::google::protobuf::int32 boundary_width() const; + void set_boundary_width(::google::protobuf::int32 value); // required int32 referee_width = 5; - inline bool has_referee_width() const; - inline void clear_referee_width(); + bool has_referee_width() const; + void clear_referee_width(); static const int kRefereeWidthFieldNumber = 5; - inline ::google::protobuf::int32 referee_width() const; - inline void set_referee_width(::google::protobuf::int32 value); + ::google::protobuf::int32 referee_width() const; + void set_referee_width(::google::protobuf::int32 value); // required int32 goal_width = 6; - inline bool has_goal_width() const; - inline void clear_goal_width(); + bool has_goal_width() const; + void clear_goal_width(); static const int kGoalWidthFieldNumber = 6; - inline ::google::protobuf::int32 goal_width() const; - inline void set_goal_width(::google::protobuf::int32 value); + ::google::protobuf::int32 goal_width() const; + void set_goal_width(::google::protobuf::int32 value); // required int32 goal_depth = 7; - inline bool has_goal_depth() const; - inline void clear_goal_depth(); + bool has_goal_depth() const; + void clear_goal_depth(); static const int kGoalDepthFieldNumber = 7; - inline ::google::protobuf::int32 goal_depth() const; - inline void set_goal_depth(::google::protobuf::int32 value); + ::google::protobuf::int32 goal_depth() const; + void set_goal_depth(::google::protobuf::int32 value); // required int32 goal_wall_width = 8; - inline bool has_goal_wall_width() const; - inline void clear_goal_wall_width(); + bool has_goal_wall_width() const; + void clear_goal_wall_width(); static const int kGoalWallWidthFieldNumber = 8; - inline ::google::protobuf::int32 goal_wall_width() const; - inline void set_goal_wall_width(::google::protobuf::int32 value); + ::google::protobuf::int32 goal_wall_width() const; + void set_goal_wall_width(::google::protobuf::int32 value); // required int32 center_circle_radius = 9; - inline bool has_center_circle_radius() const; - inline void clear_center_circle_radius(); + bool has_center_circle_radius() const; + void clear_center_circle_radius(); static const int kCenterCircleRadiusFieldNumber = 9; - inline ::google::protobuf::int32 center_circle_radius() const; - inline void set_center_circle_radius(::google::protobuf::int32 value); + ::google::protobuf::int32 center_circle_radius() const; + void set_center_circle_radius(::google::protobuf::int32 value); // required int32 defense_radius = 10; - inline bool has_defense_radius() const; - inline void clear_defense_radius(); + bool has_defense_radius() const; + void clear_defense_radius(); static const int kDefenseRadiusFieldNumber = 10; - inline ::google::protobuf::int32 defense_radius() const; - inline void set_defense_radius(::google::protobuf::int32 value); + ::google::protobuf::int32 defense_radius() const; + void set_defense_radius(::google::protobuf::int32 value); // required int32 defense_stretch = 11; - inline bool has_defense_stretch() const; - inline void clear_defense_stretch(); + bool has_defense_stretch() const; + void clear_defense_stretch(); static const int kDefenseStretchFieldNumber = 11; - inline ::google::protobuf::int32 defense_stretch() const; - inline void set_defense_stretch(::google::protobuf::int32 value); + ::google::protobuf::int32 defense_stretch() const; + void set_defense_stretch(::google::protobuf::int32 value); // required int32 free_kick_from_defense_dist = 12; - inline bool has_free_kick_from_defense_dist() const; - inline void clear_free_kick_from_defense_dist(); + bool has_free_kick_from_defense_dist() const; + void clear_free_kick_from_defense_dist(); static const int kFreeKickFromDefenseDistFieldNumber = 12; - inline ::google::protobuf::int32 free_kick_from_defense_dist() const; - inline void set_free_kick_from_defense_dist(::google::protobuf::int32 value); + ::google::protobuf::int32 free_kick_from_defense_dist() const; + void set_free_kick_from_defense_dist(::google::protobuf::int32 value); // required int32 penalty_spot_from_field_line_dist = 13; - inline bool has_penalty_spot_from_field_line_dist() const; - inline void clear_penalty_spot_from_field_line_dist(); + bool has_penalty_spot_from_field_line_dist() const; + void clear_penalty_spot_from_field_line_dist(); static const int kPenaltySpotFromFieldLineDistFieldNumber = 13; - inline ::google::protobuf::int32 penalty_spot_from_field_line_dist() const; - inline void set_penalty_spot_from_field_line_dist(::google::protobuf::int32 value); + ::google::protobuf::int32 penalty_spot_from_field_line_dist() const; + void set_penalty_spot_from_field_line_dist(::google::protobuf::int32 value); // required int32 penalty_line_from_spot_dist = 14; - inline bool has_penalty_line_from_spot_dist() const; - inline void clear_penalty_line_from_spot_dist(); + bool has_penalty_line_from_spot_dist() const; + void clear_penalty_line_from_spot_dist(); static const int kPenaltyLineFromSpotDistFieldNumber = 14; - inline ::google::protobuf::int32 penalty_line_from_spot_dist() const; - inline void set_penalty_line_from_spot_dist(::google::protobuf::int32 value); + ::google::protobuf::int32 penalty_line_from_spot_dist() const; + void set_penalty_line_from_spot_dist(::google::protobuf::int32 value); // @@protoc_insertion_point(class_scope:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize) private: - inline void set_has_line_width(); - inline void clear_has_line_width(); - inline void set_has_field_length(); - inline void clear_has_field_length(); - inline void set_has_field_width(); - inline void clear_has_field_width(); - inline void set_has_boundary_width(); - inline void clear_has_boundary_width(); - inline void set_has_referee_width(); - inline void clear_has_referee_width(); - inline void set_has_goal_width(); - inline void clear_has_goal_width(); - inline void set_has_goal_depth(); - inline void clear_has_goal_depth(); - inline void set_has_goal_wall_width(); - inline void clear_has_goal_wall_width(); - inline void set_has_center_circle_radius(); - inline void clear_has_center_circle_radius(); - inline void set_has_defense_radius(); - inline void clear_has_defense_radius(); - inline void set_has_defense_stretch(); - inline void clear_has_defense_stretch(); - inline void set_has_free_kick_from_defense_dist(); - inline void clear_has_free_kick_from_defense_dist(); - inline void set_has_penalty_spot_from_field_line_dist(); - inline void clear_has_penalty_spot_from_field_line_dist(); - inline void set_has_penalty_line_from_spot_dist(); - inline void clear_has_penalty_line_from_spot_dist(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + void set_has_line_width(); + void clear_has_line_width(); + void set_has_field_length(); + void clear_has_field_length(); + void set_has_field_width(); + void clear_has_field_width(); + void set_has_boundary_width(); + void clear_has_boundary_width(); + void set_has_referee_width(); + void clear_has_referee_width(); + void set_has_goal_width(); + void clear_has_goal_width(); + void set_has_goal_depth(); + void clear_has_goal_depth(); + void set_has_goal_wall_width(); + void clear_has_goal_wall_width(); + void set_has_center_circle_radius(); + void clear_has_center_circle_radius(); + void set_has_defense_radius(); + void clear_has_defense_radius(); + void set_has_defense_stretch(); + void clear_has_defense_stretch(); + void set_has_free_kick_from_defense_dist(); + void clear_has_free_kick_from_defense_dist(); + void set_has_penalty_spot_from_field_line_dist(); + void clear_has_penalty_spot_from_field_line_dist(); + void set_has_penalty_line_from_spot_dist(); + void clear_has_penalty_line_from_spot_dist(); + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; ::google::protobuf::int32 line_width_; ::google::protobuf::int32 field_length_; ::google::protobuf::int32 field_width_; @@ -239,20 +290,15 @@ class SSL_GeometryFieldSize : public ::google::protobuf::Message { ::google::protobuf::int32 free_kick_from_defense_dist_; ::google::protobuf::int32 penalty_spot_from_field_line_dist_; ::google::protobuf::int32 penalty_line_from_spot_dist_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(14 + 31) / 32]; - - friend void protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto(); - friend void protobuf_AssignDesc_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto(); + friend void protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto_impl(); + friend void protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto(); friend void protobuf_ShutdownFile_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto(); - void InitAsDefaultInstance(); - static SSL_GeometryFieldSize* default_instance_; }; // ------------------------------------------------------------------- -class SSL_GeometryData : public ::google::protobuf::Message { +class SSL_GeometryData : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:RoboCup2014Legacy.Geometry.SSL_GeometryData) */ { public: SSL_GeometryData(); virtual ~SSL_GeometryData(); @@ -265,93 +311,110 @@ class SSL_GeometryData : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const SSL_GeometryData& default_instance(); + static inline const SSL_GeometryData* internal_default_instance() { + return reinterpret_cast( + &_SSL_GeometryData_default_instance_); + } + void Swap(SSL_GeometryData* other); // implements Message ---------------------------------------------- - SSL_GeometryData* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline SSL_GeometryData* New() const PROTOBUF_FINAL { return New(NULL); } + + SSL_GeometryData* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const SSL_GeometryData& from); void MergeFrom(const SSL_GeometryData& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(SSL_GeometryData* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // required .RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize field = 1; - inline bool has_field() const; - inline void clear_field(); + bool has_field() const; + void clear_field(); static const int kFieldFieldNumber = 1; - inline const ::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize& field() const; - inline ::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize* mutable_field(); - inline ::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize* release_field(); - inline void set_allocated_field(::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize* field); + const ::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize& field() const; + ::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize* mutable_field(); + ::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize* release_field(); + void set_allocated_field(::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize* field); // repeated .SSL_GeometryCameraCalibration calib = 2; - inline int calib_size() const; - inline void clear_calib(); + int calib_size() const; + void clear_calib(); static const int kCalibFieldNumber = 2; - inline const ::SSL_GeometryCameraCalibration& calib(int index) const; - inline ::SSL_GeometryCameraCalibration* mutable_calib(int index); - inline ::SSL_GeometryCameraCalibration* add_calib(); - inline const ::google::protobuf::RepeatedPtrField< ::SSL_GeometryCameraCalibration >& - calib() const; - inline ::google::protobuf::RepeatedPtrField< ::SSL_GeometryCameraCalibration >* + const ::SSL_GeometryCameraCalibration& calib(int index) const; + ::SSL_GeometryCameraCalibration* mutable_calib(int index); + ::SSL_GeometryCameraCalibration* add_calib(); + ::google::protobuf::RepeatedPtrField< ::SSL_GeometryCameraCalibration >* mutable_calib(); + const ::google::protobuf::RepeatedPtrField< ::SSL_GeometryCameraCalibration >& + calib() const; // @@protoc_insertion_point(class_scope:RoboCup2014Legacy.Geometry.SSL_GeometryData) private: - inline void set_has_field(); - inline void clear_has_field(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize* field_; - ::google::protobuf::RepeatedPtrField< ::SSL_GeometryCameraCalibration > calib_; + void set_has_field(); + void clear_has_field(); + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; - - friend void protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto(); - friend void protobuf_AssignDesc_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto(); + ::google::protobuf::RepeatedPtrField< ::SSL_GeometryCameraCalibration > calib_; + ::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize* field_; + friend void protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto_impl(); + friend void protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto(); friend void protobuf_ShutdownFile_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto(); - void InitAsDefaultInstance(); - static SSL_GeometryData* default_instance_; }; // =================================================================== // =================================================================== +#if !PROTOBUF_INLINE_NOT_IN_HEADERS // SSL_GeometryFieldSize // required int32 line_width = 1; @@ -369,11 +432,13 @@ inline void SSL_GeometryFieldSize::clear_line_width() { clear_has_line_width(); } inline ::google::protobuf::int32 SSL_GeometryFieldSize::line_width() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.line_width) return line_width_; } inline void SSL_GeometryFieldSize::set_line_width(::google::protobuf::int32 value) { set_has_line_width(); line_width_ = value; + // @@protoc_insertion_point(field_set:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.line_width) } // required int32 field_length = 2; @@ -391,11 +456,13 @@ inline void SSL_GeometryFieldSize::clear_field_length() { clear_has_field_length(); } inline ::google::protobuf::int32 SSL_GeometryFieldSize::field_length() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.field_length) return field_length_; } inline void SSL_GeometryFieldSize::set_field_length(::google::protobuf::int32 value) { set_has_field_length(); field_length_ = value; + // @@protoc_insertion_point(field_set:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.field_length) } // required int32 field_width = 3; @@ -413,11 +480,13 @@ inline void SSL_GeometryFieldSize::clear_field_width() { clear_has_field_width(); } inline ::google::protobuf::int32 SSL_GeometryFieldSize::field_width() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.field_width) return field_width_; } inline void SSL_GeometryFieldSize::set_field_width(::google::protobuf::int32 value) { set_has_field_width(); field_width_ = value; + // @@protoc_insertion_point(field_set:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.field_width) } // required int32 boundary_width = 4; @@ -435,11 +504,13 @@ inline void SSL_GeometryFieldSize::clear_boundary_width() { clear_has_boundary_width(); } inline ::google::protobuf::int32 SSL_GeometryFieldSize::boundary_width() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.boundary_width) return boundary_width_; } inline void SSL_GeometryFieldSize::set_boundary_width(::google::protobuf::int32 value) { set_has_boundary_width(); boundary_width_ = value; + // @@protoc_insertion_point(field_set:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.boundary_width) } // required int32 referee_width = 5; @@ -457,11 +528,13 @@ inline void SSL_GeometryFieldSize::clear_referee_width() { clear_has_referee_width(); } inline ::google::protobuf::int32 SSL_GeometryFieldSize::referee_width() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.referee_width) return referee_width_; } inline void SSL_GeometryFieldSize::set_referee_width(::google::protobuf::int32 value) { set_has_referee_width(); referee_width_ = value; + // @@protoc_insertion_point(field_set:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.referee_width) } // required int32 goal_width = 6; @@ -479,11 +552,13 @@ inline void SSL_GeometryFieldSize::clear_goal_width() { clear_has_goal_width(); } inline ::google::protobuf::int32 SSL_GeometryFieldSize::goal_width() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.goal_width) return goal_width_; } inline void SSL_GeometryFieldSize::set_goal_width(::google::protobuf::int32 value) { set_has_goal_width(); goal_width_ = value; + // @@protoc_insertion_point(field_set:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.goal_width) } // required int32 goal_depth = 7; @@ -501,11 +576,13 @@ inline void SSL_GeometryFieldSize::clear_goal_depth() { clear_has_goal_depth(); } inline ::google::protobuf::int32 SSL_GeometryFieldSize::goal_depth() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.goal_depth) return goal_depth_; } inline void SSL_GeometryFieldSize::set_goal_depth(::google::protobuf::int32 value) { set_has_goal_depth(); goal_depth_ = value; + // @@protoc_insertion_point(field_set:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.goal_depth) } // required int32 goal_wall_width = 8; @@ -523,11 +600,13 @@ inline void SSL_GeometryFieldSize::clear_goal_wall_width() { clear_has_goal_wall_width(); } inline ::google::protobuf::int32 SSL_GeometryFieldSize::goal_wall_width() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.goal_wall_width) return goal_wall_width_; } inline void SSL_GeometryFieldSize::set_goal_wall_width(::google::protobuf::int32 value) { set_has_goal_wall_width(); goal_wall_width_ = value; + // @@protoc_insertion_point(field_set:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.goal_wall_width) } // required int32 center_circle_radius = 9; @@ -545,11 +624,13 @@ inline void SSL_GeometryFieldSize::clear_center_circle_radius() { clear_has_center_circle_radius(); } inline ::google::protobuf::int32 SSL_GeometryFieldSize::center_circle_radius() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.center_circle_radius) return center_circle_radius_; } inline void SSL_GeometryFieldSize::set_center_circle_radius(::google::protobuf::int32 value) { set_has_center_circle_radius(); center_circle_radius_ = value; + // @@protoc_insertion_point(field_set:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.center_circle_radius) } // required int32 defense_radius = 10; @@ -567,11 +648,13 @@ inline void SSL_GeometryFieldSize::clear_defense_radius() { clear_has_defense_radius(); } inline ::google::protobuf::int32 SSL_GeometryFieldSize::defense_radius() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.defense_radius) return defense_radius_; } inline void SSL_GeometryFieldSize::set_defense_radius(::google::protobuf::int32 value) { set_has_defense_radius(); defense_radius_ = value; + // @@protoc_insertion_point(field_set:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.defense_radius) } // required int32 defense_stretch = 11; @@ -589,11 +672,13 @@ inline void SSL_GeometryFieldSize::clear_defense_stretch() { clear_has_defense_stretch(); } inline ::google::protobuf::int32 SSL_GeometryFieldSize::defense_stretch() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.defense_stretch) return defense_stretch_; } inline void SSL_GeometryFieldSize::set_defense_stretch(::google::protobuf::int32 value) { set_has_defense_stretch(); defense_stretch_ = value; + // @@protoc_insertion_point(field_set:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.defense_stretch) } // required int32 free_kick_from_defense_dist = 12; @@ -611,11 +696,13 @@ inline void SSL_GeometryFieldSize::clear_free_kick_from_defense_dist() { clear_has_free_kick_from_defense_dist(); } inline ::google::protobuf::int32 SSL_GeometryFieldSize::free_kick_from_defense_dist() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.free_kick_from_defense_dist) return free_kick_from_defense_dist_; } inline void SSL_GeometryFieldSize::set_free_kick_from_defense_dist(::google::protobuf::int32 value) { set_has_free_kick_from_defense_dist(); free_kick_from_defense_dist_ = value; + // @@protoc_insertion_point(field_set:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.free_kick_from_defense_dist) } // required int32 penalty_spot_from_field_line_dist = 13; @@ -633,11 +720,13 @@ inline void SSL_GeometryFieldSize::clear_penalty_spot_from_field_line_dist() { clear_has_penalty_spot_from_field_line_dist(); } inline ::google::protobuf::int32 SSL_GeometryFieldSize::penalty_spot_from_field_line_dist() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.penalty_spot_from_field_line_dist) return penalty_spot_from_field_line_dist_; } inline void SSL_GeometryFieldSize::set_penalty_spot_from_field_line_dist(::google::protobuf::int32 value) { set_has_penalty_spot_from_field_line_dist(); penalty_spot_from_field_line_dist_ = value; + // @@protoc_insertion_point(field_set:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.penalty_spot_from_field_line_dist) } // required int32 penalty_line_from_spot_dist = 14; @@ -655,11 +744,13 @@ inline void SSL_GeometryFieldSize::clear_penalty_line_from_spot_dist() { clear_has_penalty_line_from_spot_dist(); } inline ::google::protobuf::int32 SSL_GeometryFieldSize::penalty_line_from_spot_dist() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.penalty_line_from_spot_dist) return penalty_line_from_spot_dist_; } inline void SSL_GeometryFieldSize::set_penalty_line_from_spot_dist(::google::protobuf::int32 value) { set_has_penalty_line_from_spot_dist(); penalty_line_from_spot_dist_ = value; + // @@protoc_insertion_point(field_set:RoboCup2014Legacy.Geometry.SSL_GeometryFieldSize.penalty_line_from_spot_dist) } // ------------------------------------------------------------------- @@ -681,14 +772,20 @@ inline void SSL_GeometryData::clear_field() { clear_has_field(); } inline const ::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize& SSL_GeometryData::field() const { - return field_ != NULL ? *field_ : *default_instance_->field_; + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryData.field) + return field_ != NULL ? *field_ + : *::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize::internal_default_instance(); } inline ::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize* SSL_GeometryData::mutable_field() { set_has_field(); - if (field_ == NULL) field_ = new ::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize; + if (field_ == NULL) { + field_ = new ::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize; + } + // @@protoc_insertion_point(field_mutable:RoboCup2014Legacy.Geometry.SSL_GeometryData.field) return field_; } inline ::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize* SSL_GeometryData::release_field() { + // @@protoc_insertion_point(field_release:RoboCup2014Legacy.Geometry.SSL_GeometryData.field) clear_has_field(); ::RoboCup2014Legacy::Geometry::SSL_GeometryFieldSize* temp = field_; field_ = NULL; @@ -702,6 +799,7 @@ inline void SSL_GeometryData::set_allocated_field(::RoboCup2014Legacy::Geometry: } else { clear_has_field(); } + // @@protoc_insertion_point(field_set_allocated:RoboCup2014Legacy.Geometry.SSL_GeometryData.field) } // repeated .SSL_GeometryCameraCalibration calib = 2; @@ -712,38 +810,38 @@ inline void SSL_GeometryData::clear_calib() { calib_.Clear(); } inline const ::SSL_GeometryCameraCalibration& SSL_GeometryData::calib(int index) const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Geometry.SSL_GeometryData.calib) return calib_.Get(index); } inline ::SSL_GeometryCameraCalibration* SSL_GeometryData::mutable_calib(int index) { + // @@protoc_insertion_point(field_mutable:RoboCup2014Legacy.Geometry.SSL_GeometryData.calib) return calib_.Mutable(index); } inline ::SSL_GeometryCameraCalibration* SSL_GeometryData::add_calib() { + // @@protoc_insertion_point(field_add:RoboCup2014Legacy.Geometry.SSL_GeometryData.calib) return calib_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::SSL_GeometryCameraCalibration >& -SSL_GeometryData::calib() const { - return calib_; -} inline ::google::protobuf::RepeatedPtrField< ::SSL_GeometryCameraCalibration >* SSL_GeometryData::mutable_calib() { + // @@protoc_insertion_point(field_mutable_list:RoboCup2014Legacy.Geometry.SSL_GeometryData.calib) return &calib_; } +inline const ::google::protobuf::RepeatedPtrField< ::SSL_GeometryCameraCalibration >& +SSL_GeometryData::calib() const { + // @@protoc_insertion_point(field_list:RoboCup2014Legacy.Geometry.SSL_GeometryData.calib) + return calib_; +} + +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS +// ------------------------------------------------------------------- // @@protoc_insertion_point(namespace_scope) + } // namespace Geometry } // namespace RoboCup2014Legacy -#ifndef SWIG -namespace google { -namespace protobuf { - - -} // namespace google -} // namespace protobuf -#endif // SWIG - // @@protoc_insertion_point(global_scope) #endif // PROTOBUF_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto__INCLUDED diff --git a/src/proto/messages_robocup_ssl_refbox_log.pb.cc b/src/proto/messages_robocup_ssl_refbox_log.pb.cc index f0d3c38..9ca253f 100644 --- a/src/proto/messages_robocup_ssl_refbox_log.pb.cc +++ b/src/proto/messages_robocup_ssl_refbox_log.pb.cc @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -15,105 +16,116 @@ #include #include // @@protoc_insertion_point(includes) +class Log_FrameDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +Log_FrameDefaultTypeInternal _Log_Frame_default_instance_; +class Refbox_LogDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +Refbox_LogDefaultTypeInternal _Refbox_Log_default_instance_; namespace { -const ::google::protobuf::Descriptor* Log_Frame_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - Log_Frame_reflection_ = NULL; -const ::google::protobuf::Descriptor* Refbox_Log_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - Refbox_Log_reflection_ = NULL; +::google::protobuf::Metadata file_level_metadata[2]; } // namespace -void protobuf_AssignDesc_messages_5frobocup_5fssl_5frefbox_5flog_2eproto() { - protobuf_AddDesc_messages_5frobocup_5fssl_5frefbox_5flog_2eproto(); - const ::google::protobuf::FileDescriptor* file = - ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( - "messages_robocup_ssl_refbox_log.proto"); - GOOGLE_CHECK(file != NULL); - Log_Frame_descriptor_ = file->message_type(0); - static const int Log_Frame_offsets_[2] = { +const ::google::protobuf::uint32* protobuf_Offsets_messages_5frobocup_5fssl_5frefbox_5flog_2eproto() GOOGLE_ATTRIBUTE_COLD; +const ::google::protobuf::uint32* protobuf_Offsets_messages_5frobocup_5fssl_5frefbox_5flog_2eproto() { + static const ::google::protobuf::uint32 offsets[] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Log_Frame, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Log_Frame, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Log_Frame, frame_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Log_Frame, refbox_cmd_), - }; - Log_Frame_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - Log_Frame_descriptor_, - Log_Frame::default_instance_, - Log_Frame_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Log_Frame, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Log_Frame, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(Log_Frame)); - Refbox_Log_descriptor_ = file->message_type(1); - static const int Refbox_Log_offsets_[1] = { + 1, + 0, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Refbox_Log, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Refbox_Log, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Refbox_Log, log_), + 0, }; - Refbox_Log_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - Refbox_Log_descriptor_, - Refbox_Log::default_instance_, - Refbox_Log_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Refbox_Log, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Refbox_Log, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(Refbox_Log)); + return offsets; } +static const ::google::protobuf::internal::MigrationSchema schemas[] = { + { 0, 6, sizeof(Log_Frame)}, + { 8, 13, sizeof(Refbox_Log)}, +}; + +static const ::google::protobuf::internal::DefaultInstanceData file_default_instances[] = { + {reinterpret_cast(&_Log_Frame_default_instance_), NULL}, + {reinterpret_cast(&_Refbox_Log_default_instance_), NULL}, +}; + namespace { -GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); -inline void protobuf_AssignDescriptorsOnce() { - ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, - &protobuf_AssignDesc_messages_5frobocup_5fssl_5frefbox_5flog_2eproto); +void protobuf_AssignDescriptors() { + protobuf_AddDesc_messages_5frobocup_5fssl_5frefbox_5flog_2eproto(); + ::google::protobuf::MessageFactory* factory = NULL; + AssignDescriptors( + "messages_robocup_ssl_refbox_log.proto", schemas, file_default_instances, protobuf_Offsets_messages_5frobocup_5fssl_5frefbox_5flog_2eproto(), factory, + file_level_metadata, NULL, NULL); +} + +void protobuf_AssignDescriptorsOnce() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); } +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - Log_Frame_descriptor_, &Log_Frame::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - Refbox_Log_descriptor_, &Refbox_Log::default_instance()); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 2); } } // namespace void protobuf_ShutdownFile_messages_5frobocup_5fssl_5frefbox_5flog_2eproto() { - delete Log_Frame::default_instance_; - delete Log_Frame_reflection_; - delete Refbox_Log::default_instance_; - delete Refbox_Log_reflection_; + _Log_Frame_default_instance_.Shutdown(); + delete file_level_metadata[0].reflection; + _Refbox_Log_default_instance_.Shutdown(); + delete file_level_metadata[1].reflection; } -void protobuf_AddDesc_messages_5frobocup_5fssl_5frefbox_5flog_2eproto() { - static bool already_here = false; - if (already_here) return; - already_here = true; +void protobuf_InitDefaults_messages_5frobocup_5fssl_5frefbox_5flog_2eproto_impl() { GOOGLE_PROTOBUF_VERIFY_VERSION; - ::protobuf_AddDesc_messages_5frobocup_5fssl_5fdetection_2eproto(); + ::protobuf_InitDefaults_messages_5frobocup_5fssl_5fdetection_2eproto(); + ::google::protobuf::internal::InitProtobufDefaults(); + _Log_Frame_default_instance_.DefaultConstruct(); + _Refbox_Log_default_instance_.DefaultConstruct(); + _Log_Frame_default_instance_.get_mutable()->frame_ = const_cast< ::SSL_DetectionFrame*>( + ::SSL_DetectionFrame::internal_default_instance()); +} + +void protobuf_InitDefaults_messages_5frobocup_5fssl_5frefbox_5flog_2eproto() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_InitDefaults_messages_5frobocup_5fssl_5frefbox_5flog_2eproto_impl); +} +void protobuf_AddDesc_messages_5frobocup_5fssl_5frefbox_5flog_2eproto_impl() { + protobuf_InitDefaults_messages_5frobocup_5fssl_5frefbox_5flog_2eproto(); + static const char descriptor[] = { + "\n%messages_robocup_ssl_refbox_log.proto\032" + "$messages_robocup_ssl_detection.proto\"C\n" + "\tLog_Frame\022\"\n\005frame\030\001 \002(\0132\023.SSL_Detectio" + "nFrame\022\022\n\nrefbox_cmd\030\002 \002(\t\"%\n\nRefbox_Log" + "\022\027\n\003log\030\001 \003(\0132\n.Log_Frame" + }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - "\n%messages_robocup_ssl_refbox_log.proto\032" - "$messages_robocup_ssl_detection.proto\"C\n" - "\tLog_Frame\022\"\n\005frame\030\001 \002(\0132\023.SSL_Detectio" - "nFrame\022\022\n\nrefbox_cmd\030\002 \002(\t\"%\n\nRefbox_Log" - "\022\027\n\003log\030\001 \003(\0132\n.Log_Frame", 185); + descriptor, 185); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "messages_robocup_ssl_refbox_log.proto", &protobuf_RegisterTypes); - Log_Frame::default_instance_ = new Log_Frame(); - Refbox_Log::default_instance_ = new Refbox_Log(); - Log_Frame::default_instance_->InitAsDefaultInstance(); - Refbox_Log::default_instance_->InitAsDefaultInstance(); + ::protobuf_AddDesc_messages_5frobocup_5fssl_5fdetection_2eproto(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_messages_5frobocup_5fssl_5frefbox_5flog_2eproto); } +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_messages_5frobocup_5fssl_5frefbox_5flog_2eproto_once_); +void protobuf_AddDesc_messages_5frobocup_5fssl_5frefbox_5flog_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_messages_5frobocup_5fssl_5frefbox_5flog_2eproto_once_, + &protobuf_AddDesc_messages_5frobocup_5fssl_5frefbox_5flog_2eproto_impl); +} // Force AddDescriptors() to be called at static initialization time. struct StaticDescriptorInitializer_messages_5frobocup_5fssl_5frefbox_5flog_2eproto { StaticDescriptorInitializer_messages_5frobocup_5fssl_5frefbox_5flog_2eproto() { @@ -123,42 +135,51 @@ struct StaticDescriptorInitializer_messages_5frobocup_5fssl_5frefbox_5flog_2epro // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int Log_Frame::kFrameFieldNumber; const int Log_Frame::kRefboxCmdFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 Log_Frame::Log_Frame() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_messages_5frobocup_5fssl_5frefbox_5flog_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:Log_Frame) } - -void Log_Frame::InitAsDefaultInstance() { - frame_ = const_cast< ::SSL_DetectionFrame*>(&::SSL_DetectionFrame::default_instance()); -} - Log_Frame::Log_Frame(const Log_Frame& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + refbox_cmd_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.has_refbox_cmd()) { + refbox_cmd_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.refbox_cmd_); + } + if (from.has_frame()) { + frame_ = new ::SSL_DetectionFrame(*from.frame_); + } else { + frame_ = NULL; + } + // @@protoc_insertion_point(copy_constructor:Log_Frame) } void Log_Frame::SharedCtor() { _cached_size_ = 0; + refbox_cmd_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); frame_ = NULL; - refbox_cmd_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); } Log_Frame::~Log_Frame() { + // @@protoc_insertion_point(destructor:Log_Frame) SharedDtor(); } void Log_Frame::SharedDtor() { - if (refbox_cmd_ != &::google::protobuf::internal::kEmptyString) { - delete refbox_cmd_; - } - if (this != default_instance_) { + refbox_cmd_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) { delete frame_; } } @@ -170,76 +191,80 @@ void Log_Frame::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* Log_Frame::descriptor() { protobuf_AssignDescriptorsOnce(); - return Log_Frame_descriptor_; + return file_level_metadata[0].descriptor; } const Log_Frame& Log_Frame::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_messages_5frobocup_5fssl_5frefbox_5flog_2eproto(); - return *default_instance_; + protobuf_InitDefaults_messages_5frobocup_5fssl_5frefbox_5flog_2eproto(); + return *internal_default_instance(); } -Log_Frame* Log_Frame::default_instance_ = NULL; - -Log_Frame* Log_Frame::New() const { - return new Log_Frame; +Log_Frame* Log_Frame::New(::google::protobuf::Arena* arena) const { + Log_Frame* n = new Log_Frame; + if (arena != NULL) { + arena->Own(n); + } + return n; } void Log_Frame::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (has_frame()) { - if (frame_ != NULL) frame_->::SSL_DetectionFrame::Clear(); - } +// @@protoc_insertion_point(message_clear_start:Log_Frame) + if (_has_bits_[0 / 32] & 3u) { if (has_refbox_cmd()) { - if (refbox_cmd_ != &::google::protobuf::internal::kEmptyString) { - refbox_cmd_->clear(); - } + GOOGLE_DCHECK(!refbox_cmd_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); + (*refbox_cmd_.UnsafeRawStringPointer())->clear(); + } + if (has_frame()) { + GOOGLE_DCHECK(frame_ != NULL); + frame_->::SSL_DetectionFrame::Clear(); } } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool Log_Frame::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:Log_Frame) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required .SSL_DetectionFrame frame = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + if (tag == 10u) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_frame())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(18)) goto parse_refbox_cmd; break; } // required string refbox_cmd = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_refbox_cmd: + if (tag == 18u) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_refbox_cmd())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->refbox_cmd().data(), this->refbox_cmd().length(), - ::google::protobuf::internal::WireFormat::PARSE); + ::google::protobuf::internal::WireFormat::PARSE, + "Log_Frame.refbox_cmd"); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectAtEnd()) return true; break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -247,121 +272,160 @@ bool Log_Frame::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:Log_Frame) return true; +failure: + // @@protoc_insertion_point(parse_failure:Log_Frame) + return false; #undef DO_ } void Log_Frame::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:Log_Frame) // required .SSL_DetectionFrame frame = 1; if (has_frame()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, this->frame(), output); + 1, *this->frame_, output); } // required string refbox_cmd = 2; if (has_refbox_cmd()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->refbox_cmd().data(), this->refbox_cmd().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( + ::google::protobuf::internal::WireFormat::SERIALIZE, + "Log_Frame.refbox_cmd"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->refbox_cmd(), output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:Log_Frame) } -::google::protobuf::uint8* Log_Frame::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* Log_Frame::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:Log_Frame) // required .SSL_DetectionFrame frame = 1; if (has_frame()) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 1, this->frame(), target); + InternalWriteMessageNoVirtualToArray( + 1, *this->frame_, false, target); } // required string refbox_cmd = 2; if (has_refbox_cmd()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->refbox_cmd().data(), this->refbox_cmd().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormat::SERIALIZE, + "Log_Frame.refbox_cmd"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->refbox_cmd(), target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:Log_Frame) return target; } -int Log_Frame::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // required .SSL_DetectionFrame frame = 1; - if (has_frame()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->frame()); - } +size_t Log_Frame::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:Log_Frame) + size_t total_size = 0; + if (has_refbox_cmd()) { // required string refbox_cmd = 2; - if (has_refbox_cmd()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->refbox_cmd()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->refbox_cmd()); + } + if (has_frame()) { + // required .SSL_DetectionFrame frame = 1; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->frame_); } - if (!unknown_fields().empty()) { + + return total_size; +} +size_t Log_Frame::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Log_Frame) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( unknown_fields()); } + if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present. + // required string refbox_cmd = 2; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->refbox_cmd()); + + // required .SSL_DetectionFrame frame = 1; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->frame_); + + } else { + total_size += RequiredFieldsByteSizeFallback(); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void Log_Frame::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:Log_Frame) + GOOGLE_DCHECK_NE(&from, this); const Log_Frame* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Log_Frame) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Log_Frame) MergeFrom(*source); } } void Log_Frame::MergeFrom(const Log_Frame& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { +// @@protoc_insertion_point(class_specific_merge_from_start:Log_Frame) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._has_bits_[0 / 32] & 3u) { + if (from.has_refbox_cmd()) { + set_has_refbox_cmd(); + refbox_cmd_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.refbox_cmd_); + } if (from.has_frame()) { mutable_frame()->::SSL_DetectionFrame::MergeFrom(from.frame()); } - if (from.has_refbox_cmd()) { - set_refbox_cmd(from.refbox_cmd()); - } } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void Log_Frame::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Log_Frame) if (&from == this) return; Clear(); MergeFrom(from); } void Log_Frame::CopyFrom(const Log_Frame& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Log_Frame) if (&from == this) return; Clear(); MergeFrom(from); @@ -369,64 +433,175 @@ void Log_Frame::CopyFrom(const Log_Frame& from) { bool Log_Frame::IsInitialized() const { if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; - if (has_frame()) { - if (!this->frame().IsInitialized()) return false; + if (!this->frame_->IsInitialized()) return false; } return true; } void Log_Frame::Swap(Log_Frame* other) { - if (other != this) { - std::swap(frame_, other->frame_); - std::swap(refbox_cmd_, other->refbox_cmd_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void Log_Frame::InternalSwap(Log_Frame* other) { + refbox_cmd_.Swap(&other->refbox_cmd_); + std::swap(frame_, other->frame_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata Log_Frame::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = Log_Frame_descriptor_; - metadata.reflection = Log_Frame_reflection_; - return metadata; + return file_level_metadata[0]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// Log_Frame + +// required .SSL_DetectionFrame frame = 1; +bool Log_Frame::has_frame() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +void Log_Frame::set_has_frame() { + _has_bits_[0] |= 0x00000002u; +} +void Log_Frame::clear_has_frame() { + _has_bits_[0] &= ~0x00000002u; +} +void Log_Frame::clear_frame() { + if (frame_ != NULL) frame_->::SSL_DetectionFrame::Clear(); + clear_has_frame(); +} +const ::SSL_DetectionFrame& Log_Frame::frame() const { + // @@protoc_insertion_point(field_get:Log_Frame.frame) + return frame_ != NULL ? *frame_ + : *::SSL_DetectionFrame::internal_default_instance(); +} +::SSL_DetectionFrame* Log_Frame::mutable_frame() { + set_has_frame(); + if (frame_ == NULL) { + frame_ = new ::SSL_DetectionFrame; + } + // @@protoc_insertion_point(field_mutable:Log_Frame.frame) + return frame_; +} +::SSL_DetectionFrame* Log_Frame::release_frame() { + // @@protoc_insertion_point(field_release:Log_Frame.frame) + clear_has_frame(); + ::SSL_DetectionFrame* temp = frame_; + frame_ = NULL; + return temp; +} +void Log_Frame::set_allocated_frame(::SSL_DetectionFrame* frame) { + delete frame_; + frame_ = frame; + if (frame) { + set_has_frame(); + } else { + clear_has_frame(); + } + // @@protoc_insertion_point(field_set_allocated:Log_Frame.frame) +} + +// required string refbox_cmd = 2; +bool Log_Frame::has_refbox_cmd() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void Log_Frame::set_has_refbox_cmd() { + _has_bits_[0] |= 0x00000001u; +} +void Log_Frame::clear_has_refbox_cmd() { + _has_bits_[0] &= ~0x00000001u; +} +void Log_Frame::clear_refbox_cmd() { + refbox_cmd_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_refbox_cmd(); +} +const ::std::string& Log_Frame::refbox_cmd() const { + // @@protoc_insertion_point(field_get:Log_Frame.refbox_cmd) + return refbox_cmd_.GetNoArena(); +} +void Log_Frame::set_refbox_cmd(const ::std::string& value) { + set_has_refbox_cmd(); + refbox_cmd_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:Log_Frame.refbox_cmd) +} +#if LANG_CXX11 +void Log_Frame::set_refbox_cmd(::std::string&& value) { + set_has_refbox_cmd(); + refbox_cmd_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:Log_Frame.refbox_cmd) +} +#endif +void Log_Frame::set_refbox_cmd(const char* value) { + set_has_refbox_cmd(); + refbox_cmd_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:Log_Frame.refbox_cmd) +} +void Log_Frame::set_refbox_cmd(const char* value, size_t size) { + set_has_refbox_cmd(); + refbox_cmd_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:Log_Frame.refbox_cmd) +} +::std::string* Log_Frame::mutable_refbox_cmd() { + set_has_refbox_cmd(); + // @@protoc_insertion_point(field_mutable:Log_Frame.refbox_cmd) + return refbox_cmd_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +::std::string* Log_Frame::release_refbox_cmd() { + // @@protoc_insertion_point(field_release:Log_Frame.refbox_cmd) + clear_has_refbox_cmd(); + return refbox_cmd_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void Log_Frame::set_allocated_refbox_cmd(::std::string* refbox_cmd) { + if (refbox_cmd != NULL) { + set_has_refbox_cmd(); + } else { + clear_has_refbox_cmd(); + } + refbox_cmd_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), refbox_cmd); + // @@protoc_insertion_point(field_set_allocated:Log_Frame.refbox_cmd) } +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int Refbox_Log::kLogFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 Refbox_Log::Refbox_Log() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_messages_5frobocup_5fssl_5frefbox_5flog_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:Refbox_Log) } - -void Refbox_Log::InitAsDefaultInstance() { -} - Refbox_Log::Refbox_Log(const Refbox_Log& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0), + log_(from.log_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:Refbox_Log) } void Refbox_Log::SharedCtor() { _cached_size_ = 0; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); } Refbox_Log::~Refbox_Log() { + // @@protoc_insertion_point(destructor:Refbox_Log) SharedDtor(); } void Refbox_Log::SharedDtor() { - if (this != default_instance_) { - } } void Refbox_Log::SetCachedSize(int size) const { @@ -436,52 +611,58 @@ void Refbox_Log::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* Refbox_Log::descriptor() { protobuf_AssignDescriptorsOnce(); - return Refbox_Log_descriptor_; + return file_level_metadata[1].descriptor; } const Refbox_Log& Refbox_Log::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_messages_5frobocup_5fssl_5frefbox_5flog_2eproto(); - return *default_instance_; + protobuf_InitDefaults_messages_5frobocup_5fssl_5frefbox_5flog_2eproto(); + return *internal_default_instance(); } -Refbox_Log* Refbox_Log::default_instance_ = NULL; - -Refbox_Log* Refbox_Log::New() const { - return new Refbox_Log; +Refbox_Log* Refbox_Log::New(::google::protobuf::Arena* arena) const { + Refbox_Log* n = new Refbox_Log; + if (arena != NULL) { + arena->Own(n); + } + return n; } void Refbox_Log::Clear() { +// @@protoc_insertion_point(message_clear_start:Refbox_Log) log_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool Refbox_Log::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:Refbox_Log) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // repeated .Log_Frame log = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_log: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + if (tag == 10u) { + DO_(input->IncrementRecursionDepth()); + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( input, add_log())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(10)) goto parse_log; - if (input->ExpectAtEnd()) return true; + input->UnsafeDecrementRecursionDepth(); break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -489,117 +670,168 @@ bool Refbox_Log::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:Refbox_Log) return true; +failure: + // @@protoc_insertion_point(parse_failure:Refbox_Log) + return false; #undef DO_ } void Refbox_Log::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:Refbox_Log) // repeated .Log_Frame log = 1; - for (int i = 0; i < this->log_size(); i++) { + for (unsigned int i = 0, n = this->log_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, this->log(i), output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:Refbox_Log) } -::google::protobuf::uint8* Refbox_Log::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* Refbox_Log::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:Refbox_Log) // repeated .Log_Frame log = 1; - for (int i = 0; i < this->log_size(); i++) { + for (unsigned int i = 0, n = this->log_size(); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 1, this->log(i), target); + InternalWriteMessageNoVirtualToArray( + 1, this->log(i), false, target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:Refbox_Log) return target; } -int Refbox_Log::ByteSize() const { - int total_size = 0; - - // repeated .Log_Frame log = 1; - total_size += 1 * this->log_size(); - for (int i = 0; i < this->log_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->log(i)); - } +size_t Refbox_Log::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Refbox_Log) + size_t total_size = 0; - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( unknown_fields()); } + // repeated .Log_Frame log = 1; + { + unsigned int count = this->log_size(); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->log(i)); + } + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void Refbox_Log::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:Refbox_Log) + GOOGLE_DCHECK_NE(&from, this); const Refbox_Log* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Refbox_Log) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Refbox_Log) MergeFrom(*source); } } void Refbox_Log::MergeFrom(const Refbox_Log& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(class_specific_merge_from_start:Refbox_Log) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); log_.MergeFrom(from.log_); - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void Refbox_Log::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Refbox_Log) if (&from == this) return; Clear(); MergeFrom(from); } void Refbox_Log::CopyFrom(const Refbox_Log& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Refbox_Log) if (&from == this) return; Clear(); MergeFrom(from); } bool Refbox_Log::IsInitialized() const { - - for (int i = 0; i < log_size(); i++) { - if (!this->log(i).IsInitialized()) return false; - } + if (!::google::protobuf::internal::AllAreInitialized(this->log())) return false; return true; } void Refbox_Log::Swap(Refbox_Log* other) { - if (other != this) { - log_.Swap(&other->log_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void Refbox_Log::InternalSwap(Refbox_Log* other) { + log_.UnsafeArenaSwap(&other->log_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata Refbox_Log::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = Refbox_Log_descriptor_; - metadata.reflection = Refbox_Log_reflection_; - return metadata; + return file_level_metadata[1]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// Refbox_Log + +// repeated .Log_Frame log = 1; +int Refbox_Log::log_size() const { + return log_.size(); +} +void Refbox_Log::clear_log() { + log_.Clear(); +} +const ::Log_Frame& Refbox_Log::log(int index) const { + // @@protoc_insertion_point(field_get:Refbox_Log.log) + return log_.Get(index); +} +::Log_Frame* Refbox_Log::mutable_log(int index) { + // @@protoc_insertion_point(field_mutable:Refbox_Log.log) + return log_.Mutable(index); +} +::Log_Frame* Refbox_Log::add_log() { + // @@protoc_insertion_point(field_add:Refbox_Log.log) + return log_.Add(); +} +::google::protobuf::RepeatedPtrField< ::Log_Frame >* +Refbox_Log::mutable_log() { + // @@protoc_insertion_point(field_mutable_list:Refbox_Log.log) + return &log_; +} +const ::google::protobuf::RepeatedPtrField< ::Log_Frame >& +Refbox_Log::log() const { + // @@protoc_insertion_point(field_list:Refbox_Log.log) + return log_; } +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) diff --git a/src/proto/messages_robocup_ssl_refbox_log.pb.h b/src/proto/messages_robocup_ssl_refbox_log.pb.h index 1f2ba5c..79a3a62 100644 --- a/src/proto/messages_robocup_ssl_refbox_log.pb.h +++ b/src/proto/messages_robocup_ssl_refbox_log.pb.h @@ -8,36 +8,50 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 2005000 +#if GOOGLE_PROTOBUF_VERSION < 3001000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. #endif +#include +#include #include +#include #include -#include -#include +#include // IWYU pragma: export +#include // IWYU pragma: export #include #include "messages_robocup_ssl_detection.pb.h" // @@protoc_insertion_point(includes) - -// Internal implementation detail -- do not call these. -void protobuf_AddDesc_messages_5frobocup_5fssl_5frefbox_5flog_2eproto(); -void protobuf_AssignDesc_messages_5frobocup_5fssl_5frefbox_5flog_2eproto(); -void protobuf_ShutdownFile_messages_5frobocup_5fssl_5frefbox_5flog_2eproto(); - class Log_Frame; +class Log_FrameDefaultTypeInternal; +extern Log_FrameDefaultTypeInternal _Log_Frame_default_instance_; class Refbox_Log; +class Refbox_LogDefaultTypeInternal; +extern Refbox_LogDefaultTypeInternal _Refbox_Log_default_instance_; +class SSL_DetectionBall; +class SSL_DetectionBallDefaultTypeInternal; +extern SSL_DetectionBallDefaultTypeInternal _SSL_DetectionBall_default_instance_; +class SSL_DetectionFrame; +class SSL_DetectionFrameDefaultTypeInternal; +extern SSL_DetectionFrameDefaultTypeInternal _SSL_DetectionFrame_default_instance_; +class SSL_DetectionRobot; +class SSL_DetectionRobotDefaultTypeInternal; +extern SSL_DetectionRobotDefaultTypeInternal _SSL_DetectionRobot_default_instance_; + +// Internal implementation detail -- do not call these. +void protobuf_AddDesc_messages_5frobocup_5fssl_5frefbox_5flog_2eproto(); +void protobuf_InitDefaults_messages_5frobocup_5fssl_5frefbox_5flog_2eproto(); // =================================================================== -class Log_Frame : public ::google::protobuf::Message { +class Log_Frame : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:Log_Frame) */ { public: Log_Frame(); virtual ~Log_Frame(); @@ -50,93 +64,115 @@ class Log_Frame : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const Log_Frame& default_instance(); + static inline const Log_Frame* internal_default_instance() { + return reinterpret_cast( + &_Log_Frame_default_instance_); + } + void Swap(Log_Frame* other); // implements Message ---------------------------------------------- - Log_Frame* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline Log_Frame* New() const PROTOBUF_FINAL { return New(NULL); } + + Log_Frame* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const Log_Frame& from); void MergeFrom(const Log_Frame& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(Log_Frame* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // required .SSL_DetectionFrame frame = 1; - inline bool has_frame() const; - inline void clear_frame(); + bool has_frame() const; + void clear_frame(); static const int kFrameFieldNumber = 1; - inline const ::SSL_DetectionFrame& frame() const; - inline ::SSL_DetectionFrame* mutable_frame(); - inline ::SSL_DetectionFrame* release_frame(); - inline void set_allocated_frame(::SSL_DetectionFrame* frame); + const ::SSL_DetectionFrame& frame() const; + ::SSL_DetectionFrame* mutable_frame(); + ::SSL_DetectionFrame* release_frame(); + void set_allocated_frame(::SSL_DetectionFrame* frame); // required string refbox_cmd = 2; - inline bool has_refbox_cmd() const; - inline void clear_refbox_cmd(); + bool has_refbox_cmd() const; + void clear_refbox_cmd(); static const int kRefboxCmdFieldNumber = 2; - inline const ::std::string& refbox_cmd() const; - inline void set_refbox_cmd(const ::std::string& value); - inline void set_refbox_cmd(const char* value); - inline void set_refbox_cmd(const char* value, size_t size); - inline ::std::string* mutable_refbox_cmd(); - inline ::std::string* release_refbox_cmd(); - inline void set_allocated_refbox_cmd(::std::string* refbox_cmd); + const ::std::string& refbox_cmd() const; + void set_refbox_cmd(const ::std::string& value); + #if LANG_CXX11 + void set_refbox_cmd(::std::string&& value); + #endif + void set_refbox_cmd(const char* value); + void set_refbox_cmd(const char* value, size_t size); + ::std::string* mutable_refbox_cmd(); + ::std::string* release_refbox_cmd(); + void set_allocated_refbox_cmd(::std::string* refbox_cmd); // @@protoc_insertion_point(class_scope:Log_Frame) private: - inline void set_has_frame(); - inline void clear_has_frame(); - inline void set_has_refbox_cmd(); - inline void clear_has_refbox_cmd(); + void set_has_frame(); + void clear_has_frame(); + void set_has_refbox_cmd(); + void clear_has_refbox_cmd(); - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::SSL_DetectionFrame* frame_; - ::std::string* refbox_cmd_; + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; - - friend void protobuf_AddDesc_messages_5frobocup_5fssl_5frefbox_5flog_2eproto(); - friend void protobuf_AssignDesc_messages_5frobocup_5fssl_5frefbox_5flog_2eproto(); + ::google::protobuf::internal::ArenaStringPtr refbox_cmd_; + ::SSL_DetectionFrame* frame_; + friend void protobuf_InitDefaults_messages_5frobocup_5fssl_5frefbox_5flog_2eproto_impl(); + friend void protobuf_AddDesc_messages_5frobocup_5fssl_5frefbox_5flog_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_messages_5frobocup_5fssl_5frefbox_5flog_2eproto(); friend void protobuf_ShutdownFile_messages_5frobocup_5fssl_5frefbox_5flog_2eproto(); - void InitAsDefaultInstance(); - static Log_Frame* default_instance_; }; // ------------------------------------------------------------------- -class Refbox_Log : public ::google::protobuf::Message { +class Refbox_Log : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:Refbox_Log) */ { public: Refbox_Log(); virtual ~Refbox_Log(); @@ -149,106 +185,129 @@ class Refbox_Log : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const Refbox_Log& default_instance(); + static inline const Refbox_Log* internal_default_instance() { + return reinterpret_cast( + &_Refbox_Log_default_instance_); + } + void Swap(Refbox_Log* other); // implements Message ---------------------------------------------- - Refbox_Log* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline Refbox_Log* New() const PROTOBUF_FINAL { return New(NULL); } + + Refbox_Log* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const Refbox_Log& from); void MergeFrom(const Refbox_Log& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(Refbox_Log* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // repeated .Log_Frame log = 1; - inline int log_size() const; - inline void clear_log(); + int log_size() const; + void clear_log(); static const int kLogFieldNumber = 1; - inline const ::Log_Frame& log(int index) const; - inline ::Log_Frame* mutable_log(int index); - inline ::Log_Frame* add_log(); - inline const ::google::protobuf::RepeatedPtrField< ::Log_Frame >& - log() const; - inline ::google::protobuf::RepeatedPtrField< ::Log_Frame >* + const ::Log_Frame& log(int index) const; + ::Log_Frame* mutable_log(int index); + ::Log_Frame* add_log(); + ::google::protobuf::RepeatedPtrField< ::Log_Frame >* mutable_log(); + const ::google::protobuf::RepeatedPtrField< ::Log_Frame >& + log() const; // @@protoc_insertion_point(class_scope:Refbox_Log) private: - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::google::protobuf::RepeatedPtrField< ::Log_Frame > log_; - + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; - - friend void protobuf_AddDesc_messages_5frobocup_5fssl_5frefbox_5flog_2eproto(); - friend void protobuf_AssignDesc_messages_5frobocup_5fssl_5frefbox_5flog_2eproto(); + ::google::protobuf::RepeatedPtrField< ::Log_Frame > log_; + friend void protobuf_InitDefaults_messages_5frobocup_5fssl_5frefbox_5flog_2eproto_impl(); + friend void protobuf_AddDesc_messages_5frobocup_5fssl_5frefbox_5flog_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_messages_5frobocup_5fssl_5frefbox_5flog_2eproto(); friend void protobuf_ShutdownFile_messages_5frobocup_5fssl_5frefbox_5flog_2eproto(); - void InitAsDefaultInstance(); - static Refbox_Log* default_instance_; }; // =================================================================== // =================================================================== +#if !PROTOBUF_INLINE_NOT_IN_HEADERS // Log_Frame // required .SSL_DetectionFrame frame = 1; inline bool Log_Frame::has_frame() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return (_has_bits_[0] & 0x00000002u) != 0; } inline void Log_Frame::set_has_frame() { - _has_bits_[0] |= 0x00000001u; + _has_bits_[0] |= 0x00000002u; } inline void Log_Frame::clear_has_frame() { - _has_bits_[0] &= ~0x00000001u; + _has_bits_[0] &= ~0x00000002u; } inline void Log_Frame::clear_frame() { if (frame_ != NULL) frame_->::SSL_DetectionFrame::Clear(); clear_has_frame(); } inline const ::SSL_DetectionFrame& Log_Frame::frame() const { - return frame_ != NULL ? *frame_ : *default_instance_->frame_; + // @@protoc_insertion_point(field_get:Log_Frame.frame) + return frame_ != NULL ? *frame_ + : *::SSL_DetectionFrame::internal_default_instance(); } inline ::SSL_DetectionFrame* Log_Frame::mutable_frame() { set_has_frame(); - if (frame_ == NULL) frame_ = new ::SSL_DetectionFrame; + if (frame_ == NULL) { + frame_ = new ::SSL_DetectionFrame; + } + // @@protoc_insertion_point(field_mutable:Log_Frame.frame) return frame_; } inline ::SSL_DetectionFrame* Log_Frame::release_frame() { + // @@protoc_insertion_point(field_release:Log_Frame.frame) clear_has_frame(); ::SSL_DetectionFrame* temp = frame_; frame_ = NULL; @@ -262,76 +321,69 @@ inline void Log_Frame::set_allocated_frame(::SSL_DetectionFrame* frame) { } else { clear_has_frame(); } + // @@protoc_insertion_point(field_set_allocated:Log_Frame.frame) } // required string refbox_cmd = 2; inline bool Log_Frame::has_refbox_cmd() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return (_has_bits_[0] & 0x00000001u) != 0; } inline void Log_Frame::set_has_refbox_cmd() { - _has_bits_[0] |= 0x00000002u; + _has_bits_[0] |= 0x00000001u; } inline void Log_Frame::clear_has_refbox_cmd() { - _has_bits_[0] &= ~0x00000002u; + _has_bits_[0] &= ~0x00000001u; } inline void Log_Frame::clear_refbox_cmd() { - if (refbox_cmd_ != &::google::protobuf::internal::kEmptyString) { - refbox_cmd_->clear(); - } + refbox_cmd_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); clear_has_refbox_cmd(); } inline const ::std::string& Log_Frame::refbox_cmd() const { - return *refbox_cmd_; + // @@protoc_insertion_point(field_get:Log_Frame.refbox_cmd) + return refbox_cmd_.GetNoArena(); } inline void Log_Frame::set_refbox_cmd(const ::std::string& value) { set_has_refbox_cmd(); - if (refbox_cmd_ == &::google::protobuf::internal::kEmptyString) { - refbox_cmd_ = new ::std::string; - } - refbox_cmd_->assign(value); + refbox_cmd_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:Log_Frame.refbox_cmd) } +#if LANG_CXX11 +inline void Log_Frame::set_refbox_cmd(::std::string&& value) { + set_has_refbox_cmd(); + refbox_cmd_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:Log_Frame.refbox_cmd) +} +#endif inline void Log_Frame::set_refbox_cmd(const char* value) { set_has_refbox_cmd(); - if (refbox_cmd_ == &::google::protobuf::internal::kEmptyString) { - refbox_cmd_ = new ::std::string; - } - refbox_cmd_->assign(value); + refbox_cmd_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:Log_Frame.refbox_cmd) } inline void Log_Frame::set_refbox_cmd(const char* value, size_t size) { set_has_refbox_cmd(); - if (refbox_cmd_ == &::google::protobuf::internal::kEmptyString) { - refbox_cmd_ = new ::std::string; - } - refbox_cmd_->assign(reinterpret_cast(value), size); + refbox_cmd_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:Log_Frame.refbox_cmd) } inline ::std::string* Log_Frame::mutable_refbox_cmd() { set_has_refbox_cmd(); - if (refbox_cmd_ == &::google::protobuf::internal::kEmptyString) { - refbox_cmd_ = new ::std::string; - } - return refbox_cmd_; + // @@protoc_insertion_point(field_mutable:Log_Frame.refbox_cmd) + return refbox_cmd_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* Log_Frame::release_refbox_cmd() { + // @@protoc_insertion_point(field_release:Log_Frame.refbox_cmd) clear_has_refbox_cmd(); - if (refbox_cmd_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = refbox_cmd_; - refbox_cmd_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } + return refbox_cmd_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void Log_Frame::set_allocated_refbox_cmd(::std::string* refbox_cmd) { - if (refbox_cmd_ != &::google::protobuf::internal::kEmptyString) { - delete refbox_cmd_; - } - if (refbox_cmd) { + if (refbox_cmd != NULL) { set_has_refbox_cmd(); - refbox_cmd_ = refbox_cmd; } else { clear_has_refbox_cmd(); - refbox_cmd_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); } + refbox_cmd_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), refbox_cmd); + // @@protoc_insertion_point(field_set_allocated:Log_Frame.refbox_cmd) } // ------------------------------------------------------------------- @@ -346,34 +398,34 @@ inline void Refbox_Log::clear_log() { log_.Clear(); } inline const ::Log_Frame& Refbox_Log::log(int index) const { + // @@protoc_insertion_point(field_get:Refbox_Log.log) return log_.Get(index); } inline ::Log_Frame* Refbox_Log::mutable_log(int index) { + // @@protoc_insertion_point(field_mutable:Refbox_Log.log) return log_.Mutable(index); } inline ::Log_Frame* Refbox_Log::add_log() { + // @@protoc_insertion_point(field_add:Refbox_Log.log) return log_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::Log_Frame >& -Refbox_Log::log() const { - return log_; -} inline ::google::protobuf::RepeatedPtrField< ::Log_Frame >* Refbox_Log::mutable_log() { + // @@protoc_insertion_point(field_mutable_list:Refbox_Log.log) return &log_; } +inline const ::google::protobuf::RepeatedPtrField< ::Log_Frame >& +Refbox_Log::log() const { + // @@protoc_insertion_point(field_list:Refbox_Log.log) + return log_; +} +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS +// ------------------------------------------------------------------- -// @@protoc_insertion_point(namespace_scope) - -#ifndef SWIG -namespace google { -namespace protobuf { +// @@protoc_insertion_point(namespace_scope) -} // namespace google -} // namespace protobuf -#endif // SWIG // @@protoc_insertion_point(global_scope) diff --git a/src/proto/messages_robocup_ssl_wrapper.pb.cc b/src/proto/messages_robocup_ssl_wrapper.pb.cc index 88e52a4..d2f8382 100644 --- a/src/proto/messages_robocup_ssl_wrapper.pb.cc +++ b/src/proto/messages_robocup_ssl_wrapper.pb.cc @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -15,83 +16,108 @@ #include #include // @@protoc_insertion_point(includes) +class SSL_WrapperPacketDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +SSL_WrapperPacketDefaultTypeInternal _SSL_WrapperPacket_default_instance_; namespace { -const ::google::protobuf::Descriptor* SSL_WrapperPacket_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - SSL_WrapperPacket_reflection_ = NULL; +::google::protobuf::Metadata file_level_metadata[1]; } // namespace -void protobuf_AssignDesc_messages_5frobocup_5fssl_5fwrapper_2eproto() { - protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_2eproto(); - const ::google::protobuf::FileDescriptor* file = - ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( - "messages_robocup_ssl_wrapper.proto"); - GOOGLE_CHECK(file != NULL); - SSL_WrapperPacket_descriptor_ = file->message_type(0); - static const int SSL_WrapperPacket_offsets_[2] = { +const ::google::protobuf::uint32* protobuf_Offsets_messages_5frobocup_5fssl_5fwrapper_2eproto() GOOGLE_ATTRIBUTE_COLD; +const ::google::protobuf::uint32* protobuf_Offsets_messages_5frobocup_5fssl_5fwrapper_2eproto() { + static const ::google::protobuf::uint32 offsets[] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_WrapperPacket, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_WrapperPacket, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_WrapperPacket, detection_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_WrapperPacket, geometry_), + 0, + 1, }; - SSL_WrapperPacket_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - SSL_WrapperPacket_descriptor_, - SSL_WrapperPacket::default_instance_, - SSL_WrapperPacket_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_WrapperPacket, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_WrapperPacket, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(SSL_WrapperPacket)); + return offsets; } +static const ::google::protobuf::internal::MigrationSchema schemas[] = { + { 0, 6, sizeof(SSL_WrapperPacket)}, +}; + +static const ::google::protobuf::internal::DefaultInstanceData file_default_instances[] = { + {reinterpret_cast(&_SSL_WrapperPacket_default_instance_), NULL}, +}; + namespace { -GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); -inline void protobuf_AssignDescriptorsOnce() { - ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, - &protobuf_AssignDesc_messages_5frobocup_5fssl_5fwrapper_2eproto); +void protobuf_AssignDescriptors() { + protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_2eproto(); + ::google::protobuf::MessageFactory* factory = NULL; + AssignDescriptors( + "messages_robocup_ssl_wrapper.proto", schemas, file_default_instances, protobuf_Offsets_messages_5frobocup_5fssl_5fwrapper_2eproto(), factory, + file_level_metadata, NULL, NULL); } +void protobuf_AssignDescriptorsOnce() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); +} + +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - SSL_WrapperPacket_descriptor_, &SSL_WrapperPacket::default_instance()); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1); } } // namespace void protobuf_ShutdownFile_messages_5frobocup_5fssl_5fwrapper_2eproto() { - delete SSL_WrapperPacket::default_instance_; - delete SSL_WrapperPacket_reflection_; + _SSL_WrapperPacket_default_instance_.Shutdown(); + delete file_level_metadata[0].reflection; } -void protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_2eproto() { - static bool already_here = false; - if (already_here) return; - already_here = true; +void protobuf_InitDefaults_messages_5frobocup_5fssl_5fwrapper_2eproto_impl() { GOOGLE_PROTOBUF_VERIFY_VERSION; - ::protobuf_AddDesc_messages_5frobocup_5fssl_5fdetection_2eproto(); - ::protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto(); + ::protobuf_InitDefaults_messages_5frobocup_5fssl_5fdetection_2eproto(); + ::protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_2eproto(); + ::google::protobuf::internal::InitProtobufDefaults(); + _SSL_WrapperPacket_default_instance_.DefaultConstruct(); + _SSL_WrapperPacket_default_instance_.get_mutable()->detection_ = const_cast< ::SSL_DetectionFrame*>( + ::SSL_DetectionFrame::internal_default_instance()); + _SSL_WrapperPacket_default_instance_.get_mutable()->geometry_ = const_cast< ::SSL_GeometryData*>( + ::SSL_GeometryData::internal_default_instance()); +} + +void protobuf_InitDefaults_messages_5frobocup_5fssl_5fwrapper_2eproto() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_InitDefaults_messages_5frobocup_5fssl_5fwrapper_2eproto_impl); +} +void protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_2eproto_impl() { + protobuf_InitDefaults_messages_5frobocup_5fssl_5fwrapper_2eproto(); + static const char descriptor[] = { + "\n\"messages_robocup_ssl_wrapper.proto\032$me" + "ssages_robocup_ssl_detection.proto\032#mess" + "ages_robocup_ssl_geometry.proto\"`\n\021SSL_W" + "rapperPacket\022&\n\tdetection\030\001 \001(\0132\023.SSL_De" + "tectionFrame\022#\n\010geometry\030\002 \001(\0132\021.SSL_Geo" + "metryData" + }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - "\n\"messages_robocup_ssl_wrapper.proto\032$me" - "ssages_robocup_ssl_detection.proto\032#mess" - "ages_robocup_ssl_geometry.proto\"`\n\021SSL_W" - "rapperPacket\022&\n\tdetection\030\001 \001(\0132\023.SSL_De" - "tectionFrame\022#\n\010geometry\030\002 \001(\0132\021.SSL_Geo" - "metryData", 209); + descriptor, 209); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "messages_robocup_ssl_wrapper.proto", &protobuf_RegisterTypes); - SSL_WrapperPacket::default_instance_ = new SSL_WrapperPacket(); - SSL_WrapperPacket::default_instance_->InitAsDefaultInstance(); + ::protobuf_AddDesc_messages_5frobocup_5fssl_5fdetection_2eproto(); + ::protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_2eproto(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_messages_5frobocup_5fssl_5fwrapper_2eproto); } +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_2eproto_once_); +void protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_2eproto_once_, + &protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_2eproto_impl); +} // Force AddDescriptors() to be called at static initialization time. struct StaticDescriptorInitializer_messages_5frobocup_5fssl_5fwrapper_2eproto { StaticDescriptorInitializer_messages_5frobocup_5fssl_5fwrapper_2eproto() { @@ -101,41 +127,54 @@ struct StaticDescriptorInitializer_messages_5frobocup_5fssl_5fwrapper_2eproto { // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int SSL_WrapperPacket::kDetectionFieldNumber; const int SSL_WrapperPacket::kGeometryFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 SSL_WrapperPacket::SSL_WrapperPacket() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_messages_5frobocup_5fssl_5fwrapper_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:SSL_WrapperPacket) } - -void SSL_WrapperPacket::InitAsDefaultInstance() { - detection_ = const_cast< ::SSL_DetectionFrame*>(&::SSL_DetectionFrame::default_instance()); - geometry_ = const_cast< ::SSL_GeometryData*>(&::SSL_GeometryData::default_instance()); -} - SSL_WrapperPacket::SSL_WrapperPacket(const SSL_WrapperPacket& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from.has_detection()) { + detection_ = new ::SSL_DetectionFrame(*from.detection_); + } else { + detection_ = NULL; + } + if (from.has_geometry()) { + geometry_ = new ::SSL_GeometryData(*from.geometry_); + } else { + geometry_ = NULL; + } + // @@protoc_insertion_point(copy_constructor:SSL_WrapperPacket) } void SSL_WrapperPacket::SharedCtor() { _cached_size_ = 0; - detection_ = NULL; - geometry_ = NULL; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); + ::memset(&detection_, 0, reinterpret_cast(&geometry_) - + reinterpret_cast(&detection_) + sizeof(geometry_)); } SSL_WrapperPacket::~SSL_WrapperPacket() { + // @@protoc_insertion_point(destructor:SSL_WrapperPacket) SharedDtor(); } void SSL_WrapperPacket::SharedDtor() { - if (this != default_instance_) { + if (this != internal_default_instance()) { delete detection_; + } + if (this != internal_default_instance()) { delete geometry_; } } @@ -147,71 +186,76 @@ void SSL_WrapperPacket::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* SSL_WrapperPacket::descriptor() { protobuf_AssignDescriptorsOnce(); - return SSL_WrapperPacket_descriptor_; + return file_level_metadata[0].descriptor; } const SSL_WrapperPacket& SSL_WrapperPacket::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_2eproto(); - return *default_instance_; + protobuf_InitDefaults_messages_5frobocup_5fssl_5fwrapper_2eproto(); + return *internal_default_instance(); } -SSL_WrapperPacket* SSL_WrapperPacket::default_instance_ = NULL; - -SSL_WrapperPacket* SSL_WrapperPacket::New() const { - return new SSL_WrapperPacket; +SSL_WrapperPacket* SSL_WrapperPacket::New(::google::protobuf::Arena* arena) const { + SSL_WrapperPacket* n = new SSL_WrapperPacket; + if (arena != NULL) { + arena->Own(n); + } + return n; } void SSL_WrapperPacket::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { +// @@protoc_insertion_point(message_clear_start:SSL_WrapperPacket) + if (_has_bits_[0 / 32] & 3u) { if (has_detection()) { - if (detection_ != NULL) detection_->::SSL_DetectionFrame::Clear(); + GOOGLE_DCHECK(detection_ != NULL); + detection_->::SSL_DetectionFrame::Clear(); } if (has_geometry()) { - if (geometry_ != NULL) geometry_->::SSL_GeometryData::Clear(); + GOOGLE_DCHECK(geometry_ != NULL); + geometry_->::SSL_GeometryData::Clear(); } } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool SSL_WrapperPacket::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:SSL_WrapperPacket) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional .SSL_DetectionFrame detection = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + if (tag == 10u) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_detection())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(18)) goto parse_geometry; break; } // optional .SSL_GeometryData geometry = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_geometry: + if (tag == 18u) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_geometry())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectAtEnd()) return true; break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -219,98 +263,115 @@ bool SSL_WrapperPacket::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:SSL_WrapperPacket) return true; +failure: + // @@protoc_insertion_point(parse_failure:SSL_WrapperPacket) + return false; #undef DO_ } void SSL_WrapperPacket::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:SSL_WrapperPacket) // optional .SSL_DetectionFrame detection = 1; if (has_detection()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, this->detection(), output); + 1, *this->detection_, output); } // optional .SSL_GeometryData geometry = 2; if (has_geometry()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, this->geometry(), output); + 2, *this->geometry_, output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:SSL_WrapperPacket) } -::google::protobuf::uint8* SSL_WrapperPacket::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* SSL_WrapperPacket::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:SSL_WrapperPacket) // optional .SSL_DetectionFrame detection = 1; if (has_detection()) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 1, this->detection(), target); + InternalWriteMessageNoVirtualToArray( + 1, *this->detection_, false, target); } // optional .SSL_GeometryData geometry = 2; if (has_geometry()) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 2, this->geometry(), target); + InternalWriteMessageNoVirtualToArray( + 2, *this->geometry_, false, target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:SSL_WrapperPacket) return target; } -int SSL_WrapperPacket::ByteSize() const { - int total_size = 0; +size_t SSL_WrapperPacket::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:SSL_WrapperPacket) + size_t total_size = 0; - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + if (_has_bits_[0 / 32] & 3u) { // optional .SSL_DetectionFrame detection = 1; if (has_detection()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->detection()); + *this->detection_); } // optional .SSL_GeometryData geometry = 2; if (has_geometry()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->geometry()); + *this->geometry_); } } - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void SSL_WrapperPacket::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:SSL_WrapperPacket) + GOOGLE_DCHECK_NE(&from, this); const SSL_WrapperPacket* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:SSL_WrapperPacket) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:SSL_WrapperPacket) MergeFrom(*source); } } void SSL_WrapperPacket::MergeFrom(const SSL_WrapperPacket& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { +// @@protoc_insertion_point(class_specific_merge_from_start:SSL_WrapperPacket) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._has_bits_[0 / 32] & 3u) { if (from.has_detection()) { mutable_detection()->::SSL_DetectionFrame::MergeFrom(from.detection()); } @@ -318,50 +379,143 @@ void SSL_WrapperPacket::MergeFrom(const SSL_WrapperPacket& from) { mutable_geometry()->::SSL_GeometryData::MergeFrom(from.geometry()); } } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void SSL_WrapperPacket::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:SSL_WrapperPacket) if (&from == this) return; Clear(); MergeFrom(from); } void SSL_WrapperPacket::CopyFrom(const SSL_WrapperPacket& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:SSL_WrapperPacket) if (&from == this) return; Clear(); MergeFrom(from); } bool SSL_WrapperPacket::IsInitialized() const { - if (has_detection()) { - if (!this->detection().IsInitialized()) return false; + if (!this->detection_->IsInitialized()) return false; } if (has_geometry()) { - if (!this->geometry().IsInitialized()) return false; + if (!this->geometry_->IsInitialized()) return false; } return true; } void SSL_WrapperPacket::Swap(SSL_WrapperPacket* other) { - if (other != this) { - std::swap(detection_, other->detection_); - std::swap(geometry_, other->geometry_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void SSL_WrapperPacket::InternalSwap(SSL_WrapperPacket* other) { + std::swap(detection_, other->detection_); + std::swap(geometry_, other->geometry_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata SSL_WrapperPacket::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = SSL_WrapperPacket_descriptor_; - metadata.reflection = SSL_WrapperPacket_reflection_; - return metadata; + return file_level_metadata[0]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// SSL_WrapperPacket + +// optional .SSL_DetectionFrame detection = 1; +bool SSL_WrapperPacket::has_detection() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void SSL_WrapperPacket::set_has_detection() { + _has_bits_[0] |= 0x00000001u; +} +void SSL_WrapperPacket::clear_has_detection() { + _has_bits_[0] &= ~0x00000001u; +} +void SSL_WrapperPacket::clear_detection() { + if (detection_ != NULL) detection_->::SSL_DetectionFrame::Clear(); + clear_has_detection(); +} +const ::SSL_DetectionFrame& SSL_WrapperPacket::detection() const { + // @@protoc_insertion_point(field_get:SSL_WrapperPacket.detection) + return detection_ != NULL ? *detection_ + : *::SSL_DetectionFrame::internal_default_instance(); +} +::SSL_DetectionFrame* SSL_WrapperPacket::mutable_detection() { + set_has_detection(); + if (detection_ == NULL) { + detection_ = new ::SSL_DetectionFrame; + } + // @@protoc_insertion_point(field_mutable:SSL_WrapperPacket.detection) + return detection_; +} +::SSL_DetectionFrame* SSL_WrapperPacket::release_detection() { + // @@protoc_insertion_point(field_release:SSL_WrapperPacket.detection) + clear_has_detection(); + ::SSL_DetectionFrame* temp = detection_; + detection_ = NULL; + return temp; +} +void SSL_WrapperPacket::set_allocated_detection(::SSL_DetectionFrame* detection) { + delete detection_; + detection_ = detection; + if (detection) { + set_has_detection(); + } else { + clear_has_detection(); + } + // @@protoc_insertion_point(field_set_allocated:SSL_WrapperPacket.detection) +} + +// optional .SSL_GeometryData geometry = 2; +bool SSL_WrapperPacket::has_geometry() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +void SSL_WrapperPacket::set_has_geometry() { + _has_bits_[0] |= 0x00000002u; +} +void SSL_WrapperPacket::clear_has_geometry() { + _has_bits_[0] &= ~0x00000002u; +} +void SSL_WrapperPacket::clear_geometry() { + if (geometry_ != NULL) geometry_->::SSL_GeometryData::Clear(); + clear_has_geometry(); +} +const ::SSL_GeometryData& SSL_WrapperPacket::geometry() const { + // @@protoc_insertion_point(field_get:SSL_WrapperPacket.geometry) + return geometry_ != NULL ? *geometry_ + : *::SSL_GeometryData::internal_default_instance(); +} +::SSL_GeometryData* SSL_WrapperPacket::mutable_geometry() { + set_has_geometry(); + if (geometry_ == NULL) { + geometry_ = new ::SSL_GeometryData; + } + // @@protoc_insertion_point(field_mutable:SSL_WrapperPacket.geometry) + return geometry_; +} +::SSL_GeometryData* SSL_WrapperPacket::release_geometry() { + // @@protoc_insertion_point(field_release:SSL_WrapperPacket.geometry) + clear_has_geometry(); + ::SSL_GeometryData* temp = geometry_; + geometry_ = NULL; + return temp; +} +void SSL_WrapperPacket::set_allocated_geometry(::SSL_GeometryData* geometry) { + delete geometry_; + geometry_ = geometry; + if (geometry) { + set_has_geometry(); + } else { + clear_has_geometry(); + } + // @@protoc_insertion_point(field_set_allocated:SSL_WrapperPacket.geometry) } +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) diff --git a/src/proto/messages_robocup_ssl_wrapper.pb.h b/src/proto/messages_robocup_ssl_wrapper.pb.h index 7e9ffd9..d77af94 100644 --- a/src/proto/messages_robocup_ssl_wrapper.pb.h +++ b/src/proto/messages_robocup_ssl_wrapper.pb.h @@ -8,36 +8,66 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 2005000 +#if GOOGLE_PROTOBUF_VERSION < 3001000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. #endif +#include +#include #include +#include #include -#include -#include +#include // IWYU pragma: export +#include // IWYU pragma: export #include #include "messages_robocup_ssl_detection.pb.h" #include "messages_robocup_ssl_geometry.pb.h" // @@protoc_insertion_point(includes) +class SSL_DetectionBall; +class SSL_DetectionBallDefaultTypeInternal; +extern SSL_DetectionBallDefaultTypeInternal _SSL_DetectionBall_default_instance_; +class SSL_DetectionFrame; +class SSL_DetectionFrameDefaultTypeInternal; +extern SSL_DetectionFrameDefaultTypeInternal _SSL_DetectionFrame_default_instance_; +class SSL_DetectionRobot; +class SSL_DetectionRobotDefaultTypeInternal; +extern SSL_DetectionRobotDefaultTypeInternal _SSL_DetectionRobot_default_instance_; +class SSL_FieldCicularArc; +class SSL_FieldCicularArcDefaultTypeInternal; +extern SSL_FieldCicularArcDefaultTypeInternal _SSL_FieldCicularArc_default_instance_; +class SSL_FieldLineSegment; +class SSL_FieldLineSegmentDefaultTypeInternal; +extern SSL_FieldLineSegmentDefaultTypeInternal _SSL_FieldLineSegment_default_instance_; +class SSL_GeometryCameraCalibration; +class SSL_GeometryCameraCalibrationDefaultTypeInternal; +extern SSL_GeometryCameraCalibrationDefaultTypeInternal _SSL_GeometryCameraCalibration_default_instance_; +class SSL_GeometryData; +class SSL_GeometryDataDefaultTypeInternal; +extern SSL_GeometryDataDefaultTypeInternal _SSL_GeometryData_default_instance_; +class SSL_GeometryFieldSize; +class SSL_GeometryFieldSizeDefaultTypeInternal; +extern SSL_GeometryFieldSizeDefaultTypeInternal _SSL_GeometryFieldSize_default_instance_; +class SSL_WrapperPacket; +class SSL_WrapperPacketDefaultTypeInternal; +extern SSL_WrapperPacketDefaultTypeInternal _SSL_WrapperPacket_default_instance_; +class Vector2f; +class Vector2fDefaultTypeInternal; +extern Vector2fDefaultTypeInternal _Vector2f_default_instance_; // Internal implementation detail -- do not call these. -void protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_2eproto(); -void protobuf_AssignDesc_messages_5frobocup_5fssl_5fwrapper_2eproto(); -void protobuf_ShutdownFile_messages_5frobocup_5fssl_5fwrapper_2eproto(); - -class SSL_WrapperPacket; +void protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_2eproto(); +void protobuf_InitDefaults_messages_5frobocup_5fssl_5fwrapper_2eproto(); // =================================================================== -class SSL_WrapperPacket : public ::google::protobuf::Message { +class SSL_WrapperPacket : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:SSL_WrapperPacket) */ { public: SSL_WrapperPacket(); virtual ~SSL_WrapperPacket(); @@ -50,92 +80,109 @@ class SSL_WrapperPacket : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const SSL_WrapperPacket& default_instance(); + static inline const SSL_WrapperPacket* internal_default_instance() { + return reinterpret_cast( + &_SSL_WrapperPacket_default_instance_); + } + void Swap(SSL_WrapperPacket* other); // implements Message ---------------------------------------------- - SSL_WrapperPacket* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline SSL_WrapperPacket* New() const PROTOBUF_FINAL { return New(NULL); } + + SSL_WrapperPacket* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const SSL_WrapperPacket& from); void MergeFrom(const SSL_WrapperPacket& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(SSL_WrapperPacket* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // optional .SSL_DetectionFrame detection = 1; - inline bool has_detection() const; - inline void clear_detection(); + bool has_detection() const; + void clear_detection(); static const int kDetectionFieldNumber = 1; - inline const ::SSL_DetectionFrame& detection() const; - inline ::SSL_DetectionFrame* mutable_detection(); - inline ::SSL_DetectionFrame* release_detection(); - inline void set_allocated_detection(::SSL_DetectionFrame* detection); + const ::SSL_DetectionFrame& detection() const; + ::SSL_DetectionFrame* mutable_detection(); + ::SSL_DetectionFrame* release_detection(); + void set_allocated_detection(::SSL_DetectionFrame* detection); // optional .SSL_GeometryData geometry = 2; - inline bool has_geometry() const; - inline void clear_geometry(); + bool has_geometry() const; + void clear_geometry(); static const int kGeometryFieldNumber = 2; - inline const ::SSL_GeometryData& geometry() const; - inline ::SSL_GeometryData* mutable_geometry(); - inline ::SSL_GeometryData* release_geometry(); - inline void set_allocated_geometry(::SSL_GeometryData* geometry); + const ::SSL_GeometryData& geometry() const; + ::SSL_GeometryData* mutable_geometry(); + ::SSL_GeometryData* release_geometry(); + void set_allocated_geometry(::SSL_GeometryData* geometry); // @@protoc_insertion_point(class_scope:SSL_WrapperPacket) private: - inline void set_has_detection(); - inline void clear_has_detection(); - inline void set_has_geometry(); - inline void clear_has_geometry(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; + void set_has_detection(); + void clear_has_detection(); + void set_has_geometry(); + void clear_has_geometry(); + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; ::SSL_DetectionFrame* detection_; ::SSL_GeometryData* geometry_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; - - friend void protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_2eproto(); - friend void protobuf_AssignDesc_messages_5frobocup_5fssl_5fwrapper_2eproto(); + friend void protobuf_InitDefaults_messages_5frobocup_5fssl_5fwrapper_2eproto_impl(); + friend void protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_messages_5frobocup_5fssl_5fwrapper_2eproto(); friend void protobuf_ShutdownFile_messages_5frobocup_5fssl_5fwrapper_2eproto(); - void InitAsDefaultInstance(); - static SSL_WrapperPacket* default_instance_; }; // =================================================================== // =================================================================== +#if !PROTOBUF_INLINE_NOT_IN_HEADERS // SSL_WrapperPacket // optional .SSL_DetectionFrame detection = 1; @@ -153,14 +200,20 @@ inline void SSL_WrapperPacket::clear_detection() { clear_has_detection(); } inline const ::SSL_DetectionFrame& SSL_WrapperPacket::detection() const { - return detection_ != NULL ? *detection_ : *default_instance_->detection_; + // @@protoc_insertion_point(field_get:SSL_WrapperPacket.detection) + return detection_ != NULL ? *detection_ + : *::SSL_DetectionFrame::internal_default_instance(); } inline ::SSL_DetectionFrame* SSL_WrapperPacket::mutable_detection() { set_has_detection(); - if (detection_ == NULL) detection_ = new ::SSL_DetectionFrame; + if (detection_ == NULL) { + detection_ = new ::SSL_DetectionFrame; + } + // @@protoc_insertion_point(field_mutable:SSL_WrapperPacket.detection) return detection_; } inline ::SSL_DetectionFrame* SSL_WrapperPacket::release_detection() { + // @@protoc_insertion_point(field_release:SSL_WrapperPacket.detection) clear_has_detection(); ::SSL_DetectionFrame* temp = detection_; detection_ = NULL; @@ -174,6 +227,7 @@ inline void SSL_WrapperPacket::set_allocated_detection(::SSL_DetectionFrame* det } else { clear_has_detection(); } + // @@protoc_insertion_point(field_set_allocated:SSL_WrapperPacket.detection) } // optional .SSL_GeometryData geometry = 2; @@ -191,14 +245,20 @@ inline void SSL_WrapperPacket::clear_geometry() { clear_has_geometry(); } inline const ::SSL_GeometryData& SSL_WrapperPacket::geometry() const { - return geometry_ != NULL ? *geometry_ : *default_instance_->geometry_; + // @@protoc_insertion_point(field_get:SSL_WrapperPacket.geometry) + return geometry_ != NULL ? *geometry_ + : *::SSL_GeometryData::internal_default_instance(); } inline ::SSL_GeometryData* SSL_WrapperPacket::mutable_geometry() { set_has_geometry(); - if (geometry_ == NULL) geometry_ = new ::SSL_GeometryData; + if (geometry_ == NULL) { + geometry_ = new ::SSL_GeometryData; + } + // @@protoc_insertion_point(field_mutable:SSL_WrapperPacket.geometry) return geometry_; } inline ::SSL_GeometryData* SSL_WrapperPacket::release_geometry() { + // @@protoc_insertion_point(field_release:SSL_WrapperPacket.geometry) clear_has_geometry(); ::SSL_GeometryData* temp = geometry_; geometry_ = NULL; @@ -212,19 +272,13 @@ inline void SSL_WrapperPacket::set_allocated_geometry(::SSL_GeometryData* geomet } else { clear_has_geometry(); } + // @@protoc_insertion_point(field_set_allocated:SSL_WrapperPacket.geometry) } +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) -#ifndef SWIG -namespace google { -namespace protobuf { - - -} // namespace google -} // namespace protobuf -#endif // SWIG // @@protoc_insertion_point(global_scope) diff --git a/src/proto/messages_robocup_ssl_wrapper_legacy.pb.cc b/src/proto/messages_robocup_ssl_wrapper_legacy.pb.cc index 5f93bf8..dbbfe4d 100644 --- a/src/proto/messages_robocup_ssl_wrapper_legacy.pb.cc +++ b/src/proto/messages_robocup_ssl_wrapper_legacy.pb.cc @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -18,84 +19,109 @@ namespace RoboCup2014Legacy { namespace Wrapper { +class SSL_WrapperPacketDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +SSL_WrapperPacketDefaultTypeInternal _SSL_WrapperPacket_default_instance_; namespace { -const ::google::protobuf::Descriptor* SSL_WrapperPacket_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - SSL_WrapperPacket_reflection_ = NULL; +::google::protobuf::Metadata file_level_metadata[1]; } // namespace -void protobuf_AssignDesc_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto() { - protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto(); - const ::google::protobuf::FileDescriptor* file = - ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( - "messages_robocup_ssl_wrapper_legacy.proto"); - GOOGLE_CHECK(file != NULL); - SSL_WrapperPacket_descriptor_ = file->message_type(0); - static const int SSL_WrapperPacket_offsets_[2] = { +const ::google::protobuf::uint32* protobuf_Offsets_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto() GOOGLE_ATTRIBUTE_COLD; +const ::google::protobuf::uint32* protobuf_Offsets_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto() { + static const ::google::protobuf::uint32 offsets[] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_WrapperPacket, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_WrapperPacket, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_WrapperPacket, detection_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_WrapperPacket, geometry_), + 0, + 1, }; - SSL_WrapperPacket_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - SSL_WrapperPacket_descriptor_, - SSL_WrapperPacket::default_instance_, - SSL_WrapperPacket_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_WrapperPacket, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_WrapperPacket, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(SSL_WrapperPacket)); + return offsets; } +static const ::google::protobuf::internal::MigrationSchema schemas[] = { + { 0, 6, sizeof(SSL_WrapperPacket)}, +}; + +static const ::google::protobuf::internal::DefaultInstanceData file_default_instances[] = { + {reinterpret_cast(&_SSL_WrapperPacket_default_instance_), NULL}, +}; + namespace { -GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); -inline void protobuf_AssignDescriptorsOnce() { - ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, - &protobuf_AssignDesc_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto); +void protobuf_AssignDescriptors() { + protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto(); + ::google::protobuf::MessageFactory* factory = NULL; + AssignDescriptors( + "messages_robocup_ssl_wrapper_legacy.proto", schemas, file_default_instances, protobuf_Offsets_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto(), factory, + file_level_metadata, NULL, NULL); } +void protobuf_AssignDescriptorsOnce() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); +} + +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - SSL_WrapperPacket_descriptor_, &SSL_WrapperPacket::default_instance()); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1); } } // namespace void protobuf_ShutdownFile_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto() { - delete SSL_WrapperPacket::default_instance_; - delete SSL_WrapperPacket_reflection_; + _SSL_WrapperPacket_default_instance_.Shutdown(); + delete file_level_metadata[0].reflection; } -void protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto() { - static bool already_here = false; - if (already_here) return; - already_here = true; +void protobuf_InitDefaults_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto_impl() { GOOGLE_PROTOBUF_VERIFY_VERSION; - ::protobuf_AddDesc_messages_5frobocup_5fssl_5fdetection_2eproto(); - ::RoboCup2014Legacy::Geometry::protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto(); + ::protobuf_InitDefaults_messages_5frobocup_5fssl_5fdetection_2eproto(); + ::RoboCup2014Legacy::Geometry::protobuf_InitDefaults_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto(); + ::google::protobuf::internal::InitProtobufDefaults(); + _SSL_WrapperPacket_default_instance_.DefaultConstruct(); + _SSL_WrapperPacket_default_instance_.get_mutable()->detection_ = const_cast< ::SSL_DetectionFrame*>( + ::SSL_DetectionFrame::internal_default_instance()); + _SSL_WrapperPacket_default_instance_.get_mutable()->geometry_ = const_cast< ::RoboCup2014Legacy::Geometry::SSL_GeometryData*>( + ::RoboCup2014Legacy::Geometry::SSL_GeometryData::internal_default_instance()); +} + +void protobuf_InitDefaults_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_InitDefaults_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto_impl); +} +void protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto_impl() { + protobuf_InitDefaults_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto(); + static const char descriptor[] = { + "\n)messages_robocup_ssl_wrapper_legacy.pr" + "oto\022\031RoboCup2014Legacy.Wrapper\032$messages" + "_robocup_ssl_detection.proto\032*messages_r" + "obocup_ssl_geometry_legacy.proto\"{\n\021SSL_" + "WrapperPacket\022&\n\tdetection\030\001 \001(\0132\023.SSL_D" + "etectionFrame\022>\n\010geometry\030\002 \001(\0132,.RoboCu" + "p2014Legacy.Geometry.SSL_GeometryData" + }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - "\n)messages_robocup_ssl_wrapper_legacy.pr" - "oto\022\031RoboCup2014Legacy.Wrapper\032$messages" - "_robocup_ssl_detection.proto\032*messages_r" - "obocup_ssl_geometry_legacy.proto\"{\n\021SSL_" - "WrapperPacket\022&\n\tdetection\030\001 \001(\0132\023.SSL_D" - "etectionFrame\022>\n\010geometry\030\002 \001(\0132,.RoboCu" - "p2014Legacy.Geometry.SSL_GeometryData", 277); + descriptor, 277); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "messages_robocup_ssl_wrapper_legacy.proto", &protobuf_RegisterTypes); - SSL_WrapperPacket::default_instance_ = new SSL_WrapperPacket(); - SSL_WrapperPacket::default_instance_->InitAsDefaultInstance(); + ::protobuf_AddDesc_messages_5frobocup_5fssl_5fdetection_2eproto(); + ::RoboCup2014Legacy::Geometry::protobuf_AddDesc_messages_5frobocup_5fssl_5fgeometry_5flegacy_2eproto(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto); } +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto_once_); +void protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto_once_, + &protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto_impl); +} // Force AddDescriptors() to be called at static initialization time. struct StaticDescriptorInitializer_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto { StaticDescriptorInitializer_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto() { @@ -105,41 +131,54 @@ struct StaticDescriptorInitializer_messages_5frobocup_5fssl_5fwrapper_5flegacy_2 // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int SSL_WrapperPacket::kDetectionFieldNumber; const int SSL_WrapperPacket::kGeometryFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 SSL_WrapperPacket::SSL_WrapperPacket() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket) } - -void SSL_WrapperPacket::InitAsDefaultInstance() { - detection_ = const_cast< ::SSL_DetectionFrame*>(&::SSL_DetectionFrame::default_instance()); - geometry_ = const_cast< ::RoboCup2014Legacy::Geometry::SSL_GeometryData*>(&::RoboCup2014Legacy::Geometry::SSL_GeometryData::default_instance()); -} - SSL_WrapperPacket::SSL_WrapperPacket(const SSL_WrapperPacket& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from.has_detection()) { + detection_ = new ::SSL_DetectionFrame(*from.detection_); + } else { + detection_ = NULL; + } + if (from.has_geometry()) { + geometry_ = new ::RoboCup2014Legacy::Geometry::SSL_GeometryData(*from.geometry_); + } else { + geometry_ = NULL; + } + // @@protoc_insertion_point(copy_constructor:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket) } void SSL_WrapperPacket::SharedCtor() { _cached_size_ = 0; - detection_ = NULL; - geometry_ = NULL; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); + ::memset(&detection_, 0, reinterpret_cast(&geometry_) - + reinterpret_cast(&detection_) + sizeof(geometry_)); } SSL_WrapperPacket::~SSL_WrapperPacket() { + // @@protoc_insertion_point(destructor:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket) SharedDtor(); } void SSL_WrapperPacket::SharedDtor() { - if (this != default_instance_) { + if (this != internal_default_instance()) { delete detection_; + } + if (this != internal_default_instance()) { delete geometry_; } } @@ -151,71 +190,76 @@ void SSL_WrapperPacket::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* SSL_WrapperPacket::descriptor() { protobuf_AssignDescriptorsOnce(); - return SSL_WrapperPacket_descriptor_; + return file_level_metadata[0].descriptor; } const SSL_WrapperPacket& SSL_WrapperPacket::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto(); - return *default_instance_; + protobuf_InitDefaults_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto(); + return *internal_default_instance(); } -SSL_WrapperPacket* SSL_WrapperPacket::default_instance_ = NULL; - -SSL_WrapperPacket* SSL_WrapperPacket::New() const { - return new SSL_WrapperPacket; +SSL_WrapperPacket* SSL_WrapperPacket::New(::google::protobuf::Arena* arena) const { + SSL_WrapperPacket* n = new SSL_WrapperPacket; + if (arena != NULL) { + arena->Own(n); + } + return n; } void SSL_WrapperPacket::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { +// @@protoc_insertion_point(message_clear_start:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket) + if (_has_bits_[0 / 32] & 3u) { if (has_detection()) { - if (detection_ != NULL) detection_->::SSL_DetectionFrame::Clear(); + GOOGLE_DCHECK(detection_ != NULL); + detection_->::SSL_DetectionFrame::Clear(); } if (has_geometry()) { - if (geometry_ != NULL) geometry_->::RoboCup2014Legacy::Geometry::SSL_GeometryData::Clear(); + GOOGLE_DCHECK(geometry_ != NULL); + geometry_->::RoboCup2014Legacy::Geometry::SSL_GeometryData::Clear(); } } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool SSL_WrapperPacket::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional .SSL_DetectionFrame detection = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + if (tag == 10u) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_detection())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(18)) goto parse_geometry; break; } // optional .RoboCup2014Legacy.Geometry.SSL_GeometryData geometry = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_geometry: + if (tag == 18u) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_geometry())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectAtEnd()) return true; break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -223,98 +267,115 @@ bool SSL_WrapperPacket::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket) return true; +failure: + // @@protoc_insertion_point(parse_failure:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket) + return false; #undef DO_ } void SSL_WrapperPacket::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket) // optional .SSL_DetectionFrame detection = 1; if (has_detection()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, this->detection(), output); + 1, *this->detection_, output); } // optional .RoboCup2014Legacy.Geometry.SSL_GeometryData geometry = 2; if (has_geometry()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, this->geometry(), output); + 2, *this->geometry_, output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket) } -::google::protobuf::uint8* SSL_WrapperPacket::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* SSL_WrapperPacket::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket) // optional .SSL_DetectionFrame detection = 1; if (has_detection()) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 1, this->detection(), target); + InternalWriteMessageNoVirtualToArray( + 1, *this->detection_, false, target); } // optional .RoboCup2014Legacy.Geometry.SSL_GeometryData geometry = 2; if (has_geometry()) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 2, this->geometry(), target); + InternalWriteMessageNoVirtualToArray( + 2, *this->geometry_, false, target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket) return target; } -int SSL_WrapperPacket::ByteSize() const { - int total_size = 0; +size_t SSL_WrapperPacket::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket) + size_t total_size = 0; - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + if (_has_bits_[0 / 32] & 3u) { // optional .SSL_DetectionFrame detection = 1; if (has_detection()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->detection()); + *this->detection_); } // optional .RoboCup2014Legacy.Geometry.SSL_GeometryData geometry = 2; if (has_geometry()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->geometry()); + *this->geometry_); } } - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void SSL_WrapperPacket::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket) + GOOGLE_DCHECK_NE(&from, this); const SSL_WrapperPacket* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket) MergeFrom(*source); } } void SSL_WrapperPacket::MergeFrom(const SSL_WrapperPacket& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { +// @@protoc_insertion_point(class_specific_merge_from_start:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._has_bits_[0 / 32] & 3u) { if (from.has_detection()) { mutable_detection()->::SSL_DetectionFrame::MergeFrom(from.detection()); } @@ -322,50 +383,143 @@ void SSL_WrapperPacket::MergeFrom(const SSL_WrapperPacket& from) { mutable_geometry()->::RoboCup2014Legacy::Geometry::SSL_GeometryData::MergeFrom(from.geometry()); } } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void SSL_WrapperPacket::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket) if (&from == this) return; Clear(); MergeFrom(from); } void SSL_WrapperPacket::CopyFrom(const SSL_WrapperPacket& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket) if (&from == this) return; Clear(); MergeFrom(from); } bool SSL_WrapperPacket::IsInitialized() const { - if (has_detection()) { - if (!this->detection().IsInitialized()) return false; + if (!this->detection_->IsInitialized()) return false; } if (has_geometry()) { - if (!this->geometry().IsInitialized()) return false; + if (!this->geometry_->IsInitialized()) return false; } return true; } void SSL_WrapperPacket::Swap(SSL_WrapperPacket* other) { - if (other != this) { - std::swap(detection_, other->detection_); - std::swap(geometry_, other->geometry_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void SSL_WrapperPacket::InternalSwap(SSL_WrapperPacket* other) { + std::swap(detection_, other->detection_); + std::swap(geometry_, other->geometry_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata SSL_WrapperPacket::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = SSL_WrapperPacket_descriptor_; - metadata.reflection = SSL_WrapperPacket_reflection_; - return metadata; + return file_level_metadata[0]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// SSL_WrapperPacket + +// optional .SSL_DetectionFrame detection = 1; +bool SSL_WrapperPacket::has_detection() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void SSL_WrapperPacket::set_has_detection() { + _has_bits_[0] |= 0x00000001u; +} +void SSL_WrapperPacket::clear_has_detection() { + _has_bits_[0] &= ~0x00000001u; +} +void SSL_WrapperPacket::clear_detection() { + if (detection_ != NULL) detection_->::SSL_DetectionFrame::Clear(); + clear_has_detection(); +} +const ::SSL_DetectionFrame& SSL_WrapperPacket::detection() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket.detection) + return detection_ != NULL ? *detection_ + : *::SSL_DetectionFrame::internal_default_instance(); +} +::SSL_DetectionFrame* SSL_WrapperPacket::mutable_detection() { + set_has_detection(); + if (detection_ == NULL) { + detection_ = new ::SSL_DetectionFrame; + } + // @@protoc_insertion_point(field_mutable:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket.detection) + return detection_; +} +::SSL_DetectionFrame* SSL_WrapperPacket::release_detection() { + // @@protoc_insertion_point(field_release:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket.detection) + clear_has_detection(); + ::SSL_DetectionFrame* temp = detection_; + detection_ = NULL; + return temp; +} +void SSL_WrapperPacket::set_allocated_detection(::SSL_DetectionFrame* detection) { + delete detection_; + detection_ = detection; + if (detection) { + set_has_detection(); + } else { + clear_has_detection(); + } + // @@protoc_insertion_point(field_set_allocated:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket.detection) +} + +// optional .RoboCup2014Legacy.Geometry.SSL_GeometryData geometry = 2; +bool SSL_WrapperPacket::has_geometry() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +void SSL_WrapperPacket::set_has_geometry() { + _has_bits_[0] |= 0x00000002u; +} +void SSL_WrapperPacket::clear_has_geometry() { + _has_bits_[0] &= ~0x00000002u; +} +void SSL_WrapperPacket::clear_geometry() { + if (geometry_ != NULL) geometry_->::RoboCup2014Legacy::Geometry::SSL_GeometryData::Clear(); + clear_has_geometry(); +} +const ::RoboCup2014Legacy::Geometry::SSL_GeometryData& SSL_WrapperPacket::geometry() const { + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket.geometry) + return geometry_ != NULL ? *geometry_ + : *::RoboCup2014Legacy::Geometry::SSL_GeometryData::internal_default_instance(); +} +::RoboCup2014Legacy::Geometry::SSL_GeometryData* SSL_WrapperPacket::mutable_geometry() { + set_has_geometry(); + if (geometry_ == NULL) { + geometry_ = new ::RoboCup2014Legacy::Geometry::SSL_GeometryData; + } + // @@protoc_insertion_point(field_mutable:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket.geometry) + return geometry_; +} +::RoboCup2014Legacy::Geometry::SSL_GeometryData* SSL_WrapperPacket::release_geometry() { + // @@protoc_insertion_point(field_release:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket.geometry) + clear_has_geometry(); + ::RoboCup2014Legacy::Geometry::SSL_GeometryData* temp = geometry_; + geometry_ = NULL; + return temp; +} +void SSL_WrapperPacket::set_allocated_geometry(::RoboCup2014Legacy::Geometry::SSL_GeometryData* geometry) { + delete geometry_; + geometry_ = geometry; + if (geometry) { + set_has_geometry(); + } else { + clear_has_geometry(); + } + // @@protoc_insertion_point(field_set_allocated:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket.geometry) } +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) diff --git a/src/proto/messages_robocup_ssl_wrapper_legacy.pb.h b/src/proto/messages_robocup_ssl_wrapper_legacy.pb.h index 2e711ed..9f9857c 100644 --- a/src/proto/messages_robocup_ssl_wrapper_legacy.pb.h +++ b/src/proto/messages_robocup_ssl_wrapper_legacy.pb.h @@ -8,39 +8,63 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 2005000 +#if GOOGLE_PROTOBUF_VERSION < 3001000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. #endif +#include +#include #include +#include #include -#include -#include +#include // IWYU pragma: export +#include // IWYU pragma: export #include #include "messages_robocup_ssl_detection.pb.h" #include "messages_robocup_ssl_geometry_legacy.pb.h" // @@protoc_insertion_point(includes) +class SSL_DetectionBall; +class SSL_DetectionBallDefaultTypeInternal; +extern SSL_DetectionBallDefaultTypeInternal _SSL_DetectionBall_default_instance_; +class SSL_DetectionFrame; +class SSL_DetectionFrameDefaultTypeInternal; +extern SSL_DetectionFrameDefaultTypeInternal _SSL_DetectionFrame_default_instance_; +class SSL_DetectionRobot; +class SSL_DetectionRobotDefaultTypeInternal; +extern SSL_DetectionRobotDefaultTypeInternal _SSL_DetectionRobot_default_instance_; +namespace RoboCup2014Legacy { +namespace Geometry { +class SSL_GeometryData; +class SSL_GeometryDataDefaultTypeInternal; +extern SSL_GeometryDataDefaultTypeInternal _SSL_GeometryData_default_instance_; +class SSL_GeometryFieldSize; +class SSL_GeometryFieldSizeDefaultTypeInternal; +extern SSL_GeometryFieldSizeDefaultTypeInternal _SSL_GeometryFieldSize_default_instance_; +} // namespace Geometry +namespace Wrapper { +class SSL_WrapperPacket; +class SSL_WrapperPacketDefaultTypeInternal; +extern SSL_WrapperPacketDefaultTypeInternal _SSL_WrapperPacket_default_instance_; +} // namespace Wrapper +} // namespace RoboCup2014Legacy namespace RoboCup2014Legacy { namespace Wrapper { // Internal implementation detail -- do not call these. -void protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto(); -void protobuf_AssignDesc_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto(); -void protobuf_ShutdownFile_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto(); - -class SSL_WrapperPacket; +void protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto(); +void protobuf_InitDefaults_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto(); // =================================================================== -class SSL_WrapperPacket : public ::google::protobuf::Message { +class SSL_WrapperPacket : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket) */ { public: SSL_WrapperPacket(); virtual ~SSL_WrapperPacket(); @@ -53,92 +77,109 @@ class SSL_WrapperPacket : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const SSL_WrapperPacket& default_instance(); + static inline const SSL_WrapperPacket* internal_default_instance() { + return reinterpret_cast( + &_SSL_WrapperPacket_default_instance_); + } + void Swap(SSL_WrapperPacket* other); // implements Message ---------------------------------------------- - SSL_WrapperPacket* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline SSL_WrapperPacket* New() const PROTOBUF_FINAL { return New(NULL); } + + SSL_WrapperPacket* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const SSL_WrapperPacket& from); void MergeFrom(const SSL_WrapperPacket& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(SSL_WrapperPacket* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // optional .SSL_DetectionFrame detection = 1; - inline bool has_detection() const; - inline void clear_detection(); + bool has_detection() const; + void clear_detection(); static const int kDetectionFieldNumber = 1; - inline const ::SSL_DetectionFrame& detection() const; - inline ::SSL_DetectionFrame* mutable_detection(); - inline ::SSL_DetectionFrame* release_detection(); - inline void set_allocated_detection(::SSL_DetectionFrame* detection); + const ::SSL_DetectionFrame& detection() const; + ::SSL_DetectionFrame* mutable_detection(); + ::SSL_DetectionFrame* release_detection(); + void set_allocated_detection(::SSL_DetectionFrame* detection); // optional .RoboCup2014Legacy.Geometry.SSL_GeometryData geometry = 2; - inline bool has_geometry() const; - inline void clear_geometry(); + bool has_geometry() const; + void clear_geometry(); static const int kGeometryFieldNumber = 2; - inline const ::RoboCup2014Legacy::Geometry::SSL_GeometryData& geometry() const; - inline ::RoboCup2014Legacy::Geometry::SSL_GeometryData* mutable_geometry(); - inline ::RoboCup2014Legacy::Geometry::SSL_GeometryData* release_geometry(); - inline void set_allocated_geometry(::RoboCup2014Legacy::Geometry::SSL_GeometryData* geometry); + const ::RoboCup2014Legacy::Geometry::SSL_GeometryData& geometry() const; + ::RoboCup2014Legacy::Geometry::SSL_GeometryData* mutable_geometry(); + ::RoboCup2014Legacy::Geometry::SSL_GeometryData* release_geometry(); + void set_allocated_geometry(::RoboCup2014Legacy::Geometry::SSL_GeometryData* geometry); // @@protoc_insertion_point(class_scope:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket) private: - inline void set_has_detection(); - inline void clear_has_detection(); - inline void set_has_geometry(); - inline void clear_has_geometry(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; + void set_has_detection(); + void clear_has_detection(); + void set_has_geometry(); + void clear_has_geometry(); + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; ::SSL_DetectionFrame* detection_; ::RoboCup2014Legacy::Geometry::SSL_GeometryData* geometry_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; - - friend void protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto(); - friend void protobuf_AssignDesc_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto(); + friend void protobuf_InitDefaults_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto_impl(); + friend void protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto(); friend void protobuf_ShutdownFile_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto(); - void InitAsDefaultInstance(); - static SSL_WrapperPacket* default_instance_; }; // =================================================================== // =================================================================== +#if !PROTOBUF_INLINE_NOT_IN_HEADERS // SSL_WrapperPacket // optional .SSL_DetectionFrame detection = 1; @@ -156,14 +197,20 @@ inline void SSL_WrapperPacket::clear_detection() { clear_has_detection(); } inline const ::SSL_DetectionFrame& SSL_WrapperPacket::detection() const { - return detection_ != NULL ? *detection_ : *default_instance_->detection_; + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket.detection) + return detection_ != NULL ? *detection_ + : *::SSL_DetectionFrame::internal_default_instance(); } inline ::SSL_DetectionFrame* SSL_WrapperPacket::mutable_detection() { set_has_detection(); - if (detection_ == NULL) detection_ = new ::SSL_DetectionFrame; + if (detection_ == NULL) { + detection_ = new ::SSL_DetectionFrame; + } + // @@protoc_insertion_point(field_mutable:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket.detection) return detection_; } inline ::SSL_DetectionFrame* SSL_WrapperPacket::release_detection() { + // @@protoc_insertion_point(field_release:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket.detection) clear_has_detection(); ::SSL_DetectionFrame* temp = detection_; detection_ = NULL; @@ -177,6 +224,7 @@ inline void SSL_WrapperPacket::set_allocated_detection(::SSL_DetectionFrame* det } else { clear_has_detection(); } + // @@protoc_insertion_point(field_set_allocated:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket.detection) } // optional .RoboCup2014Legacy.Geometry.SSL_GeometryData geometry = 2; @@ -194,14 +242,20 @@ inline void SSL_WrapperPacket::clear_geometry() { clear_has_geometry(); } inline const ::RoboCup2014Legacy::Geometry::SSL_GeometryData& SSL_WrapperPacket::geometry() const { - return geometry_ != NULL ? *geometry_ : *default_instance_->geometry_; + // @@protoc_insertion_point(field_get:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket.geometry) + return geometry_ != NULL ? *geometry_ + : *::RoboCup2014Legacy::Geometry::SSL_GeometryData::internal_default_instance(); } inline ::RoboCup2014Legacy::Geometry::SSL_GeometryData* SSL_WrapperPacket::mutable_geometry() { set_has_geometry(); - if (geometry_ == NULL) geometry_ = new ::RoboCup2014Legacy::Geometry::SSL_GeometryData; + if (geometry_ == NULL) { + geometry_ = new ::RoboCup2014Legacy::Geometry::SSL_GeometryData; + } + // @@protoc_insertion_point(field_mutable:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket.geometry) return geometry_; } inline ::RoboCup2014Legacy::Geometry::SSL_GeometryData* SSL_WrapperPacket::release_geometry() { + // @@protoc_insertion_point(field_release:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket.geometry) clear_has_geometry(); ::RoboCup2014Legacy::Geometry::SSL_GeometryData* temp = geometry_; geometry_ = NULL; @@ -215,23 +269,17 @@ inline void SSL_WrapperPacket::set_allocated_geometry(::RoboCup2014Legacy::Geome } else { clear_has_geometry(); } + // @@protoc_insertion_point(field_set_allocated:RoboCup2014Legacy.Wrapper.SSL_WrapperPacket.geometry) } +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) + } // namespace Wrapper } // namespace RoboCup2014Legacy -#ifndef SWIG -namespace google { -namespace protobuf { - - -} // namespace google -} // namespace protobuf -#endif // SWIG - // @@protoc_insertion_point(global_scope) #endif // PROTOBUF_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto__INCLUDED diff --git a/src/proto/pb/Ball_message.proto b/src/proto/pb/Ball_message.proto old mode 100644 new mode 100755 index 2fb3a02..2ad3284 --- a/src/proto/pb/Ball_message.proto +++ b/src/proto/pb/Ball_message.proto @@ -1,3 +1,4 @@ +syntax="proto2"; import "position_message.proto"; message Ball_message diff --git a/src/proto/pb/Ball_message.proto~ b/src/proto/pb/Ball_message.proto~ new file mode 100755 index 0000000..2fb3a02 --- /dev/null +++ b/src/proto/pb/Ball_message.proto~ @@ -0,0 +1,10 @@ +import "position_message.proto"; + +message Ball_message +{ + required bool isValid = 1; + + required position_message position = 2; + required position_message velocity = 3; +} + diff --git a/src/proto/pb/RobotCommand_message.proto b/src/proto/pb/RobotCommand_message.proto old mode 100644 new mode 100755 index 45474c9..4b507c4 --- a/src/proto/pb/RobotCommand_message.proto +++ b/src/proto/pb/RobotCommand_message.proto @@ -1,3 +1,4 @@ +syntax="proto2"; import "position_message.proto"; message RobotCommand_message diff --git a/src/proto/pb/RobotCommand_message.proto~ b/src/proto/pb/RobotCommand_message.proto~ new file mode 100755 index 0000000..45474c9 --- /dev/null +++ b/src/proto/pb/RobotCommand_message.proto~ @@ -0,0 +1,16 @@ +import "position_message.proto"; + +message RobotCommand_message +{ + required position_message fin_pos = 1; + required position_message fin_vel = 2; + + required float maxSpeed = 3; + + required float kickspeedx = 4; + required float kickspeedz = 5; + + required bool useNav = 6; + required bool isBallObs = 7; + required bool isKickObs = 8; +} diff --git a/src/proto/pb/Robot_message.proto b/src/proto/pb/Robot_message.proto old mode 100644 new mode 100755 index 624087d..e686f5e --- a/src/proto/pb/Robot_message.proto +++ b/src/proto/pb/Robot_message.proto @@ -1,3 +1,4 @@ +syntax="proto2"; import "position_message.proto"; import "RobotCommand_message.proto"; diff --git a/src/proto/pb/Robot_message.proto~ b/src/proto/pb/Robot_message.proto~ new file mode 100755 index 0000000..624087d --- /dev/null +++ b/src/proto/pb/Robot_message.proto~ @@ -0,0 +1,55 @@ +import "position_message.proto"; +import "RobotCommand_message.proto"; + +message Robot_message +{ + enum AgentStatus + { + Idle = 1; + Passing = 2; + Kicking = 3; + Chiping = 4; + FollowingBall = 5; + BlockingBall = 6; + BlockingRobot = 7; + RecievingPass = 8; + } + + enum AgentRegion + { + NoRegion=21; + Left = 22; + Center = 23; + Right = 24; + } + + enum AgentRole + { + NoRole = 31; + ArcMid = 32; + ArcLeft = 33; + ArcRight = 34; + FixedPositionLeft = 35; + FixedPositionRight = 36; + FixedPositionMid = 37; + AttackerLeft = 38; + AttackerRight = 39; + AttackerMid = 40; + Blocker = 41; + DefenderLeft = 42; + DefenderRight = 43; + DefenderMid = 44; + Golie = 45; + } + + required bool isValid = 1; + + required position_message position = 2; + required position_message velocity = 3; + + optional AgentStatus status = 4; + optional AgentRole role = 5; + optional AgentRegion region = 6; + + optional RobotCommand_message rc = 7; +} diff --git a/src/proto/pb/grSim_Commands.proto b/src/proto/pb/grSim_Commands.proto old mode 100644 new mode 100755 index fa89267..1311d0e --- a/src/proto/pb/grSim_Commands.proto +++ b/src/proto/pb/grSim_Commands.proto @@ -1,3 +1,4 @@ +syntax="proto2"; message grSim_Robot_Command { required uint32 id = 1; required float kickspeedx = 2; diff --git a/src/proto/pb/grSim_Commands.proto~ b/src/proto/pb/grSim_Commands.proto~ new file mode 100755 index 0000000..fa89267 --- /dev/null +++ b/src/proto/pb/grSim_Commands.proto~ @@ -0,0 +1,21 @@ +message grSim_Robot_Command { +required uint32 id = 1; +required float kickspeedx = 2; +required float kickspeedz = 3; +required float veltangent = 4; +required float velnormal = 5; +required float velangular = 6; +required bool spinner = 7; +required bool wheelsspeed = 8; +optional float wheel1 = 9; +optional float wheel2 = 10; +optional float wheel3 = 11; +optional float wheel4 = 12; +} + +message grSim_Commands { +required double timestamp = 1; +required bool isteamyellow = 2; +repeated grSim_Robot_Command robot_commands = 3; +} + diff --git a/src/proto/pb/grSim_Packet.proto b/src/proto/pb/grSim_Packet.proto old mode 100644 new mode 100755 index 5bf696f..2922349 --- a/src/proto/pb/grSim_Packet.proto +++ b/src/proto/pb/grSim_Packet.proto @@ -1,6 +1,7 @@ +syntax="proto2"; import "grSim_Commands.proto"; import "grSim_Replacement.proto"; message grSim_Packet { optional grSim_Commands commands = 1; optional grSim_Replacement replacement = 2; -} \ No newline at end of file +} diff --git a/src/proto/pb/grSim_Packet.proto~ b/src/proto/pb/grSim_Packet.proto~ new file mode 100755 index 0000000..5bf696f --- /dev/null +++ b/src/proto/pb/grSim_Packet.proto~ @@ -0,0 +1,6 @@ +import "grSim_Commands.proto"; +import "grSim_Replacement.proto"; +message grSim_Packet { + optional grSim_Commands commands = 1; + optional grSim_Replacement replacement = 2; +} \ No newline at end of file diff --git a/src/proto/pb/grSim_Replacement.proto b/src/proto/pb/grSim_Replacement.proto old mode 100644 new mode 100755 index 22bcfad..1096f66 --- a/src/proto/pb/grSim_Replacement.proto +++ b/src/proto/pb/grSim_Replacement.proto @@ -1,3 +1,4 @@ +syntax="proto2"; message grSim_RobotReplacement { required double x=1; required double y=2; diff --git a/src/proto/pb/grSim_Replacement.proto~ b/src/proto/pb/grSim_Replacement.proto~ new file mode 100755 index 0000000..22bcfad --- /dev/null +++ b/src/proto/pb/grSim_Replacement.proto~ @@ -0,0 +1,19 @@ +message grSim_RobotReplacement { +required double x=1; +required double y=2; +required double dir=3; +required uint32 id=4; +required bool yellowteam=5; +} + +message grSim_BallReplacement { +required double x=1; +required double y=2; +required double vx=3; +required double vy=4; +} + +message grSim_Replacement { +optional grSim_BallReplacement ball = 1; +repeated grSim_RobotReplacement robots = 2; +} diff --git a/src/proto/pb/log.proto b/src/proto/pb/log.proto old mode 100644 new mode 100755 index a79a1b9..6cf029e --- a/src/proto/pb/log.proto +++ b/src/proto/pb/log.proto @@ -1,3 +1,4 @@ +syntax="proto2"; import "vision_log.proto"; import "ssl_log.proto"; import "ref_log.proto"; diff --git a/src/proto/pb/log.proto~ b/src/proto/pb/log.proto~ new file mode 100755 index 0000000..a79a1b9 --- /dev/null +++ b/src/proto/pb/log.proto~ @@ -0,0 +1,10 @@ +import "vision_log.proto"; +import "ssl_log.proto"; +import "ref_log.proto"; + +message logRecord +{ + optional SSL_log ai = 1; + optional Vision_log vision = 2; + optional Ref_log referee = 3; +} diff --git a/src/proto/pb/messages_robocup_ssl_detection.proto b/src/proto/pb/messages_robocup_ssl_detection.proto old mode 100644 new mode 100755 index ff50f41..380a61a --- a/src/proto/pb/messages_robocup_ssl_detection.proto +++ b/src/proto/pb/messages_robocup_ssl_detection.proto @@ -1,3 +1,4 @@ +syntax="proto2"; message SSL_DetectionBall { required float confidence = 1; optional uint32 area = 2; diff --git a/src/proto/pb/messages_robocup_ssl_detection.proto~ b/src/proto/pb/messages_robocup_ssl_detection.proto~ new file mode 100755 index 0000000..ff50f41 --- /dev/null +++ b/src/proto/pb/messages_robocup_ssl_detection.proto~ @@ -0,0 +1,30 @@ +message SSL_DetectionBall { + required float confidence = 1; + optional uint32 area = 2; + required float x = 3; + required float y = 4; + optional float z = 5; + required float pixel_x = 6; + required float pixel_y = 7; +} + +message SSL_DetectionRobot { + required float confidence = 1; + optional uint32 robot_id = 2; + required float x = 3; + required float y = 4; + optional float orientation = 5; + required float pixel_x = 6; + required float pixel_y = 7; + optional float height = 8; +} + +message SSL_DetectionFrame { + required uint32 frame_number = 1; + required double t_capture = 2; + required double t_sent = 3; + required uint32 camera_id = 4; + repeated SSL_DetectionBall balls = 5; + repeated SSL_DetectionRobot robots_yellow = 6; + repeated SSL_DetectionRobot robots_blue = 7; +} diff --git a/src/proto/pb/messages_robocup_ssl_geometry.proto b/src/proto/pb/messages_robocup_ssl_geometry.proto old mode 100644 new mode 100755 index d4431b8..f286863 --- a/src/proto/pb/messages_robocup_ssl_geometry.proto +++ b/src/proto/pb/messages_robocup_ssl_geometry.proto @@ -1,3 +1,4 @@ +syntax="proto2"; // A 2D float vector. message Vector2f { required float x = 1; diff --git a/src/proto/pb/messages_robocup_ssl_geometry.proto~ b/src/proto/pb/messages_robocup_ssl_geometry.proto~ new file mode 100755 index 0000000..d4431b8 --- /dev/null +++ b/src/proto/pb/messages_robocup_ssl_geometry.proto~ @@ -0,0 +1,70 @@ +// A 2D float vector. +message Vector2f { + required float x = 1; + required float y = 2; +} + +// Represents a field marking as a line segment represented by a start point p1, +// and end point p2, and a line thickness. The start and end points are along +// the center of the line, so the thickness of the line extends by thickness / 2 +// on either side of the line. +message SSL_FieldLineSegment { + // Name of this field marking. + required string name = 1; + // Start point of the line segment. + required Vector2f p1 = 2; + // End point of the line segment. + required Vector2f p2 = 3; + // Thickness of the line segment. + required float thickness = 4; +} + +// Represents a field marking as a circular arc segment represented by center point, a +// start angle, an end angle, and an arc thickness. +message SSL_FieldCicularArc { + // Name of this field marking. + required string name = 1; + // Center point of the circular arc. + required Vector2f center = 2; + // Radius of the arc. + required float radius = 3; + // Start angle in counter-clockwise order. + required float a1 = 4; + // End angle in counter-clockwise order. + required float a2 = 5; + // Thickness of the arc. + required float thickness = 6; +} + +message SSL_GeometryFieldSize { + required int32 field_length = 1; + required int32 field_width = 2; + required int32 goal_width = 3; + required int32 goal_depth = 4; + required int32 boundary_width = 5; + repeated SSL_FieldLineSegment field_lines = 6; + repeated SSL_FieldCicularArc field_arcs = 7; +} + +message SSL_GeometryCameraCalibration { + required uint32 camera_id = 1; + required float focal_length = 2; + required float principal_point_x = 3; + required float principal_point_y = 4; + required float distortion = 5; + required float q0 = 6; + required float q1 = 7; + required float q2 = 8; + required float q3 = 9; + required float tx = 10; + required float ty = 11; + required float tz = 12; + optional float derived_camera_world_tx = 13; + optional float derived_camera_world_ty = 14; + optional float derived_camera_world_tz = 15; +} + +message SSL_GeometryData { + required SSL_GeometryFieldSize field = 1; + repeated SSL_GeometryCameraCalibration calib = 2; +} diff --git a/src/proto/pb/messages_robocup_ssl_geometry_legacy.proto b/src/proto/pb/messages_robocup_ssl_geometry_legacy.proto old mode 100644 new mode 100755 index 108c983..27083fd --- a/src/proto/pb/messages_robocup_ssl_geometry_legacy.proto +++ b/src/proto/pb/messages_robocup_ssl_geometry_legacy.proto @@ -1,3 +1,4 @@ +syntax="proto2"; import "messages_robocup_ssl_geometry.proto"; package RoboCup2014Legacy.Geometry; diff --git a/src/proto/pb/messages_robocup_ssl_geometry_legacy.proto~ b/src/proto/pb/messages_robocup_ssl_geometry_legacy.proto~ new file mode 100755 index 0000000..108c983 --- /dev/null +++ b/src/proto/pb/messages_robocup_ssl_geometry_legacy.proto~ @@ -0,0 +1,27 @@ +import "messages_robocup_ssl_geometry.proto"; +package RoboCup2014Legacy.Geometry; + +message SSL_GeometryFieldSize { + required int32 line_width = 1; + required int32 field_length = 2; + required int32 field_width = 3; + required int32 boundary_width = 4; + required int32 referee_width = 5; + required int32 goal_width = 6; + required int32 goal_depth = 7; + required int32 goal_wall_width = 8; + required int32 center_circle_radius = 9; + required int32 defense_radius = 10; + required int32 defense_stretch = 11; + required int32 free_kick_from_defense_dist = 12; + required int32 penalty_spot_from_field_line_dist = 13; + required int32 penalty_line_from_spot_dist = 14; +} + +// SSL_GeometryCameraCalibration is identical to the one defined in +// messages_robocup_ssl_geometry.proto . + +message SSL_GeometryData { + required SSL_GeometryFieldSize field = 1; + repeated SSL_GeometryCameraCalibration calib = 2; +} diff --git a/src/proto/pb/messages_robocup_ssl_refbox_log.proto b/src/proto/pb/messages_robocup_ssl_refbox_log.proto old mode 100644 new mode 100755 index 9ae6cd7..5411267 --- a/src/proto/pb/messages_robocup_ssl_refbox_log.proto +++ b/src/proto/pb/messages_robocup_ssl_refbox_log.proto @@ -1,3 +1,4 @@ +syntax="proto2"; import "messages_robocup_ssl_detection.proto"; message Log_Frame diff --git a/src/proto/pb/messages_robocup_ssl_refbox_log.proto~ b/src/proto/pb/messages_robocup_ssl_refbox_log.proto~ new file mode 100755 index 0000000..9ae6cd7 --- /dev/null +++ b/src/proto/pb/messages_robocup_ssl_refbox_log.proto~ @@ -0,0 +1,12 @@ +import "messages_robocup_ssl_detection.proto"; + +message Log_Frame +{ + required SSL_DetectionFrame frame = 1; + required string refbox_cmd = 2; +} + +message Refbox_Log +{ + repeated Log_Frame log = 1; +} diff --git a/src/proto/pb/messages_robocup_ssl_wrapper.proto b/src/proto/pb/messages_robocup_ssl_wrapper.proto old mode 100644 new mode 100755 index 25b6d2d..6bfd6c3 --- a/src/proto/pb/messages_robocup_ssl_wrapper.proto +++ b/src/proto/pb/messages_robocup_ssl_wrapper.proto @@ -1,3 +1,4 @@ +syntax="proto2"; import "messages_robocup_ssl_detection.proto"; import "messages_robocup_ssl_geometry.proto"; diff --git a/src/proto/pb/messages_robocup_ssl_wrapper.proto~ b/src/proto/pb/messages_robocup_ssl_wrapper.proto~ new file mode 100755 index 0000000..25b6d2d --- /dev/null +++ b/src/proto/pb/messages_robocup_ssl_wrapper.proto~ @@ -0,0 +1,7 @@ +import "messages_robocup_ssl_detection.proto"; +import "messages_robocup_ssl_geometry.proto"; + +message SSL_WrapperPacket { + optional SSL_DetectionFrame detection = 1; + optional SSL_GeometryData geometry = 2; +} diff --git a/src/proto/pb/messages_robocup_ssl_wrapper_legacy.proto b/src/proto/pb/messages_robocup_ssl_wrapper_legacy.proto old mode 100644 new mode 100755 index e924a34..db848e8 --- a/src/proto/pb/messages_robocup_ssl_wrapper_legacy.proto +++ b/src/proto/pb/messages_robocup_ssl_wrapper_legacy.proto @@ -1,3 +1,4 @@ +syntax="proto2"; import "messages_robocup_ssl_detection.proto"; import "messages_robocup_ssl_geometry_legacy.proto"; @@ -6,4 +7,4 @@ package RoboCup2014Legacy.Wrapper; message SSL_WrapperPacket { optional SSL_DetectionFrame detection = 1; optional RoboCup2014Legacy.Geometry.SSL_GeometryData geometry = 2; -} \ No newline at end of file +} diff --git a/src/proto/pb/messages_robocup_ssl_wrapper_legacy.proto~ b/src/proto/pb/messages_robocup_ssl_wrapper_legacy.proto~ new file mode 100755 index 0000000..e924a34 --- /dev/null +++ b/src/proto/pb/messages_robocup_ssl_wrapper_legacy.proto~ @@ -0,0 +1,9 @@ +import "messages_robocup_ssl_detection.proto"; +import "messages_robocup_ssl_geometry_legacy.proto"; + +package RoboCup2014Legacy.Wrapper; + +message SSL_WrapperPacket { + optional SSL_DetectionFrame detection = 1; + optional RoboCup2014Legacy.Geometry.SSL_GeometryData geometry = 2; +} \ No newline at end of file diff --git a/src/proto/pb/position_message.proto b/src/proto/pb/position_message.proto old mode 100644 new mode 100755 index 3e2530c..086ab33 --- a/src/proto/pb/position_message.proto +++ b/src/proto/pb/position_message.proto @@ -1,3 +1,4 @@ +syntax="proto2"; message position_message { required float x = 1; diff --git a/src/proto/pb/position_message.proto~ b/src/proto/pb/position_message.proto~ new file mode 100755 index 0000000..3e2530c --- /dev/null +++ b/src/proto/pb/position_message.proto~ @@ -0,0 +1,6 @@ +message position_message +{ + required float x = 1; + required float y = 2; + required float dir = 3; +} diff --git a/src/proto/pb/ref_log.proto b/src/proto/pb/ref_log.proto old mode 100644 new mode 100755 index 6c7a8ed..46dab8a --- a/src/proto/pb/ref_log.proto +++ b/src/proto/pb/ref_log.proto @@ -1,3 +1,4 @@ +syntax="proto2"; import "referee.proto"; message Ref_chunk diff --git a/src/proto/pb/ref_log.proto~ b/src/proto/pb/ref_log.proto~ new file mode 100755 index 0000000..6c7a8ed --- /dev/null +++ b/src/proto/pb/ref_log.proto~ @@ -0,0 +1,14 @@ +import "referee.proto"; + +message Ref_chunk +{ + required int64 time_elapsed = 1; + optional int64 id = 2; + required SSL_Referee packet = 3; +} + +message Ref_log +{ + optional int64 number = 1; + repeated Ref_chunk chunks = 2; +} diff --git a/src/proto/pb/referee.proto b/src/proto/pb/referee.proto old mode 100644 new mode 100755 index 36cdc6f..a57aeed --- a/src/proto/pb/referee.proto +++ b/src/proto/pb/referee.proto @@ -1,3 +1,4 @@ +syntax="proto2"; // Each UDP packet contains one of these messages. message SSL_Referee { // The UNIX timestamp when the packet was sent, in microseconds. diff --git a/src/proto/pb/referee.proto~ b/src/proto/pb/referee.proto~ new file mode 100755 index 0000000..a57aeed --- /dev/null +++ b/src/proto/pb/referee.proto~ @@ -0,0 +1,136 @@ +syntax="proto2"; +// Each UDP packet contains one of these messages. +message SSL_Referee { + // The UNIX timestamp when the packet was sent, in microseconds. + // Divide by 1,000,000 to get a time_t. + required uint64 packet_timestamp = 1; + + // These are the "coarse" stages of the game. + enum Stage { + // The first half is about to start. + // A kickoff is called within this stage. + // This stage ends with the NORMAL_START. + NORMAL_FIRST_HALF_PRE = 0; + // The first half of the normal game, before half time. + NORMAL_FIRST_HALF = 1; + // Half time between first and second halves. + NORMAL_HALF_TIME = 2; + // The second half is about to start. + // A kickoff is called within this stage. + // This stage ends with the NORMAL_START. + NORMAL_SECOND_HALF_PRE = 3; + // The second half of the normal game, after half time. + NORMAL_SECOND_HALF = 4; + // The break before extra time. + EXTRA_TIME_BREAK = 5; + // The first half of extra time is about to start. + // A kickoff is called within this stage. + // This stage ends with the NORMAL_START. + EXTRA_FIRST_HALF_PRE = 6; + // The first half of extra time. + EXTRA_FIRST_HALF = 7; + // Half time between first and second extra halves. + EXTRA_HALF_TIME = 8; + // The second half of extra time is about to start. + // A kickoff is called within this stage. + // This stage ends with the NORMAL_START. + EXTRA_SECOND_HALF_PRE = 9; + // The second half of extra time. + EXTRA_SECOND_HALF = 10; + // The break before penalty shootout. + PENALTY_SHOOTOUT_BREAK = 11; + // The penalty shootout. + PENALTY_SHOOTOUT = 12; + // The game is over. + POST_GAME = 13; + } + required Stage stage = 2; + + // The number of microseconds left in the stage. + // The following stages have this value; the rest do not: + // NORMAL_FIRST_HALF + // NORMAL_HALF_TIME + // NORMAL_SECOND_HALF + // EXTRA_TIME_BREAK + // EXTRA_FIRST_HALF + // EXTRA_HALF_TIME + // EXTRA_SECOND_HALF + // PENALTY_SHOOTOUT_BREAK + // + // If the stage runs over its specified time, this value + // becomes negative. + optional sint32 stage_time_left = 3; + + // These are the "fine" states of play on the field. + enum Command { + // All robots should completely stop moving. + HALT = 0; + // Robots must keep 50 cm from the ball. + STOP = 1; + // A prepared kickoff or penalty may now be taken. + NORMAL_START = 2; + // The ball is dropped and free for either team. + FORCE_START = 3; + // The yellow team may move into kickoff position. + PREPARE_KICKOFF_YELLOW = 4; + // The blue team may move into kickoff position. + PREPARE_KICKOFF_BLUE = 5; + // The yellow team may move into penalty position. + PREPARE_PENALTY_YELLOW = 6; + // The blue team may move into penalty position. + PREPARE_PENALTY_BLUE = 7; + // The yellow team may take a direct free kick. + DIRECT_FREE_YELLOW = 8; + // The blue team may take a direct free kick. + DIRECT_FREE_BLUE = 9; + // The yellow team may take an indirect free kick. + INDIRECT_FREE_YELLOW = 10; + // The blue team may take an indirect free kick. + INDIRECT_FREE_BLUE = 11; + // The yellow team is currently in a timeout. + TIMEOUT_YELLOW = 12; + // The blue team is currently in a timeout. + TIMEOUT_BLUE = 13; + // The yellow team just scored a goal. + // For information only. + // For rules compliance, teams must treat as STOP. + GOAL_YELLOW = 14; + // The blue team just scored a goal. + GOAL_BLUE = 15; + } + required Command command = 4; + + // The number of commands issued since startup (mod 2^32). + required uint32 command_counter = 5; + + // The UNIX timestamp when the command was issued, in microseconds. + // This value changes only when a new command is issued, not on each packet. + required uint64 command_timestamp = 6; + + // Information about a single team. + message TeamInfo { + // The team's name (empty string if operator has not typed anything). + required string name = 1; + // The number of goals scored by the team during normal play and overtime. + required uint32 score = 2; + // The number of red cards issued to the team since the beginning of the game. + required uint32 red_cards = 3; + // The amount of time (in microseconds) left on each yellow card issued to the team. + // If no yellow cards are issued, this array has no elements. + // Otherwise, times are ordered from smallest to largest. + repeated uint32 yellow_card_times = 4 [packed=true]; + // The total number of yellow cards ever issued to the team. + required uint32 yellow_cards = 5; + // The number of timeouts this team can still call. + // If in a timeout right now, that timeout is excluded. + required uint32 timeouts = 6; + // The number of microseconds of timeout this team can use. + required uint32 timeout_time = 7; + // The pattern number of this team's goalie. + required uint32 goalie = 8; + } + + // Information about the two teams. + required TeamInfo yellow = 7; + required TeamInfo blue = 8; +} diff --git a/src/proto/pb/ssl_log.proto b/src/proto/pb/ssl_log.proto old mode 100644 new mode 100755 index f55a50a..34aba69 --- a/src/proto/pb/ssl_log.proto +++ b/src/proto/pb/ssl_log.proto @@ -1,3 +1,4 @@ +syntax="proto2"; import "Robot_message.proto"; import "Ball_message.proto"; diff --git a/src/proto/pb/ssl_log.proto~ b/src/proto/pb/ssl_log.proto~ new file mode 100755 index 0000000..f55a50a --- /dev/null +++ b/src/proto/pb/ssl_log.proto~ @@ -0,0 +1,17 @@ +import "Robot_message.proto"; +import "Ball_message.proto"; + +message log_chunk +{ + required int64 chunk_number = 1; + required Ball_message ball = 2; + repeated Robot_message ours = 3; + repeated Robot_message opps = 4; +} + +message SSL_log +{ + required int64 numberOfChunks = 1; + required int64 timerInterval = 2; + repeated log_chunk chunks = 3; +} diff --git a/src/proto/pb/vision_log.proto b/src/proto/pb/vision_log.proto old mode 100644 new mode 100755 index 69fde74..9548e54 --- a/src/proto/pb/vision_log.proto +++ b/src/proto/pb/vision_log.proto @@ -1,3 +1,4 @@ +syntax="proto2"; import "messages_robocup_ssl_wrapper.proto"; import "messages_robocup_ssl_wrapper_legacy.proto"; diff --git a/src/proto/pb/vision_log.proto~ b/src/proto/pb/vision_log.proto~ new file mode 100755 index 0000000..69fde74 --- /dev/null +++ b/src/proto/pb/vision_log.proto~ @@ -0,0 +1,15 @@ +import "messages_robocup_ssl_wrapper.proto"; +import "messages_robocup_ssl_wrapper_legacy.proto"; + +message Vision_chunk +{ + required int64 time_elapsed = 1; + optional int64 id = 2; + required SSL_WrapperPacket packet = 3; +} + +message Vision_log +{ + optional int64 number = 1; + repeated Vision_chunk chunks = 2; +} diff --git a/src/proto/position_message.pb.cc b/src/proto/position_message.pb.cc index 288b27d..32a0b58 100644 --- a/src/proto/position_message.pb.cc +++ b/src/proto/position_message.pb.cc @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -15,78 +16,98 @@ #include #include // @@protoc_insertion_point(includes) +class position_messageDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +position_messageDefaultTypeInternal _position_message_default_instance_; namespace { -const ::google::protobuf::Descriptor* position_message_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - position_message_reflection_ = NULL; +::google::protobuf::Metadata file_level_metadata[1]; } // namespace -void protobuf_AssignDesc_position_5fmessage_2eproto() { - protobuf_AddDesc_position_5fmessage_2eproto(); - const ::google::protobuf::FileDescriptor* file = - ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( - "position_message.proto"); - GOOGLE_CHECK(file != NULL); - position_message_descriptor_ = file->message_type(0); - static const int position_message_offsets_[3] = { +const ::google::protobuf::uint32* protobuf_Offsets_position_5fmessage_2eproto() GOOGLE_ATTRIBUTE_COLD; +const ::google::protobuf::uint32* protobuf_Offsets_position_5fmessage_2eproto() { + static const ::google::protobuf::uint32 offsets[] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(position_message, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(position_message, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(position_message, x_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(position_message, y_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(position_message, dir_), + 0, + 1, + 2, }; - position_message_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - position_message_descriptor_, - position_message::default_instance_, - position_message_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(position_message, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(position_message, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(position_message)); + return offsets; } +static const ::google::protobuf::internal::MigrationSchema schemas[] = { + { 0, 7, sizeof(position_message)}, +}; + +static const ::google::protobuf::internal::DefaultInstanceData file_default_instances[] = { + {reinterpret_cast(&_position_message_default_instance_), NULL}, +}; + namespace { -GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); -inline void protobuf_AssignDescriptorsOnce() { - ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, - &protobuf_AssignDesc_position_5fmessage_2eproto); +void protobuf_AssignDescriptors() { + protobuf_AddDesc_position_5fmessage_2eproto(); + ::google::protobuf::MessageFactory* factory = NULL; + AssignDescriptors( + "position_message.proto", schemas, file_default_instances, protobuf_Offsets_position_5fmessage_2eproto(), factory, + file_level_metadata, NULL, NULL); +} + +void protobuf_AssignDescriptorsOnce() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); } +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - position_message_descriptor_, &position_message::default_instance()); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1); } } // namespace void protobuf_ShutdownFile_position_5fmessage_2eproto() { - delete position_message::default_instance_; - delete position_message_reflection_; + _position_message_default_instance_.Shutdown(); + delete file_level_metadata[0].reflection; } -void protobuf_AddDesc_position_5fmessage_2eproto() { - static bool already_here = false; - if (already_here) return; - already_here = true; +void protobuf_InitDefaults_position_5fmessage_2eproto_impl() { GOOGLE_PROTOBUF_VERIFY_VERSION; + ::google::protobuf::internal::InitProtobufDefaults(); + _position_message_default_instance_.DefaultConstruct(); +} + +void protobuf_InitDefaults_position_5fmessage_2eproto() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_InitDefaults_position_5fmessage_2eproto_impl); +} +void protobuf_AddDesc_position_5fmessage_2eproto_impl() { + protobuf_InitDefaults_position_5fmessage_2eproto(); + static const char descriptor[] = { + "\n\026position_message.proto\"5\n\020position_mes" + "sage\022\t\n\001x\030\001 \002(\002\022\t\n\001y\030\002 \002(\002\022\013\n\003dir\030\003 \002(\002" + }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - "\n\026position_message.proto\"5\n\020position_mes" - "sage\022\t\n\001x\030\001 \002(\002\022\t\n\001y\030\002 \002(\002\022\013\n\003dir\030\003 \002(\002", 79); + descriptor, 79); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "position_message.proto", &protobuf_RegisterTypes); - position_message::default_instance_ = new position_message(); - position_message::default_instance_->InitAsDefaultInstance(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_position_5fmessage_2eproto); } +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_position_5fmessage_2eproto_once_); +void protobuf_AddDesc_position_5fmessage_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_position_5fmessage_2eproto_once_, + &protobuf_AddDesc_position_5fmessage_2eproto_impl); +} // Force AddDescriptors() to be called at static initialization time. struct StaticDescriptorInitializer_position_5fmessage_2eproto { StaticDescriptorInitializer_position_5fmessage_2eproto() { @@ -96,41 +117,44 @@ struct StaticDescriptorInitializer_position_5fmessage_2eproto { // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int position_message::kXFieldNumber; const int position_message::kYFieldNumber; const int position_message::kDirFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 position_message::position_message() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_position_5fmessage_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:position_message) } - -void position_message::InitAsDefaultInstance() { -} - position_message::position_message(const position_message& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::memcpy(&x_, &from.x_, + reinterpret_cast(&dir_) - + reinterpret_cast(&x_) + sizeof(dir_)); + // @@protoc_insertion_point(copy_constructor:position_message) } void position_message::SharedCtor() { _cached_size_ = 0; - x_ = 0; - y_ = 0; - dir_ = 0; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); + ::memset(&x_, 0, reinterpret_cast(&dir_) - + reinterpret_cast(&x_) + sizeof(dir_)); } position_message::~position_message() { + // @@protoc_insertion_point(destructor:position_message) SharedDtor(); } void position_message::SharedDtor() { - if (this != default_instance_) { - } } void position_message::SetCachedSize(int size) const { @@ -140,88 +164,87 @@ void position_message::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* position_message::descriptor() { protobuf_AssignDescriptorsOnce(); - return position_message_descriptor_; + return file_level_metadata[0].descriptor; } const position_message& position_message::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_position_5fmessage_2eproto(); - return *default_instance_; + protobuf_InitDefaults_position_5fmessage_2eproto(); + return *internal_default_instance(); } -position_message* position_message::default_instance_ = NULL; - -position_message* position_message::New() const { - return new position_message; +position_message* position_message::New(::google::protobuf::Arena* arena) const { + position_message* n = new position_message; + if (arena != NULL) { + arena->Own(n); + } + return n; } void position_message::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - x_ = 0; - y_ = 0; - dir_ = 0; +// @@protoc_insertion_point(message_clear_start:position_message) + if (_has_bits_[0 / 32] & 7u) { + ::memset(&x_, 0, reinterpret_cast(&dir_) - + reinterpret_cast(&x_) + sizeof(dir_)); } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool position_message::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:position_message) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required float x = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { + if (tag == 13u) { + set_has_x(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &x_))); - set_has_x(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(21)) goto parse_y; break; } // required float y = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_y: + if (tag == 21u) { + set_has_y(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &y_))); - set_has_y(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(29)) goto parse_dir; break; } // required float dir = 3; case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_dir: + if (tag == 29u) { + set_has_dir(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( input, &dir_))); - set_has_dir(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectAtEnd()) return true; break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -229,12 +252,18 @@ bool position_message::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:position_message) return true; +failure: + // @@protoc_insertion_point(parse_failure:position_message) + return false; #undef DO_ } void position_message::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:position_message) // required float x = 1; if (has_x()) { ::google::protobuf::internal::WireFormatLite::WriteFloat(1, this->x(), output); @@ -250,14 +279,17 @@ void position_message::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteFloat(3, this->dir(), output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:position_message) } -::google::protobuf::uint8* position_message::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* position_message::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:position_message) // required float x = 1; if (has_x()) { target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(1, this->x(), target); @@ -273,59 +305,84 @@ ::google::protobuf::uint8* position_message::SerializeWithCachedSizesToArray( target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(3, this->dir(), target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:position_message) return target; } -int position_message::ByteSize() const { - int total_size = 0; +size_t position_message::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:position_message) + size_t total_size = 0; - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_x()) { // required float x = 1; - if (has_x()) { - total_size += 1 + 4; - } + total_size += 1 + 4; + } + if (has_y()) { // required float y = 2; - if (has_y()) { - total_size += 1 + 4; - } + total_size += 1 + 4; + } + if (has_dir()) { // required float dir = 3; - if (has_dir()) { - total_size += 1 + 4; - } - + total_size += 1 + 4; } - if (!unknown_fields().empty()) { + + return total_size; +} +size_t position_message::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:position_message) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( unknown_fields()); } + if (((_has_bits_[0] & 0x00000007) ^ 0x00000007) == 0) { // All required fields are present. + // required float x = 1; + total_size += 1 + 4; + + // required float y = 2; + total_size += 1 + 4; + + // required float dir = 3; + total_size += 1 + 4; + + } else { + total_size += RequiredFieldsByteSizeFallback(); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void position_message::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:position_message) + GOOGLE_DCHECK_NE(&from, this); const position_message* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:position_message) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:position_message) MergeFrom(*source); } } void position_message::MergeFrom(const position_message& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { +// @@protoc_insertion_point(class_specific_merge_from_start:position_message) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._has_bits_[0 / 32] & 7u) { if (from.has_x()) { set_x(from.x()); } @@ -336,16 +393,17 @@ void position_message::MergeFrom(const position_message& from) { set_dir(from.dir()); } } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void position_message::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:position_message) if (&from == this) return; Clear(); MergeFrom(from); } void position_message::CopyFrom(const position_message& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:position_message) if (&from == this) return; Clear(); MergeFrom(from); @@ -353,29 +411,103 @@ void position_message::CopyFrom(const position_message& from) { bool position_message::IsInitialized() const { if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false; - return true; } void position_message::Swap(position_message* other) { - if (other != this) { - std::swap(x_, other->x_); - std::swap(y_, other->y_); - std::swap(dir_, other->dir_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void position_message::InternalSwap(position_message* other) { + std::swap(x_, other->x_); + std::swap(y_, other->y_); + std::swap(dir_, other->dir_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata position_message::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = position_message_descriptor_; - metadata.reflection = position_message_reflection_; - return metadata; + return file_level_metadata[0]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// position_message + +// required float x = 1; +bool position_message::has_x() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void position_message::set_has_x() { + _has_bits_[0] |= 0x00000001u; +} +void position_message::clear_has_x() { + _has_bits_[0] &= ~0x00000001u; +} +void position_message::clear_x() { + x_ = 0; + clear_has_x(); +} +float position_message::x() const { + // @@protoc_insertion_point(field_get:position_message.x) + return x_; +} +void position_message::set_x(float value) { + set_has_x(); + x_ = value; + // @@protoc_insertion_point(field_set:position_message.x) +} + +// required float y = 2; +bool position_message::has_y() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +void position_message::set_has_y() { + _has_bits_[0] |= 0x00000002u; +} +void position_message::clear_has_y() { + _has_bits_[0] &= ~0x00000002u; +} +void position_message::clear_y() { + y_ = 0; + clear_has_y(); +} +float position_message::y() const { + // @@protoc_insertion_point(field_get:position_message.y) + return y_; +} +void position_message::set_y(float value) { + set_has_y(); + y_ = value; + // @@protoc_insertion_point(field_set:position_message.y) +} + +// required float dir = 3; +bool position_message::has_dir() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +void position_message::set_has_dir() { + _has_bits_[0] |= 0x00000004u; +} +void position_message::clear_has_dir() { + _has_bits_[0] &= ~0x00000004u; +} +void position_message::clear_dir() { + dir_ = 0; + clear_has_dir(); +} +float position_message::dir() const { + // @@protoc_insertion_point(field_get:position_message.dir) + return dir_; +} +void position_message::set_dir(float value) { + set_has_dir(); + dir_ = value; + // @@protoc_insertion_point(field_set:position_message.dir) } +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) diff --git a/src/proto/position_message.pb.h b/src/proto/position_message.pb.h index 200f362..91e17d3 100644 --- a/src/proto/position_message.pb.h +++ b/src/proto/position_message.pb.h @@ -8,34 +8,37 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 2005000 +#if GOOGLE_PROTOBUF_VERSION < 3001000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. #endif +#include +#include #include +#include #include -#include -#include +#include // IWYU pragma: export +#include // IWYU pragma: export #include // @@protoc_insertion_point(includes) +class position_message; +class position_messageDefaultTypeInternal; +extern position_messageDefaultTypeInternal _position_message_default_instance_; // Internal implementation detail -- do not call these. -void protobuf_AddDesc_position_5fmessage_2eproto(); -void protobuf_AssignDesc_position_5fmessage_2eproto(); -void protobuf_ShutdownFile_position_5fmessage_2eproto(); - -class position_message; +void protobuf_AddDesc_position_5fmessage_2eproto(); +void protobuf_InitDefaults_position_5fmessage_2eproto(); // =================================================================== -class position_message : public ::google::protobuf::Message { +class position_message : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:position_message) */ { public: position_message(); virtual ~position_message(); @@ -48,98 +51,118 @@ class position_message : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const position_message& default_instance(); + static inline const position_message* internal_default_instance() { + return reinterpret_cast( + &_position_message_default_instance_); + } + void Swap(position_message* other); // implements Message ---------------------------------------------- - position_message* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline position_message* New() const PROTOBUF_FINAL { return New(NULL); } + + position_message* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const position_message& from); void MergeFrom(const position_message& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(position_message* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // required float x = 1; - inline bool has_x() const; - inline void clear_x(); + bool has_x() const; + void clear_x(); static const int kXFieldNumber = 1; - inline float x() const; - inline void set_x(float value); + float x() const; + void set_x(float value); // required float y = 2; - inline bool has_y() const; - inline void clear_y(); + bool has_y() const; + void clear_y(); static const int kYFieldNumber = 2; - inline float y() const; - inline void set_y(float value); + float y() const; + void set_y(float value); // required float dir = 3; - inline bool has_dir() const; - inline void clear_dir(); + bool has_dir() const; + void clear_dir(); static const int kDirFieldNumber = 3; - inline float dir() const; - inline void set_dir(float value); + float dir() const; + void set_dir(float value); // @@protoc_insertion_point(class_scope:position_message) private: - inline void set_has_x(); - inline void clear_has_x(); - inline void set_has_y(); - inline void clear_has_y(); - inline void set_has_dir(); - inline void clear_has_dir(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + void set_has_x(); + void clear_has_x(); + void set_has_y(); + void clear_has_y(); + void set_has_dir(); + void clear_has_dir(); + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; float x_; float y_; float dir_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; - - friend void protobuf_AddDesc_position_5fmessage_2eproto(); - friend void protobuf_AssignDesc_position_5fmessage_2eproto(); + friend void protobuf_InitDefaults_position_5fmessage_2eproto_impl(); + friend void protobuf_AddDesc_position_5fmessage_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_position_5fmessage_2eproto(); friend void protobuf_ShutdownFile_position_5fmessage_2eproto(); - void InitAsDefaultInstance(); - static position_message* default_instance_; }; // =================================================================== // =================================================================== +#if !PROTOBUF_INLINE_NOT_IN_HEADERS // position_message // required float x = 1; @@ -157,11 +180,13 @@ inline void position_message::clear_x() { clear_has_x(); } inline float position_message::x() const { + // @@protoc_insertion_point(field_get:position_message.x) return x_; } inline void position_message::set_x(float value) { set_has_x(); x_ = value; + // @@protoc_insertion_point(field_set:position_message.x) } // required float y = 2; @@ -179,11 +204,13 @@ inline void position_message::clear_y() { clear_has_y(); } inline float position_message::y() const { + // @@protoc_insertion_point(field_get:position_message.y) return y_; } inline void position_message::set_y(float value) { set_has_y(); y_ = value; + // @@protoc_insertion_point(field_set:position_message.y) } // required float dir = 3; @@ -201,24 +228,19 @@ inline void position_message::clear_dir() { clear_has_dir(); } inline float position_message::dir() const { + // @@protoc_insertion_point(field_get:position_message.dir) return dir_; } inline void position_message::set_dir(float value) { set_has_dir(); dir_ = value; + // @@protoc_insertion_point(field_set:position_message.dir) } +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) -#ifndef SWIG -namespace google { -namespace protobuf { - - -} // namespace google -} // namespace protobuf -#endif // SWIG // @@protoc_insertion_point(global_scope) diff --git a/src/proto/ref_log.pb.cc b/src/proto/ref_log.pb.cc index e4f5586..cc4b661 100644 --- a/src/proto/ref_log.pb.cc +++ b/src/proto/ref_log.pb.cc @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -15,107 +16,120 @@ #include #include // @@protoc_insertion_point(includes) +class Ref_chunkDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +Ref_chunkDefaultTypeInternal _Ref_chunk_default_instance_; +class Ref_logDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +Ref_logDefaultTypeInternal _Ref_log_default_instance_; namespace { -const ::google::protobuf::Descriptor* Ref_chunk_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - Ref_chunk_reflection_ = NULL; -const ::google::protobuf::Descriptor* Ref_log_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - Ref_log_reflection_ = NULL; +::google::protobuf::Metadata file_level_metadata[2]; } // namespace -void protobuf_AssignDesc_ref_5flog_2eproto() { - protobuf_AddDesc_ref_5flog_2eproto(); - const ::google::protobuf::FileDescriptor* file = - ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( - "ref_log.proto"); - GOOGLE_CHECK(file != NULL); - Ref_chunk_descriptor_ = file->message_type(0); - static const int Ref_chunk_offsets_[3] = { +const ::google::protobuf::uint32* protobuf_Offsets_ref_5flog_2eproto() GOOGLE_ATTRIBUTE_COLD; +const ::google::protobuf::uint32* protobuf_Offsets_ref_5flog_2eproto() { + static const ::google::protobuf::uint32 offsets[] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ref_chunk, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ref_chunk, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ref_chunk, time_elapsed_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ref_chunk, id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ref_chunk, packet_), - }; - Ref_chunk_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - Ref_chunk_descriptor_, - Ref_chunk::default_instance_, - Ref_chunk_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ref_chunk, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ref_chunk, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(Ref_chunk)); - Ref_log_descriptor_ = file->message_type(1); - static const int Ref_log_offsets_[2] = { + 1, + 2, + 0, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ref_log, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ref_log, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ref_log, number_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ref_log, chunks_), + 0, + 1, }; - Ref_log_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - Ref_log_descriptor_, - Ref_log::default_instance_, - Ref_log_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ref_log, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ref_log, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(Ref_log)); + return offsets; } +static const ::google::protobuf::internal::MigrationSchema schemas[] = { + { 0, 7, sizeof(Ref_chunk)}, + { 10, 16, sizeof(Ref_log)}, +}; + +static const ::google::protobuf::internal::DefaultInstanceData file_default_instances[] = { + {reinterpret_cast(&_Ref_chunk_default_instance_), NULL}, + {reinterpret_cast(&_Ref_log_default_instance_), NULL}, +}; + namespace { -GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); -inline void protobuf_AssignDescriptorsOnce() { - ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, - &protobuf_AssignDesc_ref_5flog_2eproto); +void protobuf_AssignDescriptors() { + protobuf_AddDesc_ref_5flog_2eproto(); + ::google::protobuf::MessageFactory* factory = NULL; + AssignDescriptors( + "ref_log.proto", schemas, file_default_instances, protobuf_Offsets_ref_5flog_2eproto(), factory, + file_level_metadata, NULL, NULL); +} + +void protobuf_AssignDescriptorsOnce() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); } +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - Ref_chunk_descriptor_, &Ref_chunk::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - Ref_log_descriptor_, &Ref_log::default_instance()); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 2); } } // namespace void protobuf_ShutdownFile_ref_5flog_2eproto() { - delete Ref_chunk::default_instance_; - delete Ref_chunk_reflection_; - delete Ref_log::default_instance_; - delete Ref_log_reflection_; + _Ref_chunk_default_instance_.Shutdown(); + delete file_level_metadata[0].reflection; + _Ref_log_default_instance_.Shutdown(); + delete file_level_metadata[1].reflection; } -void protobuf_AddDesc_ref_5flog_2eproto() { - static bool already_here = false; - if (already_here) return; - already_here = true; +void protobuf_InitDefaults_ref_5flog_2eproto_impl() { GOOGLE_PROTOBUF_VERIFY_VERSION; - ::protobuf_AddDesc_referee_2eproto(); + ::protobuf_InitDefaults_referee_2eproto(); + ::google::protobuf::internal::InitProtobufDefaults(); + _Ref_chunk_default_instance_.DefaultConstruct(); + _Ref_log_default_instance_.DefaultConstruct(); + _Ref_chunk_default_instance_.get_mutable()->packet_ = const_cast< ::SSL_Referee*>( + ::SSL_Referee::internal_default_instance()); +} + +void protobuf_InitDefaults_ref_5flog_2eproto() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_InitDefaults_ref_5flog_2eproto_impl); +} +void protobuf_AddDesc_ref_5flog_2eproto_impl() { + protobuf_InitDefaults_ref_5flog_2eproto(); + static const char descriptor[] = { + "\n\rref_log.proto\032\rreferee.proto\"K\n\tRef_ch" + "unk\022\024\n\014time_elapsed\030\001 \002(\003\022\n\n\002id\030\002 \001(\003\022\034\n" + "\006packet\030\003 \002(\0132\014.SSL_Referee\"5\n\007Ref_log\022\016" + "\n\006number\030\001 \001(\003\022\032\n\006chunks\030\002 \003(\0132\n.Ref_chu" + "nk" + }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - "\n\rref_log.proto\032\rreferee.proto\"K\n\tRef_ch" - "unk\022\024\n\014time_elapsed\030\001 \002(\003\022\n\n\002id\030\002 \001(\003\022\034\n" - "\006packet\030\003 \002(\0132\014.SSL_Referee\"5\n\007Ref_log\022\016" - "\n\006number\030\001 \001(\003\022\032\n\006chunks\030\002 \003(\0132\n.Ref_chu" - "nk", 162); + descriptor, 162); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "ref_log.proto", &protobuf_RegisterTypes); - Ref_chunk::default_instance_ = new Ref_chunk(); - Ref_log::default_instance_ = new Ref_log(); - Ref_chunk::default_instance_->InitAsDefaultInstance(); - Ref_log::default_instance_->InitAsDefaultInstance(); + ::protobuf_AddDesc_referee_2eproto(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_ref_5flog_2eproto); } +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_ref_5flog_2eproto_once_); +void protobuf_AddDesc_ref_5flog_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_ref_5flog_2eproto_once_, + &protobuf_AddDesc_ref_5flog_2eproto_impl); +} // Force AddDescriptors() to be called at static initialization time. struct StaticDescriptorInitializer_ref_5flog_2eproto { StaticDescriptorInitializer_ref_5flog_2eproto() { @@ -125,41 +139,50 @@ struct StaticDescriptorInitializer_ref_5flog_2eproto { // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int Ref_chunk::kTimeElapsedFieldNumber; const int Ref_chunk::kIdFieldNumber; const int Ref_chunk::kPacketFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 Ref_chunk::Ref_chunk() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_ref_5flog_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:Ref_chunk) } - -void Ref_chunk::InitAsDefaultInstance() { - packet_ = const_cast< ::SSL_Referee*>(&::SSL_Referee::default_instance()); -} - Ref_chunk::Ref_chunk(const Ref_chunk& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from.has_packet()) { + packet_ = new ::SSL_Referee(*from.packet_); + } else { + packet_ = NULL; + } + ::memcpy(&time_elapsed_, &from.time_elapsed_, + reinterpret_cast(&id_) - + reinterpret_cast(&time_elapsed_) + sizeof(id_)); + // @@protoc_insertion_point(copy_constructor:Ref_chunk) } void Ref_chunk::SharedCtor() { _cached_size_ = 0; - time_elapsed_ = GOOGLE_LONGLONG(0); - id_ = GOOGLE_LONGLONG(0); - packet_ = NULL; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); + ::memset(&packet_, 0, reinterpret_cast(&id_) - + reinterpret_cast(&packet_) + sizeof(id_)); } Ref_chunk::~Ref_chunk() { + // @@protoc_insertion_point(destructor:Ref_chunk) SharedDtor(); } void Ref_chunk::SharedDtor() { - if (this != default_instance_) { + if (this != internal_default_instance()) { delete packet_; } } @@ -171,88 +194,89 @@ void Ref_chunk::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* Ref_chunk::descriptor() { protobuf_AssignDescriptorsOnce(); - return Ref_chunk_descriptor_; + return file_level_metadata[0].descriptor; } const Ref_chunk& Ref_chunk::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_ref_5flog_2eproto(); - return *default_instance_; + protobuf_InitDefaults_ref_5flog_2eproto(); + return *internal_default_instance(); } -Ref_chunk* Ref_chunk::default_instance_ = NULL; - -Ref_chunk* Ref_chunk::New() const { - return new Ref_chunk; +Ref_chunk* Ref_chunk::New(::google::protobuf::Arena* arena) const { + Ref_chunk* n = new Ref_chunk; + if (arena != NULL) { + arena->Own(n); + } + return n; } void Ref_chunk::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - time_elapsed_ = GOOGLE_LONGLONG(0); - id_ = GOOGLE_LONGLONG(0); - if (has_packet()) { - if (packet_ != NULL) packet_->::SSL_Referee::Clear(); - } +// @@protoc_insertion_point(message_clear_start:Ref_chunk) + if (has_packet()) { + GOOGLE_DCHECK(packet_ != NULL); + packet_->::SSL_Referee::Clear(); + } + if (_has_bits_[0 / 32] & 6u) { + ::memset(&time_elapsed_, 0, reinterpret_cast(&id_) - + reinterpret_cast(&time_elapsed_) + sizeof(id_)); } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool Ref_chunk::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:Ref_chunk) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required int64 time_elapsed = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + if (tag == 8u) { + set_has_time_elapsed(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( input, &time_elapsed_))); - set_has_time_elapsed(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(16)) goto parse_id; break; } // optional int64 id = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_id: + if (tag == 16u) { + set_has_id(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( input, &id_))); - set_has_id(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(26)) goto parse_packet; break; } // required .SSL_Referee packet = 3; case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_packet: + if (tag == 26u) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_packet())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectAtEnd()) return true; break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -260,12 +284,18 @@ bool Ref_chunk::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:Ref_chunk) return true; +failure: + // @@protoc_insertion_point(parse_failure:Ref_chunk) + return false; #undef DO_ } void Ref_chunk::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:Ref_chunk) // required int64 time_elapsed = 1; if (has_time_elapsed()) { ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->time_elapsed(), output); @@ -279,17 +309,20 @@ void Ref_chunk::SerializeWithCachedSizes( // required .SSL_Referee packet = 3; if (has_packet()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, this->packet(), output); + 3, *this->packet_, output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:Ref_chunk) } -::google::protobuf::uint8* Ref_chunk::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* Ref_chunk::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:Ref_chunk) // required int64 time_elapsed = 1; if (has_time_elapsed()) { target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->time_elapsed(), target); @@ -303,157 +336,282 @@ ::google::protobuf::uint8* Ref_chunk::SerializeWithCachedSizesToArray( // required .SSL_Referee packet = 3; if (has_packet()) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 3, this->packet(), target); + InternalWriteMessageNoVirtualToArray( + 3, *this->packet_, false, target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:Ref_chunk) return target; } -int Ref_chunk::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // required int64 time_elapsed = 1; - if (has_time_elapsed()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int64Size( - this->time_elapsed()); - } - - // optional int64 id = 2; - if (has_id()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int64Size( - this->id()); - } +size_t Ref_chunk::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:Ref_chunk) + size_t total_size = 0; + if (has_packet()) { // required .SSL_Referee packet = 3; - if (has_packet()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->packet()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->packet_); + } + if (has_time_elapsed()) { + // required int64 time_elapsed = 1; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->time_elapsed()); } - if (!unknown_fields().empty()) { + + return total_size; +} +size_t Ref_chunk::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Ref_chunk) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( unknown_fields()); } + if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present. + // required .SSL_Referee packet = 3; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->packet_); + + // required int64 time_elapsed = 1; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->time_elapsed()); + + } else { + total_size += RequiredFieldsByteSizeFallback(); + } + // optional int64 id = 2; + if (has_id()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->id()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void Ref_chunk::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:Ref_chunk) + GOOGLE_DCHECK_NE(&from, this); const Ref_chunk* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Ref_chunk) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Ref_chunk) MergeFrom(*source); } } void Ref_chunk::MergeFrom(const Ref_chunk& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { +// @@protoc_insertion_point(class_specific_merge_from_start:Ref_chunk) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._has_bits_[0 / 32] & 7u) { + if (from.has_packet()) { + mutable_packet()->::SSL_Referee::MergeFrom(from.packet()); + } if (from.has_time_elapsed()) { set_time_elapsed(from.time_elapsed()); } if (from.has_id()) { set_id(from.id()); } - if (from.has_packet()) { - mutable_packet()->::SSL_Referee::MergeFrom(from.packet()); - } } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void Ref_chunk::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Ref_chunk) if (&from == this) return; Clear(); MergeFrom(from); } void Ref_chunk::CopyFrom(const Ref_chunk& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Ref_chunk) if (&from == this) return; Clear(); MergeFrom(from); } bool Ref_chunk::IsInitialized() const { - if ((_has_bits_[0] & 0x00000005) != 0x00000005) return false; - + if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; if (has_packet()) { - if (!this->packet().IsInitialized()) return false; + if (!this->packet_->IsInitialized()) return false; } return true; } void Ref_chunk::Swap(Ref_chunk* other) { - if (other != this) { - std::swap(time_elapsed_, other->time_elapsed_); - std::swap(id_, other->id_); - std::swap(packet_, other->packet_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void Ref_chunk::InternalSwap(Ref_chunk* other) { + std::swap(packet_, other->packet_); + std::swap(time_elapsed_, other->time_elapsed_); + std::swap(id_, other->id_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata Ref_chunk::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = Ref_chunk_descriptor_; - metadata.reflection = Ref_chunk_reflection_; - return metadata; + return file_level_metadata[0]; } +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// Ref_chunk + +// required int64 time_elapsed = 1; +bool Ref_chunk::has_time_elapsed() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +void Ref_chunk::set_has_time_elapsed() { + _has_bits_[0] |= 0x00000002u; +} +void Ref_chunk::clear_has_time_elapsed() { + _has_bits_[0] &= ~0x00000002u; +} +void Ref_chunk::clear_time_elapsed() { + time_elapsed_ = GOOGLE_LONGLONG(0); + clear_has_time_elapsed(); +} +::google::protobuf::int64 Ref_chunk::time_elapsed() const { + // @@protoc_insertion_point(field_get:Ref_chunk.time_elapsed) + return time_elapsed_; +} +void Ref_chunk::set_time_elapsed(::google::protobuf::int64 value) { + set_has_time_elapsed(); + time_elapsed_ = value; + // @@protoc_insertion_point(field_set:Ref_chunk.time_elapsed) +} + +// optional int64 id = 2; +bool Ref_chunk::has_id() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +void Ref_chunk::set_has_id() { + _has_bits_[0] |= 0x00000004u; +} +void Ref_chunk::clear_has_id() { + _has_bits_[0] &= ~0x00000004u; +} +void Ref_chunk::clear_id() { + id_ = GOOGLE_LONGLONG(0); + clear_has_id(); +} +::google::protobuf::int64 Ref_chunk::id() const { + // @@protoc_insertion_point(field_get:Ref_chunk.id) + return id_; +} +void Ref_chunk::set_id(::google::protobuf::int64 value) { + set_has_id(); + id_ = value; + // @@protoc_insertion_point(field_set:Ref_chunk.id) +} + +// required .SSL_Referee packet = 3; +bool Ref_chunk::has_packet() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void Ref_chunk::set_has_packet() { + _has_bits_[0] |= 0x00000001u; +} +void Ref_chunk::clear_has_packet() { + _has_bits_[0] &= ~0x00000001u; +} +void Ref_chunk::clear_packet() { + if (packet_ != NULL) packet_->::SSL_Referee::Clear(); + clear_has_packet(); +} +const ::SSL_Referee& Ref_chunk::packet() const { + // @@protoc_insertion_point(field_get:Ref_chunk.packet) + return packet_ != NULL ? *packet_ + : *::SSL_Referee::internal_default_instance(); +} +::SSL_Referee* Ref_chunk::mutable_packet() { + set_has_packet(); + if (packet_ == NULL) { + packet_ = new ::SSL_Referee; + } + // @@protoc_insertion_point(field_mutable:Ref_chunk.packet) + return packet_; +} +::SSL_Referee* Ref_chunk::release_packet() { + // @@protoc_insertion_point(field_release:Ref_chunk.packet) + clear_has_packet(); + ::SSL_Referee* temp = packet_; + packet_ = NULL; + return temp; +} +void Ref_chunk::set_allocated_packet(::SSL_Referee* packet) { + delete packet_; + packet_ = packet; + if (packet) { + set_has_packet(); + } else { + clear_has_packet(); + } + // @@protoc_insertion_point(field_set_allocated:Ref_chunk.packet) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int Ref_log::kNumberFieldNumber; const int Ref_log::kChunksFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 Ref_log::Ref_log() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_ref_5flog_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:Ref_log) } - -void Ref_log::InitAsDefaultInstance() { -} - Ref_log::Ref_log(const Ref_log& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0), + chunks_(from.chunks_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + number_ = from.number_; + // @@protoc_insertion_point(copy_constructor:Ref_log) } void Ref_log::SharedCtor() { _cached_size_ = 0; number_ = GOOGLE_LONGLONG(0); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); } Ref_log::~Ref_log() { + // @@protoc_insertion_point(destructor:Ref_log) SharedDtor(); } void Ref_log::SharedDtor() { - if (this != default_instance_) { - } } void Ref_log::SetCachedSize(int size) const { @@ -463,70 +621,72 @@ void Ref_log::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* Ref_log::descriptor() { protobuf_AssignDescriptorsOnce(); - return Ref_log_descriptor_; + return file_level_metadata[1].descriptor; } const Ref_log& Ref_log::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_ref_5flog_2eproto(); - return *default_instance_; + protobuf_InitDefaults_ref_5flog_2eproto(); + return *internal_default_instance(); } -Ref_log* Ref_log::default_instance_ = NULL; - -Ref_log* Ref_log::New() const { - return new Ref_log; +Ref_log* Ref_log::New(::google::protobuf::Arena* arena) const { + Ref_log* n = new Ref_log; + if (arena != NULL) { + arena->Own(n); + } + return n; } void Ref_log::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - number_ = GOOGLE_LONGLONG(0); - } +// @@protoc_insertion_point(message_clear_start:Ref_log) chunks_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + number_ = GOOGLE_LONGLONG(0); + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool Ref_log::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:Ref_log) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional int64 number = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + if (tag == 8u) { + set_has_number(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( input, &number_))); - set_has_number(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(18)) goto parse_chunks; break; } // repeated .Ref_chunk chunks = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_chunks: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + if (tag == 18u) { + DO_(input->IncrementRecursionDepth()); + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( input, add_chunks())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(18)) goto parse_chunks; - if (input->ExpectAtEnd()) return true; + input->UnsafeDecrementRecursionDepth(); break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -534,142 +694,213 @@ bool Ref_log::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:Ref_log) return true; +failure: + // @@protoc_insertion_point(parse_failure:Ref_log) + return false; #undef DO_ } void Ref_log::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:Ref_log) // optional int64 number = 1; if (has_number()) { ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->number(), output); } // repeated .Ref_chunk chunks = 2; - for (int i = 0; i < this->chunks_size(); i++) { + for (unsigned int i = 0, n = this->chunks_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, this->chunks(i), output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:Ref_log) } -::google::protobuf::uint8* Ref_log::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* Ref_log::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:Ref_log) // optional int64 number = 1; if (has_number()) { target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->number(), target); } // repeated .Ref_chunk chunks = 2; - for (int i = 0; i < this->chunks_size(); i++) { + for (unsigned int i = 0, n = this->chunks_size(); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 2, this->chunks(i), target); + InternalWriteMessageNoVirtualToArray( + 2, this->chunks(i), false, target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:Ref_log) return target; } -int Ref_log::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // optional int64 number = 1; - if (has_number()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int64Size( - this->number()); - } +size_t Ref_log::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Ref_log) + size_t total_size = 0; + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); } // repeated .Ref_chunk chunks = 2; - total_size += 1 * this->chunks_size(); - for (int i = 0; i < this->chunks_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->chunks(i)); + { + unsigned int count = this->chunks_size(); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->chunks(i)); + } } - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + // optional int64 number = 1; + if (has_number()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->number()); } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void Ref_log::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:Ref_log) + GOOGLE_DCHECK_NE(&from, this); const Ref_log* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Ref_log) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Ref_log) MergeFrom(*source); } } void Ref_log::MergeFrom(const Ref_log& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(class_specific_merge_from_start:Ref_log) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); chunks_.MergeFrom(from.chunks_); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_number()) { - set_number(from.number()); - } + if (from.has_number()) { + set_number(from.number()); } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void Ref_log::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Ref_log) if (&from == this) return; Clear(); MergeFrom(from); } void Ref_log::CopyFrom(const Ref_log& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Ref_log) if (&from == this) return; Clear(); MergeFrom(from); } bool Ref_log::IsInitialized() const { - - for (int i = 0; i < chunks_size(); i++) { - if (!this->chunks(i).IsInitialized()) return false; - } + if (!::google::protobuf::internal::AllAreInitialized(this->chunks())) return false; return true; } void Ref_log::Swap(Ref_log* other) { - if (other != this) { - std::swap(number_, other->number_); - chunks_.Swap(&other->chunks_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void Ref_log::InternalSwap(Ref_log* other) { + chunks_.UnsafeArenaSwap(&other->chunks_); + std::swap(number_, other->number_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata Ref_log::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = Ref_log_descriptor_; - metadata.reflection = Ref_log_reflection_; - return metadata; + return file_level_metadata[1]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// Ref_log + +// optional int64 number = 1; +bool Ref_log::has_number() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void Ref_log::set_has_number() { + _has_bits_[0] |= 0x00000001u; +} +void Ref_log::clear_has_number() { + _has_bits_[0] &= ~0x00000001u; +} +void Ref_log::clear_number() { + number_ = GOOGLE_LONGLONG(0); + clear_has_number(); +} +::google::protobuf::int64 Ref_log::number() const { + // @@protoc_insertion_point(field_get:Ref_log.number) + return number_; +} +void Ref_log::set_number(::google::protobuf::int64 value) { + set_has_number(); + number_ = value; + // @@protoc_insertion_point(field_set:Ref_log.number) +} + +// repeated .Ref_chunk chunks = 2; +int Ref_log::chunks_size() const { + return chunks_.size(); +} +void Ref_log::clear_chunks() { + chunks_.Clear(); +} +const ::Ref_chunk& Ref_log::chunks(int index) const { + // @@protoc_insertion_point(field_get:Ref_log.chunks) + return chunks_.Get(index); +} +::Ref_chunk* Ref_log::mutable_chunks(int index) { + // @@protoc_insertion_point(field_mutable:Ref_log.chunks) + return chunks_.Mutable(index); +} +::Ref_chunk* Ref_log::add_chunks() { + // @@protoc_insertion_point(field_add:Ref_log.chunks) + return chunks_.Add(); +} +::google::protobuf::RepeatedPtrField< ::Ref_chunk >* +Ref_log::mutable_chunks() { + // @@protoc_insertion_point(field_mutable_list:Ref_log.chunks) + return &chunks_; +} +const ::google::protobuf::RepeatedPtrField< ::Ref_chunk >& +Ref_log::chunks() const { + // @@protoc_insertion_point(field_list:Ref_log.chunks) + return chunks_; } +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) diff --git a/src/proto/ref_log.pb.h b/src/proto/ref_log.pb.h index 8fa76ad..46922e1 100644 --- a/src/proto/ref_log.pb.h +++ b/src/proto/ref_log.pb.h @@ -8,36 +8,47 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 2005000 +#if GOOGLE_PROTOBUF_VERSION < 3001000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. #endif +#include +#include #include +#include #include -#include -#include +#include // IWYU pragma: export +#include // IWYU pragma: export #include #include "referee.pb.h" // @@protoc_insertion_point(includes) - -// Internal implementation detail -- do not call these. -void protobuf_AddDesc_ref_5flog_2eproto(); -void protobuf_AssignDesc_ref_5flog_2eproto(); -void protobuf_ShutdownFile_ref_5flog_2eproto(); - class Ref_chunk; +class Ref_chunkDefaultTypeInternal; +extern Ref_chunkDefaultTypeInternal _Ref_chunk_default_instance_; class Ref_log; +class Ref_logDefaultTypeInternal; +extern Ref_logDefaultTypeInternal _Ref_log_default_instance_; +class SSL_Referee; +class SSL_RefereeDefaultTypeInternal; +extern SSL_RefereeDefaultTypeInternal _SSL_Referee_default_instance_; +class SSL_Referee_TeamInfo; +class SSL_Referee_TeamInfoDefaultTypeInternal; +extern SSL_Referee_TeamInfoDefaultTypeInternal _SSL_Referee_TeamInfo_default_instance_; + +// Internal implementation detail -- do not call these. +void protobuf_AddDesc_ref_5flog_2eproto(); +void protobuf_InitDefaults_ref_5flog_2eproto(); // =================================================================== -class Ref_chunk : public ::google::protobuf::Message { +class Ref_chunk : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:Ref_chunk) */ { public: Ref_chunk(); virtual ~Ref_chunk(); @@ -50,98 +61,117 @@ class Ref_chunk : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const Ref_chunk& default_instance(); + static inline const Ref_chunk* internal_default_instance() { + return reinterpret_cast( + &_Ref_chunk_default_instance_); + } + void Swap(Ref_chunk* other); // implements Message ---------------------------------------------- - Ref_chunk* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline Ref_chunk* New() const PROTOBUF_FINAL { return New(NULL); } + + Ref_chunk* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const Ref_chunk& from); void MergeFrom(const Ref_chunk& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(Ref_chunk* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // required int64 time_elapsed = 1; - inline bool has_time_elapsed() const; - inline void clear_time_elapsed(); + bool has_time_elapsed() const; + void clear_time_elapsed(); static const int kTimeElapsedFieldNumber = 1; - inline ::google::protobuf::int64 time_elapsed() const; - inline void set_time_elapsed(::google::protobuf::int64 value); + ::google::protobuf::int64 time_elapsed() const; + void set_time_elapsed(::google::protobuf::int64 value); // optional int64 id = 2; - inline bool has_id() const; - inline void clear_id(); + bool has_id() const; + void clear_id(); static const int kIdFieldNumber = 2; - inline ::google::protobuf::int64 id() const; - inline void set_id(::google::protobuf::int64 value); + ::google::protobuf::int64 id() const; + void set_id(::google::protobuf::int64 value); // required .SSL_Referee packet = 3; - inline bool has_packet() const; - inline void clear_packet(); + bool has_packet() const; + void clear_packet(); static const int kPacketFieldNumber = 3; - inline const ::SSL_Referee& packet() const; - inline ::SSL_Referee* mutable_packet(); - inline ::SSL_Referee* release_packet(); - inline void set_allocated_packet(::SSL_Referee* packet); + const ::SSL_Referee& packet() const; + ::SSL_Referee* mutable_packet(); + ::SSL_Referee* release_packet(); + void set_allocated_packet(::SSL_Referee* packet); // @@protoc_insertion_point(class_scope:Ref_chunk) private: - inline void set_has_time_elapsed(); - inline void clear_has_time_elapsed(); - inline void set_has_id(); - inline void clear_has_id(); - inline void set_has_packet(); - inline void clear_has_packet(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + void set_has_time_elapsed(); + void clear_has_time_elapsed(); + void set_has_id(); + void clear_has_id(); + void set_has_packet(); + void clear_has_packet(); + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; + ::SSL_Referee* packet_; ::google::protobuf::int64 time_elapsed_; ::google::protobuf::int64 id_; - ::SSL_Referee* packet_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; - - friend void protobuf_AddDesc_ref_5flog_2eproto(); - friend void protobuf_AssignDesc_ref_5flog_2eproto(); + friend void protobuf_InitDefaults_ref_5flog_2eproto_impl(); + friend void protobuf_AddDesc_ref_5flog_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_ref_5flog_2eproto(); friend void protobuf_ShutdownFile_ref_5flog_2eproto(); - void InitAsDefaultInstance(); - static Ref_chunk* default_instance_; }; // ------------------------------------------------------------------- -class Ref_log : public ::google::protobuf::Message { +class Ref_log : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:Ref_log) */ { public: Ref_log(); virtual ~Ref_log(); @@ -154,160 +184,187 @@ class Ref_log : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const Ref_log& default_instance(); + static inline const Ref_log* internal_default_instance() { + return reinterpret_cast( + &_Ref_log_default_instance_); + } + void Swap(Ref_log* other); // implements Message ---------------------------------------------- - Ref_log* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline Ref_log* New() const PROTOBUF_FINAL { return New(NULL); } + + Ref_log* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const Ref_log& from); void MergeFrom(const Ref_log& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(Ref_log* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // optional int64 number = 1; - inline bool has_number() const; - inline void clear_number(); + bool has_number() const; + void clear_number(); static const int kNumberFieldNumber = 1; - inline ::google::protobuf::int64 number() const; - inline void set_number(::google::protobuf::int64 value); + ::google::protobuf::int64 number() const; + void set_number(::google::protobuf::int64 value); // repeated .Ref_chunk chunks = 2; - inline int chunks_size() const; - inline void clear_chunks(); + int chunks_size() const; + void clear_chunks(); static const int kChunksFieldNumber = 2; - inline const ::Ref_chunk& chunks(int index) const; - inline ::Ref_chunk* mutable_chunks(int index); - inline ::Ref_chunk* add_chunks(); - inline const ::google::protobuf::RepeatedPtrField< ::Ref_chunk >& - chunks() const; - inline ::google::protobuf::RepeatedPtrField< ::Ref_chunk >* + const ::Ref_chunk& chunks(int index) const; + ::Ref_chunk* mutable_chunks(int index); + ::Ref_chunk* add_chunks(); + ::google::protobuf::RepeatedPtrField< ::Ref_chunk >* mutable_chunks(); + const ::google::protobuf::RepeatedPtrField< ::Ref_chunk >& + chunks() const; // @@protoc_insertion_point(class_scope:Ref_log) private: - inline void set_has_number(); - inline void clear_has_number(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::google::protobuf::int64 number_; - ::google::protobuf::RepeatedPtrField< ::Ref_chunk > chunks_; + void set_has_number(); + void clear_has_number(); + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; - - friend void protobuf_AddDesc_ref_5flog_2eproto(); - friend void protobuf_AssignDesc_ref_5flog_2eproto(); + ::google::protobuf::RepeatedPtrField< ::Ref_chunk > chunks_; + ::google::protobuf::int64 number_; + friend void protobuf_InitDefaults_ref_5flog_2eproto_impl(); + friend void protobuf_AddDesc_ref_5flog_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_ref_5flog_2eproto(); friend void protobuf_ShutdownFile_ref_5flog_2eproto(); - void InitAsDefaultInstance(); - static Ref_log* default_instance_; }; // =================================================================== // =================================================================== +#if !PROTOBUF_INLINE_NOT_IN_HEADERS // Ref_chunk // required int64 time_elapsed = 1; inline bool Ref_chunk::has_time_elapsed() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return (_has_bits_[0] & 0x00000002u) != 0; } inline void Ref_chunk::set_has_time_elapsed() { - _has_bits_[0] |= 0x00000001u; + _has_bits_[0] |= 0x00000002u; } inline void Ref_chunk::clear_has_time_elapsed() { - _has_bits_[0] &= ~0x00000001u; + _has_bits_[0] &= ~0x00000002u; } inline void Ref_chunk::clear_time_elapsed() { time_elapsed_ = GOOGLE_LONGLONG(0); clear_has_time_elapsed(); } inline ::google::protobuf::int64 Ref_chunk::time_elapsed() const { + // @@protoc_insertion_point(field_get:Ref_chunk.time_elapsed) return time_elapsed_; } inline void Ref_chunk::set_time_elapsed(::google::protobuf::int64 value) { set_has_time_elapsed(); time_elapsed_ = value; + // @@protoc_insertion_point(field_set:Ref_chunk.time_elapsed) } // optional int64 id = 2; inline bool Ref_chunk::has_id() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return (_has_bits_[0] & 0x00000004u) != 0; } inline void Ref_chunk::set_has_id() { - _has_bits_[0] |= 0x00000002u; + _has_bits_[0] |= 0x00000004u; } inline void Ref_chunk::clear_has_id() { - _has_bits_[0] &= ~0x00000002u; + _has_bits_[0] &= ~0x00000004u; } inline void Ref_chunk::clear_id() { id_ = GOOGLE_LONGLONG(0); clear_has_id(); } inline ::google::protobuf::int64 Ref_chunk::id() const { + // @@protoc_insertion_point(field_get:Ref_chunk.id) return id_; } inline void Ref_chunk::set_id(::google::protobuf::int64 value) { set_has_id(); id_ = value; + // @@protoc_insertion_point(field_set:Ref_chunk.id) } // required .SSL_Referee packet = 3; inline bool Ref_chunk::has_packet() const { - return (_has_bits_[0] & 0x00000004u) != 0; + return (_has_bits_[0] & 0x00000001u) != 0; } inline void Ref_chunk::set_has_packet() { - _has_bits_[0] |= 0x00000004u; + _has_bits_[0] |= 0x00000001u; } inline void Ref_chunk::clear_has_packet() { - _has_bits_[0] &= ~0x00000004u; + _has_bits_[0] &= ~0x00000001u; } inline void Ref_chunk::clear_packet() { if (packet_ != NULL) packet_->::SSL_Referee::Clear(); clear_has_packet(); } inline const ::SSL_Referee& Ref_chunk::packet() const { - return packet_ != NULL ? *packet_ : *default_instance_->packet_; + // @@protoc_insertion_point(field_get:Ref_chunk.packet) + return packet_ != NULL ? *packet_ + : *::SSL_Referee::internal_default_instance(); } inline ::SSL_Referee* Ref_chunk::mutable_packet() { set_has_packet(); - if (packet_ == NULL) packet_ = new ::SSL_Referee; + if (packet_ == NULL) { + packet_ = new ::SSL_Referee; + } + // @@protoc_insertion_point(field_mutable:Ref_chunk.packet) return packet_; } inline ::SSL_Referee* Ref_chunk::release_packet() { + // @@protoc_insertion_point(field_release:Ref_chunk.packet) clear_has_packet(); ::SSL_Referee* temp = packet_; packet_ = NULL; @@ -321,6 +378,7 @@ inline void Ref_chunk::set_allocated_packet(::SSL_Referee* packet) { } else { clear_has_packet(); } + // @@protoc_insertion_point(field_set_allocated:Ref_chunk.packet) } // ------------------------------------------------------------------- @@ -342,11 +400,13 @@ inline void Ref_log::clear_number() { clear_has_number(); } inline ::google::protobuf::int64 Ref_log::number() const { + // @@protoc_insertion_point(field_get:Ref_log.number) return number_; } inline void Ref_log::set_number(::google::protobuf::int64 value) { set_has_number(); number_ = value; + // @@protoc_insertion_point(field_set:Ref_log.number) } // repeated .Ref_chunk chunks = 2; @@ -357,34 +417,34 @@ inline void Ref_log::clear_chunks() { chunks_.Clear(); } inline const ::Ref_chunk& Ref_log::chunks(int index) const { + // @@protoc_insertion_point(field_get:Ref_log.chunks) return chunks_.Get(index); } inline ::Ref_chunk* Ref_log::mutable_chunks(int index) { + // @@protoc_insertion_point(field_mutable:Ref_log.chunks) return chunks_.Mutable(index); } inline ::Ref_chunk* Ref_log::add_chunks() { + // @@protoc_insertion_point(field_add:Ref_log.chunks) return chunks_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::Ref_chunk >& -Ref_log::chunks() const { - return chunks_; -} inline ::google::protobuf::RepeatedPtrField< ::Ref_chunk >* Ref_log::mutable_chunks() { + // @@protoc_insertion_point(field_mutable_list:Ref_log.chunks) return &chunks_; } +inline const ::google::protobuf::RepeatedPtrField< ::Ref_chunk >& +Ref_log::chunks() const { + // @@protoc_insertion_point(field_list:Ref_log.chunks) + return chunks_; +} +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS +// ------------------------------------------------------------------- -// @@protoc_insertion_point(namespace_scope) - -#ifndef SWIG -namespace google { -namespace protobuf { +// @@protoc_insertion_point(namespace_scope) -} // namespace google -} // namespace protobuf -#endif // SWIG // @@protoc_insertion_point(global_scope) diff --git a/src/proto/referee.pb.cc b/src/proto/referee.pb.cc index b640090..215946d 100644 --- a/src/proto/referee.pb.cc +++ b/src/proto/referee.pb.cc @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -15,51 +16,26 @@ #include #include // @@protoc_insertion_point(includes) +class SSL_Referee_TeamInfoDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +SSL_Referee_TeamInfoDefaultTypeInternal _SSL_Referee_TeamInfo_default_instance_; +class SSL_RefereeDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +SSL_RefereeDefaultTypeInternal _SSL_Referee_default_instance_; namespace { -const ::google::protobuf::Descriptor* SSL_Referee_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - SSL_Referee_reflection_ = NULL; -const ::google::protobuf::Descriptor* SSL_Referee_TeamInfo_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - SSL_Referee_TeamInfo_reflection_ = NULL; -const ::google::protobuf::EnumDescriptor* SSL_Referee_Stage_descriptor_ = NULL; -const ::google::protobuf::EnumDescriptor* SSL_Referee_Command_descriptor_ = NULL; +::google::protobuf::Metadata file_level_metadata[2]; +const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[2]; } // namespace -void protobuf_AssignDesc_referee_2eproto() { - protobuf_AddDesc_referee_2eproto(); - const ::google::protobuf::FileDescriptor* file = - ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( - "referee.proto"); - GOOGLE_CHECK(file != NULL); - SSL_Referee_descriptor_ = file->message_type(0); - static const int SSL_Referee_offsets_[8] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee, packet_timestamp_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee, stage_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee, stage_time_left_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee, command_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee, command_counter_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee, command_timestamp_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee, yellow_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee, blue_), - }; - SSL_Referee_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - SSL_Referee_descriptor_, - SSL_Referee::default_instance_, - SSL_Referee_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(SSL_Referee)); - SSL_Referee_TeamInfo_descriptor_ = SSL_Referee_descriptor_->nested_type(0); - static const int SSL_Referee_TeamInfo_offsets_[8] = { +const ::google::protobuf::uint32* protobuf_Offsets_referee_2eproto() GOOGLE_ATTRIBUTE_COLD; +const ::google::protobuf::uint32* protobuf_Offsets_referee_2eproto() { + static const ::google::protobuf::uint32 offsets[] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee_TeamInfo, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee_TeamInfo, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee_TeamInfo, name_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee_TeamInfo, score_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee_TeamInfo, red_cards_), @@ -68,107 +44,151 @@ void protobuf_AssignDesc_referee_2eproto() { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee_TeamInfo, timeouts_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee_TeamInfo, timeout_time_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee_TeamInfo, goalie_), + 0, + 1, + 2, + 7, + 3, + 4, + 5, + 6, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee, packet_timestamp_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee, stage_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee, stage_time_left_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee, command_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee, command_counter_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee, command_timestamp_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee, yellow_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee, blue_), + 2, + 3, + 4, + 5, + 6, + 7, + 0, + 1, }; - SSL_Referee_TeamInfo_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - SSL_Referee_TeamInfo_descriptor_, - SSL_Referee_TeamInfo::default_instance_, - SSL_Referee_TeamInfo_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee_TeamInfo, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_Referee_TeamInfo, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(SSL_Referee_TeamInfo)); - SSL_Referee_Stage_descriptor_ = SSL_Referee_descriptor_->enum_type(0); - SSL_Referee_Command_descriptor_ = SSL_Referee_descriptor_->enum_type(1); + return offsets; } +static const ::google::protobuf::internal::MigrationSchema schemas[] = { + { 0, 12, sizeof(SSL_Referee_TeamInfo)}, + { 20, 32, sizeof(SSL_Referee)}, +}; + +static const ::google::protobuf::internal::DefaultInstanceData file_default_instances[] = { + {reinterpret_cast(&_SSL_Referee_TeamInfo_default_instance_), NULL}, + {reinterpret_cast(&_SSL_Referee_default_instance_), NULL}, +}; + namespace { -GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); -inline void protobuf_AssignDescriptorsOnce() { - ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, - &protobuf_AssignDesc_referee_2eproto); +void protobuf_AssignDescriptors() { + protobuf_AddDesc_referee_2eproto(); + ::google::protobuf::MessageFactory* factory = NULL; + AssignDescriptors( + "referee.proto", schemas, file_default_instances, protobuf_Offsets_referee_2eproto(), factory, + file_level_metadata, file_level_enum_descriptors, NULL); +} + +void protobuf_AssignDescriptorsOnce() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); } +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - SSL_Referee_descriptor_, &SSL_Referee::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - SSL_Referee_TeamInfo_descriptor_, &SSL_Referee_TeamInfo::default_instance()); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 2); } } // namespace void protobuf_ShutdownFile_referee_2eproto() { - delete SSL_Referee::default_instance_; - delete SSL_Referee_reflection_; - delete SSL_Referee_TeamInfo::default_instance_; - delete SSL_Referee_TeamInfo_reflection_; + _SSL_Referee_TeamInfo_default_instance_.Shutdown(); + delete file_level_metadata[0].reflection; + _SSL_Referee_default_instance_.Shutdown(); + delete file_level_metadata[1].reflection; } -void protobuf_AddDesc_referee_2eproto() { - static bool already_here = false; - if (already_here) return; - already_here = true; +void protobuf_InitDefaults_referee_2eproto_impl() { GOOGLE_PROTOBUF_VERIFY_VERSION; + ::google::protobuf::internal::InitProtobufDefaults(); + _SSL_Referee_TeamInfo_default_instance_.DefaultConstruct(); + _SSL_Referee_default_instance_.DefaultConstruct(); + _SSL_Referee_default_instance_.get_mutable()->yellow_ = const_cast< ::SSL_Referee_TeamInfo*>( + ::SSL_Referee_TeamInfo::internal_default_instance()); + _SSL_Referee_default_instance_.get_mutable()->blue_ = const_cast< ::SSL_Referee_TeamInfo*>( + ::SSL_Referee_TeamInfo::internal_default_instance()); +} + +void protobuf_InitDefaults_referee_2eproto() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_InitDefaults_referee_2eproto_impl); +} +void protobuf_AddDesc_referee_2eproto_impl() { + protobuf_InitDefaults_referee_2eproto(); + static const char descriptor[] = { + "\n\rreferee.proto\"\335\010\n\013SSL_Referee\022\030\n\020packe" + "t_timestamp\030\001 \002(\004\022!\n\005stage\030\002 \002(\0162\022.SSL_R" + "eferee.Stage\022\027\n\017stage_time_left\030\003 \001(\021\022%\n" + "\007command\030\004 \002(\0162\024.SSL_Referee.Command\022\027\n\017" + "command_counter\030\005 \002(\r\022\031\n\021command_timesta" + "mp\030\006 \002(\004\022%\n\006yellow\030\007 \002(\0132\025.SSL_Referee.T" + "eamInfo\022#\n\004blue\030\010 \002(\0132\025.SSL_Referee.Team" + "Info\032\247\001\n\010TeamInfo\022\014\n\004name\030\001 \002(\t\022\r\n\005score" + "\030\002 \002(\r\022\021\n\tred_cards\030\003 \002(\r\022\035\n\021yellow_card" + "_times\030\004 \003(\rB\002\020\001\022\024\n\014yellow_cards\030\005 \002(\r\022\020" + "\n\010timeouts\030\006 \002(\r\022\024\n\014timeout_time\030\007 \002(\r\022\016" + "\n\006goalie\030\010 \002(\r\"\321\002\n\005Stage\022\031\n\025NORMAL_FIRST" + "_HALF_PRE\020\000\022\025\n\021NORMAL_FIRST_HALF\020\001\022\024\n\020NO" + "RMAL_HALF_TIME\020\002\022\032\n\026NORMAL_SECOND_HALF_P" + "RE\020\003\022\026\n\022NORMAL_SECOND_HALF\020\004\022\024\n\020EXTRA_TI" + "ME_BREAK\020\005\022\030\n\024EXTRA_FIRST_HALF_PRE\020\006\022\024\n\020" + "EXTRA_FIRST_HALF\020\007\022\023\n\017EXTRA_HALF_TIME\020\010\022" + "\031\n\025EXTRA_SECOND_HALF_PRE\020\t\022\025\n\021EXTRA_SECO" + "ND_HALF\020\n\022\032\n\026PENALTY_SHOOTOUT_BREAK\020\013\022\024\n" + "\020PENALTY_SHOOTOUT\020\014\022\r\n\tPOST_GAME\020\r\"\322\002\n\007C" + "ommand\022\010\n\004HALT\020\000\022\010\n\004STOP\020\001\022\020\n\014NORMAL_STA" + "RT\020\002\022\017\n\013FORCE_START\020\003\022\032\n\026PREPARE_KICKOFF" + "_YELLOW\020\004\022\030\n\024PREPARE_KICKOFF_BLUE\020\005\022\032\n\026P" + "REPARE_PENALTY_YELLOW\020\006\022\030\n\024PREPARE_PENAL" + "TY_BLUE\020\007\022\026\n\022DIRECT_FREE_YELLOW\020\010\022\024\n\020DIR" + "ECT_FREE_BLUE\020\t\022\030\n\024INDIRECT_FREE_YELLOW\020" + "\n\022\026\n\022INDIRECT_FREE_BLUE\020\013\022\022\n\016TIMEOUT_YEL" + "LOW\020\014\022\020\n\014TIMEOUT_BLUE\020\r\022\017\n\013GOAL_YELLOW\020\016" + "\022\r\n\tGOAL_BLUE\020\017" + }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - "\n\rreferee.proto\"\335\010\n\013SSL_Referee\022\030\n\020packe" - "t_timestamp\030\001 \002(\004\022!\n\005stage\030\002 \002(\0162\022.SSL_R" - "eferee.Stage\022\027\n\017stage_time_left\030\003 \001(\021\022%\n" - "\007command\030\004 \002(\0162\024.SSL_Referee.Command\022\027\n\017" - "command_counter\030\005 \002(\r\022\031\n\021command_timesta" - "mp\030\006 \002(\004\022%\n\006yellow\030\007 \002(\0132\025.SSL_Referee.T" - "eamInfo\022#\n\004blue\030\010 \002(\0132\025.SSL_Referee.Team" - "Info\032\247\001\n\010TeamInfo\022\014\n\004name\030\001 \002(\t\022\r\n\005score" - "\030\002 \002(\r\022\021\n\tred_cards\030\003 \002(\r\022\035\n\021yellow_card" - "_times\030\004 \003(\rB\002\020\001\022\024\n\014yellow_cards\030\005 \002(\r\022\020" - "\n\010timeouts\030\006 \002(\r\022\024\n\014timeout_time\030\007 \002(\r\022\016" - "\n\006goalie\030\010 \002(\r\"\321\002\n\005Stage\022\031\n\025NORMAL_FIRST" - "_HALF_PRE\020\000\022\025\n\021NORMAL_FIRST_HALF\020\001\022\024\n\020NO" - "RMAL_HALF_TIME\020\002\022\032\n\026NORMAL_SECOND_HALF_P" - "RE\020\003\022\026\n\022NORMAL_SECOND_HALF\020\004\022\024\n\020EXTRA_TI" - "ME_BREAK\020\005\022\030\n\024EXTRA_FIRST_HALF_PRE\020\006\022\024\n\020" - "EXTRA_FIRST_HALF\020\007\022\023\n\017EXTRA_HALF_TIME\020\010\022" - "\031\n\025EXTRA_SECOND_HALF_PRE\020\t\022\025\n\021EXTRA_SECO" - "ND_HALF\020\n\022\032\n\026PENALTY_SHOOTOUT_BREAK\020\013\022\024\n" - "\020PENALTY_SHOOTOUT\020\014\022\r\n\tPOST_GAME\020\r\"\322\002\n\007C" - "ommand\022\010\n\004HALT\020\000\022\010\n\004STOP\020\001\022\020\n\014NORMAL_STA" - "RT\020\002\022\017\n\013FORCE_START\020\003\022\032\n\026PREPARE_KICKOFF" - "_YELLOW\020\004\022\030\n\024PREPARE_KICKOFF_BLUE\020\005\022\032\n\026P" - "REPARE_PENALTY_YELLOW\020\006\022\030\n\024PREPARE_PENAL" - "TY_BLUE\020\007\022\026\n\022DIRECT_FREE_YELLOW\020\010\022\024\n\020DIR" - "ECT_FREE_BLUE\020\t\022\030\n\024INDIRECT_FREE_YELLOW\020" - "\n\022\026\n\022INDIRECT_FREE_BLUE\020\013\022\022\n\016TIMEOUT_YEL" - "LOW\020\014\022\020\n\014TIMEOUT_BLUE\020\r\022\017\n\013GOAL_YELLOW\020\016" - "\022\r\n\tGOAL_BLUE\020\017", 1135); + descriptor, 1135); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "referee.proto", &protobuf_RegisterTypes); - SSL_Referee::default_instance_ = new SSL_Referee(); - SSL_Referee_TeamInfo::default_instance_ = new SSL_Referee_TeamInfo(); - SSL_Referee::default_instance_->InitAsDefaultInstance(); - SSL_Referee_TeamInfo::default_instance_->InitAsDefaultInstance(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_referee_2eproto); } +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_referee_2eproto_once_); +void protobuf_AddDesc_referee_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_referee_2eproto_once_, + &protobuf_AddDesc_referee_2eproto_impl); +} // Force AddDescriptors() to be called at static initialization time. struct StaticDescriptorInitializer_referee_2eproto { StaticDescriptorInitializer_referee_2eproto() { protobuf_AddDesc_referee_2eproto(); } } static_descriptor_initializer_referee_2eproto_; - -// =================================================================== - const ::google::protobuf::EnumDescriptor* SSL_Referee_Stage_descriptor() { protobuf_AssignDescriptorsOnce(); - return SSL_Referee_Stage_descriptor_; + return file_level_enum_descriptors[0]; } bool SSL_Referee_Stage_IsValid(int value) { - switch(value) { + switch (value) { case 0: case 1: case 2: @@ -189,7 +209,7 @@ bool SSL_Referee_Stage_IsValid(int value) { } } -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const SSL_Referee_Stage SSL_Referee::NORMAL_FIRST_HALF_PRE; const SSL_Referee_Stage SSL_Referee::NORMAL_FIRST_HALF; const SSL_Referee_Stage SSL_Referee::NORMAL_HALF_TIME; @@ -207,13 +227,13 @@ const SSL_Referee_Stage SSL_Referee::POST_GAME; const SSL_Referee_Stage SSL_Referee::Stage_MIN; const SSL_Referee_Stage SSL_Referee::Stage_MAX; const int SSL_Referee::Stage_ARRAYSIZE; -#endif // _MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 const ::google::protobuf::EnumDescriptor* SSL_Referee_Command_descriptor() { protobuf_AssignDescriptorsOnce(); - return SSL_Referee_Command_descriptor_; + return file_level_enum_descriptors[1]; } bool SSL_Referee_Command_IsValid(int value) { - switch(value) { + switch (value) { case 0: case 1: case 2: @@ -236,7 +256,7 @@ bool SSL_Referee_Command_IsValid(int value) { } } -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const SSL_Referee_Command SSL_Referee::HALT; const SSL_Referee_Command SSL_Referee::STOP; const SSL_Referee_Command SSL_Referee::NORMAL_START; @@ -256,8 +276,11 @@ const SSL_Referee_Command SSL_Referee::GOAL_BLUE; const SSL_Referee_Command SSL_Referee::Command_MIN; const SSL_Referee_Command SSL_Referee::Command_MAX; const int SSL_Referee::Command_ARRAYSIZE; -#endif // _MSC_VER -#ifndef _MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int SSL_Referee_TeamInfo::kNameFieldNumber; const int SSL_Referee_TeamInfo::kScoreFieldNumber; const int SSL_Referee_TeamInfo::kRedCardsFieldNumber; @@ -266,44 +289,47 @@ const int SSL_Referee_TeamInfo::kYellowCardsFieldNumber; const int SSL_Referee_TeamInfo::kTimeoutsFieldNumber; const int SSL_Referee_TeamInfo::kTimeoutTimeFieldNumber; const int SSL_Referee_TeamInfo::kGoalieFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 SSL_Referee_TeamInfo::SSL_Referee_TeamInfo() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_referee_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:SSL_Referee.TeamInfo) } - -void SSL_Referee_TeamInfo::InitAsDefaultInstance() { -} - SSL_Referee_TeamInfo::SSL_Referee_TeamInfo(const SSL_Referee_TeamInfo& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0), + yellow_card_times_(from.yellow_card_times_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.has_name()) { + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } + ::memcpy(&score_, &from.score_, + reinterpret_cast(&goalie_) - + reinterpret_cast(&score_) + sizeof(goalie_)); + // @@protoc_insertion_point(copy_constructor:SSL_Referee.TeamInfo) } void SSL_Referee_TeamInfo::SharedCtor() { _cached_size_ = 0; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - score_ = 0u; - red_cards_ = 0u; - yellow_cards_ = 0u; - timeouts_ = 0u; - timeout_time_ = 0u; - goalie_ = 0u; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::memset(&score_, 0, reinterpret_cast(&goalie_) - + reinterpret_cast(&score_) + sizeof(goalie_)); } SSL_Referee_TeamInfo::~SSL_Referee_TeamInfo() { + // @@protoc_insertion_point(destructor:SSL_Referee.TeamInfo) SharedDtor(); } void SSL_Referee_TeamInfo::SharedDtor() { - if (name_ != &::google::protobuf::internal::kEmptyString) { - delete name_; - } - if (this != default_instance_) { - } + name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void SSL_Referee_TeamInfo::SetCachedSize(int size) const { @@ -313,183 +339,162 @@ void SSL_Referee_TeamInfo::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* SSL_Referee_TeamInfo::descriptor() { protobuf_AssignDescriptorsOnce(); - return SSL_Referee_TeamInfo_descriptor_; + return file_level_metadata[0].descriptor; } const SSL_Referee_TeamInfo& SSL_Referee_TeamInfo::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_referee_2eproto(); - return *default_instance_; + protobuf_InitDefaults_referee_2eproto(); + return *internal_default_instance(); } -SSL_Referee_TeamInfo* SSL_Referee_TeamInfo::default_instance_ = NULL; - -SSL_Referee_TeamInfo* SSL_Referee_TeamInfo::New() const { - return new SSL_Referee_TeamInfo; +SSL_Referee_TeamInfo* SSL_Referee_TeamInfo::New(::google::protobuf::Arena* arena) const { + SSL_Referee_TeamInfo* n = new SSL_Referee_TeamInfo; + if (arena != NULL) { + arena->Own(n); + } + return n; } void SSL_Referee_TeamInfo::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (has_name()) { - if (name_ != &::google::protobuf::internal::kEmptyString) { - name_->clear(); - } - } - score_ = 0u; - red_cards_ = 0u; - yellow_cards_ = 0u; - timeouts_ = 0u; - timeout_time_ = 0u; - goalie_ = 0u; - } +// @@protoc_insertion_point(message_clear_start:SSL_Referee.TeamInfo) yellow_card_times_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + if (has_name()) { + GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); + (*name_.UnsafeRawStringPointer())->clear(); + } + if (_has_bits_[0 / 32] & 126u) { + ::memset(&score_, 0, reinterpret_cast(&goalie_) - + reinterpret_cast(&score_) + sizeof(goalie_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool SSL_Referee_TeamInfo::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:SSL_Referee.TeamInfo) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required string name = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + if (tag == 10u) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::PARSE); + ::google::protobuf::internal::WireFormat::PARSE, + "SSL_Referee.TeamInfo.name"); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(16)) goto parse_score; break; } // required uint32 score = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_score: + if (tag == 16u) { + set_has_score(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( input, &score_))); - set_has_score(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(24)) goto parse_red_cards; break; } // required uint32 red_cards = 3; case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_red_cards: + if (tag == 24u) { + set_has_red_cards(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( input, &red_cards_))); - set_has_red_cards(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(34)) goto parse_yellow_card_times; break; } // repeated uint32 yellow_card_times = 4 [packed = true]; case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_yellow_card_times: + if (tag == 34u) { DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( input, this->mutable_yellow_card_times()))); - } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) - == ::google::protobuf::internal::WireFormatLite:: - WIRETYPE_VARINT) { + } else if (tag == 32u) { DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( - 1, 34, input, this->mutable_yellow_card_times()))); + 1, 34u, input, this->mutable_yellow_card_times()))); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(40)) goto parse_yellow_cards; break; } // required uint32 yellow_cards = 5; case 5: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_yellow_cards: + if (tag == 40u) { + set_has_yellow_cards(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( input, &yellow_cards_))); - set_has_yellow_cards(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(48)) goto parse_timeouts; break; } // required uint32 timeouts = 6; case 6: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_timeouts: + if (tag == 48u) { + set_has_timeouts(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( input, &timeouts_))); - set_has_timeouts(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(56)) goto parse_timeout_time; break; } // required uint32 timeout_time = 7; case 7: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_timeout_time: + if (tag == 56u) { + set_has_timeout_time(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( input, &timeout_time_))); - set_has_timeout_time(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(64)) goto parse_goalie; break; } // required uint32 goalie = 8; case 8: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_goalie: + if (tag == 64u) { + set_has_goalie(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( input, &goalie_))); - set_has_goalie(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectAtEnd()) return true; break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -497,18 +502,25 @@ bool SSL_Referee_TeamInfo::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:SSL_Referee.TeamInfo) return true; +failure: + // @@protoc_insertion_point(parse_failure:SSL_Referee.TeamInfo) + return false; #undef DO_ } void SSL_Referee_TeamInfo::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:SSL_Referee.TeamInfo) // required string name = 1; if (has_name()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( + ::google::protobuf::internal::WireFormat::SERIALIZE, + "SSL_Referee.TeamInfo.name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); } @@ -552,19 +564,23 @@ void SSL_Referee_TeamInfo::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteUInt32(8, this->goalie(), output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:SSL_Referee.TeamInfo) } -::google::protobuf::uint8* SSL_Referee_TeamInfo::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* SSL_Referee_TeamInfo::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:SSL_Referee.TeamInfo) // required string name = 1; if (has_name()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormat::SERIALIZE, + "SSL_Referee.TeamInfo.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->name(), target); @@ -614,71 +630,122 @@ ::google::protobuf::uint8* SSL_Referee_TeamInfo::SerializeWithCachedSizesToArray target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(8, this->goalie(), target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:SSL_Referee.TeamInfo) return target; } -int SSL_Referee_TeamInfo::ByteSize() const { - int total_size = 0; +size_t SSL_Referee_TeamInfo::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:SSL_Referee.TeamInfo) + size_t total_size = 0; - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_name()) { // required string name = 1; - if (has_name()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->name()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + if (has_score()) { // required uint32 score = 2; - if (has_score()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::UInt32Size( - this->score()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->score()); + } + if (has_red_cards()) { // required uint32 red_cards = 3; - if (has_red_cards()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::UInt32Size( - this->red_cards()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->red_cards()); + } + if (has_yellow_cards()) { // required uint32 yellow_cards = 5; - if (has_yellow_cards()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::UInt32Size( - this->yellow_cards()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->yellow_cards()); + } + if (has_timeouts()) { // required uint32 timeouts = 6; - if (has_timeouts()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::UInt32Size( - this->timeouts()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->timeouts()); + } + if (has_timeout_time()) { // required uint32 timeout_time = 7; - if (has_timeout_time()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::UInt32Size( - this->timeout_time()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->timeout_time()); + } + + if (has_goalie()) { + // required uint32 goalie = 8; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->goalie()); + } + + return total_size; +} +size_t SSL_Referee_TeamInfo::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:SSL_Referee.TeamInfo) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + if (((_has_bits_[0] & 0x0000007f) ^ 0x0000007f) == 0) { // All required fields are present. + // required string name = 1; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + + // required uint32 score = 2; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->score()); + + // required uint32 red_cards = 3; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->red_cards()); + + // required uint32 yellow_cards = 5; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->yellow_cards()); + + // required uint32 timeouts = 6; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->timeouts()); + + // required uint32 timeout_time = 7; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->timeout_time()); // required uint32 goalie = 8; - if (has_goalie()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::UInt32Size( - this->goalie()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->goalie()); + } else { + total_size += RequiredFieldsByteSizeFallback(); } // repeated uint32 yellow_card_times = 4 [packed = true]; { - int data_size = 0; - for (int i = 0; i < this->yellow_card_times_size(); i++) { + size_t data_size = 0; + unsigned int count = this->yellow_card_times_size(); + for (unsigned int i = 0; i < count; i++) { data_size += ::google::protobuf::internal::WireFormatLite:: UInt32Size(this->yellow_card_times(i)); } @@ -686,41 +753,44 @@ int SSL_Referee_TeamInfo::ByteSize() const { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); } + int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _yellow_card_times_cached_byte_size_ = data_size; + _yellow_card_times_cached_byte_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); total_size += data_size; } - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void SSL_Referee_TeamInfo::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:SSL_Referee.TeamInfo) + GOOGLE_DCHECK_NE(&from, this); const SSL_Referee_TeamInfo* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:SSL_Referee.TeamInfo) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:SSL_Referee.TeamInfo) MergeFrom(*source); } } void SSL_Referee_TeamInfo::MergeFrom(const SSL_Referee_TeamInfo& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(class_specific_merge_from_start:SSL_Referee.TeamInfo) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); yellow_card_times_.MergeFrom(from.yellow_card_times_); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from._has_bits_[0 / 32] & 127u) { if (from.has_name()) { - set_name(from.name()); + set_has_name(); + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } if (from.has_score()) { set_score(from.score()); @@ -741,55 +811,294 @@ void SSL_Referee_TeamInfo::MergeFrom(const SSL_Referee_TeamInfo& from) { set_goalie(from.goalie()); } } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void SSL_Referee_TeamInfo::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:SSL_Referee.TeamInfo) if (&from == this) return; Clear(); MergeFrom(from); } void SSL_Referee_TeamInfo::CopyFrom(const SSL_Referee_TeamInfo& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:SSL_Referee.TeamInfo) if (&from == this) return; Clear(); MergeFrom(from); } bool SSL_Referee_TeamInfo::IsInitialized() const { - if ((_has_bits_[0] & 0x000000f7) != 0x000000f7) return false; - + if ((_has_bits_[0] & 0x0000007f) != 0x0000007f) return false; return true; } void SSL_Referee_TeamInfo::Swap(SSL_Referee_TeamInfo* other) { - if (other != this) { - std::swap(name_, other->name_); - std::swap(score_, other->score_); - std::swap(red_cards_, other->red_cards_); - yellow_card_times_.Swap(&other->yellow_card_times_); - std::swap(yellow_cards_, other->yellow_cards_); - std::swap(timeouts_, other->timeouts_); - std::swap(timeout_time_, other->timeout_time_); - std::swap(goalie_, other->goalie_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void SSL_Referee_TeamInfo::InternalSwap(SSL_Referee_TeamInfo* other) { + yellow_card_times_.UnsafeArenaSwap(&other->yellow_card_times_); + name_.Swap(&other->name_); + std::swap(score_, other->score_); + std::swap(red_cards_, other->red_cards_); + std::swap(yellow_cards_, other->yellow_cards_); + std::swap(timeouts_, other->timeouts_); + std::swap(timeout_time_, other->timeout_time_); + std::swap(goalie_, other->goalie_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata SSL_Referee_TeamInfo::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = SSL_Referee_TeamInfo_descriptor_; - metadata.reflection = SSL_Referee_TeamInfo_reflection_; - return metadata; + return file_level_metadata[0]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// SSL_Referee_TeamInfo + +// required string name = 1; +bool SSL_Referee_TeamInfo::has_name() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void SSL_Referee_TeamInfo::set_has_name() { + _has_bits_[0] |= 0x00000001u; +} +void SSL_Referee_TeamInfo::clear_has_name() { + _has_bits_[0] &= ~0x00000001u; +} +void SSL_Referee_TeamInfo::clear_name() { + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_name(); +} +const ::std::string& SSL_Referee_TeamInfo::name() const { + // @@protoc_insertion_point(field_get:SSL_Referee.TeamInfo.name) + return name_.GetNoArena(); +} +void SSL_Referee_TeamInfo::set_name(const ::std::string& value) { + set_has_name(); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:SSL_Referee.TeamInfo.name) +} +#if LANG_CXX11 +void SSL_Referee_TeamInfo::set_name(::std::string&& value) { + set_has_name(); + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:SSL_Referee.TeamInfo.name) +} +#endif +void SSL_Referee_TeamInfo::set_name(const char* value) { + set_has_name(); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:SSL_Referee.TeamInfo.name) +} +void SSL_Referee_TeamInfo::set_name(const char* value, size_t size) { + set_has_name(); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:SSL_Referee.TeamInfo.name) +} +::std::string* SSL_Referee_TeamInfo::mutable_name() { + set_has_name(); + // @@protoc_insertion_point(field_mutable:SSL_Referee.TeamInfo.name) + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +::std::string* SSL_Referee_TeamInfo::release_name() { + // @@protoc_insertion_point(field_release:SSL_Referee.TeamInfo.name) + clear_has_name(); + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void SSL_Referee_TeamInfo::set_allocated_name(::std::string* name) { + if (name != NULL) { + set_has_name(); + } else { + clear_has_name(); + } + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + // @@protoc_insertion_point(field_set_allocated:SSL_Referee.TeamInfo.name) } +// required uint32 score = 2; +bool SSL_Referee_TeamInfo::has_score() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +void SSL_Referee_TeamInfo::set_has_score() { + _has_bits_[0] |= 0x00000002u; +} +void SSL_Referee_TeamInfo::clear_has_score() { + _has_bits_[0] &= ~0x00000002u; +} +void SSL_Referee_TeamInfo::clear_score() { + score_ = 0u; + clear_has_score(); +} +::google::protobuf::uint32 SSL_Referee_TeamInfo::score() const { + // @@protoc_insertion_point(field_get:SSL_Referee.TeamInfo.score) + return score_; +} +void SSL_Referee_TeamInfo::set_score(::google::protobuf::uint32 value) { + set_has_score(); + score_ = value; + // @@protoc_insertion_point(field_set:SSL_Referee.TeamInfo.score) +} + +// required uint32 red_cards = 3; +bool SSL_Referee_TeamInfo::has_red_cards() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +void SSL_Referee_TeamInfo::set_has_red_cards() { + _has_bits_[0] |= 0x00000004u; +} +void SSL_Referee_TeamInfo::clear_has_red_cards() { + _has_bits_[0] &= ~0x00000004u; +} +void SSL_Referee_TeamInfo::clear_red_cards() { + red_cards_ = 0u; + clear_has_red_cards(); +} +::google::protobuf::uint32 SSL_Referee_TeamInfo::red_cards() const { + // @@protoc_insertion_point(field_get:SSL_Referee.TeamInfo.red_cards) + return red_cards_; +} +void SSL_Referee_TeamInfo::set_red_cards(::google::protobuf::uint32 value) { + set_has_red_cards(); + red_cards_ = value; + // @@protoc_insertion_point(field_set:SSL_Referee.TeamInfo.red_cards) +} + +// repeated uint32 yellow_card_times = 4 [packed = true]; +int SSL_Referee_TeamInfo::yellow_card_times_size() const { + return yellow_card_times_.size(); +} +void SSL_Referee_TeamInfo::clear_yellow_card_times() { + yellow_card_times_.Clear(); +} +::google::protobuf::uint32 SSL_Referee_TeamInfo::yellow_card_times(int index) const { + // @@protoc_insertion_point(field_get:SSL_Referee.TeamInfo.yellow_card_times) + return yellow_card_times_.Get(index); +} +void SSL_Referee_TeamInfo::set_yellow_card_times(int index, ::google::protobuf::uint32 value) { + yellow_card_times_.Set(index, value); + // @@protoc_insertion_point(field_set:SSL_Referee.TeamInfo.yellow_card_times) +} +void SSL_Referee_TeamInfo::add_yellow_card_times(::google::protobuf::uint32 value) { + yellow_card_times_.Add(value); + // @@protoc_insertion_point(field_add:SSL_Referee.TeamInfo.yellow_card_times) +} +const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& +SSL_Referee_TeamInfo::yellow_card_times() const { + // @@protoc_insertion_point(field_list:SSL_Referee.TeamInfo.yellow_card_times) + return yellow_card_times_; +} +::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* +SSL_Referee_TeamInfo::mutable_yellow_card_times() { + // @@protoc_insertion_point(field_mutable_list:SSL_Referee.TeamInfo.yellow_card_times) + return &yellow_card_times_; +} -// ------------------------------------------------------------------- +// required uint32 yellow_cards = 5; +bool SSL_Referee_TeamInfo::has_yellow_cards() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +void SSL_Referee_TeamInfo::set_has_yellow_cards() { + _has_bits_[0] |= 0x00000008u; +} +void SSL_Referee_TeamInfo::clear_has_yellow_cards() { + _has_bits_[0] &= ~0x00000008u; +} +void SSL_Referee_TeamInfo::clear_yellow_cards() { + yellow_cards_ = 0u; + clear_has_yellow_cards(); +} +::google::protobuf::uint32 SSL_Referee_TeamInfo::yellow_cards() const { + // @@protoc_insertion_point(field_get:SSL_Referee.TeamInfo.yellow_cards) + return yellow_cards_; +} +void SSL_Referee_TeamInfo::set_yellow_cards(::google::protobuf::uint32 value) { + set_has_yellow_cards(); + yellow_cards_ = value; + // @@protoc_insertion_point(field_set:SSL_Referee.TeamInfo.yellow_cards) +} + +// required uint32 timeouts = 6; +bool SSL_Referee_TeamInfo::has_timeouts() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +void SSL_Referee_TeamInfo::set_has_timeouts() { + _has_bits_[0] |= 0x00000010u; +} +void SSL_Referee_TeamInfo::clear_has_timeouts() { + _has_bits_[0] &= ~0x00000010u; +} +void SSL_Referee_TeamInfo::clear_timeouts() { + timeouts_ = 0u; + clear_has_timeouts(); +} +::google::protobuf::uint32 SSL_Referee_TeamInfo::timeouts() const { + // @@protoc_insertion_point(field_get:SSL_Referee.TeamInfo.timeouts) + return timeouts_; +} +void SSL_Referee_TeamInfo::set_timeouts(::google::protobuf::uint32 value) { + set_has_timeouts(); + timeouts_ = value; + // @@protoc_insertion_point(field_set:SSL_Referee.TeamInfo.timeouts) +} + +// required uint32 timeout_time = 7; +bool SSL_Referee_TeamInfo::has_timeout_time() const { + return (_has_bits_[0] & 0x00000020u) != 0; +} +void SSL_Referee_TeamInfo::set_has_timeout_time() { + _has_bits_[0] |= 0x00000020u; +} +void SSL_Referee_TeamInfo::clear_has_timeout_time() { + _has_bits_[0] &= ~0x00000020u; +} +void SSL_Referee_TeamInfo::clear_timeout_time() { + timeout_time_ = 0u; + clear_has_timeout_time(); +} +::google::protobuf::uint32 SSL_Referee_TeamInfo::timeout_time() const { + // @@protoc_insertion_point(field_get:SSL_Referee.TeamInfo.timeout_time) + return timeout_time_; +} +void SSL_Referee_TeamInfo::set_timeout_time(::google::protobuf::uint32 value) { + set_has_timeout_time(); + timeout_time_ = value; + // @@protoc_insertion_point(field_set:SSL_Referee.TeamInfo.timeout_time) +} -#ifndef _MSC_VER +// required uint32 goalie = 8; +bool SSL_Referee_TeamInfo::has_goalie() const { + return (_has_bits_[0] & 0x00000040u) != 0; +} +void SSL_Referee_TeamInfo::set_has_goalie() { + _has_bits_[0] |= 0x00000040u; +} +void SSL_Referee_TeamInfo::clear_has_goalie() { + _has_bits_[0] &= ~0x00000040u; +} +void SSL_Referee_TeamInfo::clear_goalie() { + goalie_ = 0u; + clear_has_goalie(); +} +::google::protobuf::uint32 SSL_Referee_TeamInfo::goalie() const { + // @@protoc_insertion_point(field_get:SSL_Referee.TeamInfo.goalie) + return goalie_; +} +void SSL_Referee_TeamInfo::set_goalie(::google::protobuf::uint32 value) { + set_has_goalie(); + goalie_ = value; + // @@protoc_insertion_point(field_set:SSL_Referee.TeamInfo.goalie) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int SSL_Referee::kPacketTimestampFieldNumber; const int SSL_Referee::kStageFieldNumber; const int SSL_Referee::kStageTimeLeftFieldNumber; @@ -798,44 +1107,54 @@ const int SSL_Referee::kCommandCounterFieldNumber; const int SSL_Referee::kCommandTimestampFieldNumber; const int SSL_Referee::kYellowFieldNumber; const int SSL_Referee::kBlueFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 SSL_Referee::SSL_Referee() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_referee_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:SSL_Referee) } - -void SSL_Referee::InitAsDefaultInstance() { - yellow_ = const_cast< ::SSL_Referee_TeamInfo*>(&::SSL_Referee_TeamInfo::default_instance()); - blue_ = const_cast< ::SSL_Referee_TeamInfo*>(&::SSL_Referee_TeamInfo::default_instance()); -} - SSL_Referee::SSL_Referee(const SSL_Referee& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from.has_yellow()) { + yellow_ = new ::SSL_Referee_TeamInfo(*from.yellow_); + } else { + yellow_ = NULL; + } + if (from.has_blue()) { + blue_ = new ::SSL_Referee_TeamInfo(*from.blue_); + } else { + blue_ = NULL; + } + ::memcpy(&packet_timestamp_, &from.packet_timestamp_, + reinterpret_cast(&command_timestamp_) - + reinterpret_cast(&packet_timestamp_) + sizeof(command_timestamp_)); + // @@protoc_insertion_point(copy_constructor:SSL_Referee) } void SSL_Referee::SharedCtor() { _cached_size_ = 0; - packet_timestamp_ = GOOGLE_ULONGLONG(0); - stage_ = 0; - stage_time_left_ = 0; - command_ = 0; - command_counter_ = 0u; - command_timestamp_ = GOOGLE_ULONGLONG(0); - yellow_ = NULL; - blue_ = NULL; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); + ::memset(&yellow_, 0, reinterpret_cast(&command_timestamp_) - + reinterpret_cast(&yellow_) + sizeof(command_timestamp_)); } SSL_Referee::~SSL_Referee() { + // @@protoc_insertion_point(destructor:SSL_Referee) SharedDtor(); } void SSL_Referee::SharedDtor() { - if (this != default_instance_) { + if (this != internal_default_instance()) { delete yellow_; + } + if (this != internal_default_instance()) { delete blue_; } } @@ -847,65 +1166,68 @@ void SSL_Referee::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* SSL_Referee::descriptor() { protobuf_AssignDescriptorsOnce(); - return SSL_Referee_descriptor_; + return file_level_metadata[1].descriptor; } const SSL_Referee& SSL_Referee::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_referee_2eproto(); - return *default_instance_; + protobuf_InitDefaults_referee_2eproto(); + return *internal_default_instance(); } -SSL_Referee* SSL_Referee::default_instance_ = NULL; - -SSL_Referee* SSL_Referee::New() const { - return new SSL_Referee; +SSL_Referee* SSL_Referee::New(::google::protobuf::Arena* arena) const { + SSL_Referee* n = new SSL_Referee; + if (arena != NULL) { + arena->Own(n); + } + return n; } void SSL_Referee::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - packet_timestamp_ = GOOGLE_ULONGLONG(0); - stage_ = 0; - stage_time_left_ = 0; - command_ = 0; - command_counter_ = 0u; - command_timestamp_ = GOOGLE_ULONGLONG(0); +// @@protoc_insertion_point(message_clear_start:SSL_Referee) + if (_has_bits_[0 / 32] & 3u) { if (has_yellow()) { - if (yellow_ != NULL) yellow_->::SSL_Referee_TeamInfo::Clear(); + GOOGLE_DCHECK(yellow_ != NULL); + yellow_->::SSL_Referee_TeamInfo::Clear(); } if (has_blue()) { - if (blue_ != NULL) blue_->::SSL_Referee_TeamInfo::Clear(); + GOOGLE_DCHECK(blue_ != NULL); + blue_->::SSL_Referee_TeamInfo::Clear(); } } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + if (_has_bits_[0 / 32] & 252u) { + ::memset(&packet_timestamp_, 0, reinterpret_cast(&command_timestamp_) - + reinterpret_cast(&packet_timestamp_) + sizeof(command_timestamp_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool SSL_Referee::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:SSL_Referee) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required uint64 packet_timestamp = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + if (tag == 8u) { + set_has_packet_timestamp(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( input, &packet_timestamp_))); - set_has_packet_timestamp(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(16)) goto parse_stage; break; } // required .SSL_Referee.Stage stage = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_stage: + if (tag == 16u) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -916,33 +1238,27 @@ bool SSL_Referee::MergePartialFromCodedStream( mutable_unknown_fields()->AddVarint(2, value); } } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(24)) goto parse_stage_time_left; break; } // optional sint32 stage_time_left = 3; case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_stage_time_left: + if (tag == 24u) { + set_has_stage_time_left(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>( input, &stage_time_left_))); - set_has_stage_time_left(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(32)) goto parse_command; break; } // required .SSL_Referee.Command command = 4; case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_command: + if (tag == 32u) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -953,77 +1269,65 @@ bool SSL_Referee::MergePartialFromCodedStream( mutable_unknown_fields()->AddVarint(4, value); } } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(40)) goto parse_command_counter; break; } // required uint32 command_counter = 5; case 5: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_command_counter: + if (tag == 40u) { + set_has_command_counter(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( input, &command_counter_))); - set_has_command_counter(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(48)) goto parse_command_timestamp; break; } // required uint64 command_timestamp = 6; case 6: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_command_timestamp: + if (tag == 48u) { + set_has_command_timestamp(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( input, &command_timestamp_))); - set_has_command_timestamp(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(58)) goto parse_yellow; break; } // required .SSL_Referee.TeamInfo yellow = 7; case 7: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_yellow: + if (tag == 58u) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_yellow())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(66)) goto parse_blue; break; } // required .SSL_Referee.TeamInfo blue = 8; case 8: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_blue: + if (tag == 66u) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_blue())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectAtEnd()) return true; break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -1031,12 +1335,18 @@ bool SSL_Referee::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:SSL_Referee) return true; +failure: + // @@protoc_insertion_point(parse_failure:SSL_Referee) + return false; #undef DO_ } void SSL_Referee::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:SSL_Referee) // required uint64 packet_timestamp = 1; if (has_packet_timestamp()) { ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->packet_timestamp(), output); @@ -1072,23 +1382,26 @@ void SSL_Referee::SerializeWithCachedSizes( // required .SSL_Referee.TeamInfo yellow = 7; if (has_yellow()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 7, this->yellow(), output); + 7, *this->yellow_, output); } // required .SSL_Referee.TeamInfo blue = 8; if (has_blue()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 8, this->blue(), output); + 8, *this->blue_, output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:SSL_Referee) } -::google::protobuf::uint8* SSL_Referee::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* SSL_Referee::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:SSL_Referee) // required uint64 packet_timestamp = 1; if (has_packet_timestamp()) { target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->packet_timestamp(), target); @@ -1124,109 +1437,164 @@ ::google::protobuf::uint8* SSL_Referee::SerializeWithCachedSizesToArray( // required .SSL_Referee.TeamInfo yellow = 7; if (has_yellow()) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 7, this->yellow(), target); + InternalWriteMessageNoVirtualToArray( + 7, *this->yellow_, false, target); } // required .SSL_Referee.TeamInfo blue = 8; if (has_blue()) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 8, this->blue(), target); + InternalWriteMessageNoVirtualToArray( + 8, *this->blue_, false, target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:SSL_Referee) return target; } -int SSL_Referee::ByteSize() const { - int total_size = 0; +size_t SSL_Referee::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:SSL_Referee) + size_t total_size = 0; + + if (has_yellow()) { + // required .SSL_Referee.TeamInfo yellow = 7; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->yellow_); + } + + if (has_blue()) { + // required .SSL_Referee.TeamInfo blue = 8; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->blue_); + } - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_packet_timestamp()) { // required uint64 packet_timestamp = 1; - if (has_packet_timestamp()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::UInt64Size( - this->packet_timestamp()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt64Size( + this->packet_timestamp()); + } + if (has_stage()) { // required .SSL_Referee.Stage stage = 2; - if (has_stage()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->stage()); - } - - // optional sint32 stage_time_left = 3; - if (has_stage_time_left()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::SInt32Size( - this->stage_time_left()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->stage()); + } + if (has_command()) { // required .SSL_Referee.Command command = 4; - if (has_command()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->command()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->command()); + } + if (has_command_counter()) { // required uint32 command_counter = 5; - if (has_command_counter()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::UInt32Size( - this->command_counter()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->command_counter()); + } + if (has_command_timestamp()) { // required uint64 command_timestamp = 6; - if (has_command_timestamp()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::UInt64Size( - this->command_timestamp()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt64Size( + this->command_timestamp()); + } + + return total_size; +} +size_t SSL_Referee::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:SSL_Referee) + size_t total_size = 0; + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + if (((_has_bits_[0] & 0x000000ef) ^ 0x000000ef) == 0) { // All required fields are present. // required .SSL_Referee.TeamInfo yellow = 7; - if (has_yellow()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->yellow()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->yellow_); // required .SSL_Referee.TeamInfo blue = 8; - if (has_blue()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->blue()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->blue_); + // required uint64 packet_timestamp = 1; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt64Size( + this->packet_timestamp()); + + // required .SSL_Referee.Stage stage = 2; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->stage()); + + // required .SSL_Referee.Command command = 4; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->command()); + + // required uint32 command_counter = 5; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->command_counter()); + + // required uint64 command_timestamp = 6; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt64Size( + this->command_timestamp()); + + } else { + total_size += RequiredFieldsByteSizeFallback(); } - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + // optional sint32 stage_time_left = 3; + if (has_stage_time_left()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::SInt32Size( + this->stage_time_left()); } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void SSL_Referee::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:SSL_Referee) + GOOGLE_DCHECK_NE(&from, this); const SSL_Referee* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:SSL_Referee) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:SSL_Referee) MergeFrom(*source); } } void SSL_Referee::MergeFrom(const SSL_Referee& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { +// @@protoc_insertion_point(class_specific_merge_from_start:SSL_Referee) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._has_bits_[0 / 32] & 255u) { + if (from.has_yellow()) { + mutable_yellow()->::SSL_Referee_TeamInfo::MergeFrom(from.yellow()); + } + if (from.has_blue()) { + mutable_blue()->::SSL_Referee_TeamInfo::MergeFrom(from.blue()); + } if (from.has_packet_timestamp()) { set_packet_timestamp(from.packet_timestamp()); } @@ -1245,64 +1613,297 @@ void SSL_Referee::MergeFrom(const SSL_Referee& from) { if (from.has_command_timestamp()) { set_command_timestamp(from.command_timestamp()); } - if (from.has_yellow()) { - mutable_yellow()->::SSL_Referee_TeamInfo::MergeFrom(from.yellow()); - } - if (from.has_blue()) { - mutable_blue()->::SSL_Referee_TeamInfo::MergeFrom(from.blue()); - } } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void SSL_Referee::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:SSL_Referee) if (&from == this) return; Clear(); MergeFrom(from); } void SSL_Referee::CopyFrom(const SSL_Referee& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:SSL_Referee) if (&from == this) return; Clear(); MergeFrom(from); } bool SSL_Referee::IsInitialized() const { - if ((_has_bits_[0] & 0x000000fb) != 0x000000fb) return false; - + if ((_has_bits_[0] & 0x000000ef) != 0x000000ef) return false; if (has_yellow()) { - if (!this->yellow().IsInitialized()) return false; + if (!this->yellow_->IsInitialized()) return false; } if (has_blue()) { - if (!this->blue().IsInitialized()) return false; + if (!this->blue_->IsInitialized()) return false; } return true; } void SSL_Referee::Swap(SSL_Referee* other) { - if (other != this) { - std::swap(packet_timestamp_, other->packet_timestamp_); - std::swap(stage_, other->stage_); - std::swap(stage_time_left_, other->stage_time_left_); - std::swap(command_, other->command_); - std::swap(command_counter_, other->command_counter_); - std::swap(command_timestamp_, other->command_timestamp_); - std::swap(yellow_, other->yellow_); - std::swap(blue_, other->blue_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void SSL_Referee::InternalSwap(SSL_Referee* other) { + std::swap(yellow_, other->yellow_); + std::swap(blue_, other->blue_); + std::swap(packet_timestamp_, other->packet_timestamp_); + std::swap(stage_, other->stage_); + std::swap(stage_time_left_, other->stage_time_left_); + std::swap(command_, other->command_); + std::swap(command_counter_, other->command_counter_); + std::swap(command_timestamp_, other->command_timestamp_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata SSL_Referee::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = SSL_Referee_descriptor_; - metadata.reflection = SSL_Referee_reflection_; - return metadata; + return file_level_metadata[1]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// SSL_Referee + +// required uint64 packet_timestamp = 1; +bool SSL_Referee::has_packet_timestamp() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +void SSL_Referee::set_has_packet_timestamp() { + _has_bits_[0] |= 0x00000004u; +} +void SSL_Referee::clear_has_packet_timestamp() { + _has_bits_[0] &= ~0x00000004u; +} +void SSL_Referee::clear_packet_timestamp() { + packet_timestamp_ = GOOGLE_ULONGLONG(0); + clear_has_packet_timestamp(); +} +::google::protobuf::uint64 SSL_Referee::packet_timestamp() const { + // @@protoc_insertion_point(field_get:SSL_Referee.packet_timestamp) + return packet_timestamp_; +} +void SSL_Referee::set_packet_timestamp(::google::protobuf::uint64 value) { + set_has_packet_timestamp(); + packet_timestamp_ = value; + // @@protoc_insertion_point(field_set:SSL_Referee.packet_timestamp) +} + +// required .SSL_Referee.Stage stage = 2; +bool SSL_Referee::has_stage() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +void SSL_Referee::set_has_stage() { + _has_bits_[0] |= 0x00000008u; +} +void SSL_Referee::clear_has_stage() { + _has_bits_[0] &= ~0x00000008u; +} +void SSL_Referee::clear_stage() { + stage_ = 0; + clear_has_stage(); +} +::SSL_Referee_Stage SSL_Referee::stage() const { + // @@protoc_insertion_point(field_get:SSL_Referee.stage) + return static_cast< ::SSL_Referee_Stage >(stage_); +} +void SSL_Referee::set_stage(::SSL_Referee_Stage value) { + assert(::SSL_Referee_Stage_IsValid(value)); + set_has_stage(); + stage_ = value; + // @@protoc_insertion_point(field_set:SSL_Referee.stage) +} + +// optional sint32 stage_time_left = 3; +bool SSL_Referee::has_stage_time_left() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +void SSL_Referee::set_has_stage_time_left() { + _has_bits_[0] |= 0x00000010u; +} +void SSL_Referee::clear_has_stage_time_left() { + _has_bits_[0] &= ~0x00000010u; +} +void SSL_Referee::clear_stage_time_left() { + stage_time_left_ = 0; + clear_has_stage_time_left(); +} +::google::protobuf::int32 SSL_Referee::stage_time_left() const { + // @@protoc_insertion_point(field_get:SSL_Referee.stage_time_left) + return stage_time_left_; +} +void SSL_Referee::set_stage_time_left(::google::protobuf::int32 value) { + set_has_stage_time_left(); + stage_time_left_ = value; + // @@protoc_insertion_point(field_set:SSL_Referee.stage_time_left) +} + +// required .SSL_Referee.Command command = 4; +bool SSL_Referee::has_command() const { + return (_has_bits_[0] & 0x00000020u) != 0; +} +void SSL_Referee::set_has_command() { + _has_bits_[0] |= 0x00000020u; +} +void SSL_Referee::clear_has_command() { + _has_bits_[0] &= ~0x00000020u; +} +void SSL_Referee::clear_command() { + command_ = 0; + clear_has_command(); +} +::SSL_Referee_Command SSL_Referee::command() const { + // @@protoc_insertion_point(field_get:SSL_Referee.command) + return static_cast< ::SSL_Referee_Command >(command_); +} +void SSL_Referee::set_command(::SSL_Referee_Command value) { + assert(::SSL_Referee_Command_IsValid(value)); + set_has_command(); + command_ = value; + // @@protoc_insertion_point(field_set:SSL_Referee.command) +} + +// required uint32 command_counter = 5; +bool SSL_Referee::has_command_counter() const { + return (_has_bits_[0] & 0x00000040u) != 0; +} +void SSL_Referee::set_has_command_counter() { + _has_bits_[0] |= 0x00000040u; +} +void SSL_Referee::clear_has_command_counter() { + _has_bits_[0] &= ~0x00000040u; +} +void SSL_Referee::clear_command_counter() { + command_counter_ = 0u; + clear_has_command_counter(); +} +::google::protobuf::uint32 SSL_Referee::command_counter() const { + // @@protoc_insertion_point(field_get:SSL_Referee.command_counter) + return command_counter_; +} +void SSL_Referee::set_command_counter(::google::protobuf::uint32 value) { + set_has_command_counter(); + command_counter_ = value; + // @@protoc_insertion_point(field_set:SSL_Referee.command_counter) +} + +// required uint64 command_timestamp = 6; +bool SSL_Referee::has_command_timestamp() const { + return (_has_bits_[0] & 0x00000080u) != 0; +} +void SSL_Referee::set_has_command_timestamp() { + _has_bits_[0] |= 0x00000080u; +} +void SSL_Referee::clear_has_command_timestamp() { + _has_bits_[0] &= ~0x00000080u; +} +void SSL_Referee::clear_command_timestamp() { + command_timestamp_ = GOOGLE_ULONGLONG(0); + clear_has_command_timestamp(); +} +::google::protobuf::uint64 SSL_Referee::command_timestamp() const { + // @@protoc_insertion_point(field_get:SSL_Referee.command_timestamp) + return command_timestamp_; +} +void SSL_Referee::set_command_timestamp(::google::protobuf::uint64 value) { + set_has_command_timestamp(); + command_timestamp_ = value; + // @@protoc_insertion_point(field_set:SSL_Referee.command_timestamp) +} + +// required .SSL_Referee.TeamInfo yellow = 7; +bool SSL_Referee::has_yellow() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void SSL_Referee::set_has_yellow() { + _has_bits_[0] |= 0x00000001u; +} +void SSL_Referee::clear_has_yellow() { + _has_bits_[0] &= ~0x00000001u; +} +void SSL_Referee::clear_yellow() { + if (yellow_ != NULL) yellow_->::SSL_Referee_TeamInfo::Clear(); + clear_has_yellow(); +} +const ::SSL_Referee_TeamInfo& SSL_Referee::yellow() const { + // @@protoc_insertion_point(field_get:SSL_Referee.yellow) + return yellow_ != NULL ? *yellow_ + : *::SSL_Referee_TeamInfo::internal_default_instance(); +} +::SSL_Referee_TeamInfo* SSL_Referee::mutable_yellow() { + set_has_yellow(); + if (yellow_ == NULL) { + yellow_ = new ::SSL_Referee_TeamInfo; + } + // @@protoc_insertion_point(field_mutable:SSL_Referee.yellow) + return yellow_; +} +::SSL_Referee_TeamInfo* SSL_Referee::release_yellow() { + // @@protoc_insertion_point(field_release:SSL_Referee.yellow) + clear_has_yellow(); + ::SSL_Referee_TeamInfo* temp = yellow_; + yellow_ = NULL; + return temp; +} +void SSL_Referee::set_allocated_yellow(::SSL_Referee_TeamInfo* yellow) { + delete yellow_; + yellow_ = yellow; + if (yellow) { + set_has_yellow(); + } else { + clear_has_yellow(); + } + // @@protoc_insertion_point(field_set_allocated:SSL_Referee.yellow) +} + +// required .SSL_Referee.TeamInfo blue = 8; +bool SSL_Referee::has_blue() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +void SSL_Referee::set_has_blue() { + _has_bits_[0] |= 0x00000002u; +} +void SSL_Referee::clear_has_blue() { + _has_bits_[0] &= ~0x00000002u; +} +void SSL_Referee::clear_blue() { + if (blue_ != NULL) blue_->::SSL_Referee_TeamInfo::Clear(); + clear_has_blue(); +} +const ::SSL_Referee_TeamInfo& SSL_Referee::blue() const { + // @@protoc_insertion_point(field_get:SSL_Referee.blue) + return blue_ != NULL ? *blue_ + : *::SSL_Referee_TeamInfo::internal_default_instance(); +} +::SSL_Referee_TeamInfo* SSL_Referee::mutable_blue() { + set_has_blue(); + if (blue_ == NULL) { + blue_ = new ::SSL_Referee_TeamInfo; + } + // @@protoc_insertion_point(field_mutable:SSL_Referee.blue) + return blue_; +} +::SSL_Referee_TeamInfo* SSL_Referee::release_blue() { + // @@protoc_insertion_point(field_release:SSL_Referee.blue) + clear_has_blue(); + ::SSL_Referee_TeamInfo* temp = blue_; + blue_ = NULL; + return temp; +} +void SSL_Referee::set_allocated_blue(::SSL_Referee_TeamInfo* blue) { + delete blue_; + blue_ = blue; + if (blue) { + set_has_blue(); + } else { + clear_has_blue(); + } + // @@protoc_insertion_point(field_set_allocated:SSL_Referee.blue) } +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) diff --git a/src/proto/referee.pb.h b/src/proto/referee.pb.h index ce61106..de7165b 100644 --- a/src/proto/referee.pb.h +++ b/src/proto/referee.pb.h @@ -8,32 +8,37 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 2005000 +#if GOOGLE_PROTOBUF_VERSION < 3001000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. #endif +#include +#include #include +#include #include -#include -#include +#include // IWYU pragma: export +#include // IWYU pragma: export #include #include // @@protoc_insertion_point(includes) - -// Internal implementation detail -- do not call these. -void protobuf_AddDesc_referee_2eproto(); -void protobuf_AssignDesc_referee_2eproto(); -void protobuf_ShutdownFile_referee_2eproto(); - class SSL_Referee; +class SSL_RefereeDefaultTypeInternal; +extern SSL_RefereeDefaultTypeInternal _SSL_Referee_default_instance_; class SSL_Referee_TeamInfo; +class SSL_Referee_TeamInfoDefaultTypeInternal; +extern SSL_Referee_TeamInfoDefaultTypeInternal _SSL_Referee_TeamInfo_default_instance_; + +// Internal implementation detail -- do not call these. +void protobuf_AddDesc_referee_2eproto(); +void protobuf_InitDefaults_referee_2eproto(); enum SSL_Referee_Stage { SSL_Referee_Stage_NORMAL_FIRST_HALF_PRE = 0, @@ -101,7 +106,7 @@ inline bool SSL_Referee_Command_Parse( } // =================================================================== -class SSL_Referee_TeamInfo : public ::google::protobuf::Message { +class SSL_Referee_TeamInfo : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:SSL_Referee.TeamInfo) */ { public: SSL_Referee_TeamInfo(); virtual ~SSL_Referee_TeamInfo(); @@ -114,155 +119,177 @@ class SSL_Referee_TeamInfo : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const SSL_Referee_TeamInfo& default_instance(); + static inline const SSL_Referee_TeamInfo* internal_default_instance() { + return reinterpret_cast( + &_SSL_Referee_TeamInfo_default_instance_); + } + void Swap(SSL_Referee_TeamInfo* other); // implements Message ---------------------------------------------- - SSL_Referee_TeamInfo* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline SSL_Referee_TeamInfo* New() const PROTOBUF_FINAL { return New(NULL); } + + SSL_Referee_TeamInfo* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const SSL_Referee_TeamInfo& from); void MergeFrom(const SSL_Referee_TeamInfo& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(SSL_Referee_TeamInfo* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // required string name = 1; - inline bool has_name() const; - inline void clear_name(); + bool has_name() const; + void clear_name(); static const int kNameFieldNumber = 1; - inline const ::std::string& name() const; - inline void set_name(const ::std::string& value); - inline void set_name(const char* value); - inline void set_name(const char* value, size_t size); - inline ::std::string* mutable_name(); - inline ::std::string* release_name(); - inline void set_allocated_name(::std::string* name); + const ::std::string& name() const; + void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif + void set_name(const char* value); + void set_name(const char* value, size_t size); + ::std::string* mutable_name(); + ::std::string* release_name(); + void set_allocated_name(::std::string* name); // required uint32 score = 2; - inline bool has_score() const; - inline void clear_score(); + bool has_score() const; + void clear_score(); static const int kScoreFieldNumber = 2; - inline ::google::protobuf::uint32 score() const; - inline void set_score(::google::protobuf::uint32 value); + ::google::protobuf::uint32 score() const; + void set_score(::google::protobuf::uint32 value); // required uint32 red_cards = 3; - inline bool has_red_cards() const; - inline void clear_red_cards(); + bool has_red_cards() const; + void clear_red_cards(); static const int kRedCardsFieldNumber = 3; - inline ::google::protobuf::uint32 red_cards() const; - inline void set_red_cards(::google::protobuf::uint32 value); + ::google::protobuf::uint32 red_cards() const; + void set_red_cards(::google::protobuf::uint32 value); // repeated uint32 yellow_card_times = 4 [packed = true]; - inline int yellow_card_times_size() const; - inline void clear_yellow_card_times(); + int yellow_card_times_size() const; + void clear_yellow_card_times(); static const int kYellowCardTimesFieldNumber = 4; - inline ::google::protobuf::uint32 yellow_card_times(int index) const; - inline void set_yellow_card_times(int index, ::google::protobuf::uint32 value); - inline void add_yellow_card_times(::google::protobuf::uint32 value); - inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& + ::google::protobuf::uint32 yellow_card_times(int index) const; + void set_yellow_card_times(int index, ::google::protobuf::uint32 value); + void add_yellow_card_times(::google::protobuf::uint32 value); + const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& yellow_card_times() const; - inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* + ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* mutable_yellow_card_times(); // required uint32 yellow_cards = 5; - inline bool has_yellow_cards() const; - inline void clear_yellow_cards(); + bool has_yellow_cards() const; + void clear_yellow_cards(); static const int kYellowCardsFieldNumber = 5; - inline ::google::protobuf::uint32 yellow_cards() const; - inline void set_yellow_cards(::google::protobuf::uint32 value); + ::google::protobuf::uint32 yellow_cards() const; + void set_yellow_cards(::google::protobuf::uint32 value); // required uint32 timeouts = 6; - inline bool has_timeouts() const; - inline void clear_timeouts(); + bool has_timeouts() const; + void clear_timeouts(); static const int kTimeoutsFieldNumber = 6; - inline ::google::protobuf::uint32 timeouts() const; - inline void set_timeouts(::google::protobuf::uint32 value); + ::google::protobuf::uint32 timeouts() const; + void set_timeouts(::google::protobuf::uint32 value); // required uint32 timeout_time = 7; - inline bool has_timeout_time() const; - inline void clear_timeout_time(); + bool has_timeout_time() const; + void clear_timeout_time(); static const int kTimeoutTimeFieldNumber = 7; - inline ::google::protobuf::uint32 timeout_time() const; - inline void set_timeout_time(::google::protobuf::uint32 value); + ::google::protobuf::uint32 timeout_time() const; + void set_timeout_time(::google::protobuf::uint32 value); // required uint32 goalie = 8; - inline bool has_goalie() const; - inline void clear_goalie(); + bool has_goalie() const; + void clear_goalie(); static const int kGoalieFieldNumber = 8; - inline ::google::protobuf::uint32 goalie() const; - inline void set_goalie(::google::protobuf::uint32 value); + ::google::protobuf::uint32 goalie() const; + void set_goalie(::google::protobuf::uint32 value); // @@protoc_insertion_point(class_scope:SSL_Referee.TeamInfo) private: - inline void set_has_name(); - inline void clear_has_name(); - inline void set_has_score(); - inline void clear_has_score(); - inline void set_has_red_cards(); - inline void clear_has_red_cards(); - inline void set_has_yellow_cards(); - inline void clear_has_yellow_cards(); - inline void set_has_timeouts(); - inline void clear_has_timeouts(); - inline void set_has_timeout_time(); - inline void clear_has_timeout_time(); - inline void set_has_goalie(); - inline void clear_has_goalie(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::std::string* name_; - ::google::protobuf::uint32 score_; - ::google::protobuf::uint32 red_cards_; + void set_has_name(); + void clear_has_name(); + void set_has_score(); + void clear_has_score(); + void set_has_red_cards(); + void clear_has_red_cards(); + void set_has_yellow_cards(); + void clear_has_yellow_cards(); + void set_has_timeouts(); + void clear_has_timeouts(); + void set_has_timeout_time(); + void clear_has_timeout_time(); + void set_has_goalie(); + void clear_has_goalie(); + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > yellow_card_times_; mutable int _yellow_card_times_cached_byte_size_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::uint32 score_; + ::google::protobuf::uint32 red_cards_; ::google::protobuf::uint32 yellow_cards_; ::google::protobuf::uint32 timeouts_; ::google::protobuf::uint32 timeout_time_; ::google::protobuf::uint32 goalie_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(8 + 31) / 32]; - - friend void protobuf_AddDesc_referee_2eproto(); - friend void protobuf_AssignDesc_referee_2eproto(); + friend void protobuf_InitDefaults_referee_2eproto_impl(); + friend void protobuf_AddDesc_referee_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_referee_2eproto(); friend void protobuf_ShutdownFile_referee_2eproto(); - void InitAsDefaultInstance(); - static SSL_Referee_TeamInfo* default_instance_; }; // ------------------------------------------------------------------- -class SSL_Referee : public ::google::protobuf::Message { +class SSL_Referee : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:SSL_Referee) */ { public: SSL_Referee(); virtual ~SSL_Referee(); @@ -275,62 +302,96 @@ class SSL_Referee : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const SSL_Referee& default_instance(); + static inline const SSL_Referee* internal_default_instance() { + return reinterpret_cast( + &_SSL_Referee_default_instance_); + } + void Swap(SSL_Referee* other); // implements Message ---------------------------------------------- - SSL_Referee* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline SSL_Referee* New() const PROTOBUF_FINAL { return New(NULL); } + + SSL_Referee* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const SSL_Referee& from); void MergeFrom(const SSL_Referee& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(SSL_Referee* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- typedef SSL_Referee_TeamInfo TeamInfo; typedef SSL_Referee_Stage Stage; - static const Stage NORMAL_FIRST_HALF_PRE = SSL_Referee_Stage_NORMAL_FIRST_HALF_PRE; - static const Stage NORMAL_FIRST_HALF = SSL_Referee_Stage_NORMAL_FIRST_HALF; - static const Stage NORMAL_HALF_TIME = SSL_Referee_Stage_NORMAL_HALF_TIME; - static const Stage NORMAL_SECOND_HALF_PRE = SSL_Referee_Stage_NORMAL_SECOND_HALF_PRE; - static const Stage NORMAL_SECOND_HALF = SSL_Referee_Stage_NORMAL_SECOND_HALF; - static const Stage EXTRA_TIME_BREAK = SSL_Referee_Stage_EXTRA_TIME_BREAK; - static const Stage EXTRA_FIRST_HALF_PRE = SSL_Referee_Stage_EXTRA_FIRST_HALF_PRE; - static const Stage EXTRA_FIRST_HALF = SSL_Referee_Stage_EXTRA_FIRST_HALF; - static const Stage EXTRA_HALF_TIME = SSL_Referee_Stage_EXTRA_HALF_TIME; - static const Stage EXTRA_SECOND_HALF_PRE = SSL_Referee_Stage_EXTRA_SECOND_HALF_PRE; - static const Stage EXTRA_SECOND_HALF = SSL_Referee_Stage_EXTRA_SECOND_HALF; - static const Stage PENALTY_SHOOTOUT_BREAK = SSL_Referee_Stage_PENALTY_SHOOTOUT_BREAK; - static const Stage PENALTY_SHOOTOUT = SSL_Referee_Stage_PENALTY_SHOOTOUT; - static const Stage POST_GAME = SSL_Referee_Stage_POST_GAME; + static const Stage NORMAL_FIRST_HALF_PRE = + SSL_Referee_Stage_NORMAL_FIRST_HALF_PRE; + static const Stage NORMAL_FIRST_HALF = + SSL_Referee_Stage_NORMAL_FIRST_HALF; + static const Stage NORMAL_HALF_TIME = + SSL_Referee_Stage_NORMAL_HALF_TIME; + static const Stage NORMAL_SECOND_HALF_PRE = + SSL_Referee_Stage_NORMAL_SECOND_HALF_PRE; + static const Stage NORMAL_SECOND_HALF = + SSL_Referee_Stage_NORMAL_SECOND_HALF; + static const Stage EXTRA_TIME_BREAK = + SSL_Referee_Stage_EXTRA_TIME_BREAK; + static const Stage EXTRA_FIRST_HALF_PRE = + SSL_Referee_Stage_EXTRA_FIRST_HALF_PRE; + static const Stage EXTRA_FIRST_HALF = + SSL_Referee_Stage_EXTRA_FIRST_HALF; + static const Stage EXTRA_HALF_TIME = + SSL_Referee_Stage_EXTRA_HALF_TIME; + static const Stage EXTRA_SECOND_HALF_PRE = + SSL_Referee_Stage_EXTRA_SECOND_HALF_PRE; + static const Stage EXTRA_SECOND_HALF = + SSL_Referee_Stage_EXTRA_SECOND_HALF; + static const Stage PENALTY_SHOOTOUT_BREAK = + SSL_Referee_Stage_PENALTY_SHOOTOUT_BREAK; + static const Stage PENALTY_SHOOTOUT = + SSL_Referee_Stage_PENALTY_SHOOTOUT; + static const Stage POST_GAME = + SSL_Referee_Stage_POST_GAME; static inline bool Stage_IsValid(int value) { return SSL_Referee_Stage_IsValid(value); } @@ -353,22 +414,38 @@ class SSL_Referee : public ::google::protobuf::Message { } typedef SSL_Referee_Command Command; - static const Command HALT = SSL_Referee_Command_HALT; - static const Command STOP = SSL_Referee_Command_STOP; - static const Command NORMAL_START = SSL_Referee_Command_NORMAL_START; - static const Command FORCE_START = SSL_Referee_Command_FORCE_START; - static const Command PREPARE_KICKOFF_YELLOW = SSL_Referee_Command_PREPARE_KICKOFF_YELLOW; - static const Command PREPARE_KICKOFF_BLUE = SSL_Referee_Command_PREPARE_KICKOFF_BLUE; - static const Command PREPARE_PENALTY_YELLOW = SSL_Referee_Command_PREPARE_PENALTY_YELLOW; - static const Command PREPARE_PENALTY_BLUE = SSL_Referee_Command_PREPARE_PENALTY_BLUE; - static const Command DIRECT_FREE_YELLOW = SSL_Referee_Command_DIRECT_FREE_YELLOW; - static const Command DIRECT_FREE_BLUE = SSL_Referee_Command_DIRECT_FREE_BLUE; - static const Command INDIRECT_FREE_YELLOW = SSL_Referee_Command_INDIRECT_FREE_YELLOW; - static const Command INDIRECT_FREE_BLUE = SSL_Referee_Command_INDIRECT_FREE_BLUE; - static const Command TIMEOUT_YELLOW = SSL_Referee_Command_TIMEOUT_YELLOW; - static const Command TIMEOUT_BLUE = SSL_Referee_Command_TIMEOUT_BLUE; - static const Command GOAL_YELLOW = SSL_Referee_Command_GOAL_YELLOW; - static const Command GOAL_BLUE = SSL_Referee_Command_GOAL_BLUE; + static const Command HALT = + SSL_Referee_Command_HALT; + static const Command STOP = + SSL_Referee_Command_STOP; + static const Command NORMAL_START = + SSL_Referee_Command_NORMAL_START; + static const Command FORCE_START = + SSL_Referee_Command_FORCE_START; + static const Command PREPARE_KICKOFF_YELLOW = + SSL_Referee_Command_PREPARE_KICKOFF_YELLOW; + static const Command PREPARE_KICKOFF_BLUE = + SSL_Referee_Command_PREPARE_KICKOFF_BLUE; + static const Command PREPARE_PENALTY_YELLOW = + SSL_Referee_Command_PREPARE_PENALTY_YELLOW; + static const Command PREPARE_PENALTY_BLUE = + SSL_Referee_Command_PREPARE_PENALTY_BLUE; + static const Command DIRECT_FREE_YELLOW = + SSL_Referee_Command_DIRECT_FREE_YELLOW; + static const Command DIRECT_FREE_BLUE = + SSL_Referee_Command_DIRECT_FREE_BLUE; + static const Command INDIRECT_FREE_YELLOW = + SSL_Referee_Command_INDIRECT_FREE_YELLOW; + static const Command INDIRECT_FREE_BLUE = + SSL_Referee_Command_INDIRECT_FREE_BLUE; + static const Command TIMEOUT_YELLOW = + SSL_Referee_Command_TIMEOUT_YELLOW; + static const Command TIMEOUT_BLUE = + SSL_Referee_Command_TIMEOUT_BLUE; + static const Command GOAL_YELLOW = + SSL_Referee_Command_GOAL_YELLOW; + static const Command GOAL_BLUE = + SSL_Referee_Command_GOAL_BLUE; static inline bool Command_IsValid(int value) { return SSL_Referee_Command_IsValid(value); } @@ -393,110 +470,110 @@ class SSL_Referee : public ::google::protobuf::Message { // accessors ------------------------------------------------------- // required uint64 packet_timestamp = 1; - inline bool has_packet_timestamp() const; - inline void clear_packet_timestamp(); + bool has_packet_timestamp() const; + void clear_packet_timestamp(); static const int kPacketTimestampFieldNumber = 1; - inline ::google::protobuf::uint64 packet_timestamp() const; - inline void set_packet_timestamp(::google::protobuf::uint64 value); + ::google::protobuf::uint64 packet_timestamp() const; + void set_packet_timestamp(::google::protobuf::uint64 value); // required .SSL_Referee.Stage stage = 2; - inline bool has_stage() const; - inline void clear_stage(); + bool has_stage() const; + void clear_stage(); static const int kStageFieldNumber = 2; - inline ::SSL_Referee_Stage stage() const; - inline void set_stage(::SSL_Referee_Stage value); + ::SSL_Referee_Stage stage() const; + void set_stage(::SSL_Referee_Stage value); // optional sint32 stage_time_left = 3; - inline bool has_stage_time_left() const; - inline void clear_stage_time_left(); + bool has_stage_time_left() const; + void clear_stage_time_left(); static const int kStageTimeLeftFieldNumber = 3; - inline ::google::protobuf::int32 stage_time_left() const; - inline void set_stage_time_left(::google::protobuf::int32 value); + ::google::protobuf::int32 stage_time_left() const; + void set_stage_time_left(::google::protobuf::int32 value); // required .SSL_Referee.Command command = 4; - inline bool has_command() const; - inline void clear_command(); + bool has_command() const; + void clear_command(); static const int kCommandFieldNumber = 4; - inline ::SSL_Referee_Command command() const; - inline void set_command(::SSL_Referee_Command value); + ::SSL_Referee_Command command() const; + void set_command(::SSL_Referee_Command value); // required uint32 command_counter = 5; - inline bool has_command_counter() const; - inline void clear_command_counter(); + bool has_command_counter() const; + void clear_command_counter(); static const int kCommandCounterFieldNumber = 5; - inline ::google::protobuf::uint32 command_counter() const; - inline void set_command_counter(::google::protobuf::uint32 value); + ::google::protobuf::uint32 command_counter() const; + void set_command_counter(::google::protobuf::uint32 value); // required uint64 command_timestamp = 6; - inline bool has_command_timestamp() const; - inline void clear_command_timestamp(); + bool has_command_timestamp() const; + void clear_command_timestamp(); static const int kCommandTimestampFieldNumber = 6; - inline ::google::protobuf::uint64 command_timestamp() const; - inline void set_command_timestamp(::google::protobuf::uint64 value); + ::google::protobuf::uint64 command_timestamp() const; + void set_command_timestamp(::google::protobuf::uint64 value); // required .SSL_Referee.TeamInfo yellow = 7; - inline bool has_yellow() const; - inline void clear_yellow(); + bool has_yellow() const; + void clear_yellow(); static const int kYellowFieldNumber = 7; - inline const ::SSL_Referee_TeamInfo& yellow() const; - inline ::SSL_Referee_TeamInfo* mutable_yellow(); - inline ::SSL_Referee_TeamInfo* release_yellow(); - inline void set_allocated_yellow(::SSL_Referee_TeamInfo* yellow); + const ::SSL_Referee_TeamInfo& yellow() const; + ::SSL_Referee_TeamInfo* mutable_yellow(); + ::SSL_Referee_TeamInfo* release_yellow(); + void set_allocated_yellow(::SSL_Referee_TeamInfo* yellow); // required .SSL_Referee.TeamInfo blue = 8; - inline bool has_blue() const; - inline void clear_blue(); + bool has_blue() const; + void clear_blue(); static const int kBlueFieldNumber = 8; - inline const ::SSL_Referee_TeamInfo& blue() const; - inline ::SSL_Referee_TeamInfo* mutable_blue(); - inline ::SSL_Referee_TeamInfo* release_blue(); - inline void set_allocated_blue(::SSL_Referee_TeamInfo* blue); + const ::SSL_Referee_TeamInfo& blue() const; + ::SSL_Referee_TeamInfo* mutable_blue(); + ::SSL_Referee_TeamInfo* release_blue(); + void set_allocated_blue(::SSL_Referee_TeamInfo* blue); // @@protoc_insertion_point(class_scope:SSL_Referee) private: - inline void set_has_packet_timestamp(); - inline void clear_has_packet_timestamp(); - inline void set_has_stage(); - inline void clear_has_stage(); - inline void set_has_stage_time_left(); - inline void clear_has_stage_time_left(); - inline void set_has_command(); - inline void clear_has_command(); - inline void set_has_command_counter(); - inline void clear_has_command_counter(); - inline void set_has_command_timestamp(); - inline void clear_has_command_timestamp(); - inline void set_has_yellow(); - inline void clear_has_yellow(); - inline void set_has_blue(); - inline void clear_has_blue(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + void set_has_packet_timestamp(); + void clear_has_packet_timestamp(); + void set_has_stage(); + void clear_has_stage(); + void set_has_stage_time_left(); + void clear_has_stage_time_left(); + void set_has_command(); + void clear_has_command(); + void set_has_command_counter(); + void clear_has_command_counter(); + void set_has_command_timestamp(); + void clear_has_command_timestamp(); + void set_has_yellow(); + void clear_has_yellow(); + void set_has_blue(); + void clear_has_blue(); + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; + ::SSL_Referee_TeamInfo* yellow_; + ::SSL_Referee_TeamInfo* blue_; ::google::protobuf::uint64 packet_timestamp_; int stage_; ::google::protobuf::int32 stage_time_left_; int command_; ::google::protobuf::uint32 command_counter_; ::google::protobuf::uint64 command_timestamp_; - ::SSL_Referee_TeamInfo* yellow_; - ::SSL_Referee_TeamInfo* blue_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(8 + 31) / 32]; - - friend void protobuf_AddDesc_referee_2eproto(); - friend void protobuf_AssignDesc_referee_2eproto(); + friend void protobuf_InitDefaults_referee_2eproto_impl(); + friend void protobuf_AddDesc_referee_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_referee_2eproto(); friend void protobuf_ShutdownFile_referee_2eproto(); - void InitAsDefaultInstance(); - static SSL_Referee* default_instance_; }; // =================================================================== // =================================================================== +#if !PROTOBUF_INLINE_NOT_IN_HEADERS // SSL_Referee_TeamInfo // required string name = 1; @@ -510,63 +587,55 @@ inline void SSL_Referee_TeamInfo::clear_has_name() { _has_bits_[0] &= ~0x00000001u; } inline void SSL_Referee_TeamInfo::clear_name() { - if (name_ != &::google::protobuf::internal::kEmptyString) { - name_->clear(); - } + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); clear_has_name(); } inline const ::std::string& SSL_Referee_TeamInfo::name() const { - return *name_; + // @@protoc_insertion_point(field_get:SSL_Referee.TeamInfo.name) + return name_.GetNoArena(); } inline void SSL_Referee_TeamInfo::set_name(const ::std::string& value) { set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(value); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:SSL_Referee.TeamInfo.name) } +#if LANG_CXX11 +inline void SSL_Referee_TeamInfo::set_name(::std::string&& value) { + set_has_name(); + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:SSL_Referee.TeamInfo.name) +} +#endif inline void SSL_Referee_TeamInfo::set_name(const char* value) { set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(value); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:SSL_Referee.TeamInfo.name) } inline void SSL_Referee_TeamInfo::set_name(const char* value, size_t size) { set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(reinterpret_cast(value), size); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:SSL_Referee.TeamInfo.name) } inline ::std::string* SSL_Referee_TeamInfo::mutable_name() { set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - return name_; + // @@protoc_insertion_point(field_mutable:SSL_Referee.TeamInfo.name) + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* SSL_Referee_TeamInfo::release_name() { + // @@protoc_insertion_point(field_release:SSL_Referee.TeamInfo.name) clear_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = name_; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void SSL_Referee_TeamInfo::set_allocated_name(::std::string* name) { - if (name_ != &::google::protobuf::internal::kEmptyString) { - delete name_; - } - if (name) { + if (name != NULL) { set_has_name(); - name_ = name; } else { clear_has_name(); - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); } + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + // @@protoc_insertion_point(field_set_allocated:SSL_Referee.TeamInfo.name) } // required uint32 score = 2; @@ -584,11 +653,13 @@ inline void SSL_Referee_TeamInfo::clear_score() { clear_has_score(); } inline ::google::protobuf::uint32 SSL_Referee_TeamInfo::score() const { + // @@protoc_insertion_point(field_get:SSL_Referee.TeamInfo.score) return score_; } inline void SSL_Referee_TeamInfo::set_score(::google::protobuf::uint32 value) { set_has_score(); score_ = value; + // @@protoc_insertion_point(field_set:SSL_Referee.TeamInfo.score) } // required uint32 red_cards = 3; @@ -606,11 +677,13 @@ inline void SSL_Referee_TeamInfo::clear_red_cards() { clear_has_red_cards(); } inline ::google::protobuf::uint32 SSL_Referee_TeamInfo::red_cards() const { + // @@protoc_insertion_point(field_get:SSL_Referee.TeamInfo.red_cards) return red_cards_; } inline void SSL_Referee_TeamInfo::set_red_cards(::google::protobuf::uint32 value) { set_has_red_cards(); red_cards_ = value; + // @@protoc_insertion_point(field_set:SSL_Referee.TeamInfo.red_cards) } // repeated uint32 yellow_card_times = 4 [packed = true]; @@ -621,109 +694,122 @@ inline void SSL_Referee_TeamInfo::clear_yellow_card_times() { yellow_card_times_.Clear(); } inline ::google::protobuf::uint32 SSL_Referee_TeamInfo::yellow_card_times(int index) const { + // @@protoc_insertion_point(field_get:SSL_Referee.TeamInfo.yellow_card_times) return yellow_card_times_.Get(index); } inline void SSL_Referee_TeamInfo::set_yellow_card_times(int index, ::google::protobuf::uint32 value) { yellow_card_times_.Set(index, value); + // @@protoc_insertion_point(field_set:SSL_Referee.TeamInfo.yellow_card_times) } inline void SSL_Referee_TeamInfo::add_yellow_card_times(::google::protobuf::uint32 value) { yellow_card_times_.Add(value); + // @@protoc_insertion_point(field_add:SSL_Referee.TeamInfo.yellow_card_times) } inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& SSL_Referee_TeamInfo::yellow_card_times() const { + // @@protoc_insertion_point(field_list:SSL_Referee.TeamInfo.yellow_card_times) return yellow_card_times_; } inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* SSL_Referee_TeamInfo::mutable_yellow_card_times() { + // @@protoc_insertion_point(field_mutable_list:SSL_Referee.TeamInfo.yellow_card_times) return &yellow_card_times_; } // required uint32 yellow_cards = 5; inline bool SSL_Referee_TeamInfo::has_yellow_cards() const { - return (_has_bits_[0] & 0x00000010u) != 0; + return (_has_bits_[0] & 0x00000008u) != 0; } inline void SSL_Referee_TeamInfo::set_has_yellow_cards() { - _has_bits_[0] |= 0x00000010u; + _has_bits_[0] |= 0x00000008u; } inline void SSL_Referee_TeamInfo::clear_has_yellow_cards() { - _has_bits_[0] &= ~0x00000010u; + _has_bits_[0] &= ~0x00000008u; } inline void SSL_Referee_TeamInfo::clear_yellow_cards() { yellow_cards_ = 0u; clear_has_yellow_cards(); } inline ::google::protobuf::uint32 SSL_Referee_TeamInfo::yellow_cards() const { + // @@protoc_insertion_point(field_get:SSL_Referee.TeamInfo.yellow_cards) return yellow_cards_; } inline void SSL_Referee_TeamInfo::set_yellow_cards(::google::protobuf::uint32 value) { set_has_yellow_cards(); yellow_cards_ = value; + // @@protoc_insertion_point(field_set:SSL_Referee.TeamInfo.yellow_cards) } // required uint32 timeouts = 6; inline bool SSL_Referee_TeamInfo::has_timeouts() const { - return (_has_bits_[0] & 0x00000020u) != 0; + return (_has_bits_[0] & 0x00000010u) != 0; } inline void SSL_Referee_TeamInfo::set_has_timeouts() { - _has_bits_[0] |= 0x00000020u; + _has_bits_[0] |= 0x00000010u; } inline void SSL_Referee_TeamInfo::clear_has_timeouts() { - _has_bits_[0] &= ~0x00000020u; + _has_bits_[0] &= ~0x00000010u; } inline void SSL_Referee_TeamInfo::clear_timeouts() { timeouts_ = 0u; clear_has_timeouts(); } inline ::google::protobuf::uint32 SSL_Referee_TeamInfo::timeouts() const { + // @@protoc_insertion_point(field_get:SSL_Referee.TeamInfo.timeouts) return timeouts_; } inline void SSL_Referee_TeamInfo::set_timeouts(::google::protobuf::uint32 value) { set_has_timeouts(); timeouts_ = value; + // @@protoc_insertion_point(field_set:SSL_Referee.TeamInfo.timeouts) } // required uint32 timeout_time = 7; inline bool SSL_Referee_TeamInfo::has_timeout_time() const { - return (_has_bits_[0] & 0x00000040u) != 0; + return (_has_bits_[0] & 0x00000020u) != 0; } inline void SSL_Referee_TeamInfo::set_has_timeout_time() { - _has_bits_[0] |= 0x00000040u; + _has_bits_[0] |= 0x00000020u; } inline void SSL_Referee_TeamInfo::clear_has_timeout_time() { - _has_bits_[0] &= ~0x00000040u; + _has_bits_[0] &= ~0x00000020u; } inline void SSL_Referee_TeamInfo::clear_timeout_time() { timeout_time_ = 0u; clear_has_timeout_time(); } inline ::google::protobuf::uint32 SSL_Referee_TeamInfo::timeout_time() const { + // @@protoc_insertion_point(field_get:SSL_Referee.TeamInfo.timeout_time) return timeout_time_; } inline void SSL_Referee_TeamInfo::set_timeout_time(::google::protobuf::uint32 value) { set_has_timeout_time(); timeout_time_ = value; + // @@protoc_insertion_point(field_set:SSL_Referee.TeamInfo.timeout_time) } // required uint32 goalie = 8; inline bool SSL_Referee_TeamInfo::has_goalie() const { - return (_has_bits_[0] & 0x00000080u) != 0; + return (_has_bits_[0] & 0x00000040u) != 0; } inline void SSL_Referee_TeamInfo::set_has_goalie() { - _has_bits_[0] |= 0x00000080u; + _has_bits_[0] |= 0x00000040u; } inline void SSL_Referee_TeamInfo::clear_has_goalie() { - _has_bits_[0] &= ~0x00000080u; + _has_bits_[0] &= ~0x00000040u; } inline void SSL_Referee_TeamInfo::clear_goalie() { goalie_ = 0u; clear_has_goalie(); } inline ::google::protobuf::uint32 SSL_Referee_TeamInfo::goalie() const { + // @@protoc_insertion_point(field_get:SSL_Referee.TeamInfo.goalie) return goalie_; } inline void SSL_Referee_TeamInfo::set_goalie(::google::protobuf::uint32 value) { set_has_goalie(); goalie_ = value; + // @@protoc_insertion_point(field_set:SSL_Referee.TeamInfo.goalie) } // ------------------------------------------------------------------- @@ -732,161 +818,179 @@ inline void SSL_Referee_TeamInfo::set_goalie(::google::protobuf::uint32 value) { // required uint64 packet_timestamp = 1; inline bool SSL_Referee::has_packet_timestamp() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return (_has_bits_[0] & 0x00000004u) != 0; } inline void SSL_Referee::set_has_packet_timestamp() { - _has_bits_[0] |= 0x00000001u; + _has_bits_[0] |= 0x00000004u; } inline void SSL_Referee::clear_has_packet_timestamp() { - _has_bits_[0] &= ~0x00000001u; + _has_bits_[0] &= ~0x00000004u; } inline void SSL_Referee::clear_packet_timestamp() { packet_timestamp_ = GOOGLE_ULONGLONG(0); clear_has_packet_timestamp(); } inline ::google::protobuf::uint64 SSL_Referee::packet_timestamp() const { + // @@protoc_insertion_point(field_get:SSL_Referee.packet_timestamp) return packet_timestamp_; } inline void SSL_Referee::set_packet_timestamp(::google::protobuf::uint64 value) { set_has_packet_timestamp(); packet_timestamp_ = value; + // @@protoc_insertion_point(field_set:SSL_Referee.packet_timestamp) } // required .SSL_Referee.Stage stage = 2; inline bool SSL_Referee::has_stage() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return (_has_bits_[0] & 0x00000008u) != 0; } inline void SSL_Referee::set_has_stage() { - _has_bits_[0] |= 0x00000002u; + _has_bits_[0] |= 0x00000008u; } inline void SSL_Referee::clear_has_stage() { - _has_bits_[0] &= ~0x00000002u; + _has_bits_[0] &= ~0x00000008u; } inline void SSL_Referee::clear_stage() { stage_ = 0; clear_has_stage(); } inline ::SSL_Referee_Stage SSL_Referee::stage() const { + // @@protoc_insertion_point(field_get:SSL_Referee.stage) return static_cast< ::SSL_Referee_Stage >(stage_); } inline void SSL_Referee::set_stage(::SSL_Referee_Stage value) { assert(::SSL_Referee_Stage_IsValid(value)); set_has_stage(); stage_ = value; + // @@protoc_insertion_point(field_set:SSL_Referee.stage) } // optional sint32 stage_time_left = 3; inline bool SSL_Referee::has_stage_time_left() const { - return (_has_bits_[0] & 0x00000004u) != 0; + return (_has_bits_[0] & 0x00000010u) != 0; } inline void SSL_Referee::set_has_stage_time_left() { - _has_bits_[0] |= 0x00000004u; + _has_bits_[0] |= 0x00000010u; } inline void SSL_Referee::clear_has_stage_time_left() { - _has_bits_[0] &= ~0x00000004u; + _has_bits_[0] &= ~0x00000010u; } inline void SSL_Referee::clear_stage_time_left() { stage_time_left_ = 0; clear_has_stage_time_left(); } inline ::google::protobuf::int32 SSL_Referee::stage_time_left() const { + // @@protoc_insertion_point(field_get:SSL_Referee.stage_time_left) return stage_time_left_; } inline void SSL_Referee::set_stage_time_left(::google::protobuf::int32 value) { set_has_stage_time_left(); stage_time_left_ = value; + // @@protoc_insertion_point(field_set:SSL_Referee.stage_time_left) } // required .SSL_Referee.Command command = 4; inline bool SSL_Referee::has_command() const { - return (_has_bits_[0] & 0x00000008u) != 0; + return (_has_bits_[0] & 0x00000020u) != 0; } inline void SSL_Referee::set_has_command() { - _has_bits_[0] |= 0x00000008u; + _has_bits_[0] |= 0x00000020u; } inline void SSL_Referee::clear_has_command() { - _has_bits_[0] &= ~0x00000008u; + _has_bits_[0] &= ~0x00000020u; } inline void SSL_Referee::clear_command() { command_ = 0; clear_has_command(); } inline ::SSL_Referee_Command SSL_Referee::command() const { + // @@protoc_insertion_point(field_get:SSL_Referee.command) return static_cast< ::SSL_Referee_Command >(command_); } inline void SSL_Referee::set_command(::SSL_Referee_Command value) { assert(::SSL_Referee_Command_IsValid(value)); set_has_command(); command_ = value; + // @@protoc_insertion_point(field_set:SSL_Referee.command) } // required uint32 command_counter = 5; inline bool SSL_Referee::has_command_counter() const { - return (_has_bits_[0] & 0x00000010u) != 0; + return (_has_bits_[0] & 0x00000040u) != 0; } inline void SSL_Referee::set_has_command_counter() { - _has_bits_[0] |= 0x00000010u; + _has_bits_[0] |= 0x00000040u; } inline void SSL_Referee::clear_has_command_counter() { - _has_bits_[0] &= ~0x00000010u; + _has_bits_[0] &= ~0x00000040u; } inline void SSL_Referee::clear_command_counter() { command_counter_ = 0u; clear_has_command_counter(); } inline ::google::protobuf::uint32 SSL_Referee::command_counter() const { + // @@protoc_insertion_point(field_get:SSL_Referee.command_counter) return command_counter_; } inline void SSL_Referee::set_command_counter(::google::protobuf::uint32 value) { set_has_command_counter(); command_counter_ = value; + // @@protoc_insertion_point(field_set:SSL_Referee.command_counter) } // required uint64 command_timestamp = 6; inline bool SSL_Referee::has_command_timestamp() const { - return (_has_bits_[0] & 0x00000020u) != 0; + return (_has_bits_[0] & 0x00000080u) != 0; } inline void SSL_Referee::set_has_command_timestamp() { - _has_bits_[0] |= 0x00000020u; + _has_bits_[0] |= 0x00000080u; } inline void SSL_Referee::clear_has_command_timestamp() { - _has_bits_[0] &= ~0x00000020u; + _has_bits_[0] &= ~0x00000080u; } inline void SSL_Referee::clear_command_timestamp() { command_timestamp_ = GOOGLE_ULONGLONG(0); clear_has_command_timestamp(); } inline ::google::protobuf::uint64 SSL_Referee::command_timestamp() const { + // @@protoc_insertion_point(field_get:SSL_Referee.command_timestamp) return command_timestamp_; } inline void SSL_Referee::set_command_timestamp(::google::protobuf::uint64 value) { set_has_command_timestamp(); command_timestamp_ = value; + // @@protoc_insertion_point(field_set:SSL_Referee.command_timestamp) } // required .SSL_Referee.TeamInfo yellow = 7; inline bool SSL_Referee::has_yellow() const { - return (_has_bits_[0] & 0x00000040u) != 0; + return (_has_bits_[0] & 0x00000001u) != 0; } inline void SSL_Referee::set_has_yellow() { - _has_bits_[0] |= 0x00000040u; + _has_bits_[0] |= 0x00000001u; } inline void SSL_Referee::clear_has_yellow() { - _has_bits_[0] &= ~0x00000040u; + _has_bits_[0] &= ~0x00000001u; } inline void SSL_Referee::clear_yellow() { if (yellow_ != NULL) yellow_->::SSL_Referee_TeamInfo::Clear(); clear_has_yellow(); } inline const ::SSL_Referee_TeamInfo& SSL_Referee::yellow() const { - return yellow_ != NULL ? *yellow_ : *default_instance_->yellow_; + // @@protoc_insertion_point(field_get:SSL_Referee.yellow) + return yellow_ != NULL ? *yellow_ + : *::SSL_Referee_TeamInfo::internal_default_instance(); } inline ::SSL_Referee_TeamInfo* SSL_Referee::mutable_yellow() { set_has_yellow(); - if (yellow_ == NULL) yellow_ = new ::SSL_Referee_TeamInfo; + if (yellow_ == NULL) { + yellow_ = new ::SSL_Referee_TeamInfo; + } + // @@protoc_insertion_point(field_mutable:SSL_Referee.yellow) return yellow_; } inline ::SSL_Referee_TeamInfo* SSL_Referee::release_yellow() { + // @@protoc_insertion_point(field_release:SSL_Referee.yellow) clear_has_yellow(); ::SSL_Referee_TeamInfo* temp = yellow_; yellow_ = NULL; @@ -900,31 +1004,38 @@ inline void SSL_Referee::set_allocated_yellow(::SSL_Referee_TeamInfo* yellow) { } else { clear_has_yellow(); } + // @@protoc_insertion_point(field_set_allocated:SSL_Referee.yellow) } // required .SSL_Referee.TeamInfo blue = 8; inline bool SSL_Referee::has_blue() const { - return (_has_bits_[0] & 0x00000080u) != 0; + return (_has_bits_[0] & 0x00000002u) != 0; } inline void SSL_Referee::set_has_blue() { - _has_bits_[0] |= 0x00000080u; + _has_bits_[0] |= 0x00000002u; } inline void SSL_Referee::clear_has_blue() { - _has_bits_[0] &= ~0x00000080u; + _has_bits_[0] &= ~0x00000002u; } inline void SSL_Referee::clear_blue() { if (blue_ != NULL) blue_->::SSL_Referee_TeamInfo::Clear(); clear_has_blue(); } inline const ::SSL_Referee_TeamInfo& SSL_Referee::blue() const { - return blue_ != NULL ? *blue_ : *default_instance_->blue_; + // @@protoc_insertion_point(field_get:SSL_Referee.blue) + return blue_ != NULL ? *blue_ + : *::SSL_Referee_TeamInfo::internal_default_instance(); } inline ::SSL_Referee_TeamInfo* SSL_Referee::mutable_blue() { set_has_blue(); - if (blue_ == NULL) blue_ = new ::SSL_Referee_TeamInfo; + if (blue_ == NULL) { + blue_ = new ::SSL_Referee_TeamInfo; + } + // @@protoc_insertion_point(field_mutable:SSL_Referee.blue) return blue_; } inline ::SSL_Referee_TeamInfo* SSL_Referee::release_blue() { + // @@protoc_insertion_point(field_release:SSL_Referee.blue) clear_has_blue(); ::SSL_Referee_TeamInfo* temp = blue_; blue_ = NULL; @@ -938,26 +1049,33 @@ inline void SSL_Referee::set_allocated_blue(::SSL_Referee_TeamInfo* blue) { } else { clear_has_blue(); } + // @@protoc_insertion_point(field_set_allocated:SSL_Referee.blue) } +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) + #ifndef SWIG namespace google { namespace protobuf { +template <> struct is_proto_enum< ::SSL_Referee_Stage> : ::google::protobuf::internal::true_type {}; template <> inline const EnumDescriptor* GetEnumDescriptor< ::SSL_Referee_Stage>() { return ::SSL_Referee_Stage_descriptor(); } +template <> struct is_proto_enum< ::SSL_Referee_Command> : ::google::protobuf::internal::true_type {}; template <> inline const EnumDescriptor* GetEnumDescriptor< ::SSL_Referee_Command>() { return ::SSL_Referee_Command_descriptor(); } -} // namespace google } // namespace protobuf +} // namespace google #endif // SWIG // @@protoc_insertion_point(global_scope) diff --git a/src/proto/ssl_log.pb.cc b/src/proto/ssl_log.pb.cc index b8230c0..b73e279 100644 --- a/src/proto/ssl_log.pb.cc +++ b/src/proto/ssl_log.pb.cc @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -15,112 +16,128 @@ #include #include // @@protoc_insertion_point(includes) +class log_chunkDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +log_chunkDefaultTypeInternal _log_chunk_default_instance_; +class SSL_logDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +SSL_logDefaultTypeInternal _SSL_log_default_instance_; namespace { -const ::google::protobuf::Descriptor* log_chunk_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - log_chunk_reflection_ = NULL; -const ::google::protobuf::Descriptor* SSL_log_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - SSL_log_reflection_ = NULL; +::google::protobuf::Metadata file_level_metadata[2]; } // namespace -void protobuf_AssignDesc_ssl_5flog_2eproto() { - protobuf_AddDesc_ssl_5flog_2eproto(); - const ::google::protobuf::FileDescriptor* file = - ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( - "ssl_log.proto"); - GOOGLE_CHECK(file != NULL); - log_chunk_descriptor_ = file->message_type(0); - static const int log_chunk_offsets_[4] = { +const ::google::protobuf::uint32* protobuf_Offsets_ssl_5flog_2eproto() GOOGLE_ATTRIBUTE_COLD; +const ::google::protobuf::uint32* protobuf_Offsets_ssl_5flog_2eproto() { + static const ::google::protobuf::uint32 offsets[] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(log_chunk, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(log_chunk, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(log_chunk, chunk_number_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(log_chunk, ball_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(log_chunk, ours_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(log_chunk, opps_), - }; - log_chunk_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - log_chunk_descriptor_, - log_chunk::default_instance_, - log_chunk_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(log_chunk, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(log_chunk, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(log_chunk)); - SSL_log_descriptor_ = file->message_type(1); - static const int SSL_log_offsets_[3] = { + 1, + 0, + 2, + 3, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_log, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_log, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_log, numberofchunks_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_log, timerinterval_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_log, chunks_), + 0, + 1, + 2, }; - SSL_log_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - SSL_log_descriptor_, - SSL_log::default_instance_, - SSL_log_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_log, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SSL_log, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(SSL_log)); + return offsets; } +static const ::google::protobuf::internal::MigrationSchema schemas[] = { + { 0, 8, sizeof(log_chunk)}, + { 12, 19, sizeof(SSL_log)}, +}; + +static const ::google::protobuf::internal::DefaultInstanceData file_default_instances[] = { + {reinterpret_cast(&_log_chunk_default_instance_), NULL}, + {reinterpret_cast(&_SSL_log_default_instance_), NULL}, +}; + namespace { -GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); -inline void protobuf_AssignDescriptorsOnce() { - ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, - &protobuf_AssignDesc_ssl_5flog_2eproto); +void protobuf_AssignDescriptors() { + protobuf_AddDesc_ssl_5flog_2eproto(); + ::google::protobuf::MessageFactory* factory = NULL; + AssignDescriptors( + "ssl_log.proto", schemas, file_default_instances, protobuf_Offsets_ssl_5flog_2eproto(), factory, + file_level_metadata, NULL, NULL); +} + +void protobuf_AssignDescriptorsOnce() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); } +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - log_chunk_descriptor_, &log_chunk::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - SSL_log_descriptor_, &SSL_log::default_instance()); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 2); } } // namespace void protobuf_ShutdownFile_ssl_5flog_2eproto() { - delete log_chunk::default_instance_; - delete log_chunk_reflection_; - delete SSL_log::default_instance_; - delete SSL_log_reflection_; + _log_chunk_default_instance_.Shutdown(); + delete file_level_metadata[0].reflection; + _SSL_log_default_instance_.Shutdown(); + delete file_level_metadata[1].reflection; } -void protobuf_AddDesc_ssl_5flog_2eproto() { - static bool already_here = false; - if (already_here) return; - already_here = true; +void protobuf_InitDefaults_ssl_5flog_2eproto_impl() { GOOGLE_PROTOBUF_VERIFY_VERSION; - ::protobuf_AddDesc_Robot_5fmessage_2eproto(); - ::protobuf_AddDesc_Ball_5fmessage_2eproto(); + ::protobuf_InitDefaults_Robot_5fmessage_2eproto(); + ::protobuf_InitDefaults_Ball_5fmessage_2eproto(); + ::google::protobuf::internal::InitProtobufDefaults(); + _log_chunk_default_instance_.DefaultConstruct(); + _SSL_log_default_instance_.DefaultConstruct(); + _log_chunk_default_instance_.get_mutable()->ball_ = const_cast< ::Ball_message*>( + ::Ball_message::internal_default_instance()); +} + +void protobuf_InitDefaults_ssl_5flog_2eproto() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_InitDefaults_ssl_5flog_2eproto_impl); +} +void protobuf_AddDesc_ssl_5flog_2eproto_impl() { + protobuf_InitDefaults_ssl_5flog_2eproto(); + static const char descriptor[] = { + "\n\rssl_log.proto\032\023Robot_message.proto\032\022Ba" + "ll_message.proto\"z\n\tlog_chunk\022\024\n\014chunk_n" + "umber\030\001 \002(\003\022\033\n\004ball\030\002 \002(\0132\r.Ball_message" + "\022\034\n\004ours\030\003 \003(\0132\016.Robot_message\022\034\n\004opps\030\004" + " \003(\0132\016.Robot_message\"T\n\007SSL_log\022\026\n\016numbe" + "rOfChunks\030\001 \002(\003\022\025\n\rtimerInterval\030\002 \002(\003\022\032" + "\n\006chunks\030\003 \003(\0132\n.log_chunk" + }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - "\n\rssl_log.proto\032\023Robot_message.proto\032\022Ba" - "ll_message.proto\"z\n\tlog_chunk\022\024\n\014chunk_n" - "umber\030\001 \002(\003\022\033\n\004ball\030\002 \002(\0132\r.Ball_message" - "\022\034\n\004ours\030\003 \003(\0132\016.Robot_message\022\034\n\004opps\030\004" - " \003(\0132\016.Robot_message\"T\n\007SSL_log\022\026\n\016numbe" - "rOfChunks\030\001 \002(\003\022\025\n\rtimerInterval\030\002 \002(\003\022\032" - "\n\006chunks\030\003 \003(\0132\n.log_chunk", 266); + descriptor, 266); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "ssl_log.proto", &protobuf_RegisterTypes); - log_chunk::default_instance_ = new log_chunk(); - SSL_log::default_instance_ = new SSL_log(); - log_chunk::default_instance_->InitAsDefaultInstance(); - SSL_log::default_instance_->InitAsDefaultInstance(); + ::protobuf_AddDesc_Robot_5fmessage_2eproto(); + ::protobuf_AddDesc_Ball_5fmessage_2eproto(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_ssl_5flog_2eproto); } +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_ssl_5flog_2eproto_once_); +void protobuf_AddDesc_ssl_5flog_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_ssl_5flog_2eproto_once_, + &protobuf_AddDesc_ssl_5flog_2eproto_impl); +} // Force AddDescriptors() to be called at static initialization time. struct StaticDescriptorInitializer_ssl_5flog_2eproto { StaticDescriptorInitializer_ssl_5flog_2eproto() { @@ -130,41 +147,51 @@ struct StaticDescriptorInitializer_ssl_5flog_2eproto { // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int log_chunk::kChunkNumberFieldNumber; const int log_chunk::kBallFieldNumber; const int log_chunk::kOursFieldNumber; const int log_chunk::kOppsFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 log_chunk::log_chunk() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_ssl_5flog_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:log_chunk) } - -void log_chunk::InitAsDefaultInstance() { - ball_ = const_cast< ::Ball_message*>(&::Ball_message::default_instance()); -} - log_chunk::log_chunk(const log_chunk& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0), + ours_(from.ours_), + opps_(from.opps_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from.has_ball()) { + ball_ = new ::Ball_message(*from.ball_); + } else { + ball_ = NULL; + } + chunk_number_ = from.chunk_number_; + // @@protoc_insertion_point(copy_constructor:log_chunk) } void log_chunk::SharedCtor() { _cached_size_ = 0; - chunk_number_ = GOOGLE_LONGLONG(0); - ball_ = NULL; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); + ::memset(&ball_, 0, reinterpret_cast(&chunk_number_) - + reinterpret_cast(&ball_) + sizeof(chunk_number_)); } log_chunk::~log_chunk() { + // @@protoc_insertion_point(destructor:log_chunk) SharedDtor(); } void log_chunk::SharedDtor() { - if (this != default_instance_) { + if (this != internal_default_instance()) { delete ball_; } } @@ -176,103 +203,101 @@ void log_chunk::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* log_chunk::descriptor() { protobuf_AssignDescriptorsOnce(); - return log_chunk_descriptor_; + return file_level_metadata[0].descriptor; } const log_chunk& log_chunk::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_ssl_5flog_2eproto(); - return *default_instance_; + protobuf_InitDefaults_ssl_5flog_2eproto(); + return *internal_default_instance(); } -log_chunk* log_chunk::default_instance_ = NULL; - -log_chunk* log_chunk::New() const { - return new log_chunk; +log_chunk* log_chunk::New(::google::protobuf::Arena* arena) const { + log_chunk* n = new log_chunk; + if (arena != NULL) { + arena->Own(n); + } + return n; } void log_chunk::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - chunk_number_ = GOOGLE_LONGLONG(0); - if (has_ball()) { - if (ball_ != NULL) ball_->::Ball_message::Clear(); - } - } +// @@protoc_insertion_point(message_clear_start:log_chunk) ours_.Clear(); opps_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + if (has_ball()) { + GOOGLE_DCHECK(ball_ != NULL); + ball_->::Ball_message::Clear(); + } + chunk_number_ = GOOGLE_LONGLONG(0); + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool log_chunk::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:log_chunk) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required int64 chunk_number = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + if (tag == 8u) { + set_has_chunk_number(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( input, &chunk_number_))); - set_has_chunk_number(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(18)) goto parse_ball; break; } // required .Ball_message ball = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_ball: + if (tag == 18u) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_ball())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(26)) goto parse_ours; break; } // repeated .Robot_message ours = 3; case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_ours: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + if (tag == 26u) { + DO_(input->IncrementRecursionDepth()); + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( input, add_ours())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(26)) goto parse_ours; - if (input->ExpectTag(34)) goto parse_opps; + input->UnsafeDecrementRecursionDepth(); break; } // repeated .Robot_message opps = 4; case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_opps: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + if (tag == 34u) { + DO_(input->IncrementRecursionDepth()); + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( input, add_opps())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(34)) goto parse_opps; - if (input->ExpectAtEnd()) return true; + input->UnsafeDecrementRecursionDepth(); break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -280,12 +305,18 @@ bool log_chunk::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:log_chunk) return true; +failure: + // @@protoc_insertion_point(parse_failure:log_chunk) + return false; #undef DO_ } void log_chunk::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:log_chunk) // required int64 chunk_number = 1; if (has_chunk_number()) { ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->chunk_number(), output); @@ -294,29 +325,32 @@ void log_chunk::SerializeWithCachedSizes( // required .Ball_message ball = 2; if (has_ball()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, this->ball(), output); + 2, *this->ball_, output); } // repeated .Robot_message ours = 3; - for (int i = 0; i < this->ours_size(); i++) { + for (unsigned int i = 0, n = this->ours_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 3, this->ours(i), output); } // repeated .Robot_message opps = 4; - for (int i = 0; i < this->opps_size(); i++) { + for (unsigned int i = 0, n = this->opps_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 4, this->opps(i), output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:log_chunk) } -::google::protobuf::uint8* log_chunk::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* log_chunk::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:log_chunk) // required int64 chunk_number = 1; if (has_chunk_number()) { target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->chunk_number(), target); @@ -325,111 +359,144 @@ ::google::protobuf::uint8* log_chunk::SerializeWithCachedSizesToArray( // required .Ball_message ball = 2; if (has_ball()) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 2, this->ball(), target); + InternalWriteMessageNoVirtualToArray( + 2, *this->ball_, false, target); } // repeated .Robot_message ours = 3; - for (int i = 0; i < this->ours_size(); i++) { + for (unsigned int i = 0, n = this->ours_size(); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 3, this->ours(i), target); + InternalWriteMessageNoVirtualToArray( + 3, this->ours(i), false, target); } // repeated .Robot_message opps = 4; - for (int i = 0; i < this->opps_size(); i++) { + for (unsigned int i = 0, n = this->opps_size(); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 4, this->opps(i), target); + InternalWriteMessageNoVirtualToArray( + 4, this->opps(i), false, target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:log_chunk) return target; } -int log_chunk::ByteSize() const { - int total_size = 0; +size_t log_chunk::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:log_chunk) + size_t total_size = 0; + + if (has_ball()) { + // required .Ball_message ball = 2; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->ball_); + } - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_chunk_number()) { // required int64 chunk_number = 1; - if (has_chunk_number()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int64Size( - this->chunk_number()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->chunk_number()); + } + + return total_size; +} +size_t log_chunk::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:log_chunk) + size_t total_size = 0; + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present. // required .Ball_message ball = 2; - if (has_ball()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->ball()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->ball_); + + // required int64 chunk_number = 1; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->chunk_number()); + } else { + total_size += RequiredFieldsByteSizeFallback(); } // repeated .Robot_message ours = 3; - total_size += 1 * this->ours_size(); - for (int i = 0; i < this->ours_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->ours(i)); + { + unsigned int count = this->ours_size(); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->ours(i)); + } } // repeated .Robot_message opps = 4; - total_size += 1 * this->opps_size(); - for (int i = 0; i < this->opps_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->opps(i)); + { + unsigned int count = this->opps_size(); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->opps(i)); + } } - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void log_chunk::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:log_chunk) + GOOGLE_DCHECK_NE(&from, this); const log_chunk* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:log_chunk) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:log_chunk) MergeFrom(*source); } } void log_chunk::MergeFrom(const log_chunk& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(class_specific_merge_from_start:log_chunk) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); ours_.MergeFrom(from.ours_); opps_.MergeFrom(from.opps_); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_chunk_number()) { - set_chunk_number(from.chunk_number()); - } + if (from._has_bits_[0 / 32] & 3u) { if (from.has_ball()) { mutable_ball()->::Ball_message::MergeFrom(from.ball()); } + if (from.has_chunk_number()) { + set_chunk_number(from.chunk_number()); + } } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void log_chunk::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:log_chunk) if (&from == this) return; Clear(); MergeFrom(from); } void log_chunk::CopyFrom(const log_chunk& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:log_chunk) if (&from == this) return; Clear(); MergeFrom(from); @@ -437,76 +504,208 @@ void log_chunk::CopyFrom(const log_chunk& from) { bool log_chunk::IsInitialized() const { if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; - + if (!::google::protobuf::internal::AllAreInitialized(this->ours())) return false; + if (!::google::protobuf::internal::AllAreInitialized(this->opps())) return false; if (has_ball()) { - if (!this->ball().IsInitialized()) return false; - } - for (int i = 0; i < ours_size(); i++) { - if (!this->ours(i).IsInitialized()) return false; - } - for (int i = 0; i < opps_size(); i++) { - if (!this->opps(i).IsInitialized()) return false; + if (!this->ball_->IsInitialized()) return false; } return true; } void log_chunk::Swap(log_chunk* other) { - if (other != this) { - std::swap(chunk_number_, other->chunk_number_); - std::swap(ball_, other->ball_); - ours_.Swap(&other->ours_); - opps_.Swap(&other->opps_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void log_chunk::InternalSwap(log_chunk* other) { + ours_.UnsafeArenaSwap(&other->ours_); + opps_.UnsafeArenaSwap(&other->opps_); + std::swap(ball_, other->ball_); + std::swap(chunk_number_, other->chunk_number_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata log_chunk::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = log_chunk_descriptor_; - metadata.reflection = log_chunk_reflection_; - return metadata; + return file_level_metadata[0]; } +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// log_chunk + +// required int64 chunk_number = 1; +bool log_chunk::has_chunk_number() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +void log_chunk::set_has_chunk_number() { + _has_bits_[0] |= 0x00000002u; +} +void log_chunk::clear_has_chunk_number() { + _has_bits_[0] &= ~0x00000002u; +} +void log_chunk::clear_chunk_number() { + chunk_number_ = GOOGLE_LONGLONG(0); + clear_has_chunk_number(); +} +::google::protobuf::int64 log_chunk::chunk_number() const { + // @@protoc_insertion_point(field_get:log_chunk.chunk_number) + return chunk_number_; +} +void log_chunk::set_chunk_number(::google::protobuf::int64 value) { + set_has_chunk_number(); + chunk_number_ = value; + // @@protoc_insertion_point(field_set:log_chunk.chunk_number) +} + +// required .Ball_message ball = 2; +bool log_chunk::has_ball() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void log_chunk::set_has_ball() { + _has_bits_[0] |= 0x00000001u; +} +void log_chunk::clear_has_ball() { + _has_bits_[0] &= ~0x00000001u; +} +void log_chunk::clear_ball() { + if (ball_ != NULL) ball_->::Ball_message::Clear(); + clear_has_ball(); +} +const ::Ball_message& log_chunk::ball() const { + // @@protoc_insertion_point(field_get:log_chunk.ball) + return ball_ != NULL ? *ball_ + : *::Ball_message::internal_default_instance(); +} +::Ball_message* log_chunk::mutable_ball() { + set_has_ball(); + if (ball_ == NULL) { + ball_ = new ::Ball_message; + } + // @@protoc_insertion_point(field_mutable:log_chunk.ball) + return ball_; +} +::Ball_message* log_chunk::release_ball() { + // @@protoc_insertion_point(field_release:log_chunk.ball) + clear_has_ball(); + ::Ball_message* temp = ball_; + ball_ = NULL; + return temp; +} +void log_chunk::set_allocated_ball(::Ball_message* ball) { + delete ball_; + ball_ = ball; + if (ball) { + set_has_ball(); + } else { + clear_has_ball(); + } + // @@protoc_insertion_point(field_set_allocated:log_chunk.ball) +} + +// repeated .Robot_message ours = 3; +int log_chunk::ours_size() const { + return ours_.size(); +} +void log_chunk::clear_ours() { + ours_.Clear(); +} +const ::Robot_message& log_chunk::ours(int index) const { + // @@protoc_insertion_point(field_get:log_chunk.ours) + return ours_.Get(index); +} +::Robot_message* log_chunk::mutable_ours(int index) { + // @@protoc_insertion_point(field_mutable:log_chunk.ours) + return ours_.Mutable(index); +} +::Robot_message* log_chunk::add_ours() { + // @@protoc_insertion_point(field_add:log_chunk.ours) + return ours_.Add(); +} +::google::protobuf::RepeatedPtrField< ::Robot_message >* +log_chunk::mutable_ours() { + // @@protoc_insertion_point(field_mutable_list:log_chunk.ours) + return &ours_; +} +const ::google::protobuf::RepeatedPtrField< ::Robot_message >& +log_chunk::ours() const { + // @@protoc_insertion_point(field_list:log_chunk.ours) + return ours_; +} + +// repeated .Robot_message opps = 4; +int log_chunk::opps_size() const { + return opps_.size(); +} +void log_chunk::clear_opps() { + opps_.Clear(); +} +const ::Robot_message& log_chunk::opps(int index) const { + // @@protoc_insertion_point(field_get:log_chunk.opps) + return opps_.Get(index); +} +::Robot_message* log_chunk::mutable_opps(int index) { + // @@protoc_insertion_point(field_mutable:log_chunk.opps) + return opps_.Mutable(index); +} +::Robot_message* log_chunk::add_opps() { + // @@protoc_insertion_point(field_add:log_chunk.opps) + return opps_.Add(); +} +::google::protobuf::RepeatedPtrField< ::Robot_message >* +log_chunk::mutable_opps() { + // @@protoc_insertion_point(field_mutable_list:log_chunk.opps) + return &opps_; +} +const ::google::protobuf::RepeatedPtrField< ::Robot_message >& +log_chunk::opps() const { + // @@protoc_insertion_point(field_list:log_chunk.opps) + return opps_; +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int SSL_log::kNumberOfChunksFieldNumber; const int SSL_log::kTimerIntervalFieldNumber; const int SSL_log::kChunksFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 SSL_log::SSL_log() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_ssl_5flog_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:SSL_log) } - -void SSL_log::InitAsDefaultInstance() { -} - SSL_log::SSL_log(const SSL_log& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0), + chunks_(from.chunks_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::memcpy(&numberofchunks_, &from.numberofchunks_, + reinterpret_cast(&timerinterval_) - + reinterpret_cast(&numberofchunks_) + sizeof(timerinterval_)); + // @@protoc_insertion_point(copy_constructor:SSL_log) } void SSL_log::SharedCtor() { _cached_size_ = 0; - numberofchunks_ = GOOGLE_LONGLONG(0); - timerinterval_ = GOOGLE_LONGLONG(0); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); + ::memset(&numberofchunks_, 0, reinterpret_cast(&timerinterval_) - + reinterpret_cast(&numberofchunks_) + sizeof(timerinterval_)); } SSL_log::~SSL_log() { + // @@protoc_insertion_point(destructor:SSL_log) SharedDtor(); } void SSL_log::SharedDtor() { - if (this != default_instance_) { - } } void SSL_log::SetCachedSize(int size) const { @@ -516,87 +715,88 @@ void SSL_log::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* SSL_log::descriptor() { protobuf_AssignDescriptorsOnce(); - return SSL_log_descriptor_; + return file_level_metadata[1].descriptor; } const SSL_log& SSL_log::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_ssl_5flog_2eproto(); - return *default_instance_; + protobuf_InitDefaults_ssl_5flog_2eproto(); + return *internal_default_instance(); } -SSL_log* SSL_log::default_instance_ = NULL; - -SSL_log* SSL_log::New() const { - return new SSL_log; +SSL_log* SSL_log::New(::google::protobuf::Arena* arena) const { + SSL_log* n = new SSL_log; + if (arena != NULL) { + arena->Own(n); + } + return n; } void SSL_log::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - numberofchunks_ = GOOGLE_LONGLONG(0); - timerinterval_ = GOOGLE_LONGLONG(0); - } +// @@protoc_insertion_point(message_clear_start:SSL_log) chunks_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + if (_has_bits_[0 / 32] & 3u) { + ::memset(&numberofchunks_, 0, reinterpret_cast(&timerinterval_) - + reinterpret_cast(&numberofchunks_) + sizeof(timerinterval_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool SSL_log::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:SSL_log) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required int64 numberOfChunks = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + if (tag == 8u) { + set_has_numberofchunks(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( input, &numberofchunks_))); - set_has_numberofchunks(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(16)) goto parse_timerInterval; break; } // required int64 timerInterval = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_timerInterval: + if (tag == 16u) { + set_has_timerinterval(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( input, &timerinterval_))); - set_has_timerinterval(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(26)) goto parse_chunks; break; } // repeated .log_chunk chunks = 3; case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_chunks: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + if (tag == 26u) { + DO_(input->IncrementRecursionDepth()); + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( input, add_chunks())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(26)) goto parse_chunks; - if (input->ExpectAtEnd()) return true; + input->UnsafeDecrementRecursionDepth(); break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -604,12 +804,18 @@ bool SSL_log::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:SSL_log) return true; +failure: + // @@protoc_insertion_point(parse_failure:SSL_log) + return false; #undef DO_ } void SSL_log::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:SSL_log) // required int64 numberOfChunks = 1; if (has_numberofchunks()) { ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->numberofchunks(), output); @@ -621,19 +827,22 @@ void SSL_log::SerializeWithCachedSizes( } // repeated .log_chunk chunks = 3; - for (int i = 0; i < this->chunks_size(); i++) { + for (unsigned int i = 0, n = this->chunks_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 3, this->chunks(i), output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:SSL_log) } -::google::protobuf::uint8* SSL_log::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* SSL_log::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:SSL_log) // required int64 numberOfChunks = 1; if (has_numberofchunks()) { target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->numberofchunks(), target); @@ -645,73 +854,102 @@ ::google::protobuf::uint8* SSL_log::SerializeWithCachedSizesToArray( } // repeated .log_chunk chunks = 3; - for (int i = 0; i < this->chunks_size(); i++) { + for (unsigned int i = 0, n = this->chunks_size(); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 3, this->chunks(i), target); + InternalWriteMessageNoVirtualToArray( + 3, this->chunks(i), false, target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:SSL_log) return target; } -int SSL_log::ByteSize() const { - int total_size = 0; +size_t SSL_log::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:SSL_log) + size_t total_size = 0; - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_numberofchunks()) { // required int64 numberOfChunks = 1; - if (has_numberofchunks()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int64Size( - this->numberofchunks()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->numberofchunks()); + } + if (has_timerinterval()) { // required int64 timerInterval = 2; - if (has_timerinterval()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int64Size( - this->timerinterval()); - } - - } - // repeated .log_chunk chunks = 3; - total_size += 1 * this->chunks_size(); - for (int i = 0; i < this->chunks_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->chunks(i)); + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->timerinterval()); } - if (!unknown_fields().empty()) { + return total_size; +} +size_t SSL_log::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:SSL_log) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( unknown_fields()); } + if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present. + // required int64 numberOfChunks = 1; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->numberofchunks()); + + // required int64 timerInterval = 2; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->timerinterval()); + + } else { + total_size += RequiredFieldsByteSizeFallback(); + } + // repeated .log_chunk chunks = 3; + { + unsigned int count = this->chunks_size(); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->chunks(i)); + } + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void SSL_log::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:SSL_log) + GOOGLE_DCHECK_NE(&from, this); const SSL_log* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:SSL_log) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:SSL_log) MergeFrom(*source); } } void SSL_log::MergeFrom(const SSL_log& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(class_specific_merge_from_start:SSL_log) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); chunks_.MergeFrom(from.chunks_); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from._has_bits_[0 / 32] & 3u) { if (from.has_numberofchunks()) { set_numberofchunks(from.numberofchunks()); } @@ -719,16 +957,17 @@ void SSL_log::MergeFrom(const SSL_log& from) { set_timerinterval(from.timerinterval()); } } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void SSL_log::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:SSL_log) if (&from == this) return; Clear(); MergeFrom(from); } void SSL_log::CopyFrom(const SSL_log& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:SSL_log) if (&from == this) return; Clear(); MergeFrom(from); @@ -736,32 +975,110 @@ void SSL_log::CopyFrom(const SSL_log& from) { bool SSL_log::IsInitialized() const { if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; - - for (int i = 0; i < chunks_size(); i++) { - if (!this->chunks(i).IsInitialized()) return false; - } + if (!::google::protobuf::internal::AllAreInitialized(this->chunks())) return false; return true; } void SSL_log::Swap(SSL_log* other) { - if (other != this) { - std::swap(numberofchunks_, other->numberofchunks_); - std::swap(timerinterval_, other->timerinterval_); - chunks_.Swap(&other->chunks_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void SSL_log::InternalSwap(SSL_log* other) { + chunks_.UnsafeArenaSwap(&other->chunks_); + std::swap(numberofchunks_, other->numberofchunks_); + std::swap(timerinterval_, other->timerinterval_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata SSL_log::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = SSL_log_descriptor_; - metadata.reflection = SSL_log_reflection_; - return metadata; + return file_level_metadata[1]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// SSL_log + +// required int64 numberOfChunks = 1; +bool SSL_log::has_numberofchunks() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void SSL_log::set_has_numberofchunks() { + _has_bits_[0] |= 0x00000001u; +} +void SSL_log::clear_has_numberofchunks() { + _has_bits_[0] &= ~0x00000001u; +} +void SSL_log::clear_numberofchunks() { + numberofchunks_ = GOOGLE_LONGLONG(0); + clear_has_numberofchunks(); +} +::google::protobuf::int64 SSL_log::numberofchunks() const { + // @@protoc_insertion_point(field_get:SSL_log.numberOfChunks) + return numberofchunks_; +} +void SSL_log::set_numberofchunks(::google::protobuf::int64 value) { + set_has_numberofchunks(); + numberofchunks_ = value; + // @@protoc_insertion_point(field_set:SSL_log.numberOfChunks) +} + +// required int64 timerInterval = 2; +bool SSL_log::has_timerinterval() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +void SSL_log::set_has_timerinterval() { + _has_bits_[0] |= 0x00000002u; +} +void SSL_log::clear_has_timerinterval() { + _has_bits_[0] &= ~0x00000002u; +} +void SSL_log::clear_timerinterval() { + timerinterval_ = GOOGLE_LONGLONG(0); + clear_has_timerinterval(); +} +::google::protobuf::int64 SSL_log::timerinterval() const { + // @@protoc_insertion_point(field_get:SSL_log.timerInterval) + return timerinterval_; +} +void SSL_log::set_timerinterval(::google::protobuf::int64 value) { + set_has_timerinterval(); + timerinterval_ = value; + // @@protoc_insertion_point(field_set:SSL_log.timerInterval) +} + +// repeated .log_chunk chunks = 3; +int SSL_log::chunks_size() const { + return chunks_.size(); +} +void SSL_log::clear_chunks() { + chunks_.Clear(); +} +const ::log_chunk& SSL_log::chunks(int index) const { + // @@protoc_insertion_point(field_get:SSL_log.chunks) + return chunks_.Get(index); +} +::log_chunk* SSL_log::mutable_chunks(int index) { + // @@protoc_insertion_point(field_mutable:SSL_log.chunks) + return chunks_.Mutable(index); +} +::log_chunk* SSL_log::add_chunks() { + // @@protoc_insertion_point(field_add:SSL_log.chunks) + return chunks_.Add(); +} +::google::protobuf::RepeatedPtrField< ::log_chunk >* +SSL_log::mutable_chunks() { + // @@protoc_insertion_point(field_mutable_list:SSL_log.chunks) + return &chunks_; +} +const ::google::protobuf::RepeatedPtrField< ::log_chunk >& +SSL_log::chunks() const { + // @@protoc_insertion_point(field_list:SSL_log.chunks) + return chunks_; } +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) diff --git a/src/proto/ssl_log.pb.h b/src/proto/ssl_log.pb.h index c3b7eda..c8ac350 100644 --- a/src/proto/ssl_log.pb.h +++ b/src/proto/ssl_log.pb.h @@ -8,37 +8,48 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 2005000 +#if GOOGLE_PROTOBUF_VERSION < 3001000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. #endif +#include +#include #include +#include #include -#include -#include +#include // IWYU pragma: export +#include // IWYU pragma: export #include #include "Robot_message.pb.h" #include "Ball_message.pb.h" // @@protoc_insertion_point(includes) +class Ball_message; +class Ball_messageDefaultTypeInternal; +extern Ball_messageDefaultTypeInternal _Ball_message_default_instance_; +class Robot_message; +class Robot_messageDefaultTypeInternal; +extern Robot_messageDefaultTypeInternal _Robot_message_default_instance_; +class SSL_log; +class SSL_logDefaultTypeInternal; +extern SSL_logDefaultTypeInternal _SSL_log_default_instance_; +class log_chunk; +class log_chunkDefaultTypeInternal; +extern log_chunkDefaultTypeInternal _log_chunk_default_instance_; // Internal implementation detail -- do not call these. -void protobuf_AddDesc_ssl_5flog_2eproto(); -void protobuf_AssignDesc_ssl_5flog_2eproto(); -void protobuf_ShutdownFile_ssl_5flog_2eproto(); - -class log_chunk; -class SSL_log; +void protobuf_AddDesc_ssl_5flog_2eproto(); +void protobuf_InitDefaults_ssl_5flog_2eproto(); // =================================================================== -class log_chunk : public ::google::protobuf::Message { +class log_chunk : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:log_chunk) */ { public: log_chunk(); virtual ~log_chunk(); @@ -51,114 +62,133 @@ class log_chunk : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const log_chunk& default_instance(); + static inline const log_chunk* internal_default_instance() { + return reinterpret_cast( + &_log_chunk_default_instance_); + } + void Swap(log_chunk* other); // implements Message ---------------------------------------------- - log_chunk* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline log_chunk* New() const PROTOBUF_FINAL { return New(NULL); } + + log_chunk* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const log_chunk& from); void MergeFrom(const log_chunk& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(log_chunk* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // required int64 chunk_number = 1; - inline bool has_chunk_number() const; - inline void clear_chunk_number(); + bool has_chunk_number() const; + void clear_chunk_number(); static const int kChunkNumberFieldNumber = 1; - inline ::google::protobuf::int64 chunk_number() const; - inline void set_chunk_number(::google::protobuf::int64 value); + ::google::protobuf::int64 chunk_number() const; + void set_chunk_number(::google::protobuf::int64 value); // required .Ball_message ball = 2; - inline bool has_ball() const; - inline void clear_ball(); + bool has_ball() const; + void clear_ball(); static const int kBallFieldNumber = 2; - inline const ::Ball_message& ball() const; - inline ::Ball_message* mutable_ball(); - inline ::Ball_message* release_ball(); - inline void set_allocated_ball(::Ball_message* ball); + const ::Ball_message& ball() const; + ::Ball_message* mutable_ball(); + ::Ball_message* release_ball(); + void set_allocated_ball(::Ball_message* ball); // repeated .Robot_message ours = 3; - inline int ours_size() const; - inline void clear_ours(); + int ours_size() const; + void clear_ours(); static const int kOursFieldNumber = 3; - inline const ::Robot_message& ours(int index) const; - inline ::Robot_message* mutable_ours(int index); - inline ::Robot_message* add_ours(); - inline const ::google::protobuf::RepeatedPtrField< ::Robot_message >& - ours() const; - inline ::google::protobuf::RepeatedPtrField< ::Robot_message >* + const ::Robot_message& ours(int index) const; + ::Robot_message* mutable_ours(int index); + ::Robot_message* add_ours(); + ::google::protobuf::RepeatedPtrField< ::Robot_message >* mutable_ours(); + const ::google::protobuf::RepeatedPtrField< ::Robot_message >& + ours() const; // repeated .Robot_message opps = 4; - inline int opps_size() const; - inline void clear_opps(); + int opps_size() const; + void clear_opps(); static const int kOppsFieldNumber = 4; - inline const ::Robot_message& opps(int index) const; - inline ::Robot_message* mutable_opps(int index); - inline ::Robot_message* add_opps(); - inline const ::google::protobuf::RepeatedPtrField< ::Robot_message >& - opps() const; - inline ::google::protobuf::RepeatedPtrField< ::Robot_message >* + const ::Robot_message& opps(int index) const; + ::Robot_message* mutable_opps(int index); + ::Robot_message* add_opps(); + ::google::protobuf::RepeatedPtrField< ::Robot_message >* mutable_opps(); + const ::google::protobuf::RepeatedPtrField< ::Robot_message >& + opps() const; // @@protoc_insertion_point(class_scope:log_chunk) private: - inline void set_has_chunk_number(); - inline void clear_has_chunk_number(); - inline void set_has_ball(); - inline void clear_has_ball(); + void set_has_chunk_number(); + void clear_has_chunk_number(); + void set_has_ball(); + void clear_has_ball(); - ::google::protobuf::UnknownFieldSet _unknown_fields_; + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; - ::google::protobuf::int64 chunk_number_; - ::Ball_message* ball_; + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; ::google::protobuf::RepeatedPtrField< ::Robot_message > ours_; ::google::protobuf::RepeatedPtrField< ::Robot_message > opps_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32]; - - friend void protobuf_AddDesc_ssl_5flog_2eproto(); - friend void protobuf_AssignDesc_ssl_5flog_2eproto(); + ::Ball_message* ball_; + ::google::protobuf::int64 chunk_number_; + friend void protobuf_InitDefaults_ssl_5flog_2eproto_impl(); + friend void protobuf_AddDesc_ssl_5flog_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_ssl_5flog_2eproto(); friend void protobuf_ShutdownFile_ssl_5flog_2eproto(); - void InitAsDefaultInstance(); - static log_chunk* default_instance_; }; // ------------------------------------------------------------------- -class SSL_log : public ::google::protobuf::Message { +class SSL_log : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:SSL_log) */ { public: SSL_log(); virtual ~SSL_log(); @@ -171,148 +201,176 @@ class SSL_log : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const SSL_log& default_instance(); + static inline const SSL_log* internal_default_instance() { + return reinterpret_cast( + &_SSL_log_default_instance_); + } + void Swap(SSL_log* other); // implements Message ---------------------------------------------- - SSL_log* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline SSL_log* New() const PROTOBUF_FINAL { return New(NULL); } + + SSL_log* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const SSL_log& from); void MergeFrom(const SSL_log& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(SSL_log* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // required int64 numberOfChunks = 1; - inline bool has_numberofchunks() const; - inline void clear_numberofchunks(); + bool has_numberofchunks() const; + void clear_numberofchunks(); static const int kNumberOfChunksFieldNumber = 1; - inline ::google::protobuf::int64 numberofchunks() const; - inline void set_numberofchunks(::google::protobuf::int64 value); + ::google::protobuf::int64 numberofchunks() const; + void set_numberofchunks(::google::protobuf::int64 value); // required int64 timerInterval = 2; - inline bool has_timerinterval() const; - inline void clear_timerinterval(); + bool has_timerinterval() const; + void clear_timerinterval(); static const int kTimerIntervalFieldNumber = 2; - inline ::google::protobuf::int64 timerinterval() const; - inline void set_timerinterval(::google::protobuf::int64 value); + ::google::protobuf::int64 timerinterval() const; + void set_timerinterval(::google::protobuf::int64 value); // repeated .log_chunk chunks = 3; - inline int chunks_size() const; - inline void clear_chunks(); + int chunks_size() const; + void clear_chunks(); static const int kChunksFieldNumber = 3; - inline const ::log_chunk& chunks(int index) const; - inline ::log_chunk* mutable_chunks(int index); - inline ::log_chunk* add_chunks(); - inline const ::google::protobuf::RepeatedPtrField< ::log_chunk >& - chunks() const; - inline ::google::protobuf::RepeatedPtrField< ::log_chunk >* + const ::log_chunk& chunks(int index) const; + ::log_chunk* mutable_chunks(int index); + ::log_chunk* add_chunks(); + ::google::protobuf::RepeatedPtrField< ::log_chunk >* mutable_chunks(); + const ::google::protobuf::RepeatedPtrField< ::log_chunk >& + chunks() const; // @@protoc_insertion_point(class_scope:SSL_log) private: - inline void set_has_numberofchunks(); - inline void clear_has_numberofchunks(); - inline void set_has_timerinterval(); - inline void clear_has_timerinterval(); + void set_has_numberofchunks(); + void clear_has_numberofchunks(); + void set_has_timerinterval(); + void clear_has_timerinterval(); - ::google::protobuf::UnknownFieldSet _unknown_fields_; + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; + ::google::protobuf::RepeatedPtrField< ::log_chunk > chunks_; ::google::protobuf::int64 numberofchunks_; ::google::protobuf::int64 timerinterval_; - ::google::protobuf::RepeatedPtrField< ::log_chunk > chunks_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; - - friend void protobuf_AddDesc_ssl_5flog_2eproto(); - friend void protobuf_AssignDesc_ssl_5flog_2eproto(); + friend void protobuf_InitDefaults_ssl_5flog_2eproto_impl(); + friend void protobuf_AddDesc_ssl_5flog_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_ssl_5flog_2eproto(); friend void protobuf_ShutdownFile_ssl_5flog_2eproto(); - void InitAsDefaultInstance(); - static SSL_log* default_instance_; }; // =================================================================== // =================================================================== +#if !PROTOBUF_INLINE_NOT_IN_HEADERS // log_chunk // required int64 chunk_number = 1; inline bool log_chunk::has_chunk_number() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return (_has_bits_[0] & 0x00000002u) != 0; } inline void log_chunk::set_has_chunk_number() { - _has_bits_[0] |= 0x00000001u; + _has_bits_[0] |= 0x00000002u; } inline void log_chunk::clear_has_chunk_number() { - _has_bits_[0] &= ~0x00000001u; + _has_bits_[0] &= ~0x00000002u; } inline void log_chunk::clear_chunk_number() { chunk_number_ = GOOGLE_LONGLONG(0); clear_has_chunk_number(); } inline ::google::protobuf::int64 log_chunk::chunk_number() const { + // @@protoc_insertion_point(field_get:log_chunk.chunk_number) return chunk_number_; } inline void log_chunk::set_chunk_number(::google::protobuf::int64 value) { set_has_chunk_number(); chunk_number_ = value; + // @@protoc_insertion_point(field_set:log_chunk.chunk_number) } // required .Ball_message ball = 2; inline bool log_chunk::has_ball() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return (_has_bits_[0] & 0x00000001u) != 0; } inline void log_chunk::set_has_ball() { - _has_bits_[0] |= 0x00000002u; + _has_bits_[0] |= 0x00000001u; } inline void log_chunk::clear_has_ball() { - _has_bits_[0] &= ~0x00000002u; + _has_bits_[0] &= ~0x00000001u; } inline void log_chunk::clear_ball() { if (ball_ != NULL) ball_->::Ball_message::Clear(); clear_has_ball(); } inline const ::Ball_message& log_chunk::ball() const { - return ball_ != NULL ? *ball_ : *default_instance_->ball_; + // @@protoc_insertion_point(field_get:log_chunk.ball) + return ball_ != NULL ? *ball_ + : *::Ball_message::internal_default_instance(); } inline ::Ball_message* log_chunk::mutable_ball() { set_has_ball(); - if (ball_ == NULL) ball_ = new ::Ball_message; + if (ball_ == NULL) { + ball_ = new ::Ball_message; + } + // @@protoc_insertion_point(field_mutable:log_chunk.ball) return ball_; } inline ::Ball_message* log_chunk::release_ball() { + // @@protoc_insertion_point(field_release:log_chunk.ball) clear_has_ball(); ::Ball_message* temp = ball_; ball_ = NULL; @@ -326,6 +384,7 @@ inline void log_chunk::set_allocated_ball(::Ball_message* ball) { } else { clear_has_ball(); } + // @@protoc_insertion_point(field_set_allocated:log_chunk.ball) } // repeated .Robot_message ours = 3; @@ -336,22 +395,27 @@ inline void log_chunk::clear_ours() { ours_.Clear(); } inline const ::Robot_message& log_chunk::ours(int index) const { + // @@protoc_insertion_point(field_get:log_chunk.ours) return ours_.Get(index); } inline ::Robot_message* log_chunk::mutable_ours(int index) { + // @@protoc_insertion_point(field_mutable:log_chunk.ours) return ours_.Mutable(index); } inline ::Robot_message* log_chunk::add_ours() { + // @@protoc_insertion_point(field_add:log_chunk.ours) return ours_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::Robot_message >& -log_chunk::ours() const { - return ours_; -} inline ::google::protobuf::RepeatedPtrField< ::Robot_message >* log_chunk::mutable_ours() { + // @@protoc_insertion_point(field_mutable_list:log_chunk.ours) return &ours_; } +inline const ::google::protobuf::RepeatedPtrField< ::Robot_message >& +log_chunk::ours() const { + // @@protoc_insertion_point(field_list:log_chunk.ours) + return ours_; +} // repeated .Robot_message opps = 4; inline int log_chunk::opps_size() const { @@ -361,22 +425,27 @@ inline void log_chunk::clear_opps() { opps_.Clear(); } inline const ::Robot_message& log_chunk::opps(int index) const { + // @@protoc_insertion_point(field_get:log_chunk.opps) return opps_.Get(index); } inline ::Robot_message* log_chunk::mutable_opps(int index) { + // @@protoc_insertion_point(field_mutable:log_chunk.opps) return opps_.Mutable(index); } inline ::Robot_message* log_chunk::add_opps() { + // @@protoc_insertion_point(field_add:log_chunk.opps) return opps_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::Robot_message >& -log_chunk::opps() const { - return opps_; -} inline ::google::protobuf::RepeatedPtrField< ::Robot_message >* log_chunk::mutable_opps() { + // @@protoc_insertion_point(field_mutable_list:log_chunk.opps) return &opps_; } +inline const ::google::protobuf::RepeatedPtrField< ::Robot_message >& +log_chunk::opps() const { + // @@protoc_insertion_point(field_list:log_chunk.opps) + return opps_; +} // ------------------------------------------------------------------- @@ -397,11 +466,13 @@ inline void SSL_log::clear_numberofchunks() { clear_has_numberofchunks(); } inline ::google::protobuf::int64 SSL_log::numberofchunks() const { + // @@protoc_insertion_point(field_get:SSL_log.numberOfChunks) return numberofchunks_; } inline void SSL_log::set_numberofchunks(::google::protobuf::int64 value) { set_has_numberofchunks(); numberofchunks_ = value; + // @@protoc_insertion_point(field_set:SSL_log.numberOfChunks) } // required int64 timerInterval = 2; @@ -419,11 +490,13 @@ inline void SSL_log::clear_timerinterval() { clear_has_timerinterval(); } inline ::google::protobuf::int64 SSL_log::timerinterval() const { + // @@protoc_insertion_point(field_get:SSL_log.timerInterval) return timerinterval_; } inline void SSL_log::set_timerinterval(::google::protobuf::int64 value) { set_has_timerinterval(); timerinterval_ = value; + // @@protoc_insertion_point(field_set:SSL_log.timerInterval) } // repeated .log_chunk chunks = 3; @@ -434,34 +507,34 @@ inline void SSL_log::clear_chunks() { chunks_.Clear(); } inline const ::log_chunk& SSL_log::chunks(int index) const { + // @@protoc_insertion_point(field_get:SSL_log.chunks) return chunks_.Get(index); } inline ::log_chunk* SSL_log::mutable_chunks(int index) { + // @@protoc_insertion_point(field_mutable:SSL_log.chunks) return chunks_.Mutable(index); } inline ::log_chunk* SSL_log::add_chunks() { + // @@protoc_insertion_point(field_add:SSL_log.chunks) return chunks_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::log_chunk >& -SSL_log::chunks() const { - return chunks_; -} inline ::google::protobuf::RepeatedPtrField< ::log_chunk >* SSL_log::mutable_chunks() { + // @@protoc_insertion_point(field_mutable_list:SSL_log.chunks) return &chunks_; } +inline const ::google::protobuf::RepeatedPtrField< ::log_chunk >& +SSL_log::chunks() const { + // @@protoc_insertion_point(field_list:SSL_log.chunks) + return chunks_; +} +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS +// ------------------------------------------------------------------- -// @@protoc_insertion_point(namespace_scope) - -#ifndef SWIG -namespace google { -namespace protobuf { +// @@protoc_insertion_point(namespace_scope) -} // namespace google -} // namespace protobuf -#endif // SWIG // @@protoc_insertion_point(global_scope) diff --git a/src/proto/vision_log.pb.cc b/src/proto/vision_log.pb.cc index ceb0525..30ac746 100644 --- a/src/proto/vision_log.pb.cc +++ b/src/proto/vision_log.pb.cc @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -15,110 +16,124 @@ #include #include // @@protoc_insertion_point(includes) +class Vision_chunkDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +Vision_chunkDefaultTypeInternal _Vision_chunk_default_instance_; +class Vision_logDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed {}; +Vision_logDefaultTypeInternal _Vision_log_default_instance_; namespace { -const ::google::protobuf::Descriptor* Vision_chunk_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - Vision_chunk_reflection_ = NULL; -const ::google::protobuf::Descriptor* Vision_log_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - Vision_log_reflection_ = NULL; +::google::protobuf::Metadata file_level_metadata[2]; } // namespace -void protobuf_AssignDesc_vision_5flog_2eproto() { - protobuf_AddDesc_vision_5flog_2eproto(); - const ::google::protobuf::FileDescriptor* file = - ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( - "vision_log.proto"); - GOOGLE_CHECK(file != NULL); - Vision_chunk_descriptor_ = file->message_type(0); - static const int Vision_chunk_offsets_[3] = { +const ::google::protobuf::uint32* protobuf_Offsets_vision_5flog_2eproto() GOOGLE_ATTRIBUTE_COLD; +const ::google::protobuf::uint32* protobuf_Offsets_vision_5flog_2eproto() { + static const ::google::protobuf::uint32 offsets[] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vision_chunk, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vision_chunk, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vision_chunk, time_elapsed_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vision_chunk, id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vision_chunk, packet_), - }; - Vision_chunk_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - Vision_chunk_descriptor_, - Vision_chunk::default_instance_, - Vision_chunk_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vision_chunk, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vision_chunk, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(Vision_chunk)); - Vision_log_descriptor_ = file->message_type(1); - static const int Vision_log_offsets_[2] = { + 1, + 2, + 0, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vision_log, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vision_log, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vision_log, number_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vision_log, chunks_), + 0, + 1, }; - Vision_log_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - Vision_log_descriptor_, - Vision_log::default_instance_, - Vision_log_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vision_log, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vision_log, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(Vision_log)); + return offsets; } +static const ::google::protobuf::internal::MigrationSchema schemas[] = { + { 0, 7, sizeof(Vision_chunk)}, + { 10, 16, sizeof(Vision_log)}, +}; + +static const ::google::protobuf::internal::DefaultInstanceData file_default_instances[] = { + {reinterpret_cast(&_Vision_chunk_default_instance_), NULL}, + {reinterpret_cast(&_Vision_log_default_instance_), NULL}, +}; + namespace { -GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); -inline void protobuf_AssignDescriptorsOnce() { - ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, - &protobuf_AssignDesc_vision_5flog_2eproto); +void protobuf_AssignDescriptors() { + protobuf_AddDesc_vision_5flog_2eproto(); + ::google::protobuf::MessageFactory* factory = NULL; + AssignDescriptors( + "vision_log.proto", schemas, file_default_instances, protobuf_Offsets_vision_5flog_2eproto(), factory, + file_level_metadata, NULL, NULL); +} + +void protobuf_AssignDescriptorsOnce() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); } +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - Vision_chunk_descriptor_, &Vision_chunk::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - Vision_log_descriptor_, &Vision_log::default_instance()); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 2); } } // namespace void protobuf_ShutdownFile_vision_5flog_2eproto() { - delete Vision_chunk::default_instance_; - delete Vision_chunk_reflection_; - delete Vision_log::default_instance_; - delete Vision_log_reflection_; + _Vision_chunk_default_instance_.Shutdown(); + delete file_level_metadata[0].reflection; + _Vision_log_default_instance_.Shutdown(); + delete file_level_metadata[1].reflection; } -void protobuf_AddDesc_vision_5flog_2eproto() { - static bool already_here = false; - if (already_here) return; - already_here = true; +void protobuf_InitDefaults_vision_5flog_2eproto_impl() { GOOGLE_PROTOBUF_VERIFY_VERSION; - ::protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_2eproto(); - ::RoboCup2014Legacy::Wrapper::protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto(); + ::protobuf_InitDefaults_messages_5frobocup_5fssl_5fwrapper_2eproto(); + ::RoboCup2014Legacy::Wrapper::protobuf_InitDefaults_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto(); + ::google::protobuf::internal::InitProtobufDefaults(); + _Vision_chunk_default_instance_.DefaultConstruct(); + _Vision_log_default_instance_.DefaultConstruct(); + _Vision_chunk_default_instance_.get_mutable()->packet_ = const_cast< ::SSL_WrapperPacket*>( + ::SSL_WrapperPacket::internal_default_instance()); +} + +void protobuf_InitDefaults_vision_5flog_2eproto() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_InitDefaults_vision_5flog_2eproto_impl); +} +void protobuf_AddDesc_vision_5flog_2eproto_impl() { + protobuf_InitDefaults_vision_5flog_2eproto(); + static const char descriptor[] = { + "\n\020vision_log.proto\032\"messages_robocup_ssl" + "_wrapper.proto\032)messages_robocup_ssl_wra" + "pper_legacy.proto\"T\n\014Vision_chunk\022\024\n\014tim" + "e_elapsed\030\001 \002(\003\022\n\n\002id\030\002 \001(\003\022\"\n\006packet\030\003 " + "\002(\0132\022.SSL_WrapperPacket\";\n\nVision_log\022\016\n" + "\006number\030\001 \001(\003\022\035\n\006chunks\030\002 \003(\0132\r.Vision_c" + "hunk" + }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - "\n\020vision_log.proto\032\"messages_robocup_ssl" - "_wrapper.proto\032)messages_robocup_ssl_wra" - "pper_legacy.proto\"T\n\014Vision_chunk\022\024\n\014tim" - "e_elapsed\030\001 \002(\003\022\n\n\002id\030\002 \001(\003\022\"\n\006packet\030\003 " - "\002(\0132\022.SSL_WrapperPacket\";\n\nVision_log\022\016\n" - "\006number\030\001 \001(\003\022\035\n\006chunks\030\002 \003(\0132\r.Vision_c" - "hunk", 244); + descriptor, 244); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "vision_log.proto", &protobuf_RegisterTypes); - Vision_chunk::default_instance_ = new Vision_chunk(); - Vision_log::default_instance_ = new Vision_log(); - Vision_chunk::default_instance_->InitAsDefaultInstance(); - Vision_log::default_instance_->InitAsDefaultInstance(); + ::protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_2eproto(); + ::RoboCup2014Legacy::Wrapper::protobuf_AddDesc_messages_5frobocup_5fssl_5fwrapper_5flegacy_2eproto(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_vision_5flog_2eproto); } +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_vision_5flog_2eproto_once_); +void protobuf_AddDesc_vision_5flog_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_vision_5flog_2eproto_once_, + &protobuf_AddDesc_vision_5flog_2eproto_impl); +} // Force AddDescriptors() to be called at static initialization time. struct StaticDescriptorInitializer_vision_5flog_2eproto { StaticDescriptorInitializer_vision_5flog_2eproto() { @@ -128,41 +143,50 @@ struct StaticDescriptorInitializer_vision_5flog_2eproto { // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int Vision_chunk::kTimeElapsedFieldNumber; const int Vision_chunk::kIdFieldNumber; const int Vision_chunk::kPacketFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 Vision_chunk::Vision_chunk() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_vision_5flog_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:Vision_chunk) } - -void Vision_chunk::InitAsDefaultInstance() { - packet_ = const_cast< ::SSL_WrapperPacket*>(&::SSL_WrapperPacket::default_instance()); -} - Vision_chunk::Vision_chunk(const Vision_chunk& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from.has_packet()) { + packet_ = new ::SSL_WrapperPacket(*from.packet_); + } else { + packet_ = NULL; + } + ::memcpy(&time_elapsed_, &from.time_elapsed_, + reinterpret_cast(&id_) - + reinterpret_cast(&time_elapsed_) + sizeof(id_)); + // @@protoc_insertion_point(copy_constructor:Vision_chunk) } void Vision_chunk::SharedCtor() { _cached_size_ = 0; - time_elapsed_ = GOOGLE_LONGLONG(0); - id_ = GOOGLE_LONGLONG(0); - packet_ = NULL; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); + ::memset(&packet_, 0, reinterpret_cast(&id_) - + reinterpret_cast(&packet_) + sizeof(id_)); } Vision_chunk::~Vision_chunk() { + // @@protoc_insertion_point(destructor:Vision_chunk) SharedDtor(); } void Vision_chunk::SharedDtor() { - if (this != default_instance_) { + if (this != internal_default_instance()) { delete packet_; } } @@ -174,88 +198,89 @@ void Vision_chunk::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* Vision_chunk::descriptor() { protobuf_AssignDescriptorsOnce(); - return Vision_chunk_descriptor_; + return file_level_metadata[0].descriptor; } const Vision_chunk& Vision_chunk::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_vision_5flog_2eproto(); - return *default_instance_; + protobuf_InitDefaults_vision_5flog_2eproto(); + return *internal_default_instance(); } -Vision_chunk* Vision_chunk::default_instance_ = NULL; - -Vision_chunk* Vision_chunk::New() const { - return new Vision_chunk; +Vision_chunk* Vision_chunk::New(::google::protobuf::Arena* arena) const { + Vision_chunk* n = new Vision_chunk; + if (arena != NULL) { + arena->Own(n); + } + return n; } void Vision_chunk::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - time_elapsed_ = GOOGLE_LONGLONG(0); - id_ = GOOGLE_LONGLONG(0); - if (has_packet()) { - if (packet_ != NULL) packet_->::SSL_WrapperPacket::Clear(); - } +// @@protoc_insertion_point(message_clear_start:Vision_chunk) + if (has_packet()) { + GOOGLE_DCHECK(packet_ != NULL); + packet_->::SSL_WrapperPacket::Clear(); } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + if (_has_bits_[0 / 32] & 6u) { + ::memset(&time_elapsed_, 0, reinterpret_cast(&id_) - + reinterpret_cast(&time_elapsed_) + sizeof(id_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool Vision_chunk::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:Vision_chunk) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required int64 time_elapsed = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + if (tag == 8u) { + set_has_time_elapsed(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( input, &time_elapsed_))); - set_has_time_elapsed(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(16)) goto parse_id; break; } // optional int64 id = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_id: + if (tag == 16u) { + set_has_id(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( input, &id_))); - set_has_id(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(26)) goto parse_packet; break; } // required .SSL_WrapperPacket packet = 3; case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_packet: + if (tag == 26u) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_packet())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectAtEnd()) return true; break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -263,12 +288,18 @@ bool Vision_chunk::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:Vision_chunk) return true; +failure: + // @@protoc_insertion_point(parse_failure:Vision_chunk) + return false; #undef DO_ } void Vision_chunk::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:Vision_chunk) // required int64 time_elapsed = 1; if (has_time_elapsed()) { ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->time_elapsed(), output); @@ -282,17 +313,20 @@ void Vision_chunk::SerializeWithCachedSizes( // required .SSL_WrapperPacket packet = 3; if (has_packet()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, this->packet(), output); + 3, *this->packet_, output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:Vision_chunk) } -::google::protobuf::uint8* Vision_chunk::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* Vision_chunk::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:Vision_chunk) // required int64 time_elapsed = 1; if (has_time_elapsed()) { target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->time_elapsed(), target); @@ -306,157 +340,282 @@ ::google::protobuf::uint8* Vision_chunk::SerializeWithCachedSizesToArray( // required .SSL_WrapperPacket packet = 3; if (has_packet()) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 3, this->packet(), target); + InternalWriteMessageNoVirtualToArray( + 3, *this->packet_, false, target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:Vision_chunk) return target; } -int Vision_chunk::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // required int64 time_elapsed = 1; - if (has_time_elapsed()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int64Size( - this->time_elapsed()); - } - - // optional int64 id = 2; - if (has_id()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int64Size( - this->id()); - } +size_t Vision_chunk::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:Vision_chunk) + size_t total_size = 0; + if (has_packet()) { // required .SSL_WrapperPacket packet = 3; - if (has_packet()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->packet()); - } + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->packet_); + } + if (has_time_elapsed()) { + // required int64 time_elapsed = 1; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->time_elapsed()); } - if (!unknown_fields().empty()) { + + return total_size; +} +size_t Vision_chunk::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Vision_chunk) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( unknown_fields()); } + if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present. + // required .SSL_WrapperPacket packet = 3; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->packet_); + + // required int64 time_elapsed = 1; + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->time_elapsed()); + + } else { + total_size += RequiredFieldsByteSizeFallback(); + } + // optional int64 id = 2; + if (has_id()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->id()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void Vision_chunk::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:Vision_chunk) + GOOGLE_DCHECK_NE(&from, this); const Vision_chunk* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Vision_chunk) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Vision_chunk) MergeFrom(*source); } } void Vision_chunk::MergeFrom(const Vision_chunk& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { +// @@protoc_insertion_point(class_specific_merge_from_start:Vision_chunk) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._has_bits_[0 / 32] & 7u) { + if (from.has_packet()) { + mutable_packet()->::SSL_WrapperPacket::MergeFrom(from.packet()); + } if (from.has_time_elapsed()) { set_time_elapsed(from.time_elapsed()); } if (from.has_id()) { set_id(from.id()); } - if (from.has_packet()) { - mutable_packet()->::SSL_WrapperPacket::MergeFrom(from.packet()); - } } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void Vision_chunk::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Vision_chunk) if (&from == this) return; Clear(); MergeFrom(from); } void Vision_chunk::CopyFrom(const Vision_chunk& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Vision_chunk) if (&from == this) return; Clear(); MergeFrom(from); } bool Vision_chunk::IsInitialized() const { - if ((_has_bits_[0] & 0x00000005) != 0x00000005) return false; - + if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; if (has_packet()) { - if (!this->packet().IsInitialized()) return false; + if (!this->packet_->IsInitialized()) return false; } return true; } void Vision_chunk::Swap(Vision_chunk* other) { - if (other != this) { - std::swap(time_elapsed_, other->time_elapsed_); - std::swap(id_, other->id_); - std::swap(packet_, other->packet_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void Vision_chunk::InternalSwap(Vision_chunk* other) { + std::swap(packet_, other->packet_); + std::swap(time_elapsed_, other->time_elapsed_); + std::swap(id_, other->id_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata Vision_chunk::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = Vision_chunk_descriptor_; - metadata.reflection = Vision_chunk_reflection_; - return metadata; + return file_level_metadata[0]; } +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// Vision_chunk + +// required int64 time_elapsed = 1; +bool Vision_chunk::has_time_elapsed() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +void Vision_chunk::set_has_time_elapsed() { + _has_bits_[0] |= 0x00000002u; +} +void Vision_chunk::clear_has_time_elapsed() { + _has_bits_[0] &= ~0x00000002u; +} +void Vision_chunk::clear_time_elapsed() { + time_elapsed_ = GOOGLE_LONGLONG(0); + clear_has_time_elapsed(); +} +::google::protobuf::int64 Vision_chunk::time_elapsed() const { + // @@protoc_insertion_point(field_get:Vision_chunk.time_elapsed) + return time_elapsed_; +} +void Vision_chunk::set_time_elapsed(::google::protobuf::int64 value) { + set_has_time_elapsed(); + time_elapsed_ = value; + // @@protoc_insertion_point(field_set:Vision_chunk.time_elapsed) +} + +// optional int64 id = 2; +bool Vision_chunk::has_id() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +void Vision_chunk::set_has_id() { + _has_bits_[0] |= 0x00000004u; +} +void Vision_chunk::clear_has_id() { + _has_bits_[0] &= ~0x00000004u; +} +void Vision_chunk::clear_id() { + id_ = GOOGLE_LONGLONG(0); + clear_has_id(); +} +::google::protobuf::int64 Vision_chunk::id() const { + // @@protoc_insertion_point(field_get:Vision_chunk.id) + return id_; +} +void Vision_chunk::set_id(::google::protobuf::int64 value) { + set_has_id(); + id_ = value; + // @@protoc_insertion_point(field_set:Vision_chunk.id) +} + +// required .SSL_WrapperPacket packet = 3; +bool Vision_chunk::has_packet() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void Vision_chunk::set_has_packet() { + _has_bits_[0] |= 0x00000001u; +} +void Vision_chunk::clear_has_packet() { + _has_bits_[0] &= ~0x00000001u; +} +void Vision_chunk::clear_packet() { + if (packet_ != NULL) packet_->::SSL_WrapperPacket::Clear(); + clear_has_packet(); +} +const ::SSL_WrapperPacket& Vision_chunk::packet() const { + // @@protoc_insertion_point(field_get:Vision_chunk.packet) + return packet_ != NULL ? *packet_ + : *::SSL_WrapperPacket::internal_default_instance(); +} +::SSL_WrapperPacket* Vision_chunk::mutable_packet() { + set_has_packet(); + if (packet_ == NULL) { + packet_ = new ::SSL_WrapperPacket; + } + // @@protoc_insertion_point(field_mutable:Vision_chunk.packet) + return packet_; +} +::SSL_WrapperPacket* Vision_chunk::release_packet() { + // @@protoc_insertion_point(field_release:Vision_chunk.packet) + clear_has_packet(); + ::SSL_WrapperPacket* temp = packet_; + packet_ = NULL; + return temp; +} +void Vision_chunk::set_allocated_packet(::SSL_WrapperPacket* packet) { + delete packet_; + packet_ = packet; + if (packet) { + set_has_packet(); + } else { + clear_has_packet(); + } + // @@protoc_insertion_point(field_set_allocated:Vision_chunk.packet) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== -#ifndef _MSC_VER +#if !defined(_MSC_VER) || _MSC_VER >= 1900 const int Vision_log::kNumberFieldNumber; const int Vision_log::kChunksFieldNumber; -#endif // !_MSC_VER +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 Vision_log::Vision_log() - : ::google::protobuf::Message() { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_InitDefaults_vision_5flog_2eproto(); + } SharedCtor(); + // @@protoc_insertion_point(constructor:Vision_log) } - -void Vision_log::InitAsDefaultInstance() { -} - Vision_log::Vision_log(const Vision_log& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0), + chunks_(from.chunks_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + number_ = from.number_; + // @@protoc_insertion_point(copy_constructor:Vision_log) } void Vision_log::SharedCtor() { _cached_size_ = 0; number_ = GOOGLE_LONGLONG(0); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); } Vision_log::~Vision_log() { + // @@protoc_insertion_point(destructor:Vision_log) SharedDtor(); } void Vision_log::SharedDtor() { - if (this != default_instance_) { - } } void Vision_log::SetCachedSize(int size) const { @@ -466,70 +625,72 @@ void Vision_log::SetCachedSize(int size) const { } const ::google::protobuf::Descriptor* Vision_log::descriptor() { protobuf_AssignDescriptorsOnce(); - return Vision_log_descriptor_; + return file_level_metadata[1].descriptor; } const Vision_log& Vision_log::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_vision_5flog_2eproto(); - return *default_instance_; + protobuf_InitDefaults_vision_5flog_2eproto(); + return *internal_default_instance(); } -Vision_log* Vision_log::default_instance_ = NULL; - -Vision_log* Vision_log::New() const { - return new Vision_log; +Vision_log* Vision_log::New(::google::protobuf::Arena* arena) const { + Vision_log* n = new Vision_log; + if (arena != NULL) { + arena->Own(n); + } + return n; } void Vision_log::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - number_ = GOOGLE_LONGLONG(0); - } +// @@protoc_insertion_point(message_clear_start:Vision_log) chunks_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); + number_ = GOOGLE_LONGLONG(0); + _has_bits_.Clear(); + _internal_metadata_.Clear(); } bool Vision_log::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { + // @@protoc_insertion_point(parse_start:Vision_log) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional int64 number = 1; case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + if (tag == 8u) { + set_has_number(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( input, &number_))); - set_has_number(); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(18)) goto parse_chunks; break; } // repeated .Vision_chunk chunks = 2; case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_chunks: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + if (tag == 18u) { + DO_(input->IncrementRecursionDepth()); + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( input, add_chunks())); } else { - goto handle_uninterpreted; + goto handle_unusual; } - if (input->ExpectTag(18)) goto parse_chunks; - if (input->ExpectAtEnd()) return true; + input->UnsafeDecrementRecursionDepth(); break; } default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; + goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); @@ -537,142 +698,213 @@ bool Vision_log::MergePartialFromCodedStream( } } } +success: + // @@protoc_insertion_point(parse_success:Vision_log) return true; +failure: + // @@protoc_insertion_point(parse_failure:Vision_log) + return false; #undef DO_ } void Vision_log::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:Vision_log) // optional int64 number = 1; if (has_number()) { ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->number(), output); } // repeated .Vision_chunk chunks = 2; - for (int i = 0; i < this->chunks_size(); i++) { + for (unsigned int i = 0, n = this->chunks_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, this->chunks(i), output); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } + // @@protoc_insertion_point(serialize_end:Vision_log) } -::google::protobuf::uint8* Vision_log::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::google::protobuf::uint8* Vision_log::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:Vision_log) // optional int64 number = 1; if (has_number()) { target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->number(), target); } // repeated .Vision_chunk chunks = 2; - for (int i = 0; i < this->chunks_size(); i++) { + for (unsigned int i = 0, n = this->chunks_size(); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 2, this->chunks(i), target); + InternalWriteMessageNoVirtualToArray( + 2, this->chunks(i), false, target); } - if (!unknown_fields().empty()) { + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } + // @@protoc_insertion_point(serialize_to_array_end:Vision_log) return target; } -int Vision_log::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // optional int64 number = 1; - if (has_number()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int64Size( - this->number()); - } +size_t Vision_log::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Vision_log) + size_t total_size = 0; + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); } // repeated .Vision_chunk chunks = 2; - total_size += 1 * this->chunks_size(); - for (int i = 0; i < this->chunks_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->chunks(i)); + { + unsigned int count = this->chunks_size(); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->chunks(i)); + } } - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); + // optional int64 number = 1; + if (has_number()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->number()); } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; + _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void Vision_log::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(generalized_merge_from_start:Vision_log) + GOOGLE_DCHECK_NE(&from, this); const Vision_log* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Vision_log) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Vision_log) MergeFrom(*source); } } void Vision_log::MergeFrom(const Vision_log& from) { - GOOGLE_CHECK_NE(&from, this); +// @@protoc_insertion_point(class_specific_merge_from_start:Vision_log) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); chunks_.MergeFrom(from.chunks_); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_number()) { - set_number(from.number()); - } + if (from.has_number()) { + set_number(from.number()); } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void Vision_log::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Vision_log) if (&from == this) return; Clear(); MergeFrom(from); } void Vision_log::CopyFrom(const Vision_log& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Vision_log) if (&from == this) return; Clear(); MergeFrom(from); } bool Vision_log::IsInitialized() const { - - for (int i = 0; i < chunks_size(); i++) { - if (!this->chunks(i).IsInitialized()) return false; - } + if (!::google::protobuf::internal::AllAreInitialized(this->chunks())) return false; return true; } void Vision_log::Swap(Vision_log* other) { - if (other != this) { - std::swap(number_, other->number_); - chunks_.Swap(&other->chunks_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } + if (other == this) return; + InternalSwap(other); +} +void Vision_log::InternalSwap(Vision_log* other) { + chunks_.UnsafeArenaSwap(&other->chunks_); + std::swap(number_, other->number_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata Vision_log::GetMetadata() const { protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = Vision_log_descriptor_; - metadata.reflection = Vision_log_reflection_; - return metadata; + return file_level_metadata[1]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// Vision_log + +// optional int64 number = 1; +bool Vision_log::has_number() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +void Vision_log::set_has_number() { + _has_bits_[0] |= 0x00000001u; +} +void Vision_log::clear_has_number() { + _has_bits_[0] &= ~0x00000001u; +} +void Vision_log::clear_number() { + number_ = GOOGLE_LONGLONG(0); + clear_has_number(); +} +::google::protobuf::int64 Vision_log::number() const { + // @@protoc_insertion_point(field_get:Vision_log.number) + return number_; +} +void Vision_log::set_number(::google::protobuf::int64 value) { + set_has_number(); + number_ = value; + // @@protoc_insertion_point(field_set:Vision_log.number) +} + +// repeated .Vision_chunk chunks = 2; +int Vision_log::chunks_size() const { + return chunks_.size(); +} +void Vision_log::clear_chunks() { + chunks_.Clear(); +} +const ::Vision_chunk& Vision_log::chunks(int index) const { + // @@protoc_insertion_point(field_get:Vision_log.chunks) + return chunks_.Get(index); +} +::Vision_chunk* Vision_log::mutable_chunks(int index) { + // @@protoc_insertion_point(field_mutable:Vision_log.chunks) + return chunks_.Mutable(index); +} +::Vision_chunk* Vision_log::add_chunks() { + // @@protoc_insertion_point(field_add:Vision_log.chunks) + return chunks_.Add(); +} +::google::protobuf::RepeatedPtrField< ::Vision_chunk >* +Vision_log::mutable_chunks() { + // @@protoc_insertion_point(field_mutable_list:Vision_log.chunks) + return &chunks_; +} +const ::google::protobuf::RepeatedPtrField< ::Vision_chunk >& +Vision_log::chunks() const { + // @@protoc_insertion_point(field_list:Vision_log.chunks) + return chunks_; } +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) diff --git a/src/proto/vision_log.pb.h b/src/proto/vision_log.pb.h index 09b8641..6610215 100644 --- a/src/proto/vision_log.pb.h +++ b/src/proto/vision_log.pb.h @@ -8,37 +8,52 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 2005000 +#if GOOGLE_PROTOBUF_VERSION < 3001000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. #endif +#include +#include #include +#include #include -#include -#include +#include // IWYU pragma: export +#include // IWYU pragma: export #include #include "messages_robocup_ssl_wrapper.pb.h" #include "messages_robocup_ssl_wrapper_legacy.pb.h" // @@protoc_insertion_point(includes) - -// Internal implementation detail -- do not call these. -void protobuf_AddDesc_vision_5flog_2eproto(); -void protobuf_AssignDesc_vision_5flog_2eproto(); -void protobuf_ShutdownFile_vision_5flog_2eproto(); - +class SSL_WrapperPacket; +class SSL_WrapperPacketDefaultTypeInternal; +extern SSL_WrapperPacketDefaultTypeInternal _SSL_WrapperPacket_default_instance_; class Vision_chunk; +class Vision_chunkDefaultTypeInternal; +extern Vision_chunkDefaultTypeInternal _Vision_chunk_default_instance_; class Vision_log; +class Vision_logDefaultTypeInternal; +extern Vision_logDefaultTypeInternal _Vision_log_default_instance_; +namespace RoboCup2014Legacy { +namespace Wrapper { +class SSL_WrapperPacket; +class SSL_WrapperPacketDefaultTypeInternal; +extern SSL_WrapperPacketDefaultTypeInternal _SSL_WrapperPacket_default_instance_; +} // namespace Wrapper +} // namespace RoboCup2014Legacy + +// Internal implementation detail -- do not call these. +void protobuf_AddDesc_vision_5flog_2eproto(); +void protobuf_InitDefaults_vision_5flog_2eproto(); // =================================================================== -class Vision_chunk : public ::google::protobuf::Message { +class Vision_chunk : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:Vision_chunk) */ { public: Vision_chunk(); virtual ~Vision_chunk(); @@ -51,98 +66,117 @@ class Vision_chunk : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const Vision_chunk& default_instance(); + static inline const Vision_chunk* internal_default_instance() { + return reinterpret_cast( + &_Vision_chunk_default_instance_); + } + void Swap(Vision_chunk* other); // implements Message ---------------------------------------------- - Vision_chunk* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline Vision_chunk* New() const PROTOBUF_FINAL { return New(NULL); } + + Vision_chunk* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const Vision_chunk& from); void MergeFrom(const Vision_chunk& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(Vision_chunk* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // required int64 time_elapsed = 1; - inline bool has_time_elapsed() const; - inline void clear_time_elapsed(); + bool has_time_elapsed() const; + void clear_time_elapsed(); static const int kTimeElapsedFieldNumber = 1; - inline ::google::protobuf::int64 time_elapsed() const; - inline void set_time_elapsed(::google::protobuf::int64 value); + ::google::protobuf::int64 time_elapsed() const; + void set_time_elapsed(::google::protobuf::int64 value); // optional int64 id = 2; - inline bool has_id() const; - inline void clear_id(); + bool has_id() const; + void clear_id(); static const int kIdFieldNumber = 2; - inline ::google::protobuf::int64 id() const; - inline void set_id(::google::protobuf::int64 value); + ::google::protobuf::int64 id() const; + void set_id(::google::protobuf::int64 value); // required .SSL_WrapperPacket packet = 3; - inline bool has_packet() const; - inline void clear_packet(); + bool has_packet() const; + void clear_packet(); static const int kPacketFieldNumber = 3; - inline const ::SSL_WrapperPacket& packet() const; - inline ::SSL_WrapperPacket* mutable_packet(); - inline ::SSL_WrapperPacket* release_packet(); - inline void set_allocated_packet(::SSL_WrapperPacket* packet); + const ::SSL_WrapperPacket& packet() const; + ::SSL_WrapperPacket* mutable_packet(); + ::SSL_WrapperPacket* release_packet(); + void set_allocated_packet(::SSL_WrapperPacket* packet); // @@protoc_insertion_point(class_scope:Vision_chunk) private: - inline void set_has_time_elapsed(); - inline void clear_has_time_elapsed(); - inline void set_has_id(); - inline void clear_has_id(); - inline void set_has_packet(); - inline void clear_has_packet(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - + void set_has_time_elapsed(); + void clear_has_time_elapsed(); + void set_has_id(); + void clear_has_id(); + void set_has_packet(); + void clear_has_packet(); + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; + ::SSL_WrapperPacket* packet_; ::google::protobuf::int64 time_elapsed_; ::google::protobuf::int64 id_; - ::SSL_WrapperPacket* packet_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; - - friend void protobuf_AddDesc_vision_5flog_2eproto(); - friend void protobuf_AssignDesc_vision_5flog_2eproto(); + friend void protobuf_InitDefaults_vision_5flog_2eproto_impl(); + friend void protobuf_AddDesc_vision_5flog_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_vision_5flog_2eproto(); friend void protobuf_ShutdownFile_vision_5flog_2eproto(); - void InitAsDefaultInstance(); - static Vision_chunk* default_instance_; }; // ------------------------------------------------------------------- -class Vision_log : public ::google::protobuf::Message { +class Vision_log : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:Vision_log) */ { public: Vision_log(); virtual ~Vision_log(); @@ -155,160 +189,187 @@ class Vision_log : public ::google::protobuf::Message { } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; + return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; + return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const Vision_log& default_instance(); + static inline const Vision_log* internal_default_instance() { + return reinterpret_cast( + &_Vision_log_default_instance_); + } + void Swap(Vision_log* other); // implements Message ---------------------------------------------- - Vision_log* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); + inline Vision_log* New() const PROTOBUF_FINAL { return New(NULL); } + + Vision_log* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const Vision_log& from); void MergeFrom(const Vision_log& from); - void Clear(); - bool IsInitialized() const; + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; - int ByteSize() const; + size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) + const PROTOBUF_FINAL { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const; + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(Vision_log* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // optional int64 number = 1; - inline bool has_number() const; - inline void clear_number(); + bool has_number() const; + void clear_number(); static const int kNumberFieldNumber = 1; - inline ::google::protobuf::int64 number() const; - inline void set_number(::google::protobuf::int64 value); + ::google::protobuf::int64 number() const; + void set_number(::google::protobuf::int64 value); // repeated .Vision_chunk chunks = 2; - inline int chunks_size() const; - inline void clear_chunks(); + int chunks_size() const; + void clear_chunks(); static const int kChunksFieldNumber = 2; - inline const ::Vision_chunk& chunks(int index) const; - inline ::Vision_chunk* mutable_chunks(int index); - inline ::Vision_chunk* add_chunks(); - inline const ::google::protobuf::RepeatedPtrField< ::Vision_chunk >& - chunks() const; - inline ::google::protobuf::RepeatedPtrField< ::Vision_chunk >* + const ::Vision_chunk& chunks(int index) const; + ::Vision_chunk* mutable_chunks(int index); + ::Vision_chunk* add_chunks(); + ::google::protobuf::RepeatedPtrField< ::Vision_chunk >* mutable_chunks(); + const ::google::protobuf::RepeatedPtrField< ::Vision_chunk >& + chunks() const; // @@protoc_insertion_point(class_scope:Vision_log) private: - inline void set_has_number(); - inline void clear_has_number(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::google::protobuf::int64 number_; - ::google::protobuf::RepeatedPtrField< ::Vision_chunk > chunks_; + void set_has_number(); + void clear_has_number(); + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; - - friend void protobuf_AddDesc_vision_5flog_2eproto(); - friend void protobuf_AssignDesc_vision_5flog_2eproto(); + ::google::protobuf::RepeatedPtrField< ::Vision_chunk > chunks_; + ::google::protobuf::int64 number_; + friend void protobuf_InitDefaults_vision_5flog_2eproto_impl(); + friend void protobuf_AddDesc_vision_5flog_2eproto_impl(); + friend const ::google::protobuf::uint32* protobuf_Offsets_vision_5flog_2eproto(); friend void protobuf_ShutdownFile_vision_5flog_2eproto(); - void InitAsDefaultInstance(); - static Vision_log* default_instance_; }; // =================================================================== // =================================================================== +#if !PROTOBUF_INLINE_NOT_IN_HEADERS // Vision_chunk // required int64 time_elapsed = 1; inline bool Vision_chunk::has_time_elapsed() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return (_has_bits_[0] & 0x00000002u) != 0; } inline void Vision_chunk::set_has_time_elapsed() { - _has_bits_[0] |= 0x00000001u; + _has_bits_[0] |= 0x00000002u; } inline void Vision_chunk::clear_has_time_elapsed() { - _has_bits_[0] &= ~0x00000001u; + _has_bits_[0] &= ~0x00000002u; } inline void Vision_chunk::clear_time_elapsed() { time_elapsed_ = GOOGLE_LONGLONG(0); clear_has_time_elapsed(); } inline ::google::protobuf::int64 Vision_chunk::time_elapsed() const { + // @@protoc_insertion_point(field_get:Vision_chunk.time_elapsed) return time_elapsed_; } inline void Vision_chunk::set_time_elapsed(::google::protobuf::int64 value) { set_has_time_elapsed(); time_elapsed_ = value; + // @@protoc_insertion_point(field_set:Vision_chunk.time_elapsed) } // optional int64 id = 2; inline bool Vision_chunk::has_id() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return (_has_bits_[0] & 0x00000004u) != 0; } inline void Vision_chunk::set_has_id() { - _has_bits_[0] |= 0x00000002u; + _has_bits_[0] |= 0x00000004u; } inline void Vision_chunk::clear_has_id() { - _has_bits_[0] &= ~0x00000002u; + _has_bits_[0] &= ~0x00000004u; } inline void Vision_chunk::clear_id() { id_ = GOOGLE_LONGLONG(0); clear_has_id(); } inline ::google::protobuf::int64 Vision_chunk::id() const { + // @@protoc_insertion_point(field_get:Vision_chunk.id) return id_; } inline void Vision_chunk::set_id(::google::protobuf::int64 value) { set_has_id(); id_ = value; + // @@protoc_insertion_point(field_set:Vision_chunk.id) } // required .SSL_WrapperPacket packet = 3; inline bool Vision_chunk::has_packet() const { - return (_has_bits_[0] & 0x00000004u) != 0; + return (_has_bits_[0] & 0x00000001u) != 0; } inline void Vision_chunk::set_has_packet() { - _has_bits_[0] |= 0x00000004u; + _has_bits_[0] |= 0x00000001u; } inline void Vision_chunk::clear_has_packet() { - _has_bits_[0] &= ~0x00000004u; + _has_bits_[0] &= ~0x00000001u; } inline void Vision_chunk::clear_packet() { if (packet_ != NULL) packet_->::SSL_WrapperPacket::Clear(); clear_has_packet(); } inline const ::SSL_WrapperPacket& Vision_chunk::packet() const { - return packet_ != NULL ? *packet_ : *default_instance_->packet_; + // @@protoc_insertion_point(field_get:Vision_chunk.packet) + return packet_ != NULL ? *packet_ + : *::SSL_WrapperPacket::internal_default_instance(); } inline ::SSL_WrapperPacket* Vision_chunk::mutable_packet() { set_has_packet(); - if (packet_ == NULL) packet_ = new ::SSL_WrapperPacket; + if (packet_ == NULL) { + packet_ = new ::SSL_WrapperPacket; + } + // @@protoc_insertion_point(field_mutable:Vision_chunk.packet) return packet_; } inline ::SSL_WrapperPacket* Vision_chunk::release_packet() { + // @@protoc_insertion_point(field_release:Vision_chunk.packet) clear_has_packet(); ::SSL_WrapperPacket* temp = packet_; packet_ = NULL; @@ -322,6 +383,7 @@ inline void Vision_chunk::set_allocated_packet(::SSL_WrapperPacket* packet) { } else { clear_has_packet(); } + // @@protoc_insertion_point(field_set_allocated:Vision_chunk.packet) } // ------------------------------------------------------------------- @@ -343,11 +405,13 @@ inline void Vision_log::clear_number() { clear_has_number(); } inline ::google::protobuf::int64 Vision_log::number() const { + // @@protoc_insertion_point(field_get:Vision_log.number) return number_; } inline void Vision_log::set_number(::google::protobuf::int64 value) { set_has_number(); number_ = value; + // @@protoc_insertion_point(field_set:Vision_log.number) } // repeated .Vision_chunk chunks = 2; @@ -358,34 +422,34 @@ inline void Vision_log::clear_chunks() { chunks_.Clear(); } inline const ::Vision_chunk& Vision_log::chunks(int index) const { + // @@protoc_insertion_point(field_get:Vision_log.chunks) return chunks_.Get(index); } inline ::Vision_chunk* Vision_log::mutable_chunks(int index) { + // @@protoc_insertion_point(field_mutable:Vision_log.chunks) return chunks_.Mutable(index); } inline ::Vision_chunk* Vision_log::add_chunks() { + // @@protoc_insertion_point(field_add:Vision_log.chunks) return chunks_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::Vision_chunk >& -Vision_log::chunks() const { - return chunks_; -} inline ::google::protobuf::RepeatedPtrField< ::Vision_chunk >* Vision_log::mutable_chunks() { + // @@protoc_insertion_point(field_mutable_list:Vision_log.chunks) return &chunks_; } +inline const ::google::protobuf::RepeatedPtrField< ::Vision_chunk >& +Vision_log::chunks() const { + // @@protoc_insertion_point(field_list:Vision_log.chunks) + return chunks_; +} +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS +// ------------------------------------------------------------------- -// @@protoc_insertion_point(namespace_scope) - -#ifndef SWIG -namespace google { -namespace protobuf { +// @@protoc_insertion_point(namespace_scope) -} // namespace google -} // namespace protobuf -#endif // SWIG // @@protoc_insertion_point(global_scope) diff --git a/src/resources.qrc b/src/resources.qrc old mode 100644 new mode 100755 diff --git a/src/resources/images/Field.jpg b/src/resources/images/Field.jpg old mode 100644 new mode 100755 diff --git a/src/resources/images/Field2.jpg b/src/resources/images/Field2.jpg old mode 100644 new mode 100755 diff --git a/src/resources/images/KN2C-150x150.jpg b/src/resources/images/KN2C-150x150.jpg old mode 100644 new mode 100755 diff --git a/src/resources/images/execute.png b/src/resources/images/execute.png old mode 100644 new mode 100755 diff --git a/src/resources/images/logor2.png b/src/resources/images/logor2.png old mode 100644 new mode 100755 diff --git a/src/resources/images/open.svg b/src/resources/images/open.svg old mode 100644 new mode 100755 diff --git a/src/resources/images/pause.png b/src/resources/images/pause.png old mode 100644 new mode 100755 diff --git a/src/resources/images/play.svg b/src/resources/images/play.svg old mode 100644 new mode 100755 diff --git a/src/resources/images/record.png b/src/resources/images/record.png old mode 100644 new mode 100755 diff --git a/src/resources/images/stop.svg b/src/resources/images/stop.svg old mode 100644 new mode 100755 diff --git a/src/ssl/ball.cpp b/src/ssl/ball.cpp old mode 100644 new mode 100755 diff --git a/src/ssl/ball.h b/src/ssl/ball.h old mode 100644 new mode 100755 diff --git a/src/ssl/mobileobject.cpp b/src/ssl/mobileobject.cpp index 85a9def..34d0c31 100644 --- a/src/ssl/mobileobject.cpp +++ b/src/ssl/mobileobject.cpp @@ -8,7 +8,7 @@ MobileObject::MobileObject() : isValid = false; connect(&timer_seen, SIGNAL(timeout()), this, SLOT(timer_seen_timeout())); connect(&timer_vel, SIGNAL(timeout()), this, SLOT(timer_vel_timeout())); - timer_seen_interval = 100; + timer_seen_interval = 500; timer_vel_interval = 40; for(int i=0; i M_PI) dir_dif = dir_dif - dir_dif/fabs(dir_dif)*M_PI*2; - vel.dir = (dir_dif) / (time - last.time ) *1000 ; + vel.loc = vel.loc + (((pos.loc - last.pos.loc) / (time - last.time)) - vel.loc)*0.12; + vel.dir = (pos.dir - last.pos.dir) / (time - last.time ); + pos_predicted.loc = pos.loc + vel.loc * (time - last.time); pos_predicted.dir = pos.dir + vel.dir * (time - last.time); diff --git a/src/ssl/mobileobject.h b/src/ssl/mobileobject.h old mode 100644 new mode 100755 diff --git a/src/ssl/position.h b/src/ssl/position.h old mode 100644 new mode 100755 diff --git a/src/ssl/robot.cpp b/src/ssl/robot.cpp old mode 100644 new mode 100755 diff --git a/src/ssl/robot.h b/src/ssl/robot.h old mode 100644 new mode 100755 diff --git a/src/ssl/sslreceiver.cpp b/src/ssl/sslreceiver.cpp old mode 100644 new mode 100755 diff --git a/src/ssl/sslreceiver.h b/src/ssl/sslreceiver.h old mode 100644 new mode 100755 diff --git a/src/ssl/sslrefbox.cpp b/src/ssl/sslrefbox.cpp old mode 100644 new mode 100755 diff --git a/src/ssl/sslrefbox.h b/src/ssl/sslrefbox.h old mode 100644 new mode 100755 diff --git a/src/ssl/sslrefbox/commands.h b/src/ssl/sslrefbox/commands.h old mode 100644 new mode 100755 diff --git a/src/ssl/sslrefbox/game_state.cpp b/src/ssl/sslrefbox/game_state.cpp old mode 100644 new mode 100755 diff --git a/src/ssl/sslrefbox/game_state.h b/src/ssl/sslrefbox/game_state.h old mode 100644 new mode 100755 diff --git a/src/ssl/sslrefbox/ref_protocol.h b/src/ssl/sslrefbox/ref_protocol.h old mode 100644 new mode 100755 diff --git a/src/ssl/sslrefboxnew.cpp b/src/ssl/sslrefboxnew.cpp old mode 100644 new mode 100755 diff --git a/src/ssl/sslrefboxnew.h b/src/ssl/sslrefboxnew.h old mode 100644 new mode 100755 diff --git a/src/ssl/sslvision.cpp b/src/ssl/sslvision.cpp old mode 100644 new mode 100755 diff --git a/src/ssl/sslvision.h b/src/ssl/sslvision.h old mode 100644 new mode 100755 diff --git a/src/ssl/sslvision_double.cpp b/src/ssl/sslvision_double.cpp old mode 100644 new mode 100755 diff --git a/src/ssl/sslvision_double.h b/src/ssl/sslvision_double.h old mode 100644 new mode 100755 diff --git a/src/ssl/sslvision_single.cpp b/src/ssl/sslvision_single.cpp old mode 100644 new mode 100755 diff --git a/src/ssl/sslvision_single.h b/src/ssl/sslvision_single.h old mode 100644 new mode 100755 diff --git a/src/ssl/worldmodel.cpp b/src/ssl/worldmodel.cpp old mode 100644 new mode 100755 diff --git a/src/ssl/worldmodel.h b/src/ssl/worldmodel.h old mode 100644 new mode 100755 index f40a21a..f6970aa --- a/src/ssl/worldmodel.h +++ b/src/ssl/worldmodel.h @@ -1,7 +1,7 @@ #ifndef WORLDMODEL_H #define WORLDMODEL_H -#define NUMBEROFFREEKICKS 13 +#define NUMBEROFFREEKICKS 15 #include #include #include "constants.h" @@ -42,6 +42,8 @@ enum kickType FreeKick10, FreeKick11, FreeKick12, + FreekickTest2, + FreeKickTest1, FreeKick47 }; diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp old mode 100644 new mode 100755 index 2abb11b..3cb2d07 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -9,6 +9,7 @@ MainWindow::MainWindow(Soccer *soccer, QWidget *parent) : { ui->setupUi(this); //ui->txtLog->append(QSerialPort::); + //for rendering soccer area _render = new RenderArea(soccer); ui->gridRender->addWidget(_render); QStringList indexses; @@ -25,6 +26,8 @@ MainWindow::MainWindow(Soccer *soccer, QWidget *parent) : connect(&timer, SIGNAL(timeout()), this, SLOT(timer_timeout())); timer.start(100); + ui->debug_output_type->setCurrentIndex(1); + logTimer = new QTimer(); connect(logTimer, SIGNAL(timeout()), this, SLOT(logTimer_timeout())); @@ -420,7 +423,6 @@ void MainWindow::timer_timeout() sc->wm->select_fk[10] = ui->fk10_checkBox->isChecked(); sc->wm->select_fk[11] = ui->fk11_checkBox->isChecked(); sc->wm->select_fk[12] = ui->fk47_checkBox->isChecked(); - sc->wm->freeKickerID = ui->freeKickerID_lineedit->text().toInt(); //---Debuging Tools---------------- @@ -716,3 +718,4 @@ void MainWindow::logTimer_timeout() ui->timeLabel->setText(convertTime2String(counter) + " / " + convertTime2String(logLength)); ui->timeLine_slider->setValue(counter); } + diff --git a/src/ui/mainwindow.h b/src/ui/mainwindow.h old mode 100644 new mode 100755 diff --git a/src/ui/mainwindow.ui b/src/ui/mainwindow.ui old mode 100644 new mode 100755 index d0c4f03..ce44eed --- a/src/ui/mainwindow.ui +++ b/src/ui/mainwindow.ui @@ -321,7 +321,7 @@ 10 10 171 - 351 + 381 @@ -631,7 +631,7 @@ 10 - 370 + 410 401 311 @@ -802,6 +802,9 @@ A* Nodes + + true + @@ -820,6 +823,9 @@ Debug Points + + true + diff --git a/src/ui/renderarea.cpp b/src/ui/renderarea.cpp old mode 100644 new mode 100755 index 9d35aa6..a7409c9 --- a/src/ui/renderarea.cpp +++ b/src/ui/renderarea.cpp @@ -254,7 +254,8 @@ void RenderArea::paintEvent(QPaintEvent *) QPoint point(_sc->wm->debug_pos.at(i).x/WORLD_SCALE, -_sc->wm->debug_pos.at(i).y/WORLD_SCALE); painter.setPen(QColor::fromRgb(255,0,0)); painter.setBrush(*brush_debug); - painter.drawEllipse(point,BALL_R,BALL_R); + //painter.drawEllipse(point,BALL_R,BALL_R); + painter.drawEllipse(point,1,1); } } else if(_sc->wm->debug_type == 2) diff --git a/src/ui/renderarea.h b/src/ui/renderarea.h old mode 100644 new mode 100755 diff --git a/src/util/fpscounter.cpp b/src/util/fpscounter.cpp old mode 100644 new mode 100755 diff --git a/src/util/fpscounter.h b/src/util/fpscounter.h old mode 100644 new mode 100755 diff --git a/src/util/util.h b/src/util/util.h old mode 100644 new mode 100755