using UnityEngine;
using System.Collections.Generic;

#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN

internal class OVRCompositionUtil {

	public static void SafeDestroy(GameObject obj)
	{
		if (Application.isPlaying)
		{
			GameObject.Destroy(obj);
		}
		else
		{
			GameObject.DestroyImmediate(obj);
		}
	}

	public static void SafeDestroy(ref GameObject obj)
	{
		SafeDestroy(obj);
		obj = null;
	}

	public static OVRPlugin.CameraDevice ConvertCameraDevice(OVRManager.CameraDevice cameraDevice)
	{
		if (cameraDevice == OVRManager.CameraDevice.WebCamera0)
		{
			return OVRPlugin.CameraDevice.WebCamera0;
		}
		else if (cameraDevice == OVRManager.CameraDevice.WebCamera1)
		{
			return OVRPlugin.CameraDevice.WebCamera1;
		}
		else if (cameraDevice == OVRManager.CameraDevice.ZEDCamera)
		{
			return OVRPlugin.CameraDevice.ZEDCamera;
		}
		else
		{
			return OVRPlugin.CameraDevice.None;
		}
	}

	public static OVRBoundary.BoundaryType ToBoundaryType(OVRManager.VirtualGreenScreenType type)
	{
		if (type == OVRManager.VirtualGreenScreenType.OuterBoundary)
		{
			return OVRBoundary.BoundaryType.OuterBoundary;
		}
		else if (type == OVRManager.VirtualGreenScreenType.PlayArea)
		{
			return OVRBoundary.BoundaryType.PlayArea;
		}
		else
		{
			Debug.LogWarning("Unmatched VirtualGreenScreenType");
			return OVRBoundary.BoundaryType.OuterBoundary;
		}
	}

	public static Vector3 GetWorldPosition(Vector3 trackingSpacePosition)
	{
		OVRPose tsPose;
		tsPose.position = trackingSpacePosition;
		tsPose.orientation = Quaternion.identity;
		OVRPose wsPose = OVRExtensions.ToWorldSpacePose(tsPose);
		Vector3 pos = wsPose.position;
		return pos;
	}

	public static float GetMaximumBoundaryDistance(Camera camera, OVRBoundary.BoundaryType boundaryType)
	{
		if (!OVRManager.boundary.GetConfigured())
		{
			return float.MaxValue;
		}

		Vector3[] geometry = OVRManager.boundary.GetGeometry(boundaryType);
		if (geometry.Length == 0)
		{
			return float.MaxValue;
		}

		float maxDistance = -float.MaxValue;
		foreach (Vector3 v in geometry)
		{
			Vector3 pos = GetWorldPosition(v);
			float distance = Vector3.Dot(camera.transform.forward, pos);
			if (maxDistance < distance)
			{
				maxDistance = distance;
			}
		}
		return maxDistance;
	}

	public static Mesh BuildBoundaryMesh(OVRBoundary.BoundaryType boundaryType, float topY, float bottomY)
	{
		if (!OVRManager.boundary.GetConfigured())
		{
			return null;
		}

		List<Vector3> geometry = new List<Vector3>(OVRManager.boundary.GetGeometry(boundaryType));
		if (geometry.Count == 0)
		{
			return null;
		}

		geometry.Add(geometry[0]);
		int numPoints = geometry.Count;

		Vector3[] vertices = new Vector3[numPoints * 2];
		Vector2[] uvs = new Vector2[numPoints * 2];
		for (int i = 0; i < numPoints; ++i)
		{
			Vector3 v = geometry[i];
			vertices[i] = new Vector3(v.x, bottomY, v.z);
			vertices[i + numPoints] = new Vector3(v.x, topY, v.z);
			uvs[i] = new Vector2((float)i / (numPoints - 1), 0.0f);
			uvs[i + numPoints] = new Vector2(uvs[i].x, 1.0f);
		}

		int[] triangles = new int[(numPoints - 1) * 2 * 3];
		for (int i = 0; i < numPoints - 1; ++i)
		{
			// the geometry is built clockwised. only the back faces should be rendered in the camera frame mask

			triangles[i * 6 + 0] = i;
			triangles[i * 6 + 1] = i + numPoints;
			triangles[i * 6 + 2] = i + 1 + numPoints;

			triangles[i * 6 + 3] = i;
			triangles[i * 6 + 4] = i + 1 + numPoints;
			triangles[i * 6 + 5] = i + 1;
		}

		Mesh mesh = new Mesh();
		mesh.vertices = vertices;
		mesh.uv = uvs;
		mesh.triangles = triangles;
		return mesh;
	}

}

#endif


variable "environment" {
  default = {}

  # default {
  #    "region" = "us-west-2"
  #    "sg"     = "playground"
  #    "env"    = "prod"
  #  }
}


# Mejores Prácticas de la Programación - Tidbits
### Una colección de citas y frases obtenidos de la web para programadores

Utilice su propio juicio en su aplicación.

* * *

## Nunca construyas aplicaciones grandes

El secreto para construir aplicaciones grandes es nunca construir aplicaciones grandes. Divide tus aplicaciones en piezas más pequeñas. Entonces, ensambla esas piezas del tamaño de un mordizco que pueden ponerse a prueba, dentro de tu aplicación grande.

*Justin Meyer, autor de JavaScriptMVC*.

