converted ixd validation code to c++ class