Project

General

Profile

Statistics
| Branch: | Revision:

root / src / sim / cwatch.cc @ 3e29b8a0

History | View | Annotate | Download (1.02 KB)

1
//=========================================================================
2
//  CWATCH.CC - part of
3
//
4
//                  OMNeT++/OMNEST
5
//           Discrete System Simulation in C++
6
//
7
//
8
//   Member functions of
9
//    cWatchBase etc: make primitive types, structs etc inspectable
10
//
11
//  Author: Andras Varga
12
//
13
//=========================================================================
14

    
15
/*--------------------------------------------------------------*
16
  Copyright (C) 1992-2008 Andras Varga
17
  Copyright (C) 2006-2008 OpenSim Ltd.
18

19
  This file is distributed WITHOUT ANY WARRANTY. See the file
20
  `license' for details on this and other legal matters.
21
*--------------------------------------------------------------*/
22

    
23
#include "cwatch.h"
24
#include "stringutil.h"
25

    
26
USING_NAMESPACE
27

    
28
std::string cWatch_stdstring::info() const
29
{
30
    return opp_quotestr(r.c_str());
31
}
32

    
33
void cWatch_stdstring::assign(const char *s)
34
{
35
    if (s[0]=='"' && s[strlen(s)-1]=='"')
36
    {
37
        r = opp_parsequotedstr(s);
38
    }
39
    else
40
    {
41
        r = s;
42
    }
43
}
44