Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: New method for returning parsed results #385

Open
mxgrey opened this issue May 13, 2015 · 2 comments
Open

Proposal: New method for returning parsed results #385

mxgrey opened this issue May 13, 2015 · 2 comments

Comments

@mxgrey
Copy link
Member

mxgrey commented May 13, 2015

As it currently stands, a .skel file can return either a Skeleton or a World object. This is somewhat unintuitive, and can probably lead to confusion about which parsing function to call for any given file.

I propose instead returning a struct. Something like this:

struct FileContents
{
  std::vector<WorldPtr> mWorlds;
  std::vector<SkeletonPtr> mSkeletons;
  std::vector<ReferentialSkeletonPtr> mRefSkeletons;
  std::vector<LinkagePtr> mLinkages;
  std::vector<BranchPtr> mBranches;
  std::vector<ChainPtr> mChains;
}

This way everything that a file can possibly contain is obtainable through a single parsing function. It would also address an issue brought up in #378: this would allow ReferentialSkeletons that encapsulate multiple Skeletons to be defined.

@mxgrey
Copy link
Member Author

mxgrey commented May 13, 2015

I also wonder if we should consider using a file extension besides .skel, since it sort of implies that the file will only contain a single Skeleton, which is not accurate.

@stale
Copy link

stale bot commented Feb 13, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Feb 13, 2018
@stale stale bot removed the stale label Feb 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants