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

A simple rapid filling, only position is added #164

Closed
wants to merge 5 commits into from

Conversation

wanqing0421
Copy link
Contributor

No description provided.


word fileName_;

uint32 numPoints_;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this one. numbPoints is equal to size of the vector you read from file.


bool pFlow::positionFile::positionPointsFile()
{
std::cout << "Reading user defined position file....";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use output stream for message printing or you can use REPORT macro to perform automatic indention in the output. note that we have endl defined in the code that ends the line.

@PhasicFlow
Copy link
Owner

I added some comments in the code. Now consider these conditions:
what if data is separated with comma (,). for doing that you need to consider another member to the class

Logical commaSeparated_;

and read it from fileInfo dictionary. Then, when reading from the file, if data is separated by comma, you need to read the next valid character from file

const token nextValid(inFile)
if(nextValid != token::COMMA)
// here you must fatalErrorInFunciton and return false;

method file; // other options: empty, ordered and random
fileInfo
{
name dataFile;

        commaSeparated    No; // optional (default is No). if Yes, then fields are separated by a comma
 }

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

Successfully merging this pull request may close these issues.

2 participants