
import clr
import sys
import os

def check_abstract():
    dll_dir = os.path.join(os.getcwd(), "libs")
    sys.path.append(dll_dir)
    clr.AddReference("rapiplus")
    import com.omnesys.rapi as rapi
    
    # 抽象メソッドの確認
    cls = rapi.AdmCallbacks
    abstracts = getattr(cls, "__abstractmethods__", frozenset())
    print(f"AdmCallbacks abstract methods: {list(abstracts)}")
    
    # 実際に継承クラスを作ってみて確認
    class TestAdm(rapi.AdmCallbacks):
        def Alert(self, oInfo):
            pass
            
    print(f"TestAdm abstract methods: {list(getattr(TestAdm, '__abstractmethods__', []))}")
    
    try:
        t = TestAdm()
        print("TestAdm instantiation success!")
    except TypeError as e:
        print(f"TestAdm instantiation failed: {e}")

if __name__ == "__main__":
    check_abstract()
