├── README.md
├── ConfigDumpFileIO
├── packages.config
├── Properties
│ └── AssemblyInfo.cs
├── ConfigDumpFileIO.cs
└── ConfigDumpFileIO.csproj
├── LICENSE.md
├── ConfigDumpFileIO.sln
├── .gitattributes
├── .gitignore
└── dumpConfig.sqf
/README.md:
--------------------------------------------------------------------------------
1 | # ConfigDumpFileIO
2 | An extension used to dump the All in One Config more efficiently in Arma 3
3 |
--------------------------------------------------------------------------------
/ConfigDumpFileIO/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License
2 |
3 | Copyright (c) 2016 pennyworth12345
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
19 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
20 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
21 | OR OTHER DEALINGS IN THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/ConfigDumpFileIO/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // General Information about an assembly is controlled through the following
5 | // set of attributes. Change these attribute values to modify the information
6 | // associated with an assembly.
7 | [assembly: AssemblyTitle("ConfigDumpFileIO")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("ConfigDumpFileIO")]
12 | [assembly: AssemblyCopyright("Copyright © 2016")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // Setting ComVisible to false makes the types in this assembly not visible
17 | // to COM components. If you need to access a type in this assembly from
18 | // COM, set the ComVisible attribute to true on that type.
19 | [assembly: ComVisible(false)]
20 |
21 | // The following GUID is for the ID of the typelib if this project is exposed to COM
22 | [assembly: Guid("bacbeb95-c991-4434-9730-8435f9358981")]
23 |
24 | // Version information for an assembly consists of the following four values:
25 | //
26 | // Major Version
27 | // Minor Version
28 | // Build Number
29 | // Revision
30 | //
31 | // You can specify all the values or you can default the Build and Revision Numbers
32 | // by using the '*' as shown below:
33 | // [assembly: AssemblyVersion("1.0.*")]
34 | [assembly: AssemblyVersion("1.1.*")]
35 | //[assembly: AssemblyFileVersion("1.0.0.0")]
36 |
--------------------------------------------------------------------------------
/ConfigDumpFileIO.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25123.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConfigDumpFileIO", "ConfigDumpFileIO\ConfigDumpFileIO.csproj", "{BACBEB95-C991-4434-9730-8435F9358981}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Debug|x64 = Debug|x64
12 | Debug|x86 = Debug|x86
13 | Release|Any CPU = Release|Any CPU
14 | Release|x64 = Release|x64
15 | Release|x86 = Release|x86
16 | EndGlobalSection
17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
18 | {BACBEB95-C991-4434-9730-8435F9358981}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19 | {BACBEB95-C991-4434-9730-8435F9358981}.Debug|Any CPU.Build.0 = Debug|Any CPU
20 | {BACBEB95-C991-4434-9730-8435F9358981}.Debug|x64.ActiveCfg = Debug|x64
21 | {BACBEB95-C991-4434-9730-8435F9358981}.Debug|x64.Build.0 = Debug|x64
22 | {BACBEB95-C991-4434-9730-8435F9358981}.Debug|x86.ActiveCfg = Release|x86
23 | {BACBEB95-C991-4434-9730-8435F9358981}.Debug|x86.Build.0 = Release|x86
24 | {BACBEB95-C991-4434-9730-8435F9358981}.Release|Any CPU.ActiveCfg = Release|Any CPU
25 | {BACBEB95-C991-4434-9730-8435F9358981}.Release|Any CPU.Build.0 = Release|Any CPU
26 | {BACBEB95-C991-4434-9730-8435F9358981}.Release|x64.ActiveCfg = Release|x64
27 | {BACBEB95-C991-4434-9730-8435F9358981}.Release|x64.Build.0 = Release|x64
28 | {BACBEB95-C991-4434-9730-8435F9358981}.Release|x86.ActiveCfg = Release|x86
29 | {BACBEB95-C991-4434-9730-8435F9358981}.Release|x86.Build.0 = Release|x86
30 | EndGlobalSection
31 | GlobalSection(SolutionProperties) = preSolution
32 | HideSolutionNode = FALSE
33 | EndGlobalSection
34 | EndGlobal
35 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/ConfigDumpFileIO/ConfigDumpFileIO.cs:
--------------------------------------------------------------------------------
1 | using RGiesecke.DllExport;
2 | using System.IO;
3 | using System.Reflection;
4 | using System.Runtime.InteropServices;
5 | using System.Text;
6 |
7 | namespace ConfigDumpFileIO
8 | {
9 | public class DLLEntry
10 | {
11 | static StreamWriter outputFile;
12 | #if WIN64
13 | [DllExport("RVExtension", CallingConvention = CallingConvention.Winapi)]
14 | #else
15 | [DllExport("_RVExtension@12", CallingConvention = CallingConvention.Winapi)]
16 | #endif
17 | public static void RVExtension(StringBuilder output, int outputSize, [MarshalAs(UnmanagedType.LPStr)] string input)
18 | {
19 | byte[] bytes = Encoding.Default.GetBytes(input);
20 | input = Encoding.UTF8.GetString(bytes);
21 | var colonIndex = input.IndexOf(":");
22 | var operationType = input.Substring(0, colonIndex);
23 | var stringToWrite = input.Substring(colonIndex + 1, input.Length - colonIndex - 1);
24 | if (operationType.Equals("open"))
25 | {
26 | string assemblyFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
27 | string filePath = Path.Combine(assemblyFolder, stringToWrite);
28 | outputFile?.Close();
29 | try
30 | {
31 | outputFile = new StreamWriter(filePath);
32 | }
33 | catch (System.UnauthorizedAccessException ex)
34 | {
35 | output.Append("AccessDenied " + ex.Message);
36 | return;
37 | }
38 | catch (DirectoryNotFoundException ex)
39 | {
40 | output.Append("DirectoryNotFound " + ex.Message);
41 | return;
42 | }
43 | catch (IOException ex)
44 | {
45 | output.Append("IOException " + ex.Message);
46 | return;
47 | }
48 | catch (System.Exception ex)
49 | {
50 | output.Append("Exception " + ex.Message);
51 | return;
52 | }
53 | output.Append("true");
54 | return;
55 | }
56 | else if(operationType.Equals("write"))
57 | {
58 | outputFile?.WriteLine(stringToWrite);
59 | output.Append(outputFile != null ? "true" : "false");
60 | return;
61 | }
62 | else if(operationType.Equals("close"))
63 | {
64 | output.Append(outputFile != null ? "true" : "false");
65 | outputFile?.Close();
66 | outputFile = null;
67 | return;
68 | }
69 |
70 | output.Append("false");
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.userosscache
8 | *.sln.docstates
9 |
10 | # User-specific files (MonoDevelop/Xamarin Studio)
11 | *.userprefs
12 |
13 | # Build results
14 | [Dd]ebug/
15 | [Dd]ebugPublic/
16 | [Rr]elease/
17 | [Rr]eleases/
18 | [Xx]64/
19 | [Xx]86/
20 | [Bb]uild/
21 | bld/
22 | [Bb]in/
23 | [Oo]bj/
24 |
25 | # Visual Studio 2015 cache/options directory
26 | .vs/
27 | # Uncomment if you have tasks that create the project's static files in wwwroot
28 | #wwwroot/
29 |
30 | # MSTest test Results
31 | [Tt]est[Rr]esult*/
32 | [Bb]uild[Ll]og.*
33 |
34 | # NUNIT
35 | *.VisualState.xml
36 | TestResult.xml
37 |
38 | # Build Results of an ATL Project
39 | [Dd]ebugPS/
40 | [Rr]eleasePS/
41 | dlldata.c
42 |
43 | # DNX
44 | project.lock.json
45 | artifacts/
46 |
47 | *_i.c
48 | *_p.c
49 | *_i.h
50 | *.ilk
51 | *.meta
52 | *.obj
53 | *.pch
54 | *.pdb
55 | *.pgc
56 | *.pgd
57 | *.rsp
58 | *.sbr
59 | *.tlb
60 | *.tli
61 | *.tlh
62 | *.tmp
63 | *.tmp_proj
64 | *.log
65 | *.vspscc
66 | *.vssscc
67 | .builds
68 | *.pidb
69 | *.svclog
70 | *.scc
71 |
72 | # Chutzpah Test files
73 | _Chutzpah*
74 |
75 | # Visual C++ cache files
76 | ipch/
77 | *.aps
78 | *.ncb
79 | *.opendb
80 | *.opensdf
81 | *.sdf
82 | *.cachefile
83 | *.VC.db
84 |
85 | # Visual Studio profiler
86 | *.psess
87 | *.vsp
88 | *.vspx
89 | *.sap
90 |
91 | # TFS 2012 Local Workspace
92 | $tf/
93 |
94 | # Guidance Automation Toolkit
95 | *.gpState
96 |
97 | # ReSharper is a .NET coding add-in
98 | _ReSharper*/
99 | *.[Rr]e[Ss]harper
100 | *.DotSettings.user
101 |
102 | # JustCode is a .NET coding add-in
103 | .JustCode
104 |
105 | # TeamCity is a build add-in
106 | _TeamCity*
107 |
108 | # DotCover is a Code Coverage Tool
109 | *.dotCover
110 |
111 | # NCrunch
112 | _NCrunch_*
113 | .*crunch*.local.xml
114 | nCrunchTemp_*
115 |
116 | # MightyMoose
117 | *.mm.*
118 | AutoTest.Net/
119 |
120 | # Web workbench (sass)
121 | .sass-cache/
122 |
123 | # Installshield output folder
124 | [Ee]xpress/
125 |
126 | # DocProject is a documentation generator add-in
127 | DocProject/buildhelp/
128 | DocProject/Help/*.HxT
129 | DocProject/Help/*.HxC
130 | DocProject/Help/*.hhc
131 | DocProject/Help/*.hhk
132 | DocProject/Help/*.hhp
133 | DocProject/Help/Html2
134 | DocProject/Help/html
135 |
136 | # Click-Once directory
137 | publish/
138 |
139 | # Publish Web Output
140 | *.[Pp]ublish.xml
141 | *.azurePubxml
142 |
143 | # TODO: Un-comment the next line if you do not want to checkin
144 | # your web deploy settings because they may include unencrypted
145 | # passwords
146 | #*.pubxml
147 | *.publishproj
148 |
149 | # NuGet Packages
150 | *.nupkg
151 | # The packages folder can be ignored because of Package Restore
152 | **/packages/*
153 | # except build/, which is used as an MSBuild target.
154 | !**/packages/build/
155 | # Uncomment if necessary however generally it will be regenerated when needed
156 | #!**/packages/repositories.config
157 | # NuGet v3's project.json files produces more ignoreable files
158 | *.nuget.props
159 | *.nuget.targets
160 |
161 | # Microsoft Azure Build Output
162 | csx/
163 | *.build.csdef
164 |
165 | # Microsoft Azure Emulator
166 | ecf/
167 | rcf/
168 |
169 | # Microsoft Azure ApplicationInsights config file
170 | ApplicationInsights.config
171 |
172 | # Windows Store app package directory
173 | AppPackages/
174 | BundleArtifacts/
175 |
176 | # Visual Studio cache files
177 | # files ending in .cache can be ignored
178 | *.[Cc]ache
179 | # but keep track of directories ending in .cache
180 | !*.[Cc]ache/
181 |
182 | # Others
183 | ClientBin/
184 | [Ss]tyle[Cc]op.*
185 | ~$*
186 | *~
187 | *.dbmdl
188 | *.dbproj.schemaview
189 | *.pfx
190 | *.publishsettings
191 | node_modules/
192 | orleans.codegen.cs
193 |
194 | # RIA/Silverlight projects
195 | Generated_Code/
196 |
197 | # Backup & report files from converting an old project file
198 | # to a newer Visual Studio version. Backup files are not needed,
199 | # because we have git ;-)
200 | _UpgradeReport_Files/
201 | Backup*/
202 | UpgradeLog*.XML
203 | UpgradeLog*.htm
204 |
205 | # SQL Server files
206 | *.mdf
207 | *.ldf
208 |
209 | # Business Intelligence projects
210 | *.rdl.data
211 | *.bim.layout
212 | *.bim_*.settings
213 |
214 | # Microsoft Fakes
215 | FakesAssemblies/
216 |
217 | # GhostDoc plugin setting file
218 | *.GhostDoc.xml
219 |
220 | # Node.js Tools for Visual Studio
221 | .ntvs_analysis.dat
222 |
223 | # Visual Studio 6 build log
224 | *.plg
225 |
226 | # Visual Studio 6 workspace options file
227 | *.opt
228 |
229 | # Visual Studio LightSwitch build output
230 | **/*.HTMLClient/GeneratedArtifacts
231 | **/*.DesktopClient/GeneratedArtifacts
232 | **/*.DesktopClient/ModelManifest.xml
233 | **/*.Server/GeneratedArtifacts
234 | **/*.Server/ModelManifest.xml
235 | _Pvt_Extensions
236 |
237 | # LightSwitch generated files
238 | GeneratedArtifacts/
239 | ModelManifest.xml
240 |
241 | # Paket dependency manager
242 | .paket/paket.exe
243 |
244 | # FAKE - F# Make
245 | .fake/
--------------------------------------------------------------------------------
/ConfigDumpFileIO/ConfigDumpFileIO.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {BACBEB95-C991-4434-9730-8435F9358981}
8 | Library
9 | Properties
10 | ConfigDumpFileIO
11 | ConfigDumpFileIO
12 | v4.5.1
13 | 512
14 |
15 |
16 |
17 | true
18 | full
19 | false
20 | bin\Debug\
21 | DEBUG;TRACE
22 | prompt
23 | 4
24 |
25 |
26 | pdbonly
27 | true
28 | bin\Release\
29 | TRACE
30 | prompt
31 | 4
32 | AnyCPU
33 |
34 |
35 | true
36 | bin\x86\Debug\
37 | DEBUG;TRACE
38 | full
39 | x86
40 | prompt
41 | MinimumRecommendedRules.ruleset
42 |
43 |
44 | bin\x86\Release\
45 | TRACE;WIN32
46 | true
47 | pdbonly
48 | x86
49 | prompt
50 | MinimumRecommendedRules.ruleset
51 |
52 |
53 | true
54 | bin\x64\Debug\
55 | DEBUG;TRACE
56 | full
57 | x64
58 | prompt
59 | MinimumRecommendedRules.ruleset
60 |
61 |
62 | bin\x64\Release\
63 | TRACE;WIN64
64 | true
65 | pdbonly
66 | x64
67 | prompt
68 | MinimumRecommendedRules.ruleset
69 |
70 |
71 |
72 | ..\packages\UnmanagedExports.1.2.7\lib\net\RGiesecke.DllExport.Metadata.dll
73 | False
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 | IF $(PlatformName) == x64 (
88 | RENAME "$(TargetPath)" "$(TargetName)_x64$(TargetExt)"
89 | )
90 |
91 |
92 | cd $(TargetDir)
93 | del *.dll
94 |
95 |
102 |
--------------------------------------------------------------------------------
/dumpConfig.sqf:
--------------------------------------------------------------------------------
1 | //
2 | // dumpConfig.sqf
3 | // Copyright (c) 2010 Denis Usenko, DenVdmj@gmail.com
4 | // MIT-style license
5 | //
6 | // Modified by Pennyworth to write to file using ConfigDumpFileIO extension.
7 |
8 | /*
9 | ======================================================================================
10 |
11 | Dump config to the clipboard:
12 |
13 | [config HNDL, bool IncludeInheritedPropertiesFlag] call compile preprocessFileLineNumbers "dumpConfig.sqf"
14 |
15 | This example put section CfgVehicles on the clipboard:
16 |
17 | [configFile >> "CfgVehicles"] call compile preprocessFileLineNumbers "dumpConfig.sqf"
18 |
19 | This example will put on the clipboard class "RscDisplayArcadeUnit", all classes will contain all heritable properties, so you get a full and self-sufficient class, independent from the other classes.
20 |
21 | [configFile >> "RscDisplayArcadeUnit", true] call compile preprocessFileLineNumbers "dumpConfig.sqf"
22 |
23 | More examples:
24 |
25 | [configFile >> "RscTitle", true] call compile preprocessFileLineNumbers "dumpConfig.sqf"
26 | [configFile >> "RscEdit", true] call compile preprocessFileLineNumbers "dumpConfig.sqf"
27 | [configFile >> "RscToolbox", true] call compile preprocessFileLineNumbers "dumpConfig.sqf"
28 |
29 | Warning: don't attempt to get a large classes with switched on parameter "IncludeInheritedPropertiesFlag", eg don't do so:
30 |
31 | [configFile, true] call compile preprocessFileLineNumbers "dumpConfig.sqf"
32 |
33 | Dump the entire config, it can take over ten seconds:
34 |
35 | [configFile] call compile preprocessFileLineNumbers "dumpConfig.sqf"
36 |
37 | ======================================================================================
38 | */
39 |
40 | #define arg(x) (_this select (x))
41 | #define argIf(x) if(count _this > (x))
42 | #define argIfType(x,t) if(argIf(x)then{typeName arg(x) == (t)}else{false})
43 | #define argSafe(x) argIf(x)then{arg(x)}
44 | #define argOr(x,v) (argSafe(x)else{v})
45 | #define push(a,v) (a)pushBack(v)
46 |
47 | "ConfigDumpFileIO" callExtension format ["open:AiO.1.%1.%2.cpp", (productVersion select 2) % 100, productVersion select 3];
48 |
49 | private _escapeString = {
50 | private _source = toArray _this;
51 | private _start = _source find 34;
52 | if(_start != -1) then {
53 | private _target = +_source;
54 | _target resize _start;
55 | for "_i" from _start to count _source - 1 do {
56 | private _charCode = _source select _i;
57 | push(_target, _charCode);
58 | if(_charCode isEqualTo 34) then {
59 | push(_target, _charCode);
60 | };
61 | };
62 | str toString _target;
63 | } else {
64 | str _this;
65 | };
66 | };
67 |
68 | private _collectInheritedProperties = {
69 | private _config = _this;
70 | private _propertyNameList = [];
71 | private _propertyNameLCList = [];
72 | while {
73 | private _className = configName _config;
74 | for "_i" from 0 to count _config - 1 do {
75 | private _propertyName = _config select _i;
76 | private _propertyNameLC = toLower configName _propertyName;
77 | if!(_propertyNameLC in _propertyNameLCList) then {
78 | push(_propertyNameList, _propertyName);
79 | push(_propertyNameLCList, _propertyNameLC);
80 | };
81 | };
82 | _className != "";
83 | } do {
84 | _config = inheritsFrom _config;
85 | };
86 | _propertyNameList;
87 | };
88 |
89 | private _dumpConfigTree = {
90 | private _includeInheritedProperties = argOr(1, false);
91 | private _specifyParentClass = argOr(2, !_includeInheritedProperties);
92 |
93 | private _result = [];
94 | private _indents = [""];
95 | private _depth = 0;
96 |
97 | private _pushLine = {
98 | if(_depth >= count _indents) then {
99 | _indents set [_depth, (_indents select _depth-1) + toString[9]];
100 | };
101 | _myString = (_indents select _depth) + (_this);
102 | "ConfigDumpFileIO" callExtension ("write:" + _myString);
103 | };
104 |
105 | private _traverse = {
106 | private _confName = configName _this;
107 | if( isText _this ) exitwith {
108 | _confName + " = " + (getText _this call _escapeString) + ";" call _pushLine;
109 | };
110 | if( isNumber _this ) exitwith {
111 | _confName + " = " + str getNumber _this + ";" call _pushLine;
112 | };
113 | if( isArray _this ) exitwith {
114 | _confName + "[] = " + (getArray _this call _traverseArray) + ";" call _pushLine;
115 | };
116 | if( isClass _this ) exitwith {
117 | "class " + _confName + (
118 | configName inheritsFrom _this call {
119 | if( _this isEqualTo "" || !_specifyParentClass ) then { "" } else { ": " + _this }
120 | }
121 | ) call _pushLine;
122 | "{" call _pushLine;
123 | if( _includeInheritedProperties ) then {
124 | _this = _this call _collectInheritedProperties;
125 | };
126 | _depth = _depth + 1;
127 | for "_i" from 0 to count _this - 1 do {
128 | _this select _i call _traverse
129 | };
130 | _depth = _depth - 1;
131 | "};" call _pushLine;
132 | };
133 | };
134 |
135 | private _traverseArray = {
136 | if(_this isEqualType []) exitwith {
137 | private _array = [];
138 | for "_i" from 0 to count _this - 1 do {
139 | push(_array, _this select _i call _traverseArray);
140 | };
141 | "{" + (_array joinString ", ") + "}";
142 | };
143 | if(_this isEqualType "") exitwith {
144 | _this call _escapeString;
145 | };
146 | str _this;
147 | };
148 |
149 | arg(0) call _traverse;
150 |
151 | "ConfigDumpFileIO" callExtension "close:yes";
152 | true
153 | };
154 |
155 | private _startTime = diag_tickTime;
156 | private _finished = _this call _dumpConfigTree;
157 | private _endTime = diag_tickTime;
158 | hint format ["Ready\nNow get config from the ConfigDumpFileIO directory\ntime: %1", _endTime - _startTime];
159 | false;
160 |
--------------------------------------------------------------------------------