Example using the implementation class
// We are including the main header file it that contains // the implementation class. #include <ceVideoCoreImpl.h>
// We are using the namespace "ce" (CorEngine) by default (Optional). using namespace ce;
// We are creating our own manager class, inheriting the implementation class. class CVideoManager : public IVideoManagerImpl<CVideoManager> { public:
inline short Example(void) const { // Load a video file. this -> Video -> LoadVideoFile("video1.mpg"); // Initialize the window main loop. return this -> Video -> InitVideoWindow(); };
// Operator -> (Optional). const CVideoManager* operator -> (void) const { return this; };
};
int main(int argc, char **argv) { // We are creating a instance of our manager class. const CVideoManager Video;
// Verify the integrity of the manager class (Optional). if (Video -> VerifyVideoManager() == 0) return 1;
return Video -> Example(); }
|