Candidate_v1.7.0
        stable
      
      
      
| Rev | Line |  | 
|---|
| [0b990d] | 1 |  | 
|---|
|  | 2 | #ifdef __GNUG__ | 
|---|
|  | 3 | #pragma implementation | 
|---|
|  | 4 | #endif | 
|---|
|  | 5 |  | 
|---|
|  | 6 | #include <util/state/state_bin.h> | 
|---|
|  | 7 | #include <util/state/proxy.h> | 
|---|
|  | 8 | #include <util/keyval/keyval.h> | 
|---|
|  | 9 |  | 
|---|
|  | 10 | using namespace sc; | 
|---|
|  | 11 |  | 
|---|
|  | 12 | static ClassDesc SavableStateProxy_cd( | 
|---|
|  | 13 | typeid(SavableStateProxy), | 
|---|
|  | 14 | "SavableStateProxy",1,"public DescribedClassProxy", | 
|---|
|  | 15 | 0,create<SavableStateProxy>); | 
|---|
|  | 16 |  | 
|---|
|  | 17 | SavableStateProxy::SavableStateProxy(const Ref<KeyVal> &keyval) | 
|---|
|  | 18 | { | 
|---|
|  | 19 | Ref<StateIn> statein; statein << keyval->describedclassvalue("statein"); | 
|---|
|  | 20 | if (statein.nonnull()) { | 
|---|
|  | 21 | char *objectname = keyval->pcharvalue("object"); | 
|---|
|  | 22 | StateIn &si = *(statein.pointer()); | 
|---|
|  | 23 | if (keyval->exists("override")) { | 
|---|
|  | 24 | si.set_override(new PrefixKeyVal(keyval,"override")); | 
|---|
|  | 25 | } | 
|---|
|  | 26 | if (objectname) { | 
|---|
|  | 27 | object_ = SavableState::dir_restore_state(si, objectname); | 
|---|
|  | 28 | delete[] objectname; | 
|---|
|  | 29 | } | 
|---|
|  | 30 | else { | 
|---|
|  | 31 | object_= SavableState::restore_state(si); | 
|---|
|  | 32 | } | 
|---|
|  | 33 | } | 
|---|
|  | 34 | } | 
|---|
|  | 35 |  | 
|---|
|  | 36 | Ref<DescribedClass> | 
|---|
|  | 37 | SavableStateProxy::object() | 
|---|
|  | 38 | { | 
|---|
|  | 39 | return object_.pointer(); | 
|---|
|  | 40 | } | 
|---|
|  | 41 |  | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.