mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-14 04:57:21 +01:00
Added a user module and a (simple for now) User class.
This commit is contained in:
parent
9b0a8eb970
commit
f21b4362c6
12
modules/users/SCsub
Normal file
12
modules/users/SCsub
Normal file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
Import("env_mod")
|
||||
Import("env")
|
||||
|
||||
env_mod.core_sources = []
|
||||
|
||||
env_mod.add_source_files(env_mod.core_sources, "*.cpp")
|
||||
|
||||
# Build it all as a library
|
||||
lib = env_mod.add_library("users", env_mod.core_sources)
|
||||
env.Prepend(LIBS=[lib])
|
27
modules/users/detect.py
Normal file
27
modules/users/detect.py
Normal file
@ -0,0 +1,27 @@
|
||||
import os
|
||||
import platform
|
||||
import sys
|
||||
|
||||
|
||||
def is_active():
|
||||
return True
|
||||
|
||||
|
||||
def get_name():
|
||||
return "users"
|
||||
|
||||
|
||||
def can_build():
|
||||
return True
|
||||
|
||||
|
||||
def get_opts():
|
||||
return []
|
||||
|
||||
def get_flags():
|
||||
|
||||
return []
|
||||
|
||||
|
||||
def configure(env):
|
||||
pass
|
9
modules/users/user.cpp
Normal file
9
modules/users/user.cpp
Normal file
@ -0,0 +1,9 @@
|
||||
#include "user.h"
|
||||
|
||||
User::User() :
|
||||
Object() {
|
||||
|
||||
}
|
||||
|
||||
User::~User() {
|
||||
}
|
22
modules/users/user.h
Normal file
22
modules/users/user.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef USER_H
|
||||
#define USER_H
|
||||
|
||||
#include "core/object.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
class User : public Object {
|
||||
public:
|
||||
int id;
|
||||
std::string name;
|
||||
std::string email;
|
||||
int rank;
|
||||
std::string pre_salt;
|
||||
std::string post_salt;
|
||||
std::string password_hash;
|
||||
|
||||
User();
|
||||
~User();
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user