-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from hsorby/usecase_1i
All review comments have been addressed and tests are passing. Closes #20.
- Loading branch information
Showing
15 changed files
with
338 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
/// @mainpage libCellML | ||
|
||
libCellML Code Documentation | ||
============================ | ||
|
||
This is the documentation for the source code. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
Copyright 2015 University of Auckland | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License.Some license of other | ||
*/ | ||
|
||
#ifndef LIBCELLML_LIBCELLML_ENTITY_H_ | ||
#define LIBCELLML_LIBCELLML_ENTITY_H_ | ||
|
||
#include "libcellml/enumerations.h" | ||
|
||
namespace libcellml { | ||
|
||
/** | ||
* @brief The Entity class. | ||
* Base class for all serialisable libCellML classes. | ||
*/ | ||
class Entity | ||
{ | ||
protected: | ||
/** | ||
* @brief Pure virtual serialise method. | ||
* Pure virtual serialise method for serialising a CellML object to a std::string. | ||
* @param format The format to serialise the object to. | ||
* @return std::string representation of the object. | ||
*/ | ||
virtual std::string serialise(libcellml::CELLML_FORMATS format) const = 0; | ||
|
||
}; | ||
|
||
} | ||
|
||
#endif /* LIBCELLML_LIBCELLML_ENTITY_H_ */ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
Copyright 2015 University of Auckland | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License.Some license of other | ||
*/ | ||
|
||
#ifndef LIBCELLML_LIBCELLML_ENUMERATIONS_H_ | ||
#define LIBCELLML_LIBCELLML_ENUMERATIONS_H_ | ||
|
||
/** @file */ | ||
|
||
namespace libcellml { | ||
|
||
/** | ||
* @brief The CELLML_FORMATS enum. | ||
* Enum describing the formats that are available for | ||
* serialisation. | ||
*/ | ||
enum CELLML_FORMATS | ||
{ | ||
CELLML_FORMAT_XML = 0 /**< XML format for CellML files. */ | ||
}; | ||
|
||
} | ||
|
||
#endif /* LIBCELLML_LIBCELLML_ENUMERATIONS_H_ */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/* | ||
Copyright 2015 University of Auckland | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License.Some license of other | ||
*/ | ||
|
||
#ifndef LIBCELLML_LIBCELLML_MODEL_H_ | ||
#define LIBCELLML_LIBCELLML_MODEL_H_ | ||
|
||
#include <string> | ||
#include <memory> | ||
|
||
#include "libcellml/libcellml_export.h" | ||
#include "libcellml/entity.h" | ||
|
||
//! Everything in libCellML is in this namespace. | ||
namespace libcellml { | ||
|
||
/** | ||
* @brief The Model class. | ||
* The Model class is for representing a CellML Model. | ||
*/ | ||
class LIBCELLML_EXPORT Model: public Entity | ||
{ | ||
public: | ||
/** | ||
* @brief Model Constructor. | ||
* Default Model constructor. | ||
*/ | ||
Model(); | ||
/** | ||
* @brief Model Destructor. | ||
* Default Model destructor. | ||
*/ | ||
~Model(); | ||
|
||
Model(Model&& rhs); /**< move constructor */ | ||
Model& operator=(Model&& rhs); /**< move assignment */ | ||
|
||
/** | ||
* @brief serialise the Model. | ||
* This method serialises the Model to a std:string representation in the | ||
* desired format. | ||
* @sa deserialise | ||
* @param format The format to serialise the Model to. | ||
* @return std::string representation of the Model in the given format. | ||
*/ | ||
std::string serialise(libcellml::CELLML_FORMATS format) const; | ||
|
||
private: | ||
|
||
Model(const Model&) = delete; /**< non-copyable */ | ||
Model& operator=(const Model&) = delete; /**< non-copyable */ | ||
|
||
struct ModelImpl; /**< Forward declaration for pImpl idiom. */ | ||
std::unique_ptr<ModelImpl> mPimpl; /**< Private member to implementation pointer */ | ||
}; | ||
|
||
} | ||
|
||
#endif /* LIBCELLML_LIBCELLML_MODEL_H_ */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
/* | ||
Copyright 2015 University of Auckland | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License.Some license of other | ||
*/ | ||
|
||
#ifndef LIBCELLML_LIBCELLML_MODULE_LIBCELLML_H_ | ||
#define LIBCELLML_LIBCELLML_MODULE_LIBCELLML_H_ | ||
|
||
#include <libcellml/version.h> | ||
#include <libcellml/model.h> | ||
|
||
#endif // LIBCELLML_LIBCELLML_MODULE_LIBCELLML_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.