<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="es">
	<id>https://www.ecured.cu/index.php?action=history&amp;feed=atom&amp;title=Visitor</id>
	<title>Visitor - Historial de revisiones</title>
	<link rel="self" type="application/atom+xml" href="https://www.ecured.cu/index.php?action=history&amp;feed=atom&amp;title=Visitor"/>
	<link rel="alternate" type="text/html" href="https://www.ecured.cu/index.php?title=Visitor&amp;action=history"/>
	<updated>2026-06-23T11:02:19Z</updated>
	<subtitle>Historial de revisiones para esta página en el wiki</subtitle>
	<generator>MediaWiki 1.31.16</generator>
	<entry>
		<id>https://www.ecured.cu/index.php?title=Visitor&amp;diff=3455516&amp;oldid=prev</id>
		<title>Javiermartin jc: Texto reemplazado: «&lt;div align=&quot;justify&quot;&gt;» por «»</title>
		<link rel="alternate" type="text/html" href="https://www.ecured.cu/index.php?title=Visitor&amp;diff=3455516&amp;oldid=prev"/>
		<updated>2019-07-13T16:39:25Z</updated>

		<summary type="html">&lt;p&gt;Texto reemplazado: «&amp;lt;div align=&amp;quot;justify&amp;quot;&amp;gt;» por «»&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;es&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Revisión anterior&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revisión del 16:39 13 jul 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l5&quot; &gt;Línea 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línea 5:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|concepto= Representa una operación sobre los elementos de una estructura de objetos. Permite definir una nueva operación sin cambiar las clases de los elementos sobre los que opera.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|concepto= Representa una operación sobre los elementos de una estructura de objetos. Permite definir una nueva operación sin cambiar las clases de los elementos sobre los que opera.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;div align=&amp;quot;justify&amp;quot;&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''Resumen'''. [[Patrón Visitor]] proporciona una forma fácil y sostenible de ejecutar acciones en una familia de clases. Este patrón centraliza los comportamientos y permite que sean modificados o ampliados sin cambiar las clases sobre las que actúan.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''Resumen'''. [[Patrón Visitor]] proporciona una forma fácil y sostenible de ejecutar acciones en una familia de clases. Este patrón centraliza los comportamientos y permite que sean modificados o ampliados sin cambiar las clases sobre las que actúan.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki1:diff::1.12:old-1992515:rev-3455516 --&gt;
&lt;/table&gt;</summary>
		<author><name>Javiermartin jc</name></author>
		
	</entry>
	<entry>
		<id>https://www.ecured.cu/index.php?title=Visitor&amp;diff=1992515&amp;oldid=prev</id>
		<title>Carlos idict en 12:30 15 jul 2013</title>
		<link rel="alternate" type="text/html" href="https://www.ecured.cu/index.php?title=Visitor&amp;diff=1992515&amp;oldid=prev"/>
		<updated>2013-07-15T12:30:22Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;es&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Revisión anterior&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revisión del 12:30 15 jul 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l39&quot; &gt;Línea 39:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línea 39:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Ejemplo de aplicación==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Ejemplo de aplicación==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;En un compilador que representa los programas mediante árboles sintácticos abstractos es mejor tener por un lado la jerarquía de [[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;nodos&lt;/del&gt;]] (declaraciones de asignación, acceso a variables, expresiones aritméticas, etc...) y por otro las operaciones que queremos aplicarles (comprobación de tipos, generación de código, análisis de flujo, optimizaciones, etc...) que tener todas las operaciones dentro de cada nodo, dado que no a todos los nodos les afectan igual las distintas operaciones.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;En un compilador que representa los programas mediante árboles sintácticos abstractos es mejor tener por un lado la jerarquía de [[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;nodo&lt;/ins&gt;]]&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;s &lt;/ins&gt;(declaraciones de asignación, acceso a variables, expresiones aritméticas, etc...) y por otro las operaciones que queremos aplicarles (comprobación de tipos, generación de código, análisis de flujo, optimizaciones, etc...) que tener todas las operaciones dentro de cada nodo, dado que no a todos los nodos les afectan igual las distintas operaciones.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Fuentes==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Fuentes==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki1:diff::1.12:old-1840963:rev-1992515 --&gt;
