claugeas/AugManaged.h

31 lines
653 B
C
Raw Normal View History

#include "AugFuncs.h"
2022-11-02 23:12:38 +03:00
#include <string>
#ifndef BLUEWEST_AUGEAS_MANAGEDAUG_H
#define BLUEWEST_AUGEAS_MANAGEDAUG_H
// Managed type to expose the public library to other languages
ref class AugManaged
{
AugFuncs* NativePtr;
public:
AugManaged() : NativePtr(new AugFuncs()) {}
~AugManaged() { delete NativePtr; }
void TestAugTree()
{
auto testSettings = AugSettings {
.root = "../root",
.loadPath = "/opt/homebrew/share/augeas/lenses/dist",
};
NativePtr->printPreview(testSettings, "/files/etc/hosts/1", "/etc/hosts");
}
};
#endif //BLUEWEST_AUGEAS_MANAGEDAUG_H