mirror of
https://github.com/vishapoberon/vipak.git
synced 2026-04-06 04:52:26 +00:00
now the retriever function is the installable method of dep object.
This commit is contained in:
parent
e6823cb373
commit
db0a32e674
4 changed files with 22 additions and 9 deletions
|
|
@ -1,32 +0,0 @@
|
|||
MODULE vpkRetriever;
|
||||
IMPORT StringList, strutils, vpkJsonParser, vpkStorage, vpkSettings;
|
||||
|
||||
|
||||
PROCEDURE getDeps*(VAR name: ARRAY OF CHAR): StringList.TStringList;
|
||||
VAR
|
||||
jsonRecord, dependencies: vpkJsonParser.JsonTypePointer;
|
||||
p: strutils.pstring;
|
||||
b: BOOLEAN;
|
||||
result: StringList.TStringList;
|
||||
pkgName : ARRAY 32 OF CHAR;
|
||||
BEGIN
|
||||
result := NIL;
|
||||
p := NIL;
|
||||
vpkStorage.json2pstring(name, p);
|
||||
IF p # NIL THEN
|
||||
jsonRecord := vpkJsonParser.Create(p^);
|
||||
b := jsonRecord.GetTerminal(jsonRecord, vpkSettings.pkgTypKey, pkgName);
|
||||
IF b THEN
|
||||
dependencies := NIL;
|
||||
dependencies := jsonRecord.GetNonTerminal(jsonRecord, vpkSettings.depTypKey);
|
||||
IF dependencies # NIL THEN
|
||||
dependencies.GetTerminalKeys(dependencies, result);
|
||||
RETURN result
|
||||
END
|
||||
END
|
||||
END;
|
||||
RETURN result
|
||||
END getDeps;
|
||||
|
||||
|
||||
END vpkRetriever.
|
||||
Loading…
Add table
Add a link
Reference in a new issue