&lt;/table&gt;</summary>
		<author><name>Carlos idict</name></author>
		
	</entry>
	<entry>
		<id>https://www.ecured.cu/index.php?title=Visitor&amp;diff=1840963&amp;oldid=prev</id>
		<title>Danieli03028jcscu en 14:17 24 mar 2013</title>
		<link rel="alternate" type="text/html" href="https://www.ecured.cu/index.php?title=Visitor&amp;diff=1840963&amp;oldid=prev"/>
		<updated>2013-03-24T14:17:14Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;es&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Revisión anterior&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revisión del 14:17 24 mar 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Línea 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línea 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Definición&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Definición&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|nombre= Visitante / [[Visitor]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|nombre= Visitante / [[Visitor]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|imagen= &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;visitor-pattern&lt;/del&gt;.png&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|imagen= &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Visittern&lt;/ins&gt;.png&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|tamaño= &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|tamaño= &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|concepto= Representa una operación sobre los elementos de una estructura de objetos. Permite definir una nueva operación sin cambiar las clases de los elementos sobre los que opera.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|concepto= Representa una operación sobre los elementos de una estructura de objetos. Permite definir una nueva operación sin cambiar las clases de los elementos sobre los que opera.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki1:diff::1.12:old-1388130:rev-1840963 --&gt;
&lt;/table&gt;</summary>
		<author><name>Danieli03028jcscu</name></author>
		
	</entry>
	<entry>
		<id>https://www.ecured.cu/index.php?title=Visitor&amp;diff=1388130&amp;oldid=prev</id>
		<title>Arletisjcconsolacion: Patrón Visitor trasladada a Visitor</title>
		<link rel="alternate" type="text/html" href="https://www.ecured.cu/index.php?title=Visitor&amp;diff=1388130&amp;oldid=prev"/>
		<updated>2012-02-21T13:44:44Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/Patr%C3%B3n_Visitor&quot; class=&quot;mw-redirect&quot; title=&quot;Patrón Visitor&quot;&gt;Patrón Visitor&lt;/a&gt; trasladada a &lt;a href=&quot;/Visitor&quot; title=&quot;Visitor&quot;&gt;Visitor&lt;/a&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;es&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Revisión anterior&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revisión del 13:44 21 feb 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;es&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(Sin diferencias)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Arletisjcconsolacion</name></author>
		
	</entry>
	<entry>
		<id>https://www.ecured.cu/index.php?title=Visitor&amp;diff=1387890&amp;oldid=prev</id>
		<title>Danieli03028jcscu: Página creada con '{{Definición |nombre= Visitante / Visitor |imagen= visitor-pattern.png |tamaño=  |concepto= Representa una operación sobre los elementos de una estructura de objetos. Per...'</title>
		<link rel="alternate" type="text/html" href="https://www.ecured.cu/index.php?title=Visitor&amp;diff=1387890&amp;oldid=prev"/>
		<updated>2012-02-21T01:37:19Z</updated>

		<summary type="html">&lt;p&gt;Página creada con &amp;#039;{{Definición |nombre= Visitante / &lt;a href=&quot;/Visitor&quot; title=&quot;Visitor&quot;&gt;Visitor&lt;/a&gt; |imagen= visitor-pattern.png |tamaño=  |concepto= Representa una operación sobre los elementos de una estructura de objetos. Per...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Página nueva&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Definición&lt;br /&gt;
|nombre= Visitante / [[Visitor]]&lt;br /&gt;
|imagen= visitor-pattern.png&lt;br /&gt;
|tamaño= &lt;br /&gt;
|concepto= Representa una operación sobre los elementos de una estructura de objetos. Permite definir una nueva operación sin cambiar las clases de los elementos sobre los que opera.&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;div align=&amp;quot;justify&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Resumen'''. [[Patrón Visitor]] proporciona una forma fácil y sostenible de ejecutar acciones en una familia de clases. Este patrón centraliza los comportamientos y permite que sean modificados o ampliados sin cambiar las clases sobre las que actúan.&lt;br /&gt;
 &lt;br /&gt;
==Tipo==&lt;br /&gt;
Comportamiento, a nivel de [[objetos]].&lt;br /&gt;
 &lt;br /&gt;
==Propósito== &lt;br /&gt;
Representa una operación que está pensada para ser aplicada sobre los elementos de una estructura de objetos, permitiendo así definir y añadir un nuevo comportamiento sin necesidad de cambiar las clases de los elementos de la estructura de objetos.&lt;br /&gt;
 &lt;br /&gt;
==Cuando usarlo==&lt;br /&gt;
*Cuando una “Estructura De Objetos” contiene muchas clases con diferentes interfaces y se quieren añadir operaciones a dichos objetos en función de la interfaz.&lt;br /&gt;
*Cuando se quieren añadir a los objetos de una estructura operaciones muy diferentes y sin relación alguna entre ellas, sin necesidad de hacerlo a nivel individual.&lt;br /&gt;
*Cuando las clases que definen la “Estructura De Objetos” casi nunca cambian, pero frecuentemente queremos añadir nuevas operaciones a ciertos objetos de la estructura.&lt;br /&gt;
 &lt;br /&gt;
==Ventajas==&lt;br /&gt;
*Es fácil añadir nuevas operaciones a la “Estructura De Objetos”; sólo hay que crear un nuevo “Visitante”, en vez de cambiar todas las clases a las que queremos que afecte.&lt;br /&gt;
*Se juntan las operaciones relacionadas entre sí, separándose las que nada tienen que ver.  Esto simplifica tanto las clases de los “Elementos” como los algoritmos definidos en los “Visitantes”.&lt;br /&gt;
*Se pueden recorrer jerarquías formadas por objetos de distintos tipos (distinta clase padre), mientras que un [[Iterador]] no puede hacer esto.&lt;br /&gt;
*Se puede ir acumulando el estado a medida que se recorre la estructura, en vez de tener que pasarlo como parámetro o guardarlo en variables globales.&lt;br /&gt;
==Inconvenientes==&lt;br /&gt;
*Añadir un nuevo tipo de elemento a la estructura de objetos crea problemas, pues hay que tocar toda la estructura jerárquica de “Visitantes”, lo cual es muy costoso.&lt;br /&gt;
*Frecuentemente se fuerza a los “Elementos” a proporcionar operaciones públicas que den acceso a su estado interno, con lo que se pone en peligro el [[encapsulamiento]].&lt;br /&gt;
 &lt;br /&gt;
==Relacionado con==&lt;br /&gt;
*Visitante puede usarse para aplicar una operación sobre una estructura de objetos definida por Composición.&lt;br /&gt;
*Visitante puede utilizarse para implementar la operación de interpretación en el patrón Intérprete.&lt;br /&gt;
 &lt;br /&gt;
==Otros aspectos de interés==&lt;br /&gt;
*La técnica de programación que posibilita añadir operaciones a las clases de la “Estructura De Objetos” sin cambiarlos, recibe el nombre de “[[double]] dispatch”, pues su ejecución depende del tipo del peticionario y de los dos receptores: el “Visitante” y el “Elemento”.  Hay lenguajes [[CLOS]] que lo soportan directamente y otros [[C++]] que sólo tienen “simple dispatch”, por lo que deben pasar el “Visitante” como parámetro.&lt;br /&gt;
*La responsabilidad de recorrer la “Estructura De Objetos” puede recaer en la propia estructura (es frecuente), en un Iterador, que puede ser externo o interno (parecido a la primera opción, salvo en que ahora no hay “double dispatch”) o en el “Visitante” (nos permite implementar una política compleja particular para el recorrido, pero duplica el código en cada “Visitante” concreto).&lt;br /&gt;
*La “Estructura De Objetos” puede ser una composición o una colección de objetos ([[lista]], conjunto,...) que proporciona una interfaz de alto nivel para que el “Visitante” pueda acceder a todos sus “Elementos”.&lt;br /&gt;
 &lt;br /&gt;
==Ejemplo de aplicación==&lt;br /&gt;
En un compilador que representa los programas mediante árboles sintácticos abstractos es mejor tener por un lado la jerarquía de [[nodos]] (declaraciones de asignación, acceso a variables, expresiones aritméticas, etc...) y por otro las operaciones que queremos aplicarles (comprobación de tipos, generación de código, análisis de flujo, optimizaciones, etc...) que tener todas las operaciones dentro de cada nodo, dado que no a todos los nodos les afectan igual las distintas operaciones.&lt;br /&gt;
 &lt;br /&gt;
==Fuentes==&lt;br /&gt;
*[http://patronesdediseno.blogspot.com/2009/05/patron-visitor.html blogspot.com]&lt;br /&gt;
*[http://www.ingenierosoftware.com/analisisydiseno/patrones-diseno.php ingenierosoftware.com]&lt;br /&gt;
*[http://msdn.microsoft.com/es-es/library/bb972240.aspx Microsoft.com]&lt;br /&gt;
[[Category: Informática]][[Category:Programación]]&lt;/div&gt;</summary>
		<author><name>Danieli03028jcscu</name></author>
		
	</entry>
</feed>