Mister Test (typerecorder) wrote in oopdocbook,
Mister Test
typerecorder
oopdocbook

How to use Constraints and ConstraintMgrs

You don't want to use DataObject's singleton ConstraintManager for this exercise - your program should do something like this.

1. Read the command Line arguments.
2. Create some Constraint objects representing the command line arguments.
3. Create a ConstraintMgr object, and add those Constraint objects to it.
4, Start processing files.

PlayGen is a VFileVisitor, so it has a constructor, and a processFile()
method. Its constructor should initialize a ConstraintMgr, PlayList and a
FileTagger.

Then, in the PlayGen::ProcessFile(QString filename)
You send a message to mFileTagger to load in the id3 tag information.
You check the mConstraintMgr
fileTagger to see if it satisfies the constraints. If it does, create
a copy of that object and add it to the PlayList.

Coming soon : a diagram that will specify this better.
Subscribe
  • Post a new comment

    Error

    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments