States.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: App
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2011, Ceetron AS
8 // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Ceetron AS. The contents of this file may
9 // not be disclosed to third parties, copied or duplicated in any form, in whole or in part,
10 // without the prior written permission of Ceetron AS.
11 //##################################################################################################
12 
13 #pragma once
14 
15 #include "CeeApp/Base.h"
16 #include "CeeCore/Base.h"
17 #include "CeeCore/PtrRef.h"
18 #include "CeeCore/RefCountedObject.h"
19 #include "CeeUnstructGrid/DataState.h"
20 #include "CeeUnstructGrid/StateInfo.h"
21 
22 namespace cee {
23 namespace app {
24 
25 
26 //==================================================================================================
27 //
28 // Class for View management
29 //
30 //==================================================================================================
31 class CEE_APP_EXPORT States : public RefCountedObject
32 {
33 
34 public:
35 
36  static States* instance();
37 
38  size_t count() const;
39 
40  cee::ug::DataState* current();
41 
42  cee::ug::StateInfo currentInfo() const;
43  void setCurrentInfo(cee::ug::StateInfo info);
44 
45  size_t currentIndex() const;
46  void setCurrentIndex(size_t index);
47 
48  size_t indexOf(cee::ug::StateInfo info) const;
49 
50  cee::ug::StateInfo info(size_t index) const;
51  cee::ug::StateInfo info(const cee::Str& wildcard) const;
52 
53 
54 private:
55  States();
56  virtual ~States();
57 
58  CEE_PRIVATE_IMPL(States);
59  CEE_DISALLOW_COPY_AND_ASSIGN(States);
60 
61 };
62 
63 } // namespace cee
64 } // namespace app
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
A general unicode based string class.
Definition: Str.h:28
Base class for all reference counted objects with built-in support for intrusive reference counting...
Definition: RefCountedObject.h:34
Simple class containing metadata info for a state.
Definition: StateInfo.h:29
A state contains all data available for one time step, load case or frequency.
Definition: DataState.h:28
Class to manage the list of states in the application.
Definition: States.h:31