Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

/home/pauldt/projects/IDEA/IDEA-ALL/IDEA-DEV/Core/PlanServer/Includes/PslToken.hh

Go to the documentation of this file.
00001 // -*- Mode: c++ -*-
00002 //      CVS: $Id: PslToken.hh,v 1.25 2005/11/29 17:22:40 rijsman Exp $
00003 //      Tag: $name$
00004 //     Info: $CVSROOT/COPYRIGHT
00005 #ifndef PSL_TOKEN_HEADER_FILE
00006 #define PSL_TOKEN_HEADER_FILE
00007 
00008 #include "PslContainers.hh"
00009 
00010 #include "TimeBasics.hh"
00011 #include "TokenLocation.hh"
00012 
00013 namespace IDEA
00014 {
00015   class PslConstraint;
00016   class PslDatabase;
00017   class PslParameter;
00018   class PslPredicate;
00019   class PslTimeline;
00020   class PslTokenImpl;
00021   class PslVariableImpl;
00022   
00030   class PslToken
00031   {
00032     friend class PslDatabaseImpl;
00033   public:
00037     ~PslToken();
00041     PslTokenImpl* getImpl() const;
00046     void commit() const;
00051     bool isCommitted() const;
00056     bool isExecuting( const Time& t ) const;
00061     bool canBeCommitted() const;
00066     bool isEnabled() const;
00071     void setEnabled( bool value = true ) const;
00076     void activateTimelineAssignedConstraints( int authority ) const;
00081     void deActivateTimelineAssignedConstraints() const;
00085     void activateActiveConstraints( int authority ) const;
00089     void deActivateActiveConstraints() const;
00093     int getId() const;
00098     const std::string& getName() const;
00102     void print( std::ostream& os ) const;
00109     bool usesCPU() const;
00116     bool endsAtStart( const PslToken* token ) const;
00120     void setSuccessor( const PslToken* token ) const;
00125     bool returnsStatus() const;
00130     bool isAuthorized() const;
00136     bool hasDirectSuccessor( const PslTimeline* tl ) const;
00140     PslParameterList getParameters() const;
00145     bool isGoal() const;
00150     bool isExecutable() const;
00155     bool isFinalized() const;
00160     bool isControllable() const;
00166     bool isOpenLoop() const;
00170     const PslDatabase* getDatabase() const;
00174     Time getEarliestEndTime() const;
00178     Time getLatestEndTime() const;
00182     Time getMaximumDuration() const;
00186     Time getMinimumDuration() const;
00190     Time getEarliestStartTime() const;
00194     Time getLatestStartTime() const;
00195 
00196     int getExternalId() const;
00203     void setEarliestEndTime( const Time& value ) const;
00210     void setLatestEndTime( const Time& value ) const;
00217     void setLatestStartTime( const Time& value ) const;
00224     void setEarliestStartTime( const Time& value ) const;
00228     const PslTimeline* getTimeline() const;
00235     const TokenLocation& getSourceLocation() const;
00240     const std::string& getComRelayName() const;
00244     const PslParameter* getReturnStatusParameter() const;
00248     const PslParameter* getReturnStatusFlagParameter() const;
00253     const PslParameter* getParameter( int index ) const;
00258     const PslParameter* getParameter( const std::string& parameterName) const;
00262     const PslPredicate* getPredicate() const;
00273     static const PslToken* getExternalizedToken( unsigned int tokenId );
00277     const TokenLocation& getTargetLocation() const;
00281     const PslVariable* getStartVariable() const;
00285     const PslVariable* getEndVariable() const;
00293     void finalize() const;
00296     bool endsNoEarlierThanEnd(const PslToken * token) const;
00297   private:
00301     PslToken( PslTokenImpl* impl );
00313     void enforceOutputConstraint();
00319     void relaxOutputConstraint();
00323     PslTokenImpl* m_Impl;
00324   };
00325   
00329   std::ostream& operator<<(std::ostream& os, const PslToken& token);
00330 }
00331 
00332 #endif // PSL_TOKEN_HEADER_FILE

Contact information
© IDEA
Generated on Fri Feb 3 17:09:41 2006 for IDEA.