remove button colors from quarks gui (cocoa + swing)
[supercollider.git] / external_libraries / yaml-cpp-0.2.6 / src / collectionstack.h
blob52745466509a3042f67e0dc29642cc72a17d5b30
1 #ifndef COLLECTIONSTACK_H_62B23520_7C8E_11DE_8A39_0800200C9A66
2 #define COLLECTIONSTACK_H_62B23520_7C8E_11DE_8A39_0800200C9A66
4 #if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4
5 #pragma once
6 #endif
9 #include <stack>
10 #include <cassert>
12 namespace YAML
14 struct CollectionType {
15 enum value { None, BlockMap, BlockSeq, FlowMap, FlowSeq, CompactMap };
18 class CollectionStack
20 public:
21 CollectionType::value GetCurCollectionType() const {
22 if(collectionStack.empty())
23 return CollectionType::None;
24 return collectionStack.top();
27 void PushCollectionType(CollectionType::value type) { collectionStack.push(type); }
28 void PopCollectionType(CollectionType::value type) { assert(type == GetCurCollectionType()); collectionStack.pop(); }
30 private:
31 std::stack<CollectionType::value> collectionStack;
35 #endif // COLLECTIONSTACK_H_62B23520_7C8E_11DE_8A39_0800200C9A66