AGX Dynamics  2.35.0.1
SpoolValveConnector.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 
18 
19 #ifndef AGXHYDRAULICS_DETAIL_SPOOL_VALVE_CONNECTOR_H
20 #define AGXHYDRAULICS_DETAIL_SPOOL_VALVE_CONNECTOR_H
21 
23 
24 namespace agxHydraulics
25 {
26  class SpoolValve;
27 
28  namespace detail
29  {
30 
38  {
39  public:
41 
49  virtual bool connect(
50  agxPowerLine::Side mySide,
51  agxPowerLine::Side unitSide,
52  agxPowerLine::Unit* unit) override;
53 
54  // Inherint the versions of connect that eventually call the two above.
56 
59 
64  virtual bool vetoConnect(agxPowerLine::Unit* unit) const override;
65 
66 
70  virtual bool store(agxStream::StorageStream& str) const override;
71 
75  virtual bool restore(agxStream::StorageStream& str) override;
76 
77 
81  virtual bool postStore(agxStream::StorageStream& str) const override { return FlowConnector::postStore(str); }
82  virtual bool postRestore(agxStream::StorageStream& str) override { return FlowConnector::postRestore(str); }
83 
85 
86  protected:
89 
92  };
93  }
94 }
95 
96 #endif
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Definition: Serializable.h:207
#define AGXHYDRAULICS_EXPORT
A FlowConnector is a junction of a set of FlowUnits.
Definition: FlowConnector.h:40
virtual bool connect(agxPowerLine::Side mySide, agxPowerLine::Side unitSide, agxPowerLine::Unit *unit) override
Connect the given unit to this FlowConnector.
Spool valves are used to dynamically redirect flow during a simulation.
Definition: SpoolValve.h:45
virtual bool restore(agxStream::StorageStream &str) override
Restores internal data from stream.
bool internalConnect(agxPowerLine::Unit *unit, agxPowerLine::Side mySide, agxPowerLine::Side unitSide)
virtual bool vetoConnect(agxPowerLine::Unit *unit) const override
Will reject connections if the SpoolValveConnector is currently connected to an internal static FlowU...
virtual bool store(agxStream::StorageStream &str) const override
Stores internal data into stream.
virtual bool postRestore(agxStream::StorageStream &str) override
virtual bool connect(agxPowerLine::Side mySide, agxPowerLine::Side unitSide, agxPowerLine::Unit *unit) override
Does nothing and returns false.
virtual bool postStore(agxStream::StorageStream &str) const override
Set values of constraints.
virtual agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation * createConstraint() override
virtual bool postStore(agxStream::StorageStream &str) const
Set values of constraints.
virtual bool postRestore(agxStream::StorageStream &str)
Constraint implementation for constraining a number of physical dimensions of the same type.
Pure virtual class.
Definition: Unit.h:73
Abstract base class for storing/restoring a line/drums with version control.
Definition: StorageStream.h:49
The agxHydraulics namespace contains classes for modeling hydraulic circuits within the power line fr...
Definition: Accumulator.h:28