~mira-dev/mira/p2p

« back to all changes in this revision

Viewing changes to mira-server/include/network/Msg.h

  • Committer: Alan Alvarez
  • Date: 2008-08-24 20:03:46 UTC
  • mfrom: (170.1.3 mira)
  • Revision ID: alan.alvarez@us.army.mil-20080824200346-gjk9cckgxwl39esy
- Add dynamic fields to Users and WorkPlaces
- Track Users and Workplaces by IDs (unsigned int)

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
class Msg
50
50
{
51
51
    public:
52
 
        Msg(const std::string& user_source, const std::string& message);
 
52
        Msg(const unsigned int user_source_id, const std::string& message);
53
53
        virtual ~Msg() {}
54
54
 
55
55
        enum Token
80
80
        };
81
81
 
82
82
 
83
 
    static void  Parse(const std::string& user_source, std::string* message);
 
83
    static void  Parse(const unsigned int user_source_id, std::string* message);
84
84
   virtual void  run() = 0;
85
85
        // Return NONE if token is not found.
86
86
    static Token get_token(const char* token_string)
98
98
        typedef std::map<const char*, Token, TokenCompare> TokenMap;
99
99
 
100
100
        std::string       m_message;
101
 
        std::string       m_source;
 
101
        unsigned int      m_source_id;
102
102
 
103
103
 static TokenMap   m_token_map;
104
104