Source Code for Me (s-c.me)

Allows you to paste souce code to blogs! Adapted for Twitter! Here is Search Form in case you missed your code.
Code:
Selected Language:
Show Linenumbers:
Short link for Twitter:
HTML:

HTML view:

Copy Source | Copy HTML
  1. typedef std::string TWString;
  2. typedef __int64 bigint;
  3.  
  4. const double DBL_NULL =  0;
  5. const int INT_NULL = -1;
  6. const std::string STR_NULL = UnicodeString();
  7.  
  8.  
  9. struct TUser : public BaseType
  10. {
  11.     TUser(
  12.             int AId = INT_NULL,
  13.             const UnicodeString &ALogin = STR_NULL,
  14.             const UnicodeString &AName = STR_NULL,
  15.             const UnicodeString &ASurname = STR_NULL,
  16.             const UnicodeString &ASecondName = STR_NULL,
  17.             const UnicodeString &APassword = UnicodeString(),
  18.             const bigint AAppointmentId = INT_NULL,
  19.             bool ADisabled = false)
  20.         : Id(AId),
  21.         Login(ALogin),
  22.         Name(AName),
  23.         Surname(ASurname),
  24.         SecondName(ASecondName),
  25.         Password(APassword),
  26.     {}
  27.     bool operator!=(const TUser &Other) const
  28.     {
  29.         return !operator==(Other);
  30.     }
  31.     bool operator<(const TUser &Other) const
  32.     {
  33.         return Id < (Other.Id);
  34.     }
  35.     bool operator==(const TUser &Other) const
  36.     {
  37.         return Id == Other.Id;
  38.     }
  39.     bigint Id;
  40.     UnicodeString Login;
  41.     UnicodeString Name;
  42.     UnicodeString Password;
  43.     void StoreValue()
  44.     {
  45.         FieldStorage("Id", Id);
  46.         FieldStorage("Login", Login);
  47.         FieldStorage("Name", Name);
  48.         FieldStorage("Salary", Salary);
  49.     }
  50. };




Based on Manoli.Net's CodeFormatter. Made by Topbot (c) 2008-2012