[Fuente](http://bitovi.com/blog/2010/11/organizing-a-jquery-application.html).

## La calidad importa

Cuando escucho "¡SÓLO LIBERA DE UNA VEZ EL CÓDIGO QUE YA FUNCIONA!" pienso en todas las aplicaciones que dejé de usar porque gradualmente perdieron la habilidad de iterar.

*Avdi Grimm*

[Fuente](https://twitter.com/#!/avdi/status/180747721852985344).

## No escribas código

No escribas código (escribe nuevo código solamente cuando todo lo demás falle) es la lección más importante que todo desarrollador debería aprender. La cantidad de código duplicado y basura que existe (en todos los proyectos) es abrumadora. En muchos casos los desarrolladores ni se molestan en echar un vistazo. Lo único que quieren es escribir código.

[Fuente](http://blogs.agilefaqs.com/2009/10/19/biggest-stinkers)

#### Reducir la cantidad de código en tu producto debería ser una meta

"Odio el código, y quiero tan poco código como sea posible en nuestro producto."

*Jack Diederich*

[Fuente](http://pyvideo.org/video/880/stop-writing-classes)

#### Mantén las dependencias al mínimo

El viejo dicho "No reinventes la rueda" no aplica cuando la rueda es del motor de una locomotora.

[Fuente](http://www.reddit.com/r/programming/comments/1bcebh/programming_best_practices/c9616mn)

## Deja de escribir clases

La señal de que "esto no debería ser una clase" es cuando la clase tiene dos métodos, y uno de ellos es el constructor. Cuando quiera que veas estas señales, significa que probablemente deberías haber escrito sólo una función.

*Jack Diederich*

[Fuente](http://pyvideo.org/video/880/stop-writing-classes)

## Olvida nuevas funcionalidades, simplemente haz lo mismo pero mejor

El problema: es muy fácil perder de vista lo que más importa a los usuarios, que es el rendimiento y la usabilidad de las aplicaciones y las funcionalidades que usan más a menudo.

*Tim Anderson*

[Fuente](http://www.itjoblog.co.uk/2011/06/making-better-software.html)

## Reinventa la rueda

Inventar tus propias ruedas te da un mayor aprecio y entendimiento de cómo funcionan las ruedas y qué hace que una sea buena.

[Fuente](http://nodejs.debuggable.com/2011-02-26.txt)

## No hagas cosas difíciles, haz cosas sencillas

* Simple es mejor que complejo.
* Complejo es mejor que complicado.
* Plano es mejor que anidado.
* La legibilidad cuenta.
* Si la implementación es difícil de explicar, es una mala idea.
* Si la implementación es fácil de explicar, puede que sea una buena idea.

*El Zen de Python*

[Fuente](http://www.python.org/dev/peps/pep-0020/)

## Reescribir > Refactorizar

Si vas a cambiar más del 25% de una clase o método, considera simplemente reescribirlo. Escribirás código más limpio.

## Refactorizar > Reescribir

#### Excusas comunes para reescribir software

1. El código apesta
2. "Ahora somos mucho más listos"
3. Escogimos la plataforma y/o lenguaje equivocado

#### Por qué (casi) nunca es buena idea reescribir

1. [Tardará más de lo que piensas](http://en.wikipedia.org/wiki/Hofstadter's_law)
2. Los mercados cambian
2. Los clientes existentes se frustran
3. Puedes limpiar el código refactorizando
4. No controlas la reescritura, ella te controla a ti

[Fuente](http://onstartups.com/tabid/3339/bid/2596/Why-You-Should-Almost-Never-Rewrite-Your-Software.aspx)

## Acepta que no tienes idea de cómo esto va a crecer

La clave es reconocer desde el principio que no tienes idea de cómo esto va a crecer. Cuando aceptes que no lo sabes todo, empezarás a diseñar el sistema defensivamente... Deberías invertir la mayor parte de tu tiempo en pensando en interfaces en vez de implementaciones.

*Nicholas Zakas, autor de "High-performance JavaScript websites"*

[Fuente](http://radar.oreilly.com/2011/06/big-javascript-apps-teams.html)

[Reconocimiento a Addy Osmani](http://addyosmani.com/largescalejavascript/)

## Evita código que apesta

[Fuente](http://www.codinghorror.com/blog/2006/05/code-smells.html)

[Fuente](http://web.archive.org/web/20120130234037/http://stackoverflow.com/questions/114342/what-are-code-smells-what-is-the-best-way-to-correct-them)

## Escribe pruebas unitarias

Todo programador sabe que debería escribir tests para su código. Pocos lo hacen. La respuesta universal al "¿Por qué no?" es "Tengo mucha prisa." Rápidamente esto se convierte en un círculo vicioso. Cuanta más presión sientas, menos pruebas escribirás. Entre menos pruebas escribas, serás menos productivo y tu código se volverá menos estable. Entre menos productivo seas, mayor presión sentirás. Los programadores se desgastan con esos ciclos. Romperlos requiere de una influencia externa. Encontramos esa influencia externa en un simple framework de pruebas que nos deja hacer pequeñas pruebas que hacen una gran diferencia.

[Fuente](http://junit.sourceforge.net/doc/testinfected/testing.htm)

#### [Sin las pruebas unitarias] no estás refactorizando, sólo estás cambiando porquería. — Hamlet D'Arcy

## Para escribir pruebas unitarias efectivas, debes escribir código que se pueda probar

### Falla #1: El constructor hace trabajo real
#### Señales de alerta

* Existe `new` en un constructor o en la declaración de un atributo.
* Static method calls in a constructor or at field declaration
* Se hace algo más que solo asignar en los constructores.
* El objeto no esta completamente inicializado cuando el constructor termina (cuidado con los métodos 'para inicializar')
* Control de flujo en un constructor (existe un condicional o un bucle)
* Code does complex object graph construction inside a constructor rather than using a factory or builder
* Adding or using an initialization block

### Falla #2: Digging into Collaborators
#### Señales de alerta

* Objects are passed in but never used directly (only used to get access to other objects)
* Law of Demeter violation: method call chain walks an object graph with more than one dot (.)
* Suspicious names: context, environment, principal, container, or manager

### Falla #3: Brittle Global State & Singletons
#### Señales de alerta

* Adding or using singletons
* Adding or using static fields or static methods
* Adding or using static initialization blocks
* Adding or using registries
* Adding or using service locators

###Falla #4: La clase hace demasiado
#### Señales de alerta

* Al resumir lo que hace la clase se incluye el conector "y".
* La clase sería difícil de leer y captar para nuevos miembros del equipo.
* La clase tiene atributos que son utilizados sólo en algunos métodos.
* La clase tiene métodos estáticos que sólo operan sobre párametros

[Fuente](http://misko.hevery.com/code-reviewers-guide/)

[Fuente](http://misko.hevery.com/presentations/)

## Desarrollo guiado por pruebas con Inversión de Control

Incluso si no estás probando tu código, deberías escribir código que pueda probarse. IoC permite código "testeable". Inyecta dependencias que faciliten las pruebas o "mocks" al tiempo de probar a fin de aislar la unidad bajo prueba.

## Evita mezclar la creación de objetos con la lógica de aplicación

[Fuente](http://misko.hevery.com/2008/09/30/2008/07/08/how-to-think-about-the-new-operator/)

## Evita crear deuda técnica

"Aunque el código inmaduro funcione bien y sea totalmente aceptable al cliente, cantidades excesivas del mismo harán que un programa sea indomable, conduciendo a programadores extremadamente especializados y, finalmente, a un producto inflexible. [...] Un poco de deuda acelera el desarrollo siempre y cuando se pague prontamente con una reescritura. [...] *Cada minuto que se gasta en código no muy bien escrito cuenta como interés en esa [deuda](http://en.wikipedia.org/wiki/Technical_debt)*. Organizaciones enteras de ingeniería pueden detenerse bajo la deuda de implementación sin consolidar"
(Cursivas mías)

[Fuente](http://c2.com/doc/oopsla92.html)

## La optimización prematura es la raíz de todos los males

"Los programadores desperdician mucha cantidad de tiempo pensando o preocupándose sobre el rendimiento de partes del programa que no son críticas y estos intentos realmente tienen un poderoso impacto negativo cuando consideramos el mantenimiento y la depuración. Deberíamos olvidarnos de las pequenas optimizaciones, digamos el 97% del tiempo: la optimización prematura es la raíz de todos los males"

[Fuente](http://c2.com/cgi/wiki?PrematureOptimization)

## Planifica, Planifica, Planifica

Es mucho más barato hacerlo correctamente la primera vez que rehacerlo posteriormente. Mientras más pronto se identifica y soluciona un problema, es más barato hacerlo.

"El general que gana una batalla hace muchos cálculos en su templo antes del fragor la batalla.

El general que pierde una batalla hace pocos cálculos con antelación. Hacer muchos cálculos lleva a la victoria y pocos cálculos a la derrota: ¡cuánto más ningún cálculo en absoluto! Por dar atención a este punto yo puedo preveer quien es probable que gane o pierda"

#### "Los planes son inútiles, pero la planificación lo es todo" - Sir Winston Churchill

For this to work, everyone involved has to listen, everyone has to be open, everyone has to be responsive. Or we could keep flailing away with the fucked up attitude that “it has to be this way” because the sacred project plan says it’s this way. Because that really is a lot of fun, isn’t it?

## Programar también envuelve enseñar a tu equipo

... un equipo de programadores mediocres, sin experiencia que trabajan juntos y escriben para el beneficio del equipo tiene la capacidad de convertirse en un gran equipo, y pueden tomar este enfoque para crear otros grandes equipos. *Todo se resume en si el eqiupo ve su trabajo como sólo escribir código, o escribir con el objetivo de tanto codificar como aprender*"
(Cursivas mías)

*Reginald Braithwaite*

[Fuente](http://www.theserverside.com/tt/articles/article.tss?l=ProgrammingisAlsoTeachingYourTeam)

### "El elemento más importante del desarrollo de software con éxito es aprender"

Cuando todo el equipo alcanza un cierto nivel de competencia, existe una superficie expuesta de aprendizaje muy grande y el equipo es capaz de absorber más información.

[Fuente](http://weblog.raganwald.com/2007/06/which-theory-first-evidence.html)

## "...hay mentiras, mentiras descaradas, y estimaciones de desarrollo de software"

Software can only partially be designed in advance. ... requirements suffer from observation, that the act of building software causes the requirements to change. ...technical factors cannot be perfectly understood, that only the act of trying to build something with specific components will reveal all of the gotchas and who-knews associated with a chosen technology strategy. ...software design is an iterative process, starting with a best guess that is continually refined with experience.
the normal case for software projects is that tasks are rarely completed exactly as estimated, but that as a project progresses, the aggregate variance from estimates falls.

[Fuente](http://weblog.raganwald.com/2007/06/which-theory-first-evidence.html)

Nobody likes to look stupid. If you’re a professional and someone puts you on the spot to answer “how long will this take?” it’s only human to want to provide an answer. Whether you call it professional pride or ego, it’s a powerful driver.
Good IT workers really don’t like saying “I don’t know.” If they say it, they probably mean it. So stop pushing for a definitive answer when one doesn’t exist.It’s perfectly reasonable to want some sort of plan up front. I’m actually one of those funny types who believe up front planning is a necessity. So long as everyone understands an estimate is just that: an estimate. You learn as you go along and discover more detail. So you revise the estimate accordingly.

[![The mess we're in](https://cloud.githubusercontent.com/assets/43438/4344401/0ddd5fc8-408f-11e4-8887-b0bfbce91dc7.png)](https://www.youtube.com/watch?v=lKXe3HUG2l4)

*Joe Armstrong, autor de Erlang*

##Your architecture should resemble your domain

So what does the architecture of your application scream? When you look at the top level directory structure, and the source files in the highest level package; do they scream: health care system, or accounting system, or inventory management system? Or do they scream: rails, or spring/hibernate, or asp?

La arquitectura no debería ser dada por el framework. Los frameworks son herramientas para utilizarlas, no arquitecturas a las que haya que conformarse. Si tu arquitectua está basada en frameworks, entonces no puede estar basado en tus casos de uso.

*Uncle Bob Martin, "Screaming Architecture"*

[Fuente](http://blog.8thlight.com/uncle-bob/2011/09/30/Screaming-Architecture.html)

## Sigue los principios de X

* No añadir nueva funcionalidad a menos que un desarrollador no pueda completar una aplicación real sin ella.
* Es tan importante decidir qué no es parte del sistema, como decidir que sí lo es. No respondas a las necesidades de todo el mundo; en lugar de eso, haz el sistema extensible para que las necesidades adicionales puedan cubrirse de una manera compatible ascendente.
* La única cosa peor que generalizar a partir de un ejemplo, es generalizar a partir de ningún ejemplo.
* Si un problema no es comprendido completamente, probablemente es mejor no proporcionar ninguna solución.
* Si puedes conseguir el 90 por ciento del efecto deseado para el 10 por ciento del trabajo, utiliza la solución más simple.
* Aísla la complejidad tanto como sea posible.
* Proporcionen un mecanismo en vez de una política. En particular, pongan la interfaz de política en las manos de los clientes.

[Fuente](http://en.wikipedia.org/wiki/X_Window_System_protocols_and_architecture#Design_principles)

## Sigue los principios de Unix

"Esta es la filosofía de Unix: escribe programas que hagan una sola cosa y la hagan bien. Escribe programas para trabajar colectivamente. Escribe programas para manejar flujos de texto, porque esta es una interfaz universal."

*Doug McIlroy, citado en "A Quarter Century of Unix" [Salus]. Addison-Wesley. 1994. ISBN 0-201-54777-5.*

* Regla de Modularidad: Escribe partes simples conectadas por interfaces limpias.
* Regla de Claridad: La claridad es mejor que la habilidad y el ingenio.
* Regla de Composición: Diseña programas para ser conectados a otros programas.
* Regla de Separación: Separa la política del mecanismo; separa las interfaces de los motores.
* Regla de Simplicidad: Diseña pensando en la simplicidad; agrega complejidad solamente donde debas.
* Regla de Parsimonía: Escribe un programa grande solamente cuando es claro por demostración que ninguna otra cosa funcionará.
* Regla de Transparencia: Diseña pensando en la visibilidad para hacer la inspección y la depuración más fácil.
* Regla de Robustez: La robustez es la hija de la transparencia y la simplicidad.
* Regla de Representación: Pliega el conocimiento dentro de los datos de tal manera que la lógica del programa pueda ser estúpida y robusta.
* Regla de la Mínima Sorpresa: En el diseño de interfaces, siempre has la cosa menos sorprendente.
* Regla del Silencio: Cuando un programa no tiene nada sorprendente que decir, no debería decir nada.
* Regla de Reparación: Cuando debas fallar, falla ruidosamente y tan pronto como sea posible.
* Regla de Economía: El tiempo del programador es costoso; consérvalo en preferencia al tiempo de máquina.
* Regla de Generación: Evita el hackeo manual; escribe programas para escribir programas cuando puedas.
* Regla de Optimización: Haz prototipos antes de pulir. Haz que funcione antes que lo optimices.
* Regla de Diversidad: Desconfía de todas las pretensiones para "una vía verdadera".
* Regla de Extensibilidad: Diseña para el futuro, porque estará aquí más pronto de lo que piensas.

*Eric S. Raymond, "The Art of Unix Programming"*

[Fuente](http://www.catb.org/esr/writings/taoup/html/ch01s06.html)

[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/timoxley/best-practices/trend.png)](https://bitdeli.com/free "Bitdeli Badge")


#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
"""
This module contains AWS S3 operators.
"""
from typing import Optional

from airflow.models import BaseOperator
from airflow.providers.amazon.aws.hooks.s3 import S3Hook
from airflow.utils.decorators import apply_defaults

class S3CreateBucketOperator(BaseOperator):
    """
    This operator creates an S3 bucket

    :param bucket_name: This is bucket name you want to create
    :type bucket_name: str
    :param aws_conn_id: The Airflow connection used for AWS credentials.
        If this is None or empty then the default boto3 behaviour is used. If
        running Airflow in a distributed manner and aws_conn_id is None or
        empty, then default boto3 configuration would be used (and must be
        maintained on each worker node).
    :type aws_conn_id: Optional[str]
    :param region_name: AWS region_name. If not specified fetched from connection.
    :type region_name: Optional[str]
    """

    @apply_defaults
    def __init__(
        self,
        *,
        bucket_name,
        aws_conn_id: Optional[str] = "aws_default",
        region_name: Optional[str] = None,
        **kwargs,
    ) -> None:
        super().__init__(**kwargs)
        self.bucket_name = bucket_name
        self.region_name = region_name
        self.aws_conn_id = aws_conn_id
        self.region_name = region_name

    def execute(self, context):
        s3_hook = S3Hook(aws_conn_id=self.aws_conn_id, region_name=self.region_name)
        if not s3_hook.check_for_bucket(self.bucket_name):
            s3_hook.create_bucket(bucket_name=self.bucket_name, region_name=self.region_name)
            self.log.info("Created bucket with name: %s", self.bucket_name)
        else:
            self.log.info("Bucket with name: %s already exists", self.bucket_name)

class S3DeleteBucketOperator(BaseOperator):
    """
    This operator deletes an S3 bucket

    :param bucket_name: This is bucket name you want to create
    :type bucket_name: str
    :param force_delete: Forcibly delete all objects in the bucket before deleting the bucket
    :type force_delete: bool
    :param aws_conn_id: The Airflow connection used for AWS credentials.
        If this is None or empty then the default boto3 behaviour is used. If
        running Airflow in a distributed manner and aws_conn_id is None or
        empty, then default boto3 configuration would be used (and must be
        maintained on each worker node).
    :type aws_conn_id: Optional[str]
    """

    def __init__(
        self,
        bucket_name,
        force_delete: bool = False,
        aws_conn_id: Optional[str] = "aws_default",
        **kwargs,
    ) -> None:
        super().__init__(**kwargs)
        self.bucket_name = bucket_name
        self.force_delete = force_delete
        self.aws_conn_id = aws_conn_id

    def execute(self, context):
        s3_hook = S3Hook(aws_conn_id=self.aws_conn_id)
        if s3_hook.check_for_bucket(self.bucket_name):
            s3_hook.delete_bucket(bucket_name=self.bucket_name, force_delete=self.force_delete)
            self.log.info("Deleted bucket with name: %s", self.bucket_name)
        else:
            self.log.info("Bucket with name: %s doesn't exist", self.bucket_name)


/*
 *             Pseudo-driver for the intermediate queue device.
 *
 *             This program is free software; you can redistribute it and/or
 *             modify it under the terms of the GNU General Public License
 *             as published by the Free Software Foundation; either version
 *             2 of the License, or (at your option) any later version.
 *
 * Authors:    Patrick McHardy, <kaber@trash.net>
 *
 *            The first version was written by Martin Devera, <devik@cdi.cz>
 *
 * Credits:    Jan Rafaj <imq2t@cedric.vabo.cz>
 *              - Update patch to 2.4.21
 *             Sebastian Strollo <sstrollo@nortelnetworks.com>
 *              - Fix "Dead-loop on netdevice imq"-issue
 *             Marcel Sebek <sebek64@post.cz>
 *              - Update to 2.6.2-rc1
 *
 *	       After some time of inactivity there is a group taking care
 *	       of IMQ again: http://www.linuximq.net
 *
 *
 *	       2004/06/30 - New version of IMQ patch to kernels <=2.6.7 including
 *	       the following changes:
 *
 *	       - Correction of ipv6 support "+"s issue (Hasso Tepper)
 *	       - Correction of imq_init_devs() issue that resulted in
 *	       kernel OOPS unloading IMQ as module (Norbert Buchmuller)
 *	       - Addition of functionality to choose number of IMQ devices
 *	       during kernel config (Andre Correa)
 *	       - Addition of functionality to choose how IMQ hooks on
 *	       PRE and POSTROUTING (after or before NAT) (Andre Correa)
 *	       - Cosmetic corrections (Norbert Buchmuller) (Andre Correa)
 *
 *
 *             2005/12/16 - IMQ versions between 2.6.7 and 2.6.13 were
 *             released with almost no problems. 2.6.14-x was released
 *             with some important changes: nfcache was removed; After
 *             some weeks of trouble we figured out that some IMQ fields
 *             in skb were missing in skbuff.c - skb_clone and copy_skb_header.
 *             These functions are correctly patched by this new patch version.
 *
 *             Thanks for all who helped to figure out all the problems with
 *             2.6.14.x: Patrick McHardy, Rune Kock, VeNoMouS, Max CtRiX,
 *             Kevin Shanahan, Richard Lucassen, Valery Dachev (hopefully
 *             I didn't forget anybody). I apologize again for my lack of time.
 *
 *             More info at: http://www.linuximq.net/ (Andre Correa)
 */

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/moduleparam.h>
#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <linux/rtnetlink.h>
#include <linux/if_arp.h>
#include <linux/netfilter.h>
#include <linux/netfilter_ipv4.h>
#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
	#include <linux/netfilter_ipv6.h>
#endif
#include <linux/imq.h>
#include <net/pkt_sched.h>

extern int qdisc_restart1(struct net_device *dev);

static nf_hookfn imq_nf_hook;

static struct nf_hook_ops imq_ingress_ipv4 = {
	.hook		= imq_nf_hook,
	.owner		= THIS_MODULE,
	.pf		= PF_INET,
	.hooknum	= NF_IP_PRE_ROUTING,
	.priority	= NF_IP_PRI_MANGLE + 1
};

static struct nf_hook_ops imq_egress_ipv4 = {
	.hook		= imq_nf_hook,
	.owner		= THIS_MODULE,
	.pf		= PF_INET,
	.hooknum	= NF_IP_POST_ROUTING,
	.priority	= NF_IP_PRI_NAT_SRC - 1
};

#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
static struct nf_hook_ops imq_ingress_ipv6 = {
	.hook		= imq_nf_hook,
	.owner		= THIS_MODULE,
	.pf		= PF_INET6,
	.hooknum	= NF_IP6_PRE_ROUTING,
	.priority	= NF_IP6_PRI_MANGLE + 1
};

static struct nf_hook_ops imq_egress_ipv6 = {
	.hook		= imq_nf_hook,
	.owner		= THIS_MODULE,
	.pf		= PF_INET6,
	.hooknum	= NF_IP6_POST_ROUTING,
	.priority	= NF_IP6_PRI_NAT_SRC - 1
};
#endif

#if defined(CONFIG_IMQ_NUM_DEVS)
static unsigned int numdevs = CONFIG_IMQ_NUM_DEVS;
#else
static unsigned int numdevs = IMQ_MAX_DEVS;
#endif

static char *behaviour;

#if defined(CONFIG_IMQ_BEHAVIOR_BB)
static int imq_behaviour = 0;
#elif defined(CONFIG_IMQ_BEHAVIOR_BA)
static int imq_behaviour = IMQ_BEHAV_EGRESS_AFTER;
#elif defined(CONFIG_IMQ_BEHAVIOR_AB)
static int imq_behaviour = IMQ_BEHAV_INGRESS_AFTER;
#elif defined(CONFIG_IMQ_BEHAVIOR_AA)
static int imq_behaviour = IMQ_BEHAV_INGRESS_AFTER | IMQ_BEHAV_EGRESS_AFTER;
#else
static int imq_behaviour = IMQ_BEHAV_EGRESS_AFTER;
#endif

static struct net_device *imq_devs;

static struct net_device_stats *imq_get_stats(struct net_device *dev)
{
	return (struct net_device_stats *)dev->priv;
}

/* called for packets kfree'd in qdiscs at places other than enqueue */
static void imq_skb_destructor(struct sk_buff *skb)
{
	struct nf_info *info = skb->nf_info;

	if (info) {
		if (info->indev)
			dev_put(info->indev);
		if (info->outdev)
			dev_put(info->outdev);
		kfree(info);
	}
}

static int imq_dev_xmit(struct sk_buff *skb, struct net_device *dev)
{
	struct net_device_stats *stats = (struct net_device_stats*) dev->priv;

	stats->tx_bytes += skb->len;
	stats->tx_packets++;

	skb->imq_flags = 0;
	skb->destructor = NULL;

	dev->trans_start = jiffies;
	nf_reinject(skb, skb->nf_info, NF_ACCEPT);
	return 0;
}

static int imq_nf_queue(struct sk_buff *skb, struct nf_info *info, unsigned queue_num, void *data)
{
	struct net_device *dev;
	struct net_device_stats *stats;
	struct sk_buff *skb2 = NULL;
	struct Qdisc *q;
	unsigned int index = skb->imq_flags & IMQ_F_IFMASK;
	int ret = -EINVAL;

	if (index > numdevs)
		return ret;

	dev = imq_devs + index;
	if (!(dev->flags & IFF_UP)) {
		skb->imq_flags = 0;
		nf_reinject(skb, info, NF_ACCEPT);
		return 0;
	}
	dev->last_rx = jiffies;

	if (skb->destructor) {
		skb2 = skb;
		skb = skb_clone(skb, GFP_ATOMIC);
		if (!skb)
			return -ENOMEM;
	}
	skb->nf_info = info;

	stats = (struct net_device_stats *)dev->priv;
	stats->rx_bytes += skb->len;
	stats->rx_packets++;

	spin_lock_bh(&dev->queue_lock);
	q = dev->qdisc;
	if (q->enqueue) {
		q->enqueue(skb_get(skb), q);
		if (skb_shared(skb)) {
			skb->destructor = imq_skb_destructor;
			kfree_skb(skb);
			ret = 0;
		}
	}
	if (spin_is_locked(&dev->_xmit_lock))
		netif_schedule(dev);
	else
		while (!netif_queue_stopped(dev) && qdisc_restart1(dev) < 0)
			/* NOTHING */;

	spin_unlock_bh(&dev->queue_lock);

	if (skb2)
		kfree_skb(ret ? skb : skb2);

	return ret;
}

static struct nf_queue_handler nfqh = {
	.name  = "imq",
	.outfn = imq_nf_queue,
};

static unsigned int imq_nf_hook(unsigned int hook, struct sk_buff *skb,
				const struct net_device *indev,
				const struct net_device *outdev,
				int (*okfn)(struct sk_buff *))
{
	if (skb->imq_flags & IMQ_F_ENQUEUE)
		return NF_QUEUE;

	return NF_ACCEPT;
}

static int __init imq_init_hooks(void)
{
	int err;

	if (behaviour) {
		if (strlen(behaviour) == 2) {
			if (behaviour[0] == 'b')
				imq_behaviour &= ~IMQ_BEHAV_INGRESS_AFTER;
			else if (behaviour[0] == 'a')
				imq_behaviour |= IMQ_BEHAV_INGRESS_AFTER;
			else
				goto errp;
			if (behaviour[1] == 'b')
				imq_behaviour &= ~IMQ_BEHAV_EGRESS_AFTER;
			else if (behaviour[1] == 'a')
				imq_behaviour |= IMQ_BEHAV_EGRESS_AFTER;
			else
				goto errp;
		}
		else
			goto errp;
	}

	if (imq_behaviour & IMQ_BEHAV_INGRESS_AFTER) {
		imq_ingress_ipv4.priority = NF_IP_PRI_NAT_DST + 1;
#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
		imq_ingress_ipv6.priority = NF_IP6_PRI_NAT_DST + 1;
#endif
	}
	if (imq_behaviour & IMQ_BEHAV_EGRESS_AFTER) {
		imq_egress_ipv4.priority = NF_IP_PRI_LAST;
#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
		imq_egress_ipv6.priority = NF_IP6_PRI_LAST;
#endif
	}

	err = nf_register_queue_handler(PF_INET, &nfqh);
	if (err > 0)
		goto err1;
	if ((err = nf_register_hook(&imq_ingress_ipv4)))
		goto err2;
	if ((err = nf_register_hook(&imq_egress_ipv4)))
		goto err3;
#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
	if ((err = nf_register_queue_handler(PF_INET6, &nfqh)))
		goto err4;
	if ((err = nf_register_hook(&imq_ingress_ipv6)))
		goto err5;
	if ((err = nf_register_hook(&imq_egress_ipv6)))
		goto err6;
#endif

	return 0;

errp:
	printk(KERN_ERR "IMQ: behaviour must be one of these: \"bb\", \"ba\", \"ab\", \"aa\".\n");
	return -EINVAL;
#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
err6:
	nf_unregister_hook(&imq_ingress_ipv6);
err5:
	nf_unregister_queue_handler(PF_INET6);
err4:
	nf_unregister_hook(&imq_egress_ipv4);
#endif
err3:
	nf_unregister_hook(&imq_ingress_ipv4);
err2:
	nf_unregister_queue_handler(PF_INET);
err1:
	return err;
}

static void __exit imq_unhook(void)
{
#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
	nf_unregister_hook(&imq_ingress_ipv6);
	nf_unregister_hook(&imq_egress_ipv6);
	nf_unregister_queue_handler(PF_INET6);
#endif
	nf_unregister_hook(&imq_ingress_ipv4);
	nf_unregister_hook(&imq_egress_ipv4);
	nf_unregister_queue_handler(PF_INET);
}

static int __init imq_dev_init(struct net_device *dev)
{
	dev->hard_start_xmit    = imq_dev_xmit;
	dev->type               = ARPHRD_VOID;
	dev->mtu                = 1500;
	dev->tx_queue_len       = 30;
	dev->flags              = IFF_NOARP;
	dev->priv = kzalloc(sizeof(struct net_device_stats), GFP_KERNEL);
	if (dev->priv == NULL)
		return -ENOMEM;
	dev->get_stats          = imq_get_stats;

	return 0;
}

static void imq_dev_uninit(struct net_device *dev)
{
	kfree(dev->priv);
}

static int __init imq_init_devs(void)
{
	struct net_device *dev;
	int i,j;
	j = numdevs;

	if (numdevs < 1 || numdevs > IMQ_MAX_DEVS) {
		printk(KERN_ERR "IMQ: numdevs has to be betweed 1 and %u\n",
		       IMQ_MAX_DEVS);
		return -EINVAL;
	}

	imq_devs = kzalloc(sizeof(struct net_device) * numdevs, GFP_KERNEL);
	if (!imq_devs)
		return -ENOMEM;

	/* we start counting at zero */
	numdevs--;

	for (i = 0, dev = imq_devs; i <= numdevs; i++, dev++) {
		SET_MODULE_OWNER(dev);
		strcpy(dev->name, "imq%d");
		dev->init   = imq_dev_init;
		dev->uninit = imq_dev_uninit;

		if (register_netdev(dev) < 0)
			goto err_register;
	}
	printk(KERN_INFO "IMQ starting with %u devices...\n", j);
	return 0;

err_register:
	for (; i; i--)
		unregister_netdev(--dev);
	kfree(imq_devs);
	return -EIO;
}

static void imq_cleanup_devs(void)
{
	int i;
	struct net_device *dev = imq_devs;

	for (i = 0; i <= numdevs; i++)
		unregister_netdev(dev++);

	kfree(imq_devs);
}

static int __init imq_init_module(void)
{
	int err;

	if ((err = imq_init_devs())) {
		printk(KERN_ERR "IMQ: Error trying imq_init_devs()\n");
		return err;
	}
	if ((err = imq_init_hooks())) {
		printk(KERN_ERR "IMQ: Error trying imq_init_hooks()\n");
		imq_cleanup_devs();
		return err;
	}

	printk(KERN_INFO "IMQ driver loaded successfully.\n");

	if (imq_behaviour & IMQ_BEHAV_INGRESS_AFTER)
		printk(KERN_INFO "\tHooking IMQ after NAT on PREROUTING.\n");
	else
		printk(KERN_INFO "\tHooking IMQ before NAT on PREROUTING.\n");
	if (imq_behaviour & IMQ_BEHAV_EGRESS_AFTER)
		printk(KERN_INFO "\tHooking IMQ after NAT on POSTROUTING.\n");
	else
		printk(KERN_INFO "\tHooking IMQ before NAT on POSTROUTING.\n");

	return 0;
}

static void __exit imq_cleanup_module(void)
{
	imq_unhook();
	imq_cleanup_devs();
	printk(KERN_INFO "IMQ driver unloaded successfully.\n");
}

module_init(imq_init_module);
module_exit(imq_cleanup_module);

module_param(numdevs, int, IMQ_MAX_DEVS);
MODULE_PARM_DESC(numdevs, "number of IMQ devices (how many imq* devices will be created)");
module_param(behaviour, charp, 0);
MODULE_PARM_DESC(behaviour, "where to hook in PREROUTING and POSTROUTING - before or after NAT (aa,ab,ba,bb)");
MODULE_AUTHOR("http://www.linuximq.net");
MODULE_DESCRIPTION("Pseudo-driver for the intermediate queue device. See http://www.linuximq.net/ for more information.");
MODULE_LICENSE("GPL");


--TEST--
Bug #24313 (file_exists() throws a warning on nonexistent files when is open_basedir enabled)
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
    die('skip "/dev" is not available');
}
?>
--INI--
open_basedir=/dev
--FILE--
<?php
	var_dump(file_exists("/dev/bogus_file_no_such_thing"));
?>
--EXPECT--
bool(false)


<!DOCTYPE html
  SYSTEM "about:legacy-compat">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="UTF-8"><meta name="copyright" content="(C) Copyright 2019"><meta name="DC.rights.owner" content="(C) Copyright 2019"><meta name="DC.type" content="topic"><meta name="DC.relation" scheme="URI" content="../chap03/a-simple-database.html"><meta name="DC.format" content="HTML5"><meta name="DC.identifier" content="updating-existing-records--another-use-for-where更新已有的记录where-再战江湖"><link rel="stylesheet" type="text/css" href="../commonltr.css"><title>Updating Existing Records--Another Use for WHERE（更新已有的记录——WHERE 再战江湖）</title>

Updating Existing Records--Another Use for WHERE（更新已有的记录——WHERE 再战江湖）

Now that you've got nice generalized select and where functions,
you're in a good position to write the next feature that every
database needs--a way to update particular records. In SQL the update
command is used to update a set of records matching a particular where
clause. That seems like a good model, especially since you've already
got a where-clause generator. In fact, the update function is mostly
just the application of a few ideas you've already seen: using a
passed-in selector function to choose the records to update and using
keyword arguments to specify the values to change. The main new bit is
the use of a function MAPCAR that maps over a list, *db* in this case,
and returns a new list containing the results of calling a function on
each item in the original list.

有了完美通用的 select 和 where
函数，是时候开始编写下一个所有数据库都需要的特性——更新特定记录的方法了。在
SQL 中，update 命令被用于更新一组匹配特定 where
子句的记录。这听起来像是个很好的模型，尤其是当已经有了一个 where
子句生成器时。事实上，update
函数只是你已经见过的一些思路的再次应用：使用一个通过参数传递的选择器函数来选取需要更新的记录，再使用关键字形参来指定需要改变的值。这里主要出现的新内容是对
MAPCAR 函数的使用，其映射在一个列表上（这里是 *db*），然后返回一个新的列表，其中含有在原来列表的每个
元素上调用一个函数所得到的结果。

(defun update (selector-fn &key title artist rating (ripped nil ripped-p))
  (setf *db*
        (mapcar
         #'(lambda (row)
             (when (funcall selector-fn row)
               (if title    (setf (getf row :title) title))
               (if artist   (setf (getf row :artist) artist))
               (if rating   (setf (getf row :rating) rating))
               (if ripped-p (setf (getf row :ripped) ripped)))
             row) *db*)))

One other new bit here is the use of SETF on a complex form such as
(getf row :title). I'll discuss SETF in greater detail in Chapter 6,
but for now you just need to know that it's a general assignment
operator that can be used to assign lots of "places" other than just
variables. (It's a coincidence that SETF and GETF have such similar
names--they don't have any special relationship.) For now it's enough
to know that after (setf (getf row :title) title), the plist
referenced by row will have the value of the variable title following
the property name :title. With this update function if you decide that
you really dig the Dixie Chicks and that all their albums should go to
11, you can evaluate the following form:

这里的另一个新内容是 SETF 用在了诸如 (getf row :title)
这样的复杂形式上。第 6 章将细致地讨论
SETF，目前只需知道它是一个通用的赋值操作符，可被用于对各种 “位置”
而不只是对变量进行赋值即可。（SETF 和 GETF
具有相似的名字，但这纯属巧合，两者之间并没有特别的关系。）眼下知道执行
(setf (getf row :title) title) 以后的结果就可以了：由 row
所引用的 plist 将具有紧跟着属性名 :title 后面的那项变量 title
的值。有了这个 update 函数，如果你觉得自己真的很喜欢 Dixie
Chicks，并且他们的所有专辑的评级应该升到 11，那么可以对下列形式求值：

CL-USER> (update (where :artist "Dixie Chicks") :rating 11)
NIL

And it is so.

这样就可以了。

CL-USER> (select (where :artist "Dixie Chicks"))
((:TITLE "Home" :ARTIST "Dixie Chicks" :RATING 11 :RIPPED T)
 (:TITLE "Fly" :ARTIST "Dixie Chicks" :RATING 11 :RIPPED T))

You can even more easily add a function to delete rows from the database.

甚至可以更容易地添加一个函数来从数据库里删除行。

(defun delete-rows (selector-fn)
  (setf *db* (remove-if selector-fn *db*)))

The function REMOVE-IF is the complement of REMOVE-IF-NOT; it returns
a list with all the elements that do match the predicate
removed. Like REMOVE-IF-NOT, it doesn't actually affect the list
it's passed but by saving the result back into *db*, delete-rows
actually changes the contents of the database.

函数 REMOVE-IF 的功能跟 REMOVE-IF-NOT
正好相反，在它所返回的列表中，所有确实匹配谓词的元素都被删掉的。和
REMOVE-IF-NOT 一样，它不会实际地影响传入的那个列表，但是通过将结果重新保存到
*db* 中，delete-rows 事实上改变了数据库的内容。

Parent topic: Practical: A Simple Database（实践：一个简单的数据库）


// =============================================================================
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) ????-2010 Serge Steer - INRIA
//
//  This file is distributed under the same license as the Scilab package.
// =============================================================================

// <-- CLI SHELL MODE -->

// <-- Non-regression test for bug 5722 -->
//
// <-- Bugzilla URL -->
// http://bugzilla.scilab.org/show_bug.cgi?id=5722
//
// <-- Short Description -->
// tand() is buggy: tand(30) => error
ieee(0)
t1=tand(30)
ieee(2)
t2=tand(30)
if t1<>t2 then pause,end


//
// detail/impl/win_iocp_io_service.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef BOOST_ASIO_DETAIL_IMPL_WIN_IOCP_IO_SERVICE_IPP
#define BOOST_ASIO_DETAIL_IMPL_WIN_IOCP_IO_SERVICE_IPP

#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)

#include <boost/asio/detail/config.hpp>

#if defined(BOOST_ASIO_HAS_IOCP)

#include <boost/asio/error.hpp>
#include <boost/asio/io_service.hpp>
#include <boost/asio/detail/cstdint.hpp>
#include <boost/asio/detail/handler_alloc_helpers.hpp>
#include <boost/asio/detail/handler_invoke_helpers.hpp>
#include <boost/asio/detail/limits.hpp>
#include <boost/asio/detail/throw_error.hpp>
#include <boost/asio/detail/win_iocp_io_service.hpp>

#include <boost/asio/detail/push_options.hpp>

namespace boost {
namespace asio {
namespace detail {

struct win_iocp_io_service::work_finished_on_block_exit
{
  ~work_finished_on_block_exit()
  {
    io_service_->work_finished();
  }

  win_iocp_io_service* io_service_;
};

struct win_iocp_io_service::timer_thread_function
{
  void operator()()
  {
    while (::InterlockedExchangeAdd(&io_service_->shutdown_, 0) == 0)
    {
      if (::WaitForSingleObject(io_service_->waitable_timer_.handle,
            INFINITE) == WAIT_OBJECT_0)
      {
        ::InterlockedExchange(&io_service_->dispatch_required_, 1);
        ::PostQueuedCompletionStatus(io_service_->iocp_.handle,
            0, wake_for_dispatch, 0);
      }
    }
  }

  win_iocp_io_service* io_service_;
};

win_iocp_io_service::win_iocp_io_service(
    boost::asio::io_service& io_service, size_t concurrency_hint)
  : boost::asio::detail::service_base<win_iocp_io_service>(io_service),
    iocp_(),
    outstanding_work_(0),
    stopped_(0),
    stop_event_posted_(0),
    shutdown_(0),
    gqcs_timeout_(get_gqcs_timeout()),
    dispatch_required_(0)
{
  BOOST_ASIO_HANDLER_TRACKING_INIT;

  iocp_.handle = ::CreateIoCompletionPort(INVALID_HANDLE_VALUE, 0, 0,
      static_cast<DWORD>(concurrency_hint < DWORD(~0)
        ? concurrency_hint : DWORD(~0)));
  if (!iocp_.handle)
  {
    DWORD last_error = ::GetLastError();
    boost::system::error_code ec(last_error,
        boost::asio::error::get_system_category());
    boost::asio::detail::throw_error(ec, "iocp");
  }
}

void win_iocp_io_service::shutdown_service()
{
  ::InterlockedExchange(&shutdown_, 1);

  if (timer_thread_.get())
  {
    LARGE_INTEGER timeout;
    timeout.QuadPart = 1;
    ::SetWaitableTimer(waitable_timer_.handle, &timeout, 1, 0, 0, FALSE);
  }

  while (::InterlockedExchangeAdd(&outstanding_work_, 0) > 0)
  {
    op_queue<win_iocp_operation> ops;
    timer_queues_.get_all_timers(ops);
    ops.push(completed_ops_);
    if (!ops.empty())
    {
      while (win_iocp_operation* op = ops.front())
      {
        ops.pop();
        ::InterlockedDecrement(&outstanding_work_);
        op->destroy();
      }
    }
    else
    {
      DWORD bytes_transferred = 0;
      dword_ptr_t completion_key = 0;
      LPOVERLAPPED overlapped = 0;
      ::GetQueuedCompletionStatus(iocp_.handle, &bytes_transferred,
          &completion_key, &overlapped, gqcs_timeout_);
      if (overlapped)
      {
        ::InterlockedDecrement(&outstanding_work_);
        static_cast<win_iocp_operation*>(overlapped)->destroy();
      }
    }
  }

  if (timer_thread_.get())
    timer_thread_->join();
}

boost::system::error_code win_iocp_io_service::register_handle(
    HANDLE handle, boost::system::error_code& ec)
{
  if (::CreateIoCompletionPort(handle, iocp_.handle, 0, 0) == 0)
  {
    DWORD last_error = ::GetLastError();
    ec = boost::system::error_code(last_error,
        boost::asio::error::get_system_category());
  }
  else
  {
    ec = boost::system::error_code();
  }
  return ec;
}

size_t win_iocp_io_service::run(boost::system::error_code& ec)
{
  if (::InterlockedExchangeAdd(&outstanding_work_, 0) == 0)
  {
    stop();
    ec = boost::system::error_code();
    return 0;
  }

  win_iocp_thread_info this_thread;
  thread_call_stack::context ctx(this, this_thread);

  size_t n = 0;
  while (do_one(true, ec))
    if (n != (std::numeric_limits<size_t>::max)())
      ++n;
  return n;
}

size_t win_iocp_io_service::run_one(boost::system::error_code& ec)
{
  if (::InterlockedExchangeAdd(&outstanding_work_, 0) == 0)
  {
    stop();
    ec = boost::system::error_code();
    return 0;
  }

  win_iocp_thread_info this_thread;
  thread_call_stack::context ctx(this, this_thread);

  return do_one(true, ec);
}

size_t win_iocp_io_service::poll(boost::system::error_code& ec)
{
  if (::InterlockedExchangeAdd(&outstanding_work_, 0) == 0)
  {
    stop();
    ec = boost::system::error_code();
    return 0;
  }

  win_iocp_thread_info this_thread;
  thread_call_stack::context ctx(this, this_thread);

  size_t n = 0;
  while (do_one(false, ec))
    if (n != (std::numeric_limits<size_t>::max)())
      ++n;
  return n;
}

size_t win_iocp_io_service::poll_one(boost::system::error_code& ec)
{
  if (::InterlockedExchangeAdd(&outstanding_work_, 0) == 0)
  {
    stop();
    ec = boost::system::error_code();
    return 0;
  }

  win_iocp_thread_info this_thread;
  thread_call_stack::context ctx(this, this_thread);

  return do_one(false, ec);
}

void win_iocp_io_service::stop()
{
  if (::InterlockedExchange(&stopped_, 1) == 0)
  {
    if (::InterlockedExchange(&stop_event_posted_, 1) == 0)
    {
      if (!::PostQueuedCompletionStatus(iocp_.handle, 0, 0, 0))
      {
        DWORD last_error = ::GetLastError();
        boost::system::error_code ec(last_error,
            boost::asio::error::get_system_category());
        boost::asio::detail::throw_error(ec, "pqcs");
      }
    }
  }
}

void win_iocp_io_service::post_deferred_completion(win_iocp_operation* op)
{
  // Flag the operation as ready.
  op->ready_ = 1;

  // Enqueue the operation on the I/O completion port.
  if (!::PostQueuedCompletionStatus(iocp_.handle, 0, 0, op))
  {
    // Out of resources. Put on completed queue instead.
    mutex::scoped_lock lock(dispatch_mutex_);
    completed_ops_.push(op);
    ::InterlockedExchange(&dispatch_required_, 1);
  }
}

void win_iocp_io_service::post_deferred_completions(
    op_queue<win_iocp_operation>& ops)
{
  while (win_iocp_operation* op = ops.front())
  {
    ops.pop();

    // Flag the operation as ready.
    op->ready_ = 1;

    // Enqueue the operation on the I/O completion port.
    if (!::PostQueuedCompletionStatus(iocp_.handle, 0, 0, op))
    {
      // Out of resources. Put on completed queue instead.
      mutex::scoped_lock lock(dispatch_mutex_);
      completed_ops_.push(op);
      completed_ops_.push(ops);
      ::InterlockedExchange(&dispatch_required_, 1);
    }
  }
}

void win_iocp_io_service::abandon_operations(
    op_queue<win_iocp_operation>& ops)
{
  while (win_iocp_operation* op = ops.front())
  {
    ops.pop();
    ::InterlockedDecrement(&outstanding_work_);
    op->destroy();
  }
}

void win_iocp_io_service::on_pending(win_iocp_operation* op)
{
  if (::InterlockedCompareExchange(&op->ready_, 1, 0) == 1)
  {
    // Enqueue the operation on the I/O completion port.
    if (!::PostQueuedCompletionStatus(iocp_.handle,
          0, overlapped_contains_result, op))
    {
      // Out of resources. Put on completed queue instead.
      mutex::scoped_lock lock(dispatch_mutex_);
      completed_ops_.push(op);
      ::InterlockedExchange(&dispatch_required_, 1);
    }
  }
}

void win_iocp_io_service::on_completion(win_iocp_operation* op,
    DWORD last_error, DWORD bytes_transferred)
{
  // Flag that the operation is ready for invocation.
  op->ready_ = 1;

  // Store results in the OVERLAPPED structure.
  op->Internal = reinterpret_cast<ulong_ptr_t>(
      &boost::asio::error::get_system_category());
  op->Offset = last_error;
  op->OffsetHigh = bytes_transferred;

  // Enqueue the operation on the I/O completion port.
  if (!::PostQueuedCompletionStatus(iocp_.handle,
        0, overlapped_contains_result, op))
  {
    // Out of resources. Put on completed queue instead.
    mutex::scoped_lock lock(dispatch_mutex_);
    completed_ops_.push(op);
    ::InterlockedExchange(&dispatch_required_, 1);
  }
}

void win_iocp_io_service::on_completion(win_iocp_operation* op,
    const boost::system::error_code& ec, DWORD bytes_transferred)
{
  // Flag that the operation is ready for invocation.
  op->ready_ = 1;

  // Store results in the OVERLAPPED structure.
  op->Internal = reinterpret_cast<ulong_ptr_t>(&ec.category());
  op->Offset = ec.value();
  op->OffsetHigh = bytes_transferred;

  // Enqueue the operation on the I/O completion port.
  if (!::PostQueuedCompletionStatus(iocp_.handle,
        0, overlapped_contains_result, op))
  {
    // Out of resources. Put on completed queue instead.
    mutex::scoped_lock lock(dispatch_mutex_);
    completed_ops_.push(op);
    ::InterlockedExchange(&dispatch_required_, 1);
  }
}

size_t win_iocp_io_service::do_one(bool block, boost::system::error_code& ec)
{
  for (;;)
  {
    // Try to acquire responsibility for dispatching timers and completed ops.
    if (::InterlockedCompareExchange(&dispatch_required_, 0, 1) == 1)
    {
      mutex::scoped_lock lock(dispatch_mutex_);

      // Dispatch pending timers and operations.
      op_queue<win_iocp_operation> ops;
      ops.push(completed_ops_);
      timer_queues_.get_ready_timers(ops);
      post_deferred_completions(ops);
      update_timeout();
    }

    // Get the next operation from the queue.
    DWORD bytes_transferred = 0;
    dword_ptr_t completion_key = 0;
    LPOVERLAPPED overlapped = 0;
    ::SetLastError(0);
    BOOL ok = ::GetQueuedCompletionStatus(iocp_.handle, &bytes_transferred,
        &completion_key, &overlapped, block ? gqcs_timeout_ : 0);
    DWORD last_error = ::GetLastError();

    if (overlapped)
    {
      win_iocp_operation* op = static_cast<win_iocp_operation*>(overlapped);
      boost::system::error_code result_ec(last_error,
          boost::asio::error::get_system_category());

      // We may have been passed the last_error and bytes_transferred in the
      // OVERLAPPED structure itself.
      if (completion_key == overlapped_contains_result)
      {
        result_ec = boost::system::error_code(static_cast<int>(op->Offset),
            *reinterpret_cast<boost::system::error_category*>(op->Internal));
        bytes_transferred = op->OffsetHigh;
      }

      // Otherwise ensure any result has been saved into the OVERLAPPED
      // structure.
      else
      {
        op->Internal = reinterpret_cast<ulong_ptr_t>(&result_ec.category());
        op->Offset = result_ec.value();
        op->OffsetHigh = bytes_transferred;
      }

      // Dispatch the operation only if ready. The operation may not be ready
      // if the initiating function (e.g. a call to WSARecv) has not yet
      // returned. This is because the initiating function still wants access
      // to the operation's OVERLAPPED structure.
      if (::InterlockedCompareExchange(&op->ready_, 1, 0) == 1)
      {
        // Ensure the count of outstanding work is decremented on block exit.
        work_finished_on_block_exit on_exit = { this };
        (void)on_exit;

        op->complete(*this, result_ec, bytes_transferred);
        ec = boost::system::error_code();
        return 1;
      }
    }
    else if (!ok)
    {
      if (last_error != WAIT_TIMEOUT)
      {
        ec = boost::system::error_code(last_error,
            boost::asio::error::get_system_category());
        return 0;
      }

      // If we're not polling we need to keep going until we get a real handler.
      if (block)
        continue;

      ec = boost::system::error_code();
      return 0;
    }
    else if (completion_key == wake_for_dispatch)
    {
      // We have been woken up to try to acquire responsibility for dispatching
      // timers and completed operations.
    }
    else
    {
      // Indicate that there is no longer an in-flight stop event.
      ::InterlockedExchange(&stop_event_posted_, 0);

      // The stopped_ flag is always checked to ensure that any leftover
      // stop events from a previous run invocation are ignored.
      if (::InterlockedExchangeAdd(&stopped_, 0) != 0)
      {
        // Wake up next thread that is blocked on GetQueuedCompletionStatus.
        if (::InterlockedExchange(&stop_event_posted_, 1) == 0)
        {
          if (!::PostQueuedCompletionStatus(iocp_.handle, 0, 0, 0))
          {
            last_error = ::GetLastError();
            ec = boost::system::error_code(last_error,
                boost::asio::error::get_system_category());
            return 0;
          }
        }

        ec = boost::system::error_code();
        return 0;
      }
    }
  }
}

DWORD win_iocp_io_service::get_gqcs_timeout()
{
  OSVERSIONINFOEX osvi;
  ZeroMemory(&osvi, sizeof(osvi));
  osvi.dwOSVersionInfoSize = sizeof(osvi);
  osvi.dwMajorVersion = 6ul;

  const uint64_t condition_mask = ::VerSetConditionMask(
      0, VER_MAJORVERSION, VER_GREATER_EQUAL);

  if (!!::VerifyVersionInfo(&osvi, VER_MAJORVERSION, condition_mask))
    return INFINITE;

  return default_gqcs_timeout;
}

void win_iocp_io_service::do_add_timer_queue(timer_queue_base& queue)
{
  mutex::scoped_lock lock(dispatch_mutex_);

  timer_queues_.insert(&queue);

  if (!waitable_timer_.handle)
  {
    waitable_timer_.handle = ::CreateWaitableTimer(0, FALSE, 0);
    if (waitable_timer_.handle == 0)
    {
      DWORD last_error = ::GetLastError();
      boost::system::error_code ec(last_error,
          boost::asio::error::get_system_category());
      boost::asio::detail::throw_error(ec, "timer");
    }

    LARGE_INTEGER timeout;
    timeout.QuadPart = -max_timeout_usec;
    timeout.QuadPart *= 10;
    ::SetWaitableTimer(waitable_timer_.handle,
        &timeout, max_timeout_msec, 0, 0, FALSE);
  }

  if (!timer_thread_.get())
  {
    timer_thread_function thread_function = { this };
    timer_thread_.reset(new thread(thread_function, 65536));
  }
}

void win_iocp_io_service::do_remove_timer_queue(timer_queue_base& queue)
{
  mutex::scoped_lock lock(dispatch_mutex_);

  timer_queues_.erase(&queue);
}

void win_iocp_io_service::update_timeout()
{
  if (timer_thread_.get())
  {
    // There's no point updating the waitable timer if the new timeout period
    // exceeds the maximum timeout. In that case, we might as well wait for the
    // existing period of the timer to expire.
    long timeout_usec = timer_queues_.wait_duration_usec(max_timeout_usec);
    if (timeout_usec < max_timeout_usec)
    {
      LARGE_INTEGER timeout;
      timeout.QuadPart = -timeout_usec;
      timeout.QuadPart *= 10;
      ::SetWaitableTimer(waitable_timer_.handle,
          &timeout, max_timeout_msec, 0, 0, FALSE);
    }
  }
}

} // namespace detail
} // namespace asio
} // namespace boost

#include <boost/asio/detail/pop_options.hpp>

#endif // defined(BOOST_ASIO_HAS_IOCP)

#endif // BOOST_ASIO_DETAIL_IMPL_WIN_IOCP_IO_SERVICE_IPP


<?php
namespace oasis\names\specification\ubl\schema\xsd\CommonBasicComponents_2;

/**
 * @xmlNamespace urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2
 * @xmlType VesselIDType
 * @xmlName VesselID
 * @var oasis\names\specification\ubl\schema\xsd\CommonBasicComponents_2\VesselID
 */
class VesselID extends VesselIDType
{
} // end class VesselID


@startuml
sprite $time_6 [48x48/16] {
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
00000000000000000039CFFFFDA510000000000000000000
00000000000000005DFFFFFFFFFFF9100000000000000000
000000000000002CFFFFFFFFFFFFFFF70000000000000000
00000000000003EFFFFC7422359EFFFFA000000000000000
0000000000004FFFFB30000200006EFFFB00000000000000
000000000002FFFF600000BF300001BFFF90000000000000
00000000000CFFF4000000DF5000000AFFF5000000000000
00000000006FFF60000000DF50000000CFFD000000000000
0000000000DFFB00000000DF500000002FFF600000000000
0000000004FFF200000000DF5000000009FFC00000000000
0000000009FFB000000000DF5000000002FFF10000000000
000000000DFF6000000000DF5000000000DFF60000000000
000000000FFF3000000000DF5000000000AFF80000000000
000000001FFF1000000000DF50000000008FF90000000000
000000001FFF1000000000DF50000000007FFA0000000000
000000000FFF2000000000DF50000000008FF90000000000
000000000EFF4000000000DF5000000000BFF70000000000
000000000CFF8000000000DF5000000000EFF40000000000
0000000007FFD000000000DF5000000004FFF00000000000
0000000002FFF500000000DF500000000BFFB00000000000
0000000000BFFD00000000BF300000005FFF400000000000
00000000002FFFB00000001400000002EFFB000000000000
000000000009FFF9000000000000002DFFF2000000000000
000000000000CFFFC1000000000004EFFF50000000000000
0000000000001DFFFF8100000003BFFFF700000000000000
00000000000000BFFFFFC9767AEFFFFF5000000000000000
0000000000000006EFFFFFFFFFFFFFB20000000000000000
000000000000000008DFFFFFFFFFB4000000000000000000
0000000000000000000279ABA85000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
}

!define WEATHER_TIME_6(_alias) ENTITY(rectangle,black,time_6,_alias,WEATHER TIME_6)
!define WEATHER_TIME_6(_alias, _label) ENTITY(rectangle,black,time_6,_label, _alias,WEATHER TIME_6)
!define WEATHER_TIME_6(_alias, _label, _shape) ENTITY(_shape,black,time_6,_label, _alias,WEATHER TIME_6)
!define WEATHER_TIME_6(_alias, _label, _shape, _color) ENTITY(_shape,_color,time_6,_label, _alias,WEATHER TIME_6)
skinparam folderBackgroundColor<<WEATHER TIME_6>> White
@enduml


fileFormatVersion: 2
guid: 00b197bb73412448e9a5e14be146aaeb
timeCreated: 1492557010
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:


<?xml version="1.0" encoding="Windows-1252"?>
<!--

  This project was generated by
  Bakefile 0.2.9 (http://www.bakefile.org)
  Do not modify, all changes will be overwritten!

-->
<VisualStudioProject
	ProjectType="Visual C++"
	Version="8.00"
	Name="propgrid"
	ProjectGUID="{93781718-26B6-5541-84C5-78C6A8226AEC}"
	>
	<Platforms>
		<Platform
			Name="Win32"
		/>
		<Platform
			Name="x64"
		/>
	</Platforms>
	<ToolFiles>

	</ToolFiles>
	<Configurations>
		<Configuration
			Name="Debug|Win32"
			OutputDirectory="..\..\lib\vc_lib"
			IntermediateDirectory="vc_mswud\propgrid"
			ConfigurationType="4"
			UseOfMFC="0"
			ATLMinimizesCRunTimeLibraryUsage="false"
			CharacterSet="1"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCXMLDataGeneratorTool"
			/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"
			/>
			<Tool
				Name="VCMIDLTool"
				PreprocessorDefinitions="WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING"
				AdditionalIncludeDirectories="..\..\lib\vc_lib\mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib"
			/>
			<Tool
				Name="VCCLCompilerTool"
				Optimization="0"
				AdditionalIncludeDirectories="..\..\lib\vc_lib\mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib"
				PreprocessorDefinitions="WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING"
				MinimalRebuild="true"
				ExceptionHandling="1"
				BasicRuntimeChecks="3"
				RuntimeLibrary="3"
				BufferSecurityCheck="true"
				RuntimeTypeInfo="true"
				UsePrecompiledHeader="2"
				PrecompiledHeaderThrough="wx/wxprec.h"
				PrecompiledHeaderFile="vc_mswud\wxprec_propgridlib.pch"
				ObjectFile="vc_mswud\propgrid\"
				ProgramDataBaseFileName="..\..\lib\vc_lib\wxmsw30ud_propgrid.pdb"
				WarningLevel="4"
				SuppressStartupBanner="true"
				Detect64BitPortabilityProblems="true"
				DebugInformationFormat="3"
			/>
			<Tool
				Name="VCManagedResourceCompilerTool"
			/>
			<Tool
				Name="VCResourceCompilerTool"
				PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING"
				Culture="1033"
				AdditionalIncludeDirectories="..\..\lib\vc_lib\mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLibrarianTool"
				OutputFile="..\..\lib\vc_lib\wxmsw30ud_propgrid.lib"
				SuppressStartupBanner="true"
			/>
			<Tool
				Name="VCALinkTool"
			/>
			<Tool
				Name="VCManifestTool"
			/>
			<Tool
				Name="VCXDCMakeTool"
			/>
			<Tool
				Name="VCBscMakeTool"
				OutputFile="..\..\lib\vc_lib\wx_vc8_propgrid.bsc"
				SuppressStartupBanner="true"
			/>
			<Tool
				Name="VCFxCopTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
		</Configuration>
		<Configuration
			Name="Release|Win32"
			OutputDirectory="..\..\lib\vc_lib"
			IntermediateDirectory="vc_mswu\propgrid"
			ConfigurationType="4"
			UseOfMFC="0"
			ATLMinimizesCRunTimeLibraryUsage="false"
			CharacterSet="1"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCXMLDataGeneratorTool"
			/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"
			/>
			<Tool
				Name="VCMIDLTool"
				PreprocessorDefinitions="WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING"
				AdditionalIncludeDirectories="..\..\lib\vc_lib\mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib"
			/>
			<Tool
				Name="VCCLCompilerTool"
				Optimization="2"
				AdditionalIncludeDirectories="..\..\lib\vc_lib\mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib"
				PreprocessorDefinitions="WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING"
				ExceptionHandling="1"
				RuntimeLibrary="2"
				RuntimeTypeInfo="true"
				UsePrecompiledHeader="2"
				PrecompiledHeaderThrough="wx/wxprec.h"
				PrecompiledHeaderFile="vc_mswu\wxprec_propgridlib.pch"
				ObjectFile="vc_mswu\propgrid\"
				ProgramDataBaseFileName="..\..\lib\vc_lib\wxmsw30u_propgrid.pdb"
				WarningLevel="4"
				SuppressStartupBanner="true"
				Detect64BitPortabilityProblems="true"
				DebugInformationFormat="3"
			/>
			<Tool
				Name="VCManagedResourceCompilerTool"
			/>
			<Tool
				Name="VCResourceCompilerTool"
				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING"
				Culture="1033"
				AdditionalIncludeDirectories="..\..\lib\vc_lib\mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLibrarianTool"
				OutputFile="..\..\lib\vc_lib\wxmsw30u_propgrid.lib"
				SuppressStartupBanner="true"
			/>
			<Tool
				Name="VCALinkTool"
			/>
			<Tool
				Name="VCManifestTool"
			/>
			<Tool
				Name="VCXDCMakeTool"
			/>
			<Tool
				Name="VCBscMakeTool"
				OutputFile="..\..\lib\vc_lib\wx_vc8_propgrid.bsc"
				SuppressStartupBanner="true"
			/>
			<Tool
				Name="VCFxCopTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
		</Configuration>
		<Configuration
			Name="DLL Debug|Win32"
			OutputDirectory="..\..\lib\vc_dll"
			IntermediateDirectory="vc_mswuddll\propgrid"
			ConfigurationType="2"
			UseOfMFC="0"
			ATLMinimizesCRunTimeLibraryUsage="false"
			CharacterSet="1"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCXMLDataGeneratorTool"
			/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"
			/>
			<Tool
				Name="VCMIDLTool"
				PreprocessorDefinitions="WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID"
				AdditionalIncludeDirectories="..\..\lib\vc_dll\mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib"
			/>
			<Tool
				Name="VCCLCompilerTool"
				Optimization="0"
				AdditionalIncludeDirectories="..\..\lib\vc_dll\mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib"
				PreprocessorDefinitions="WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID"
				MinimalRebuild="true"
				ExceptionHandling="1"
				BasicRuntimeChecks="3"
				RuntimeLibrary="3"
				BufferSecurityCheck="true"
				RuntimeTypeInfo="true"
				UsePrecompiledHeader="2"
				PrecompiledHeaderThrough="wx/wxprec.h"
				PrecompiledHeaderFile="vc_mswuddll\wxprec_propgriddll.pch"
				ObjectFile="vc_mswuddll\propgrid\"
				ProgramDataBaseFileName="..\..\lib\vc_dll\wxmsw30ud_propgrid_vc_custom.pdb"
				WarningLevel="4"
				SuppressStartupBanner="true"
				Detect64BitPortabilityProblems="true"
				DebugInformationFormat="3"
			/>
			<Tool
				Name="VCManagedResourceCompilerTool"
			/>
			<Tool
				Name="VCResourceCompilerTool"
				PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30ud_propgrid_vc_custom;WXUSINGDLL;WXMAKINGDLL_PROPGRID"
				Culture="1033"
				AdditionalIncludeDirectories="..\..\lib\vc_dll\mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLinkerTool"
				AdditionalOptions=""
				AdditionalDependencies="wxtiffd.lib wxjpegd.lib wxpngd.lib   wxzlibd.lib wxregexud.lib wxexpatd.lib    kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib ..\..\lib\vc_dll\wxmsw30ud_adv.lib ..\..\lib\vc_dll\wxmsw30ud_core.lib ..\..\lib\vc_dll\wxbase30ud.lib"
				OutputFile="..\..\lib\vc_dll\wxmsw30ud_propgrid_vc_custom.dll"
				LinkIncremental="2"
				ImportLibrary="..\..\lib\vc_dll\wxmsw30ud_propgrid.lib"
				SuppressStartupBanner="true"
				AdditionalLibraryDirectories="..\..\lib\vc_dll"
				GenerateManifest="true"
				GenerateDebugInformation="true"
				ProgramDatabaseFile="..\..\lib\vc_dll\wxmsw30ud_propgrid_vc_custom.pdb"
				TargetMachine="1"
			/>
			<Tool
				Name="VCALinkTool"
			/>
			<Tool
				Name="VCManifestTool"
			/>
			<Tool
				Name="VCXDCMakeTool"
			/>
			<Tool
				Name="VCBscMakeTool"
				OutputFile="..\..\lib\vc_dll\wx_vc8_propgrid.bsc"
				SuppressStartupBanner="true"
			/>
			<Tool
				Name="VCFxCopTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
		</Configuration>
		<Configuration
			Name="DLL Release|Win32"
			OutputDirectory="..\..\lib\vc_dll"
			IntermediateDirectory="vc_mswudll\propgrid"
			ConfigurationType="2"
			UseOfMFC="0"
			ATLMinimizesCRunTimeLibraryUsage="false"
			CharacterSet="1"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCXMLDataGeneratorTool"
			/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"
			/>
			<Tool
				Name="VCMIDLTool"
				PreprocessorDefinitions="WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID"
				AdditionalIncludeDirectories="..\..\lib\vc_dll\mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib"
			/>
			<Tool
				Name="VCCLCompilerTool"
				Optimization="2"
				AdditionalIncludeDirectories="..\..\lib\vc_dll\mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib"
				PreprocessorDefinitions="WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID"
				ExceptionHandling="1"
				RuntimeLibrary="2"
				RuntimeTypeInfo="true"
				UsePrecompiledHeader="2"
				PrecompiledHeaderThrough="wx/wxprec.h"
				PrecompiledHeaderFile="vc_mswudll\wxprec_propgriddll.pch"
				ObjectFile="vc_mswudll\propgrid\"
				ProgramDataBaseFileName="..\..\lib\vc_dll\wxmsw30u_propgrid_vc_custom.pdb"
				WarningLevel="4"
				SuppressStartupBanner="true"
				Detect64BitPortabilityProblems="true"
				DebugInformationFormat="3"
			/>
			<Tool
				Name="VCManagedResourceCompilerTool"
			/>
			<Tool
				Name="VCResourceCompilerTool"
				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30u_propgrid_vc_custom;WXUSINGDLL;WXMAKINGDLL_PROPGRID"
				Culture="1033"
				AdditionalIncludeDirectories="..\..\lib\vc_dll\mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLinkerTool"
				AdditionalOptions=""
				AdditionalDependencies="wxtiff.lib wxjpeg.lib wxpng.lib   wxzlib.lib wxregexu.lib wxexpat.lib    kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib ..\..\lib\vc_dll\wxmsw30u_adv.lib ..\..\lib\vc_dll\wxmsw30u_core.lib ..\..\lib\vc_dll\wxbase30u.lib"
				OutputFile="..\..\lib\vc_dll\wxmsw30u_propgrid_vc_custom.dll"
				LinkIncremental="1"
				ImportLibrary="..\..\lib\vc_dll\wxmsw30u_propgrid.lib"
				SuppressStartupBanner="true"
				AdditionalLibraryDirectories="..\..\lib\vc_dll"
				GenerateManifest="true"
				GenerateDebugInformation="true"
				ProgramDatabaseFile="..\..\lib\vc_dll\wxmsw30u_propgrid_vc_custom.pdb"
				TargetMachine="1"
				OptimizeReferences="2"
				EnableCOMDATFolding="2"
			/>
			<Tool
				Name="VCALinkTool"
			/>
			<Tool
				Name="VCManifestTool"
			/>
			<Tool
				Name="VCXDCMakeTool"
			/>
			<Tool
				Name="VCBscMakeTool"
				OutputFile="..\..\lib\vc_dll\wx_vc8_propgrid.bsc"
				SuppressStartupBanner="true"
			/>
			<Tool
				Name="VCFxCopTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
		</Configuration>
		<Configuration
			Name="Debug|x64"
			OutputDirectory="..\..\lib\vc_x64_lib"
			IntermediateDirectory="vc_mswud_x64\propgrid"
			ConfigurationType="4"
			UseOfMFC="0"
			ATLMinimizesCRunTimeLibraryUsage="false"
			CharacterSet="1"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCXMLDataGeneratorTool"
			/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"
			/>
			<Tool
				Name="VCMIDLTool"
				PreprocessorDefinitions="WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING"
				AdditionalIncludeDirectories="..\..\lib\vc_x64_lib\mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib"
			/>
			<Tool
				Name="VCCLCompilerTool"
				Optimization="0"
				AdditionalIncludeDirectories="..\..\lib\vc_x64_lib\mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib"
				PreprocessorDefinitions="WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING"
				MinimalRebuild="true"
				ExceptionHandling="1"
				BasicRuntimeChecks="3"
				RuntimeLibrary="3"
				BufferSecurityCheck="true"
				RuntimeTypeInfo="true"
				UsePrecompiledHeader="2"
				PrecompiledHeaderThrough="wx/wxprec.h"
				PrecompiledHeaderFile="vc_mswud_x64\wxprec_propgridlib.pch"
				ObjectFile="vc_mswud_x64\propgrid\"
				ProgramDataBaseFileName="..\..\lib\vc_x64_lib\wxmsw30ud_propgrid.pdb"
				WarningLevel="4"
				SuppressStartupBanner="true"
				Detect64BitPortabilityProblems="true"
				DebugInformationFormat="3"
			/>
			<Tool
				Name="VCManagedResourceCompilerTool"
			/>
			<Tool
				Name="VCResourceCompilerTool"
				PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING"
				Culture="1033"
				AdditionalIncludeDirectories="..\..\lib\vc_x64_lib\mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLibrarianTool"
				OutputFile="..\..\lib\vc_x64_lib\wxmsw30ud_propgrid.lib"
				SuppressStartupBanner="true"
			/>
			<Tool
				Name="VCALinkTool"
			/>
			<Tool
				Name="VCManifestTool"
			/>
			<Tool
				Name="VCXDCMakeTool"
			/>
			<Tool
				Name="VCBscMakeTool"
				OutputFile="..\..\lib\vc_x64_lib\wx_vc8_propgrid.bsc"
				SuppressStartupBanner="true"
			/>
			<Tool
				Name="VCFxCopTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
		</Configuration>
		<Configuration
			Name="Release|x64"
			OutputDirectory="..\..\lib\vc_x64_lib"
			IntermediateDirectory="vc_mswu_x64\propgrid"
			ConfigurationType="4"
			UseOfMFC="0"
			ATLMinimizesCRunTimeLibraryUsage="false"
			CharacterSet="1"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCXMLDataGeneratorTool"
			/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"
			/>
			<Tool
				Name="VCMIDLTool"
				PreprocessorDefinitions="WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING"
				AdditionalIncludeDirectories="..\..\lib\vc_x64_lib\mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib"
			/>
			<Tool
				Name="VCCLCompilerTool"
				Optimization="2"
				AdditionalIncludeDirectories="..\..\lib\vc_x64_lib\mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib"
				PreprocessorDefinitions="WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING"
				ExceptionHandling="1"
				RuntimeLibrary="2"
				RuntimeTypeInfo="true"
				UsePrecompiledHeader="2"
				PrecompiledHeaderThrough="wx/wxprec.h"
				PrecompiledHeaderFile="vc_mswu_x64\wxprec_propgridlib.pch"
				ObjectFile="vc_mswu_x64\propgrid\"
				ProgramDataBaseFileName="..\..\lib\vc_x64_lib\wxmsw30u_propgrid.pdb"
				WarningLevel="4"
				SuppressStartupBanner="true"
				Detect64BitPortabilityProblems="true"
				DebugInformationFormat="3"
			/>
			<Tool
				Name="VCManagedResourceCompilerTool"
			/>
			<Tool
				Name="VCResourceCompilerTool"
				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING"
				Culture="1033"
				AdditionalIncludeDirectories="..\..\lib\vc_x64_lib\mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLibrarianTool"
				OutputFile="..\..\lib\vc_x64_lib\wxmsw30u_propgrid.lib"
				SuppressStartupBanner="true"
			/>
			<Tool
				Name="VCALinkTool"
			/>
			<Tool
				Name="VCManifestTool"
			/>
			<Tool
				Name="VCXDCMakeTool"
			/>
			<Tool
				Name="VCBscMakeTool"
				OutputFile="..\..\lib\vc_x64_lib\wx_vc8_propgrid.bsc"
				SuppressStartupBanner="true"
			/>
			<Tool
				Name="VCFxCopTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
		</Configuration>
		<Configuration
			Name="DLL Debug|x64"
			OutputDirectory="..\..\lib\vc_x64_dll"
			IntermediateDirectory="vc_mswuddll_x64\propgrid"
			ConfigurationType="2"
			UseOfMFC="0"
			ATLMinimizesCRunTimeLibraryUsage="false"
			CharacterSet="1"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCXMLDataGeneratorTool"
			/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"
			/>
			<Tool
				Name="VCMIDLTool"
				PreprocessorDefinitions="WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID"
				AdditionalIncludeDirectories="..\..\lib\vc_x64_dll\mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib"
			/>
			<Tool
				Name="VCCLCompilerTool"
				Optimization="0"
				AdditionalIncludeDirectories="..\..\lib\vc_x64_dll\mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib"
				PreprocessorDefinitions="WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID"
				MinimalRebuild="true"
				ExceptionHandling="1"
				BasicRuntimeChecks="3"
				RuntimeLibrary="3"
				BufferSecurityCheck="true"
				RuntimeTypeInfo="true"
				UsePrecompiledHeader="2"
				PrecompiledHeaderThrough="wx/wxprec.h"
				PrecompiledHeaderFile="vc_mswuddll_x64\wxprec_propgriddll.pch"
				ObjectFile="vc_mswuddll_x64\propgrid\"
				ProgramDataBaseFileName="..\..\lib\vc_x64_dll\wxmsw30ud_propgrid_vc_custom.pdb"
				WarningLevel="4"
				SuppressStartupBanner="true"
				Detect64BitPortabilityProblems="true"
				DebugInformationFormat="3"
			/>
			<Tool
				Name="VCManagedResourceCompilerTool"
			/>
			<Tool
				Name="VCResourceCompilerTool"
				PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30ud_propgrid_vc_custom;WXUSINGDLL;WXMAKINGDLL_PROPGRID"
				Culture="1033"
				AdditionalIncludeDirectories="..\..\lib\vc_x64_dll\mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLinkerTool"
				AdditionalOptions=""
				AdditionalDependencies="wxtiffd.lib wxjpegd.lib wxpngd.lib   wxzlibd.lib wxregexud.lib wxexpatd.lib    kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib ..\..\lib\vc_x64_dll\wxmsw30ud_adv.lib ..\..\lib\vc_x64_dll\wxmsw30ud_core.lib ..\..\lib\vc_x64_dll\wxbase30ud.lib"
				OutputFile="..\..\lib\vc_x64_dll\wxmsw30ud_propgrid_vc_custom.dll"
				LinkIncremental="2"
				ImportLibrary="..\..\lib\vc_x64_dll\wxmsw30ud_propgrid.lib"
				SuppressStartupBanner="true"
				AdditionalLibraryDirectories="..\..\lib\vc_x64_dll"
				GenerateManifest="true"
				GenerateDebugInformation="true"
				ProgramDatabaseFile="..\..\lib\vc_x64_dll\wxmsw30ud_propgrid_vc_custom.pdb"
				TargetMachine="17"
			/>
			<Tool
				Name="VCALinkTool"
			/>
			<Tool
				Name="VCManifestTool"
			/>
			<Tool
				Name="VCXDCMakeTool"
			/>
			<Tool
				Name="VCBscMakeTool"
				OutputFile="..\..\lib\vc_x64_dll\wx_vc8_propgrid.bsc"
				SuppressStartupBanner="true"
			/>
			<Tool
				Name="VCFxCopTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
		</Configuration>
		<Configuration
			Name="DLL Release|x64"
			OutputDirectory="..\..\lib\vc_x64_dll"
			IntermediateDirectory="vc_mswudll_x64\propgrid"
			ConfigurationType="2"
			UseOfMFC="0"
			ATLMinimizesCRunTimeLibraryUsage="false"
			CharacterSet="1"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCXMLDataGeneratorTool"
			/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"
			/>
			<Tool
				Name="VCMIDLTool"
				PreprocessorDefinitions="WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID"
				AdditionalIncludeDirectories="..\..\lib\vc_x64_dll\mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib"
			/>
			<Tool
				Name="VCCLCompilerTool"
				Optimization="2"
				AdditionalIncludeDirectories="..\..\lib\vc_x64_dll\mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib"
				PreprocessorDefinitions="WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID"
				ExceptionHandling="1"
				RuntimeLibrary="2"
				RuntimeTypeInfo="true"
				UsePrecompiledHeader="2"
				PrecompiledHeaderThrough="wx/wxprec.h"
				PrecompiledHeaderFile="vc_mswudll_x64\wxprec_propgriddll.pch"
				ObjectFile="vc_mswudll_x64\propgrid\"
				ProgramDataBaseFileName="..\..\lib\vc_x64_dll\wxmsw30u_propgrid_vc_custom.pdb"
				WarningLevel="4"
				SuppressStartupBanner="true"
				Detect64BitPortabilityProblems="true"
				DebugInformationFormat="3"
			/>
			<Tool
				Name="VCManagedResourceCompilerTool"
			/>
			<Tool
				Name="VCResourceCompilerTool"
				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30u_propgrid_vc_custom;WXUSINGDLL;WXMAKINGDLL_PROPGRID"
				Culture="1033"
				AdditionalIncludeDirectories="..\..\lib\vc_x64_dll\mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLinkerTool"
				AdditionalOptions=""
				AdditionalDependencies="wxtiff.lib wxjpeg.lib wxpng.lib   wxzlib.lib wxregexu.lib wxexpat.lib    kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib ..\..\lib\vc_x64_dll\wxmsw30u_adv.lib ..\..\lib\vc_x64_dll\wxmsw30u_core.lib ..\..\lib\vc_x64_dll\wxbase30u.lib"
				OutputFile="..\..\lib\vc_x64_dll\wxmsw30u_propgrid_vc_custom.dll"
				LinkIncremental="1"
				ImportLibrary="..\..\lib\vc_x64_dll\wxmsw30u_propgrid.lib"
				SuppressStartupBanner="true"
				AdditionalLibraryDirectories="..\..\lib\vc_x64_dll"
				GenerateManifest="true"
				GenerateDebugInformation="true"
				ProgramDatabaseFile="..\..\lib\vc_x64_dll\wxmsw30u_propgrid_vc_custom.pdb"
				TargetMachine="17"
				OptimizeReferences="2"
				EnableCOMDATFolding="2"
			/>
			<Tool
				Name="VCALinkTool"
			/>
			<Tool
				Name="VCManifestTool"
			/>
			<Tool
				Name="VCXDCMakeTool"
			/>
			<Tool
				Name="VCBscMakeTool"
				OutputFile="..\..\lib\vc_x64_dll\wx_vc8_propgrid.bsc"
				SuppressStartupBanner="true"
			/>
			<Tool
				Name="VCFxCopTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
		</Configuration>
	</Configurations>
	<References>

	</References>
	<Files>
		<Filter
			Name="Common Sources"
			UniqueIdentifier="{A6A5C30D-BDB6-5050-906D-10A96065136C}"
			>
			<File
				RelativePath="..\..\src\common\dummy.cpp"
				>
				<FileConfiguration
					Name="Debug|Win32"
					>
					<Tool
						Name="VCCLCompilerTool"
						UsePrecompiledHeader="1"
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|Win32"
					>
					<Tool
						Name="VCCLCompilerTool"
						UsePrecompiledHeader="1"
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="DLL Debug|Win32"
					>
					<Tool
						Name="VCCLCompilerTool"
						UsePrecompiledHeader="1"
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="DLL Release|Win32"
					>
					<Tool
						Name="VCCLCompilerTool"
						UsePrecompiledHeader="1"
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="Debug|x64"
					>
					<Tool
						Name="VCCLCompilerTool"
						UsePrecompiledHeader="1"
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|x64"
					>
					<Tool
						Name="VCCLCompilerTool"
						UsePrecompiledHeader="1"
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="DLL Debug|x64"
					>
					<Tool
						Name="VCCLCompilerTool"
						UsePrecompiledHeader="1"
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="DLL Release|x64"
					>
					<Tool
						Name="VCCLCompilerTool"
						UsePrecompiledHeader="1"
					/>
				</FileConfiguration>
			</File>
		</Filter>
		<Filter
			Name="MSW Sources"
			UniqueIdentifier="{D030D8C2-53EE-5B96-8F89-D78157B06140}"
			>
			<File
				RelativePath="..\..\src\msw\version.rc"
				>
				<FileConfiguration
					Name="Debug|Win32"
					ExcludedFromBuild="true"
				/>
				<FileConfiguration
					Name="Release|Win32"
					ExcludedFromBuild="true"
				/>
				<FileConfiguration
					Name="Debug|x64"
					ExcludedFromBuild="true"
				/>
				<FileConfiguration
					Name="Release|x64"
					ExcludedFromBuild="true"
				/>
			</File>
		</Filter>
		<Filter
			Name="Setup Headers"
			UniqueIdentifier="{63537534-1833-5C1F-8DBD-359A84F294C8}"
			>
			<File
				RelativePath="..\..\include\wx\msw\setup.h"
				>
				<FileConfiguration
					Name="Debug|Win32"
					>
					<Tool
						Name="VCCustomBuildTool"
						Description="Creating ..\..\lib\vc_lib\mswud\wx\setup.h"
						CommandLine="copy "$(InputPath)" ..\..\lib\vc_lib\mswud\wx\setup.h"
						Outputs="..\..\lib\vc_lib\mswud\wx\setup.h"
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|Win32"
					>
					<Tool
						Name="VCCustomBuildTool"
						Description="Creating ..\..\lib\vc_lib\mswu\wx\setup.h"
						CommandLine="copy "$(InputPath)" ..\..\lib\vc_lib\mswu\wx\setup.h"
						Outputs="..\..\lib\vc_lib\mswu\wx\setup.h"
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="DLL Debug|Win32"
					>
					<Tool
						Name="VCCustomBuildTool"
						Description="Creating ..\..\lib\vc_dll\mswud\wx\setup.h"
						CommandLine="copy "$(InputPath)" ..\..\lib\vc_dll\mswud\wx\setup.h"
						Outputs="..\..\lib\vc_dll\mswud\wx\setup.h"
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="DLL Release|Win32"
					>
					<Tool
						Name="VCCustomBuildTool"
						Description="Creating ..\..\lib\vc_dll\mswu\wx\setup.h"
						CommandLine="copy "$(InputPath)" ..\..\lib\vc_dll\mswu\wx\setup.h"
						Outputs="..\..\lib\vc_dll\mswu\wx\setup.h"
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="Debug|x64"
					>
					<Tool
						Name="VCCustomBuildTool"
						Description="Creating ..\..\lib\vc_x64_lib\mswud\wx\setup.h"
						CommandLine="copy "$(InputPath)" ..\..\lib\vc_x64_lib\mswud\wx\setup.h"
						Outputs="..\..\lib\vc_x64_lib\mswud\wx\setup.h"
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|x64"
					>
					<Tool
						Name="VCCustomBuildTool"
						Description="Creating ..\..\lib\vc_x64_lib\mswu\wx\setup.h"
						CommandLine="copy "$(InputPath)" ..\..\lib\vc_x64_lib\mswu\wx\setup.h"
						Outputs="..\..\lib\vc_x64_lib\mswu\wx\setup.h"
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="DLL Debug|x64"
					>
					<Tool
						Name="VCCustomBuildTool"
						Description="Creating ..\..\lib\vc_x64_dll\mswud\wx\setup.h"
						CommandLine="copy "$(InputPath)" ..\..\lib\vc_x64_dll\mswud\wx\setup.h"
						Outputs="..\..\lib\vc_x64_dll\mswud\wx\setup.h"
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="DLL Release|x64"
					>
					<Tool
						Name="VCCustomBuildTool"
						Description="Creating ..\..\lib\vc_x64_dll\mswu\wx\setup.h"
						CommandLine="copy "$(InputPath)" ..\..\lib\vc_x64_dll\mswu\wx\setup.h"
						Outputs="..\..\lib\vc_x64_dll\mswu\wx\setup.h"
					/>
				</FileConfiguration>
			</File>
			<File
				RelativePath="..\..\include\wx\univ\setup.h"
				>
				<FileConfiguration
					Name="Debug|Win32"
				/>
				<FileConfiguration
					Name="Release|Win32"
				/>
				<FileConfiguration
					Name="DLL Debug|Win32"
				/>
				<FileConfiguration
					Name="DLL Release|Win32"
				/>
				<FileConfiguration
					Name="Debug|x64"
				/>
				<FileConfiguration
					Name="Release|x64"
				/>
				<FileConfiguration
					Name="DLL Debug|x64"
				/>
				<FileConfiguration
					Name="DLL Release|x64"
				/>
			</File>
		</Filter>
		<Filter
			Name="MSW Headers"
			UniqueIdentifier="{5AFFF20E-29F9-512B-B80A-7DC45976CDAC}"
			>
			<File
				RelativePath="..\..\include\wx\msw\genrcdefs.h"
				>
				<FileConfiguration
					Name="Debug|Win32"
					>
					<Tool
						Name="VCCustomBuildTool"
						Description="Creating ..\..\lib\vc_lib\mswud\wx\msw\rcdefs.h"
						CommandLine="cl /EP /nologo "$(InputPath)" > "..\..\lib\vc_lib\mswud\wx\msw\rcdefs.h""
						Outputs="..\..\lib\vc_lib\mswud\wx\msw\rcdefs.h"
						AdditionalDependencies=""..\..\lib\vc_lib\mswud\wx\msw""
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|Win32"
					>
					<Tool
						Name="VCCustomBuildTool"
						Description="Creating ..\..\lib\vc_lib\mswu\wx\msw\rcdefs.h"
						CommandLine="cl /EP /nologo "$(InputPath)" > "..\..\lib\vc_lib\mswu\wx\msw\rcdefs.h""
						Outputs="..\..\lib\vc_lib\mswu\wx\msw\rcdefs.h"
						AdditionalDependencies=""..\..\lib\vc_lib\mswu\wx\msw""
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="DLL Debug|Win32"
					>
					<Tool
						Name="VCCustomBuildTool"
						Description="Creating ..\..\lib\vc_dll\mswud\wx\msw\rcdefs.h"
						CommandLine="cl /EP /nologo "$(InputPath)" > "..\..\lib\vc_dll\mswud\wx\msw\rcdefs.h""
						Outputs="..\..\lib\vc_dll\mswud\wx\msw\rcdefs.h"
						AdditionalDependencies=""..\..\lib\vc_dll\mswud\wx\msw""
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="DLL Release|Win32"
					>
					<Tool
						Name="VCCustomBuildTool"
						Description="Creating ..\..\lib\vc_dll\mswu\wx\msw\rcdefs.h"
						CommandLine="cl /EP /nologo "$(InputPath)" > "..\..\lib\vc_dll\mswu\wx\msw\rcdefs.h""
						Outputs="..\..\lib\vc_dll\mswu\wx\msw\rcdefs.h"
						AdditionalDependencies=""..\..\lib\vc_dll\mswu\wx\msw""
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="Debug|x64"
					>
					<Tool
						Name="VCCustomBuildTool"
						Description="Creating ..\..\lib\vc_x64_lib\mswud\wx\msw\rcdefs.h"
						CommandLine="cl /EP /nologo "$(InputPath)" > "..\..\lib\vc_x64_lib\mswud\wx\msw\rcdefs.h""
						Outputs="..\..\lib\vc_x64_lib\mswud\wx\msw\rcdefs.h"
						AdditionalDependencies=""..\..\lib\vc_x64_lib\mswud\wx\msw""
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|x64"
					>
					<Tool
						Name="VCCustomBuildTool"
						Description="Creating ..\..\lib\vc_x64_lib\mswu\wx\msw\rcdefs.h"
						CommandLine="cl /EP /nologo "$(InputPath)" > "..\..\lib\vc_x64_lib\mswu\wx\msw\rcdefs.h""
						Outputs="..\..\lib\vc_x64_lib\mswu\wx\msw\rcdefs.h"
						AdditionalDependencies=""..\..\lib\vc_x64_lib\mswu\wx\msw""
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="DLL Debug|x64"
					>
					<Tool
						Name="VCCustomBuildTool"
						Description="Creating ..\..\lib\vc_x64_dll\mswud\wx\msw\rcdefs.h"
						CommandLine="cl /EP /nologo "$(InputPath)" > "..\..\lib\vc_x64_dll\mswud\wx\msw\rcdefs.h""
						Outputs="..\..\lib\vc_x64_dll\mswud\wx\msw\rcdefs.h"
						AdditionalDependencies=""..\..\lib\vc_x64_dll\mswud\wx\msw""
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="DLL Release|x64"
					>
					<Tool
						Name="VCCustomBuildTool"
						Description="Creating ..\..\lib\vc_x64_dll\mswu\wx\msw\rcdefs.h"
						CommandLine="cl /EP /nologo "$(InputPath)" > "..\..\lib\vc_x64_dll\mswu\wx\msw\rcdefs.h""
						Outputs="..\..\lib\vc_x64_dll\mswu\wx\msw\rcdefs.h"
						AdditionalDependencies=""..\..\lib\vc_x64_dll\mswu\wx\msw""
					/>
				</FileConfiguration>
			</File>
		</Filter>
		<Filter
			Name="Common Headers"
			UniqueIdentifier="{8C07E926-65B0-5F00-B0D6-7F40DA69BB25}"
			>
			<File
				RelativePath="..\..\include\wx\propgrid\advprops.h"
				>
			</File>
			<File
				RelativePath="..\..\include\wx\propgrid\editors.h"
				>
			</File>
			<File
				RelativePath="..\..\include\wx\propgrid\manager.h"
				>
			</File>
			<File
				RelativePath="..\..\include\wx\propgrid\property.h"
				>
			</File>
			<File
				RelativePath="..\..\include\wx\propgrid\propgrid.h"
				>
			</File>
			<File
				RelativePath="..\..\include\wx\propgrid\propgriddefs.h"
				>
			</File>
			<File
				RelativePath="..\..\include\wx\propgrid\propgridiface.h"
				>
			</File>
			<File
				RelativePath="..\..\include\wx\propgrid\propgridpagestate.h"
				>
			</File>
			<File
				RelativePath="..\..\include\wx\propgrid\props.h"
				>
			</File>
		</Filter>
		<Filter
			Name="Source Files"
			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
			>
			<File
				RelativePath="..\..\src\propgrid\advprops.cpp"
				>
			</File>
			<File
				RelativePath="..\..\src\propgrid\editors.cpp"
				>
			</File>
			<File
				RelativePath="..\..\src\propgrid\manager.cpp"
				>
			</File>
			<File
				RelativePath="..\..\src\propgrid\property.cpp"
				>
			</File>
			<File
				RelativePath="..\..\src\propgrid\propgrid.cpp"
				>
			</File>
			<File
				RelativePath="..\..\src\propgrid\propgridiface.cpp"
				>
			</File>
			<File
				RelativePath="..\..\src\propgrid\propgridpagestate.cpp"
				>
			</File>
			<File
				RelativePath="..\..\src\propgrid\props.cpp"
				>
			</File>
		</Filter>
	</Files>
	<Globals>

	</Globals>
</VisualStudioProject>


["0.1.0"]
git-tree-sha1 = "0b2df1bca06e7a32f30b4c73dadf84225d64c362"


/* $Id$ */

#ifndef MD5OSSL_H_INCLUDED
#define MD5OSSL_H_INCLUDED

#include <stddef.h>
#include <openssl/md5.h>

#define MD5_BLOCK_LENGTH	MD5_CBLOCK

static DEFINE_FINISH_FUNC_FROM_FINAL(MD5);
#undef MD5_Finish
#define MD5_Finish rb_digest_MD5_finish

#endif