Skip to content

Commit

Permalink
Database code template
Browse files Browse the repository at this point in the history
  • Loading branch information
jmsv committed Feb 27, 2017
1 parent fe9b48b commit 64b3702
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/dbstore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,28 @@ int database_test()

return 0;
}

int create_database(string user)
{
// Create database called [user].db
return 0;
}

int add_to_inventory(string item_name)
{
// Add item to database
return 0;
}

int remove_from_inventory(string item_name)
{
// Remove item from database
return 0;
}

bool do_i_have(string item_name)
{
// Check database to see if user has item
// Return true if user has item
return false;
}
1 change: 1 addition & 0 deletions src/userin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ int int_to_string(string string_in)

bool valid_name(string test_name)
{
// Check name is valid
return true;
}

Expand Down

1 comment on commit 64b3702

@jmsv
Copy link
Owner Author

@jmsv jmsv commented on 64b3702 Feb 27, 2017

Choose a reason for hiding this comment

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

Related to #2

Please sign in to comment.