{"action":"created","issue":{"url":"https://api.github.com/repos/urho3d/Urho3D/issues/1472","repository_url":"https://api.github.com/repos/urho3d/Urho3D","labels_url":"https://api.github.com/repos/urho3d/Urho3D/issues/1472/labels{/name}","comments_url":"https://api.github.com/repos/urho3d/Urho3D/issues/1472/comments","events_url":"https://api.github.com/repos/urho3d/Urho3D/issues/1472/events","html_url":"https://github.com/urho3d/Urho3D/issues/1472","id":165824046,"number":1472,"title":"Make an umbrella header","user":{"login":"graph","id":1088059,"avatar_url":"https://avatars.githubusercontent.com/u/1088059?v=3","gravatar_id":"","url":"https://api.github.com/users/graph","html_url":"https://github.com/graph","followers_url":"https://api.github.com/users/graph/followers","following_url":"https://api.github.com/users/graph/following{/other_user}","gists_url":"https://api.github.com/users/graph/gists{/gist_id}","starred_url":"https://api.github.com/users/graph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graph/subscriptions","organizations_url":"https://api.github.com/users/graph/orgs","repos_url":"https://api.github.com/users/graph/repos","events_url":"https://api.github.com/users/graph/events{/privacy}","received_events_url":"https://api.github.com/users/graph/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/urho3d/Urho3D/labels/duplicate","name":"duplicate","color":"cccccc"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-07-15T16:11:12Z","updated_at":"2016-07-18T04:02:39Z","closed_at":null,"body":"This is a feature request. Currently incuding Urho3D is usually of this style\r\n\r\n```\r\n#include <Urho3D/Module/ClassName.h>\r\n```\r\nwhich requires me to grep alot of code to find the include I need.\r\n\r\n# Solution 1: 1 Umbrella header\r\n```\r\n#include <Urho3D/Urho3D.hpp>\r\n```\r\n\r\nI like this,  very simple. Currently I just made this and not need to think about which header I need:\r\n\r\n```\r\n#include <Urho3D/AngelScript/Addons.h>\r\n#include <Urho3D/AngelScript/APITemplates.h>\r\n#include <Urho3D/AngelScript/Script.h>\r\n#include <Urho3D/AngelScript/ScriptAPI.h>\r\n#include <Urho3D/AngelScript/ScriptEventListener.h>\r\n#include <Urho3D/AngelScript/ScriptFile.h>\r\n#include <Urho3D/AngelScript/ScriptInstance.h>\r\n\r\n#include <Urho3D/Audio/Audio.h>\r\n#include <Urho3D/Audio/AudioDefs.h>\r\n#include <Urho3D/Audio/AudioEvents.h>\r\n#include <Urho3D/Audio/BufferedSoundStream.h>\r\n#include <Urho3D/Audio/OggVorbisSoundStream.h>\r\n#include <Urho3D/Audio/Sound.h>\r\n#include <Urho3D/Audio/SoundListener.h>\r\n#include <Urho3D/Audio/SoundSource.h>\r\n#include <Urho3D/Audio/SoundSource3D.h>\r\n#include <Urho3D/Audio/SoundStream.h>\r\n\r\n#include <Urho3D/Container/Allocator.h>\r\n#include <Urho3D/Container/ArrayPtr.h>\r\n#include <Urho3D/Container/ForEach.h>\r\n#include <Urho3D/Container/Hash.h>\r\n#include <Urho3D/Container/HashBase.h>\r\n#include <Urho3D/Container/HashMap.h>\r\n#include <Urho3D/Container/HashSet.h>\r\n#include <Urho3D/Container/LinkedList.h>\r\n#include <Urho3D/Container/List.h>\r\n#include <Urho3D/Container/ListBase.h>\r\n#include <Urho3D/Container/Pair.h>\r\n#include <Urho3D/Container/Ptr.h>\r\n#include <Urho3D/Container/RefCounted.h>\r\n#include <Urho3D/Container/Sort.h>\r\n#include <Urho3D/Container/Str.h>\r\n#include <Urho3D/Container/Swap.h>\r\n#include <Urho3D/Container/Vector.h>\r\n#include <Urho3D/Container/VectorBase.h>\r\n\r\n#include <Urho3D/Core/Attribute.h>\r\n#include <Urho3D/Core/Condition.h>\r\n#include <Urho3D/Core/Context.h>\r\n#include <Urho3D/Core/CoreEvents.h>\r\n#include <Urho3D/Core/EventProfiler.h>\r\n#include <Urho3D/Core/Main.h>\r\n#include <Urho3D/Core/MiniDump.h>\r\n#include <Urho3D/Core/Mutex.h>\r\n#include <Urho3D/Core/Object.h>\r\n#include <Urho3D/Core/ProcessUtils.h>\r\n#include <Urho3D/Core/Profiler.h>\r\n#include <Urho3D/Core/Spline.h>\r\n#include <Urho3D/Core/StringUtils.h>\r\n#include <Urho3D/Core/Thread.h>\r\n#include <Urho3D/Core/Timer.h>\r\n#include <Urho3D/Core/Variant.h>\r\n#include <Urho3D/Core/WorkQueue.h>\r\n\r\n#ifdef URHO3D_DATABASE\r\n#include <Urho3D/Database/Database.h>\r\n#include <Urho3D/Database/DatabaseEvents.h>\r\n#include <Urho3D/Database/DbConnection.h>\r\n#include <Urho3D/Database/DbResult.h>\r\n#include <Urho3D/Database/ODBC>\r\n#include <Urho3D/Database/ODBC/ODBCConnection.h>\r\n#include <Urho3D/Database/ODBC/ODBCResult.h>\r\n#include <Urho3D/Database/SQLite>\r\n#include <Urho3D/Database/SQLite/SQLiteConnection.h>\r\n#include <Urho3D/Database/SQLite/SQLiteResult.h>\r\n#endif\r\n\r\n#include <Urho3D/DebugNew.h>\r\n\r\n#include <Urho3D/Engine/Application.h>\r\n#include <Urho3D/Engine/Console.h>\r\n#include <Urho3D/Engine/DebugHud.h>\r\n#include <Urho3D/Engine/Engine.h>\r\n#include <Urho3D/Engine/EngineEvents.h>\r\n\r\n#include <Urho3D/Graphics/AnimatedModel.h>\r\n#include <Urho3D/Graphics/Animation.h>\r\n#include <Urho3D/Graphics/AnimationController.h>\r\n#include <Urho3D/Graphics/AnimationState.h>\r\n#include <Urho3D/Graphics/Batch.h>\r\n#include <Urho3D/Graphics/BillboardSet.h>\r\n#include <Urho3D/Graphics/Camera.h>\r\n#include <Urho3D/Graphics/ConstantBuffer.h>\r\n#include <Urho3D/Graphics/CustomGeometry.h>\r\n#include <Urho3D/Graphics/DebugRenderer.h>\r\n#include <Urho3D/Graphics/DecalSet.h>\r\n\r\n/*\r\n#include <Urho3D/Graphics/Direct3D11/D3D11GraphicsImpl.h>\r\n#include <Urho3D/Graphics/Direct3D11/D3D11ShaderProgram.h>\r\n#include <Urho3D/Graphics/Direct3D11/D3D11VertexDeclaration.h>\r\n\r\n#include <Urho3D/Graphics/Direct3D9/D3D9GraphicsImpl.h>\r\n#include <Urho3D/Graphics/Direct3D9/D3D9ShaderProgram.h>\r\n#include <Urho3D/Graphics/Direct3D9/D3D9VertexDeclaration.h>\r\n*/\r\n\r\n#include <Urho3D/Graphics/Drawable.h>\r\n#include <Urho3D/Graphics/DrawableEvents.h>\r\n#include <Urho3D/Graphics/Geometry.h>\r\n#include <Urho3D/Graphics/GPUObject.h>\r\n#include <Urho3D/Graphics/Graphics.h>\r\n#include <Urho3D/Graphics/GraphicsDefs.h>\r\n#include <Urho3D/Graphics/GraphicsEvents.h>\r\n#include <Urho3D/Graphics/GraphicsImpl.h>\r\n#include <Urho3D/Graphics/IndexBuffer.h>\r\n#include <Urho3D/Graphics/Light.h>\r\n#include <Urho3D/Graphics/Material.h>\r\n#include <Urho3D/Graphics/Model.h>\r\n#include <Urho3D/Graphics/OcclusionBuffer.h>\r\n#include <Urho3D/Graphics/Octree.h>\r\n#include <Urho3D/Graphics/OctreeQuery.h>\r\n\r\n#include <Urho3D/Graphics/OpenGL/OGLGraphicsImpl.h>\r\n#include <Urho3D/Graphics/OpenGL/OGLShaderProgram.h>\r\n\r\n#include <Urho3D/Graphics/ParticleEffect.h>\r\n#include <Urho3D/Graphics/ParticleEmitter.h>\r\n#include <Urho3D/Graphics/Renderer.h>\r\n#include <Urho3D/Graphics/RenderPath.h>\r\n#include <Urho3D/Graphics/RenderSurface.h>\r\n#include <Urho3D/Graphics/RibbonTrail.h>\r\n#include <Urho3D/Graphics/Shader.h>\r\n#include <Urho3D/Graphics/ShaderPrecache.h>\r\n#include <Urho3D/Graphics/ShaderProgram.h>\r\n#include <Urho3D/Graphics/ShaderVariation.h>\r\n#include <Urho3D/Graphics/Skeleton.h>\r\n#include <Urho3D/Graphics/Skybox.h>\r\n#include <Urho3D/Graphics/StaticModel.h>\r\n#include <Urho3D/Graphics/StaticModelGroup.h>\r\n#include <Urho3D/Graphics/Tangent.h>\r\n#include <Urho3D/Graphics/Technique.h>\r\n#include <Urho3D/Graphics/Terrain.h>\r\n#include <Urho3D/Graphics/TerrainPatch.h>\r\n#include <Urho3D/Graphics/Texture.h>\r\n#include <Urho3D/Graphics/Texture2D.h>\r\n#include <Urho3D/Graphics/Texture2DArray.h>\r\n#include <Urho3D/Graphics/Texture3D.h>\r\n#include <Urho3D/Graphics/TextureCube.h>\r\n#include <Urho3D/Graphics/VertexBuffer.h>\r\n#include <Urho3D/Graphics/VertexDeclaration.h>\r\n#include <Urho3D/Graphics/View.h>\r\n#include <Urho3D/Graphics/Viewport.h>\r\n#include <Urho3D/Graphics/Zone.h>\r\n\r\n#include <Urho3D/Input/Controls.h>\r\n#include <Urho3D/Input/Input.h>\r\n#include <Urho3D/Input/InputEvents.h>\r\n\r\n#include <Urho3D/IO/Compression.h>\r\n#include <Urho3D/IO/Deserializer.h>\r\n#include <Urho3D/IO/File.h>\r\n#include <Urho3D/IO/FileSystem.h>\r\n#include <Urho3D/IO/FileWatcher.h>\r\n#include <Urho3D/IO/IOEvents.h>\r\n#include <Urho3D/IO/Log.h>\r\n#include <Urho3D/IO/MacFileWatcher.h>\r\n#include <Urho3D/IO/MemoryBuffer.h>\r\n#include <Urho3D/IO/NamedPipe.h>\r\n#include <Urho3D/IO/PackageFile.h>\r\n#include <Urho3D/IO/RWOpsWrapper.h>\r\n#include <Urho3D/IO/Serializer.h>\r\n#include <Urho3D/IO/VectorBuffer.h>\r\n#include <Urho3D/LibraryInfo.h>\r\n//#include <Urho3D/librevision.h>\r\n/*\r\n#include <Urho3D/LuaScript/LuaFile.h>\r\n#include <Urho3D/LuaScript/LuaFunction.h>\r\n#include <Urho3D/LuaScript/LuaScript.h>\r\n#include <Urho3D/LuaScript/LuaScriptEventInvoker.h>\r\n#include <Urho3D/LuaScript/LuaScriptEventListener.h>\r\n#include <Urho3D/LuaScript/LuaScriptInstance.h>\r\n#include <Urho3D/LuaScript/ToluaUtils.h>\r\n*/\r\n\r\n#include <Urho3D/Math/AreaAllocator.h>\r\n#include <Urho3D/Math/BoundingBox.h>\r\n#include <Urho3D/Math/Color.h>\r\n#include <Urho3D/Math/Frustum.h>\r\n#include <Urho3D/Math/MathDefs.h>\r\n#include <Urho3D/Math/Matrix2.h>\r\n#include <Urho3D/Math/Matrix3.h>\r\n#include <Urho3D/Math/Matrix3x4.h>\r\n#include <Urho3D/Math/Matrix4.h>\r\n#include <Urho3D/Math/Plane.h>\r\n#include <Urho3D/Math/Polyhedron.h>\r\n#include <Urho3D/Math/Quaternion.h>\r\n#include <Urho3D/Math/Random.h>\r\n#include <Urho3D/Math/Ray.h>\r\n#include <Urho3D/Math/Rect.h>\r\n#include <Urho3D/Math/Sphere.h>\r\n#include <Urho3D/Math/StringHash.h>\r\n#include <Urho3D/Math/Vector2.h>\r\n#include <Urho3D/Math/Vector3.h>\r\n#include <Urho3D/Math/Vector4.h>\r\n\r\n#include <Urho3D/Navigation/CrowdAgent.h>\r\n#include <Urho3D/Navigation/CrowdManager.h>\r\n#include <Urho3D/Navigation/DynamicNavigationMesh.h>\r\n#include <Urho3D/Navigation/NavArea.h>\r\n#include <Urho3D/Navigation/NavBuildData.h>\r\n#include <Urho3D/Navigation/Navigable.h>\r\n#include <Urho3D/Navigation/NavigationEvents.h>\r\n#include <Urho3D/Navigation/NavigationMesh.h>\r\n#include <Urho3D/Navigation/Obstacle.h>\r\n#include <Urho3D/Navigation/OffMeshConnection.h>\r\n\r\n/*\r\n#include <Urho3D/Network/Connection.h>\r\n#include <Urho3D/Network/HttpRequest.h>\r\n#include <Urho3D/Network/Network.h>\r\n#include <Urho3D/Network/NetworkEvents.h>\r\n#include <Urho3D/Network/NetworkPriority.h>\r\n#include <Urho3D/Network/Protocol.h>\r\n*/\r\n\r\n#include <Urho3D/Physics/CollisionShape.h>\r\n#include <Urho3D/Physics/Constraint.h>\r\n#include <Urho3D/Physics/PhysicsEvents.h>\r\n#include <Urho3D/Physics/PhysicsUtils.h>\r\n#include <Urho3D/Physics/PhysicsWorld.h>\r\n#include <Urho3D/Physics/RigidBody.h>\r\n#include <Urho3D/Precompiled.h>\r\n\r\n#include <Urho3D/Resource/BackgroundLoader.h>\r\n#include <Urho3D/Resource/Decompress.h>\r\n#include <Urho3D/Resource/Image.h>\r\n#include <Urho3D/Resource/JSONFile.h>\r\n#include <Urho3D/Resource/JSONValue.h>\r\n#include <Urho3D/Resource/Localization.h>\r\n#include <Urho3D/Resource/PListFile.h>\r\n#include <Urho3D/Resource/Resource.h>\r\n#include <Urho3D/Resource/ResourceCache.h>\r\n#include <Urho3D/Resource/ResourceEvents.h>\r\n#include <Urho3D/Resource/XMLElement.h>\r\n#include <Urho3D/Resource/XMLFile.h>\r\n\r\n#include <Urho3D/Scene/Animatable.h>\r\n#include <Urho3D/Scene/AnimationDefs.h>\r\n#include <Urho3D/Scene/Component.h>\r\n#include <Urho3D/Scene/LogicComponent.h>\r\n#include <Urho3D/Scene/Node.h>\r\n#include <Urho3D/Scene/ObjectAnimation.h>\r\n#include <Urho3D/Scene/ReplicationState.h>\r\n#include <Urho3D/Scene/Scene.h>\r\n#include <Urho3D/Scene/SceneEvents.h>\r\n#include <Urho3D/Scene/SceneResolver.h>\r\n#include <Urho3D/Scene/Serializable.h>\r\n#include <Urho3D/Scene/SmoothedTransform.h>\r\n#include <Urho3D/Scene/SplinePath.h>\r\n#include <Urho3D/Scene/UnknownComponent.h>\r\n#include <Urho3D/Scene/ValueAnimation.h>\r\n#include <Urho3D/Scene/ValueAnimationInfo.h>\r\n\r\n#include <Urho3D/UI/BorderImage.h>\r\n#include <Urho3D/UI/Button.h>\r\n#include <Urho3D/UI/CheckBox.h>\r\n#include <Urho3D/UI/Cursor.h>\r\n#include <Urho3D/UI/DropDownList.h>\r\n#include <Urho3D/UI/FileSelector.h>\r\n#include <Urho3D/UI/Font.h>\r\n#include <Urho3D/UI/FontFace.h>\r\n#include <Urho3D/UI/FontFaceBitmap.h>\r\n#include <Urho3D/UI/FontFaceFreeType.h>\r\n#include <Urho3D/UI/LineEdit.h>\r\n#include <Urho3D/UI/ListView.h>\r\n#include <Urho3D/UI/Menu.h>\r\n#include <Urho3D/UI/MessageBox.h>\r\n#include <Urho3D/UI/ScrollBar.h>\r\n#include <Urho3D/UI/ScrollView.h>\r\n#include <Urho3D/UI/Slider.h>\r\n#include <Urho3D/UI/Sprite.h>\r\n#include <Urho3D/UI/Text.h>\r\n#include <Urho3D/UI/Text3D.h>\r\n#include <Urho3D/UI/ToolTip.h>\r\n#include <Urho3D/UI/UI.h>\r\n#include <Urho3D/UI/UIBatch.h>\r\n#include <Urho3D/UI/UIElement.h>\r\n#include <Urho3D/UI/UIEvents.h>\r\n#include <Urho3D/UI/View3D.h>\r\n#include <Urho3D/UI/Window.h>\r\n\r\n#include <Urho3D/Urho2D/AnimatedSprite2D.h>\r\n#include <Urho3D/Urho2D/AnimationSet2D.h>\r\n#include <Urho3D/Urho2D/CollisionBox2D.h>\r\n#include <Urho3D/Urho2D/CollisionChain2D.h>\r\n#include <Urho3D/Urho2D/CollisionCircle2D.h>\r\n#include <Urho3D/Urho2D/CollisionEdge2D.h>\r\n#include <Urho3D/Urho2D/CollisionPolygon2D.h>\r\n#include <Urho3D/Urho2D/CollisionShape2D.h>\r\n#include <Urho3D/Urho2D/Constraint2D.h>\r\n#include <Urho3D/Urho2D/ConstraintDistance2D.h>\r\n#include <Urho3D/Urho2D/ConstraintFriction2D.h>\r\n#include <Urho3D/Urho2D/ConstraintGear2D.h>\r\n#include <Urho3D/Urho2D/ConstraintMotor2D.h>\r\n#include <Urho3D/Urho2D/ConstraintMouse2D.h>\r\n#include <Urho3D/Urho2D/ConstraintPrismatic2D.h>\r\n#include <Urho3D/Urho2D/ConstraintPulley2D.h>\r\n#include <Urho3D/Urho2D/ConstraintRevolute2D.h>\r\n#include <Urho3D/Urho2D/ConstraintRope2D.h>\r\n#include <Urho3D/Urho2D/ConstraintWeld2D.h>\r\n#include <Urho3D/Urho2D/ConstraintWheel2D.h>\r\n#include <Urho3D/Urho2D/Drawable2D.h>\r\n#include <Urho3D/Urho2D/ParticleEffect2D.h>\r\n#include <Urho3D/Urho2D/ParticleEmitter2D.h>\r\n#include <Urho3D/Urho2D/PhysicsEvents2D.h>\r\n#include <Urho3D/Urho2D/PhysicsUtils2D.h>\r\n#include <Urho3D/Urho2D/PhysicsWorld2D.h>\r\n#include <Urho3D/Urho2D/Renderer2D.h>\r\n#include <Urho3D/Urho2D/RigidBody2D.h>\r\n#include <Urho3D/Urho2D/Sprite2D.h>\r\n#include <Urho3D/Urho2D/SpriterData2D.h>\r\n#include <Urho3D/Urho2D/SpriterInstance2D.h>\r\n#include <Urho3D/Urho2D/SpriteSheet2D.h>\r\n#include <Urho3D/Urho2D/StaticSprite2D.h>\r\n#include <Urho3D/Urho2D/TileMap2D.h>\r\n#include <Urho3D/Urho2D/TileMapDefs2D.h>\r\n#include <Urho3D/Urho2D/TileMapLayer2D.h>\r\n#include <Urho3D/Urho2D/TmxFile2D.h>\r\n#include <Urho3D/Urho2D/Urho2D.h>\r\n#include <Urho3D/Urho3D.h>\r\n```\r\n\r\nThe main con is slower compilation time, but it's not much. \r\n\r\n\r\n# Solution 2: Only modules\r\n\r\n```\r\n#include <Urho3D/Module.h>\r\n```\r\n\r\nThis is a balance between 1 umbrella header for everything and the what is now. I see there is an umbrella header for each module but it is not clear if it's an umbrella header as it only includes a few items from that module. Judging on the samples source code it's not a proper umbrella header.\r\n\r\n# Solution 3: Class Level \r\n\r\nThis is Similar to what c++ standard library does\r\n\r\n```\r\n#include <Urho3D/ClassName.h>\r\n```\r\n\r\nThe complete opposite of umbrella header.\r\n\r\n\r\nI like Solution 1 & 2 as they can be done together. Solution 3 is much too granular.\r\n\r\nThank you."},"comment":{"url":"https://api.github.com/repos/urho3d/Urho3D/issues/comments/233225284","html_url":"https://github.com/urho3d/Urho3D/issues/1472#issuecomment-233225284","issue_url":"https://api.github.com/repos/urho3d/Urho3D/issues/1472","id":233225284,"user":{"login":"weitjong","id":5548048,"avatar_url":"https://avatars.githubusercontent.com/u/5548048?v=3","gravatar_id":"","url":"https://api.github.com/users/weitjong","html_url":"https://github.com/weitjong","followers_url":"https://api.github.com/users/weitjong/followers","following_url":"https://api.github.com/users/weitjong/following{/other_user}","gists_url":"https://api.github.com/users/weitjong/gists{/gist_id}","starred_url":"https://api.github.com/users/weitjong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weitjong/subscriptions","organizations_url":"https://api.github.com/users/weitjong/orgs","repos_url":"https://api.github.com/users/weitjong/repos","events_url":"https://api.github.com/users/weitjong/events{/privacy}","received_events_url":"https://api.github.com/users/weitjong/received_events","type":"User","site_admin":false},"created_at":"2016-07-18T04:02:39Z","updated_at":"2016-07-18T04:02:39Z","body":"> Generally I believe such \"catch-all\" header is horrible for compile time but since it's the user's choice to use it and the engine never needs it, I'm not totally against, if it makes some users happy.\r\n\r\nThat is a good point.  My original stand was don't propagate best practice but who are we anyway? If users don't want to heed a good advice then they will do it anyway. And rather each of them come up with a different version and cause portability issue when people sharing code, at least I see a point to standardize one \"official\" include-all-headers header file."}}
{"actor":{"display_login":"weitjong"}}