AndroMeta  2.0.0
AndroMeta/include/AndroMeta/MDLDomain.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2009-2012 AndroMeta LLC. All rights reserved.
00003  *
00004  * AndroMeta LLC retains all intellectual property and proprietary 
00005  * rights to this software and related documentation and any modifications 
00006  * thereto.  Any use, reproduction, disclosure, or distribution of this 
00007  * software and related documentation without an express license agreement 
00008  * from AndroMeta LLC is strictly prohibited.
00009  * 
00010  */
00011 
00018 #ifndef ANDROMETA_MDL_DOMAIN_H
00019 #define ANDROMETA_MDL_DOMAIN_H
00020 
00021 #include <AndroMeta/MMLEntity.h>
00022 
00023 namespace Meta{
00024 
00029   class MDLDomain : public MMLEntity{
00030   public:
00031     
00032     static const int TimeFormatFull = 0;
00033     static const int TimeFormatYear = 1;
00034     static const int TimeFormatDay = 2;
00035     
00036     MDLDomain();
00037     
00038     MDLDomain(MMLRoot* root);
00039     
00040     MDLDomain(const mvar& v, RestoreOpt opt, MMLRoot* root=0);
00041     
00042     virtual ~MDLDomain();
00043     
00044     virtual void store(mvar& v) const;
00045     
00046     virtual mnode process(mnode n, uint32_t flags=0);
00047     
00048     static MDLDomain* ptr(const mvar& v, bool dynamic=false);
00049     
00050     static mreal mdlTime(const mstr& timeStr, size_t p=3);
00051     
00052     static mstr mdlTimeStr(const mvar& t,
00053                            size_t p=3,
00054                            int format=TimeFormatFull);
00055     
00056     static void mdlTimeComponents(const mvar& t,
00057                                   int64_t& year,
00058                                   int& month,
00059                                   int& day,
00060                                   int& hour,
00061                                   int& min,
00062                                   mreal& sec);
00063     
00064     virtual mvar init();
00065     
00066     virtual mvar end();
00067     
00068     void setDomainsExtended(const mvec& domainsExtended);
00069     
00070     const mvec& getDomainsExtended() const;
00071     
00072     mvar handleEvent(const mvar& evt);
00073 
00074     mnode MDLEval(mnode n);
00075     
00076     mnode MDLMethod(mnode n);
00077     
00078     friend class MDLDomain_;
00079     
00080   private:  
00081     MDLDomain& operator=(const MDLDomain&);
00082     MDLDomain(const MDLDomain&);
00083     
00084     class MDLDomain_* x_;
00085   };
00086   
00087 } // end namespace Meta
00088 
00089 #endif // ANDROMETA_MDL_DOMAIN_H